@kabmo-labs/kabmo 0.42.2 → 0.43.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/client/index.html +1 -1
- package/dist/client/index.js +721 -675
- package/dist/client/static/js/{CsvGrid-g6rek8y9.js → CsvGrid-g67pk2zy.js} +2 -2
- package/dist/client/static/js/{DocxView-41t9ryws.js → DocxView-pyh6p2kb.js} +4 -4
- package/dist/client/static/js/{DrawioView-mfxhfz1h.js → DrawioView-g48r6y2m.js} +2 -2
- package/dist/client/static/js/ImageView-rnzf5tve.js +1 -0
- package/dist/client/static/js/LayoutWrapper-rekrgth6.js +2 -0
- package/dist/client/static/js/Modal-edw446r8.js +59 -0
- package/dist/client/static/js/{PdfView-bek8k888.js → PdfView-6z3cgj37.js} +1 -1
- package/dist/client/static/js/SessionsView-e84tjbcr.js +1 -0
- package/dist/client/static/js/{SheetView-vezssf6b.js → SheetView-64076z1j.js} +13 -13
- package/dist/client/static/js/{SvgPreview-f1qaw73k.js → SvgPreview-dmpgavgd.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-4qn94h52.js → abnfDiagram-O67JEVCF-nfz5z1vw.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-7j23x20s.js +1 -0
- package/dist/client/static/js/{architectureDiagram-NJMV4G6O-tbewzdya.js → architectureDiagram-NJMV4G6O-jra2jyzw.js} +11 -11
- package/dist/client/static/js/{astro-nn7xg0we.js → astro-dpfdhc5e.js} +1 -1
- package/dist/client/static/js/bash-vv2ysp0a.js +1 -0
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-njgnwckz.js → blockDiagram-BEXU5L5S-3szktxam.js} +7 -7
- package/dist/client/static/js/c-8jf64j6h.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-f58pcvbk.js → c4Diagram-YGBWAQC7-xe9vbppt.js} +6 -6
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-52g73vyw.js → classDiagram-v2-NBCMYWYE-egzhj1xn.js} +6 -6
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-ptdnshzh.js → cose-bilkent-JH36ORCC-dfrk1wnr.js} +1 -1
- package/dist/client/static/js/cpp-vh94zee0.js +1 -0
- package/dist/client/static/js/css-p57h1fme.js +1 -0
- package/dist/client/static/js/cynefin-OW5HDTMX-me5xnx6a.js +1 -0
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-qabfdkzr.js → cynefinDiagram-VND7K2PF-xefpcmpg.js} +2 -2
- package/dist/client/static/js/{dagre-6A5THRUB-kyf5jetf.js → dagre-6A5THRUB-vtzjnrt9.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-bxrsjtv9.js → diagram-22UHCM2B-4vvn790v.js} +16 -16
- package/dist/client/static/js/{diagram-3UASUU5V-0f41s00j.js → diagram-3UASUU5V-tmht3bew.js} +1 -1
- package/dist/client/static/js/{diagram-ATOU4E4O-0z1zx9h1.js → diagram-ATOU4E4O-p5wa5ztx.js} +3 -3
- package/dist/client/static/js/{diagram-CDSNMT55-znrmr6bk.js → diagram-CDSNMT55-8myesjfc.js} +5 -5
- package/dist/client/static/js/{diagram-MLGK6HIB-jfe2jhk0.js → diagram-MLGK6HIB-9t3x2d5f.js} +2 -2
- package/dist/client/static/js/{diagram-MPIPVDR6-2kaawmwa.js → diagram-MPIPVDR6-8ahgnmhy.js} +3 -3
- package/dist/client/static/js/{dockerfile-12exatm9.js → dockerfile-x8aa0543.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-s5n37rfp.js → ebnfDiagram-ZINNZB2B-5semw111.js} +1 -1
- package/dist/client/static/js/{elixir-szk51ehr.js → elixir-5ewfhvfh.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-433rd9fp.js → elk-276RUBZZ-jmhs58ww.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-key6ah0b.js → erDiagram-OPXOYQCR-31wvbpdr.js} +8 -8
- package/dist/client/static/js/{erlang-zwy7cqdk.js → erlang-jqqa3ehb.js} +1 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-5zbvjj84.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-36ygrbvm.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-4efkhmca.js → ganttDiagram-FUAMR5RP-c2dycjrf.js} +6 -6
- package/dist/client/static/js/gitGraph-4MIJSDKK-tjhkv71w.js +1 -0
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-ac376y2k.js → gitGraphDiagram-X574FWY7-y4k4pdd8.js} +14 -14
- package/dist/client/static/js/graphql-kesh8gk0.js +1 -0
- package/dist/client/static/js/html-sxpfydga.js +1 -0
- package/dist/client/static/js/{index-e1yz59fa.js → index-0c6vpk89.js} +2 -2
- package/dist/client/static/js/{index-0pabfaac.js → index-0q2qfcjn.js} +1 -1
- package/dist/client/static/js/{index-p0ez6hqd.js → index-181p91hf.js} +1 -1
- package/dist/client/static/js/{index-zs73zwjz.js → index-2b46dzw8.js} +4 -4
- package/dist/client/static/js/{index-02543wk3.js → index-2cbnjc32.js} +2 -2
- package/dist/client/static/js/{index-7a2efrbj.js → index-3588r3wg.js} +2 -2
- package/dist/client/static/js/{index-4cncqz8j.js → index-38v0781h.js} +2 -2
- package/dist/client/static/js/{index-z78bzryw.js → index-48gh56ka.js} +3 -3
- package/dist/client/static/js/{index-0e9nkc0g.js → index-48pb18zj.js} +2 -2
- package/dist/client/static/js/{index-77t0nvt1.js → index-4rv388z7.js} +2 -2
- package/dist/client/static/js/index-52xmdeh2.js +1 -0
- package/dist/client/static/js/{index-5jnvz9hw.js → index-6fpd55cq.js} +2 -2
- package/dist/client/static/js/{index-nh29fkk9.js → index-7dp90ad1.js} +2 -2
- package/dist/client/static/js/{index-yzda8j2d.js → index-8kqepehd.js} +12 -12
- package/dist/client/static/js/{index-raca8tsh.js → index-aar68x31.js} +4 -4
- package/dist/client/static/js/{index-pxtff3ez.js → index-bvjct7sp.js} +2 -2
- package/dist/client/static/js/{index-cz50ha6x.js → index-cgzw43bc.js} +78 -78
- package/dist/client/static/js/{index-50mdqev0.js → index-cje5gg45.js} +1 -1
- package/dist/client/static/js/{index-zndbhb9w.js → index-cjhvtzdd.js} +2 -2
- package/dist/client/static/js/{index-8b3t2y77.js → index-cqnpsw2m.js} +2 -2
- package/dist/client/static/js/{index-r9db1gsf.js → index-dkwhs38j.js} +2 -2
- package/dist/client/static/js/{index-pkes9492.js → index-e7yf273s.js} +2 -2
- package/dist/client/static/js/{index-8kbp24xg.js → index-efra065v.js} +1 -1
- package/dist/client/static/js/index-f77c3ag0.js +479 -0
- package/dist/client/static/js/{index-yjmm73jm.js → index-f7djda1g.js} +2 -2
- package/dist/client/static/js/{index-8k7vjp8b.js → index-fbcg8y95.js} +1 -1
- package/dist/client/static/js/{index-pysqpc5n.js → index-fg965t62.js} +2 -2
- package/dist/client/static/js/{index-qsw5edtk.js → index-fjnkzk12.js} +5 -5
- package/dist/client/static/js/{index-s4gv0rpk.js → index-g3shdymf.js} +1 -1
- package/dist/client/static/js/{index-qx6x4z0y.js → index-gmnmnfm0.js} +2 -2
- package/dist/client/static/js/{index-gp57dx2v.js → index-h5n1btqy.js} +1 -1
- package/dist/client/static/js/{index-r8cc80w5.js → index-jz93j0at.js} +2 -2
- package/dist/client/static/js/{index-dtj73vs1.js → index-kc5znr75.js} +2 -2
- package/dist/client/static/js/index-m1n4v0z7.js +9 -0
- package/dist/client/static/js/{index-1t5ybx9v.js → index-m94f4ngb.js} +3 -3
- package/dist/client/static/js/{index-dfqmwm7j.js → index-m9s9rg5k.js} +2 -2
- package/dist/client/static/js/{index-gsxebrq9.js → index-n9scbxy5.js} +2 -2
- package/dist/client/static/js/{index-zs7sjv6x.js → index-nt7nhchn.js} +1 -1
- package/dist/client/static/js/{index-v3f7we4n.js → index-pt8440xh.js} +22 -22
- package/dist/client/static/js/{index-b42t14wk.js → index-q81rxwh7.js} +35 -35
- package/dist/client/static/js/{index-ktbrmp29.js → index-qhytrsyb.js} +2 -2
- package/dist/client/static/js/index-rn8w29pv.js +2 -0
- package/dist/client/static/js/{index-1y3rzw6b.js → index-s00j9042.js} +1 -1
- package/dist/client/static/js/{index-hga3e13s.js → index-s78n0dtv.js} +2 -2
- package/dist/client/static/js/index-s7rfbydk.js +4 -0
- package/dist/client/static/js/{index-03pyvmcz.js → index-sesghshh.js} +2 -2
- package/dist/client/static/js/{index-ykfd2fyj.js → index-sg6sz3g8.js} +1 -1
- package/dist/client/static/js/index-vcrh95gf.css +1 -0
- package/dist/client/static/js/{index-82vk27q1.js → index-vyw4tbn8.js} +2 -2
- package/dist/client/static/js/{index-dzmar8jr.js → index-w5rw8f7w.js} +1 -1
- package/dist/client/static/js/{index-f33c4paw.js → index-x6v37h3j.js} +1 -1
- package/dist/client/static/js/{index-b0v6gwym.js → index-ycks7gyg.js} +2 -2
- package/dist/client/static/js/{index-hw14rhen.js → index-ynaxep06.js} +2 -2
- package/dist/client/static/js/{index-rab39785.js → index-ys0xpw3q.js} +2 -2
- package/dist/client/static/js/{index-feffxxss.js → index-yvgbr7ek.js} +2 -2
- package/dist/client/static/js/info-A6RAGUB7-m6qz24p8.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-4e7ej63f.js → infoDiagram-VRGFBTTK-z3pqx7w8.js} +1 -1
- package/dist/client/static/js/ini-1x0ad976.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-k3yet1ec.js → ishikawaDiagram-OU5B5YK6-f5v6z8yr.js} +4 -4
- package/dist/client/static/js/java-3944nq02.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-qe352kyd.js → journeyDiagram-ZHPQQLJL-js1yxatk.js} +5 -5
- package/dist/client/static/js/json-g5ggnd94.js +1 -0
- package/dist/client/static/js/jsx-f6p72qpc.js +1 -0
- package/dist/client/static/js/{julia-2eekpjq8.js → julia-0h9krgsd.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-58hag75n.js → kanban-definition-PNTS6WVX-m0a6069c.js} +5 -5
- package/dist/client/static/js/lua-edn2b3wn.js +1 -0
- package/dist/client/static/js/markdown-9dhg1fax.js +1 -0
- package/dist/client/static/js/{mermaid.core-6e89h6vm.js → mermaid.core-6xvbnm63.js} +6 -6
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-ncsam2fm.js → mindmap-definition-NLK3R4M7-a9f9yzc0.js} +4 -4
- package/dist/client/static/js/one-dark-pro-hteqzfb0.js +1 -0
- package/dist/client/static/js/one-light-dapnh0rs.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-ng6wq5xj.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-b5ckc39d.js → pegDiagram-GJSIUBJH-4v4pf1h1.js} +1 -1
- package/dist/client/static/js/{perl-dtn1fccw.js → perl-rptyx23q.js} +1 -1
- package/dist/client/static/js/{php-7av78hch.js → php-sagvq3wz.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-rf6jhxf6.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-s4d47ve8.js → pieDiagram-5QR66LMP-a54yrmfm.js} +3 -3
- package/dist/client/static/js/properties-fcmj08pv.js +1 -0
- package/dist/client/static/js/python-532d8ezm.js +1 -0
- package/dist/client/static/js/{quadrantDiagram-O4NWA36T-zm0ekvjz.js → quadrantDiagram-O4NWA36T-1twhvnp2.js} +6 -6
- package/dist/client/static/js/r-ptmdxs2a.js +1 -0
- package/dist/client/static/js/radar-RG4KPBEZ-ygp6hxq4.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-rxgnrb2g.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-xkv52a2p.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-bvcktbqh.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-9c3v7jsq.js +1 -0
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-52vdqf53.js → railroadDiagram-XR7U4H2S-83tqfdcy.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-7kf8bmk9.js → requirementDiagram-PLB6GJNP-73e3pzw6.js} +4 -4
- package/dist/client/static/js/{ruby-s2bqr910.js → ruby-9qyx7knh.js} +1 -1
- package/dist/client/static/js/{rust-q98kssv3.js → rust-jds4e4r7.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-bcb9f54a.js → sankeyDiagram-IPEJSGJF-1bzwj6sb.js} +6 -6
- package/dist/client/static/js/{sass-bm32bb5k.js → sass-07rteya0.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-76ywvj7g.js → sequenceDiagram-PO4LG4MO-yh3h988k.js} +19 -19
- package/dist/client/static/js/{sizeCapture-INFHLROL-p9bsf5dc.js → sizeCapture-INFHLROL-1n121yp6.js} +1 -1
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-1ecfb3fs.js → stateDiagram-v2-GCMORJYK-0tdrzn06.js} +6 -6
- package/dist/client/static/js/{svelte-ztkaww47.js → svelte-w365cpwa.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-2pyjr946.js → swimlanes-2SLR337P-77n1ttdw.js} +1 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-akjqm31r.js +8 -0
- package/dist/client/static/js/{timeline-definition-EJHVYXUP-4csxwmn2.js → timeline-definition-EJHVYXUP-b6r0k3e8.js} +2 -2
- package/dist/client/static/js/treeView-Q6P3EWNA-fb58a7z1.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-ej4qhksx.js +1 -0
- package/dist/client/static/js/typescript-683kkkaw.js +1 -0
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-0p1jnbsn.js → usecaseDiagram-POWQR4AR-efq58m3m.js} +43 -43
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-y1hgdet4.js → vennDiagram-UO4OBE2U-ad4gvd5r.js} +5 -5
- package/dist/client/static/js/{vue-cbqm4bed.js → vue-d6cesny1.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-mkp0kanv.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-p578yrgm.js → wardleyDiagram-VNRHLVJA-v89tys2p.js} +4 -4
- package/dist/client/static/js/xml-6ct32gys.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-b08b4ah0.js → xychartDiagram-PMCCYNJV-xtgzmknw.js} +5 -5
- package/dist/client/static/js/yaml-1d5m3bfj.js +1 -0
- package/marketplace/plugins/command-runner/package.json +2 -2
- package/marketplace/plugins/command-runner/src/app.test.tsx +161 -0
- package/marketplace/plugins/command-runner/src/app.tsx +37 -3
- package/marketplace/plugins/command-runner/src/panel/Glyph.tsx +22 -4
- package/marketplace/plugins/git-forge/package.json +2 -2
- package/marketplace/plugins/git-forge/src/panel/Glyph.tsx +22 -3
- package/marketplace/plugins/git-forge/src/panel/index.tsx +21 -3
- package/marketplace/plugins/git-forge/src/panel/refresh.test.tsx +192 -0
- package/marketplace/plugins/git-forge/src/panel/use-forge.ts +4 -2
- package/marketplace/plugins/git-forge/src/panel/write.test.tsx +21 -0
- package/marketplace/plugins/stats/package.json +2 -2
- package/marketplace/plugins/stats/src/RefreshButton.tsx +9 -7
- package/marketplace/plugins/stats/src/app.tsx +15 -1
- package/marketplace/plugins/stats/src/refresh.test.tsx +166 -0
- package/package.json +1 -1
- package/src/client/components/common/anchored-menu/index.tsx +26 -8
- package/src/client/components/common/context-usage-button/McpSection.test.tsx +34 -5
- package/src/client/components/common/context-usage-button/McpSection.tsx +25 -3
- package/src/client/components/common/harness-glyph/brands.ts +3 -0
- package/src/client/components/common/harness-glyph/omo.ts +22 -0
- package/src/client/components/common/server-control/Panel.tsx +24 -86
- package/src/client/components/common/server-control/Row.tsx +98 -0
- package/src/client/components/common/server-control/index.test.tsx +69 -9
- package/src/client/components/layout/VisibilityMenu.tsx +18 -6
- package/src/client/components/layout/new-workspace-host/index.test.tsx +84 -0
- package/src/client/components/layout/new-workspace-host/index.tsx +35 -0
- package/src/client/components/mobile/header-titlebar.test.tsx +38 -3
- package/src/client/components/settings/Sidebar.tsx +2 -1
- package/src/client/components/settings/categories/GitSettings.tsx +31 -0
- package/src/client/components/settings/categories/git-settings/CommitMessageSection.tsx +292 -0
- package/src/client/components/settings/categories/git-settings/IdentitySection.tsx +215 -0
- package/src/client/components/settings/category-content.tsx +3 -0
- package/src/client/components/workspace/chat-timeline/MessageItem.tsx +8 -0
- package/src/client/components/workspace/chat-timeline/MessageList.test.ts +55 -2
- package/src/client/components/workspace/chat-timeline/MessageList.tsx +13 -1
- package/src/client/components/workspace/chat-timeline/PendingChatView.tsx +56 -50
- package/src/client/components/workspace/chat-timeline/ThinkingSection.test.tsx +38 -2
- package/src/client/components/workspace/chat-timeline/ThinkingSection.tsx +13 -1
- package/src/client/components/workspace/chat-timeline/target-picker/WorkspacePicker.test.tsx +50 -0
- package/src/client/components/workspace/chat-timeline/target-picker/WorkspacePicker.tsx +20 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/extension-dialog/index.tsx +21 -9
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Bash.tsx +2 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Proc.tsx +1 -4
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/TaskResult.tsx +18 -4
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Wait.tsx +3 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/task-rows.ts +47 -0
- package/src/client/components/workspace/git-panel/CommitBox.test.tsx +98 -0
- package/src/client/components/workspace/git-panel/CommitBox.tsx +68 -3
- package/src/client/components/workspace/git-panel/index.test.ts +12 -0
- package/src/client/components/workspace/git-panel/index.tsx +20 -1
- package/src/client/components/workspace/repo-picker/index.test.tsx +20 -0
- package/src/client/components/workspace/repo-picker/index.tsx +5 -6
- package/src/client/data/settings/omp-schema.json +134 -8
- package/src/client/hooks/chat/context/mcp.ts +19 -1
- package/src/client/hooks/chat/omp/index.ts +2 -6
- package/src/client/hooks/chat/timeline/jump-rail.ts +1 -0
- package/src/client/hooks/chat/timeline/row-window.test.ts +38 -3
- package/src/client/hooks/chat/timeline/row-window.ts +33 -9
- package/src/client/hooks/chat/timeline/scroll-geometry.ts +19 -1
- package/src/client/hooks/chat/timeline/scroll.ts +15 -0
- package/src/client/hooks/chat/timeline/thinking-open.ts +10 -4
- package/src/client/hooks/workspace/commit-box.test.ts +62 -1
- package/src/client/hooks/workspace/commit-box.ts +94 -2
- package/src/client/hooks/workspace/git-panel-data.ts +15 -7
- package/src/client/hooks/workspace/repo-scope/index.test.ts +10 -3
- package/src/client/hooks/workspace/repo-scope/index.ts +21 -9
- package/src/client/lib/plugins/repo-scope-service.ts +7 -25
- package/src/server/lib/changes/capture-client-write.server.ts +45 -0
- package/src/server/lib/changes/capture.server.ts +20 -5
- package/src/server/lib/chat/session-store.server.ts +22 -1
- package/src/server/lib/db/schema.ts +3 -0
- package/src/server/lib/fs/git-commit-context.test.ts +111 -0
- package/src/server/lib/fs/git-commit-context.ts +85 -0
- package/src/server/lib/fs/git-commit-message.server.ts +251 -0
- package/src/server/lib/fs/git-commit-message.test.ts +211 -0
- package/src/server/lib/fs/git-commit-prompt.test.ts +69 -0
- package/src/server/lib/fs/git-commit-prompt.ts +57 -0
- package/src/server/lib/fs/git-commit-settings.server.ts +42 -0
- package/src/server/lib/fs/git-identity.server.test.ts +129 -0
- package/src/server/lib/fs/git-identity.server.ts +130 -0
- package/src/server/lib/harness/acp/acp-audit.server.ts +13 -62
- package/src/server/lib/harness/acp/acp-frames.server.test.ts +105 -0
- package/src/server/lib/harness/acp/acp-frames.server.ts +217 -0
- package/src/server/lib/harness/acp/acp-raw-messages.server.test.ts +69 -0
- package/src/server/lib/harness/acp/acp-raw-messages.server.ts +129 -0
- package/src/server/lib/harness/acp/acp-telemetry.server.ts +19 -0
- package/src/server/lib/harness/acp/auth.test.ts +69 -0
- package/src/server/lib/harness/acp/auth.ts +71 -0
- package/src/server/lib/harness/acp/background-replay.test.ts +139 -0
- package/src/server/lib/harness/acp/background-replay.ts +87 -0
- package/src/server/lib/harness/acp/background-work.ts +50 -33
- package/src/server/lib/harness/acp/calls.test.ts +68 -0
- package/src/server/lib/harness/acp/calls.ts +13 -0
- package/src/server/lib/harness/acp/client-capabilities.ts +5 -2
- package/src/server/lib/harness/acp/client-fs.test.ts +13 -0
- package/src/server/lib/harness/acp/client-fs.ts +16 -2
- package/src/server/lib/harness/acp/client.ts +22 -23
- package/src/server/lib/harness/acp/commands.test.ts +19 -0
- package/src/server/lib/harness/acp/commands.ts +26 -8
- package/src/server/lib/harness/acp/frames.ts +16 -1
- package/src/server/lib/harness/acp/grants.server.ts +75 -0
- package/src/server/lib/harness/acp/grants.test.ts +65 -0
- package/src/server/lib/harness/acp/grants.ts +79 -0
- package/src/server/lib/harness/acp/one-shot.server.ts +141 -0
- package/src/server/lib/harness/acp/permissions.test.ts +9 -0
- package/src/server/lib/harness/acp/permissions.ts +56 -36
- package/src/server/lib/harness/acp/prompt-files.test.ts +69 -0
- package/src/server/lib/harness/acp/prompt-files.ts +58 -0
- package/src/server/lib/harness/acp/prompt.ts +50 -11
- package/src/server/lib/harness/acp/protocol.ts +20 -1
- package/src/server/lib/harness/acp/raw-listeners.ts +30 -0
- package/src/server/lib/harness/acp/session-approvals.ts +45 -0
- package/src/server/lib/harness/acp/session-config-view.ts +81 -0
- package/src/server/lib/harness/acp/session-config.ts +48 -9
- package/src/server/lib/harness/acp/session-handshake.test.ts +71 -2
- package/src/server/lib/harness/acp/session-handshake.ts +139 -56
- package/src/server/lib/harness/acp/session-intake.test.ts +93 -0
- package/src/server/lib/harness/acp/session-intake.ts +75 -0
- package/src/server/lib/harness/acp/session-lifecycle.ts +50 -0
- package/src/server/lib/harness/acp/session-lost.test.ts +44 -0
- package/src/server/lib/harness/acp/session-lost.ts +34 -0
- package/src/server/lib/harness/acp/session-notify.ts +47 -0
- package/src/server/lib/harness/acp/session-observers.test.ts +4 -4
- package/src/server/lib/harness/acp/session-permissions.test.ts +64 -0
- package/src/server/lib/harness/acp/session-permissions.ts +9 -4
- package/src/server/lib/harness/acp/session-requests.ts +6 -0
- package/src/server/lib/harness/acp/session-roots.server.ts +47 -0
- package/src/server/lib/harness/acp/session-roots.test.ts +31 -0
- package/src/server/lib/harness/acp/session-start.ts +7 -0
- package/src/server/lib/harness/acp/session-turns.ts +11 -0
- package/src/server/lib/harness/acp/session-wiring.ts +100 -0
- package/src/server/lib/harness/acp/session.test-util.ts +36 -2
- package/src/server/lib/harness/acp/session.test.ts +10 -10
- package/src/server/lib/harness/acp/session.ts +149 -139
- package/src/server/lib/harness/acp/tool-calls.ts +27 -15
- package/src/server/lib/harness/acp/tool-identity.test.ts +136 -0
- package/src/server/lib/harness/acp/tool-identity.ts +121 -0
- package/src/server/lib/harness/acp/turn-cancel.test.ts +79 -0
- package/src/server/lib/harness/acp/turn-cancel.ts +61 -0
- package/src/server/lib/harness/acp/turn-dispatch.test.ts +103 -0
- package/src/server/lib/harness/acp/turn-dispatch.ts +61 -0
- package/src/server/lib/harness/acp/turn-queue.ts +43 -0
- package/src/server/lib/harness/acp/turn-verdict.ts +102 -0
- package/src/server/lib/harness/acp/turn.ts +86 -88
- package/src/server/lib/harness/acp/v2.test.ts +9 -0
- package/src/server/lib/harness/acp/v2.ts +13 -0
- package/src/server/lib/harness/acp/verbs.ts +35 -4
- package/src/server/lib/harness/capabilities.ts +11 -0
- package/src/server/lib/harness/launch-table.ts +19 -0
- package/src/server/lib/harness/launch.ts +4 -0
- package/src/server/lib/harness/schema.server.ts +23 -0
- package/src/server/lib/harness/spawn.server.ts +18 -2
- package/src/server/lib/mcp/agent-config.server.test.ts +111 -0
- package/src/server/lib/mcp/agent-config.server.ts +205 -0
- package/src/server/lib/mcp/probe.server.ts +7 -1
- package/src/server/lib/mcp/registry.server.ts +4 -3
- package/src/server/lib/mcp/secrets.server.test.ts +85 -0
- package/src/server/lib/mcp/secrets.server.ts +108 -0
- package/src/server/lib/omp/core/print.server.ts +100 -0
- package/src/server/lib/omp/rpc/frame-fold.ts +4 -0
- package/src/server/lib/omp/session/artifacts.server.test.ts +15 -5
- package/src/server/lib/omp/session/artifacts.server.ts +41 -26
- package/src/server/lib/omp/session/delete.server.ts +5 -0
- package/src/server/lib/omp/session/goal-auditor.server.ts +10 -48
- package/src/server/lib/realtime/topics/session-data.server.ts +6 -14
- package/src/server/routes/fs/git-message.test.ts +101 -0
- package/src/server/routes/fs/git-message.ts +60 -0
- package/src/server/routes/fs/index.ts +2 -0
- package/src/server/routes/omp/artifact.ts +4 -3
- package/src/server/routes/sessions/mcp.test.ts +65 -1
- package/src/server/routes/sessions/mcp.ts +77 -5
- package/src/server/routes/settings/git-identity.test.ts +77 -0
- package/src/server/routes/settings/git-identity.ts +47 -0
- package/src/server/routes/settings/index.ts +2 -0
- package/src/server/routes/telemetry/acp-telemetry.test.ts +149 -0
- package/src/server/routes/telemetry/context.ts +31 -0
- package/src/server/routes/telemetry/raw-messages.ts +34 -0
- package/src/shared/lib/chat/tool/artifact.test.ts +4 -2
- package/src/shared/lib/chat/tool/artifact.ts +6 -1
- package/src/shared/lib/chat/tool/proc-facts.ts +2 -1
- package/src/shared/lib/fs/paths.test.ts +2 -0
- package/src/shared/lib/fs/repo-label.test.ts +22 -1
- package/src/shared/lib/fs/repo-label.ts +29 -0
- package/src/shared/lib/git/commit-prompt.test.ts +47 -0
- package/src/shared/lib/git/commit-prompt.ts +72 -0
- package/src/shared/lib/git/identity.test.ts +46 -0
- package/src/shared/lib/git/identity.ts +70 -0
- package/src/shared/lib/harness/brand-color.ts +3 -0
- package/src/shared/lib/harness/catalog.test.ts +14 -0
- package/src/shared/lib/harness/catalog.ts +9 -1
- package/src/shared/lib/harness/mcp-facts.ts +4 -0
- package/src/shared/lib/harness/provider-facts.test.ts +11 -0
- package/src/shared/lib/harness/provider-facts.ts +14 -0
- package/src/shared/lib/harness/providers.ts +2 -2
- package/src/shared/lib/harness/updates.test.ts +8 -0
- package/src/shared/lib/harness/updates.ts +9 -0
- package/src/shared/lib/omp/session/proc-daemon.ts +124 -0
- package/src/shared/lib/omp/session/proc.test.ts +30 -3
- package/src/shared/lib/omp/session/proc.ts +6 -82
- package/src/shared/lib/omp/session/wait-idle.test.ts +15 -4
- package/src/shared/lib/omp/session/wait-idle.ts +11 -4
- package/src/shared/lib/settings/defaults.ts +5 -0
- package/src/shared/lib/workspace/new-workspace.ts +20 -0
- package/src/shared/types/omp/agent.ts +14 -5
- package/src/shared/types/settings/mcp.ts +2 -2
- package/src/shared/types/settings/state.ts +16 -0
- package/src/test-support/preload.ts +1 -0
- package/dist/client/static/js/ImageView-bxqw3t4k.js +0 -1
- package/dist/client/static/js/LayoutWrapper-zt14rv9m.js +0 -2
- package/dist/client/static/js/Modal-cm35g20x.js +0 -38
- package/dist/client/static/js/SessionsView-gn53zyn7.js +0 -1
- package/dist/client/static/js/architecture-7GRP2DOG-cagtcfhk.js +0 -1
- package/dist/client/static/js/bash-fjzhxy10.js +0 -1
- package/dist/client/static/js/c-wqtyezvw.js +0 -1
- package/dist/client/static/js/cpp-y0nzwner.js +0 -1
- package/dist/client/static/js/css-n2waj098.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-6g2ydrss.js +0 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-b774qbn2.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-nznq0n36.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-b047d6vk.js +0 -1
- package/dist/client/static/js/graphql-gvb7e2eb.js +0 -1
- package/dist/client/static/js/html-tbz83eke.js +0 -1
- package/dist/client/static/js/index-0gbj4270.js +0 -2
- package/dist/client/static/js/index-38xv8h4t.js +0 -1
- package/dist/client/static/js/index-f4vr1c6e.css +0 -1
- package/dist/client/static/js/index-fb6pw9xb.js +0 -2
- package/dist/client/static/js/index-pzvr1699.js +0 -478
- package/dist/client/static/js/index-rf29f3fq.js +0 -9
- package/dist/client/static/js/index-zw621xez.js +0 -4
- package/dist/client/static/js/info-A6RAGUB7-n495k952.js +0 -1
- package/dist/client/static/js/ini-2gvjwh83.js +0 -1
- package/dist/client/static/js/java-1xwcq79s.js +0 -1
- package/dist/client/static/js/json-4pqjabgq.js +0 -1
- package/dist/client/static/js/jsx-wcsss15s.js +0 -1
- package/dist/client/static/js/lua-h7vjcn0h.js +0 -1
- package/dist/client/static/js/markdown-f30jjjh9.js +0 -1
- package/dist/client/static/js/one-dark-pro-qmyne0tn.js +0 -1
- package/dist/client/static/js/one-light-dj0ecjcj.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-zajj62z6.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-1ve78y5f.js +0 -1
- package/dist/client/static/js/properties-ymexza6q.js +0 -1
- package/dist/client/static/js/python-31ycwa66.js +0 -1
- package/dist/client/static/js/r-t2nne4xp.js +0 -1
- package/dist/client/static/js/radar-RG4KPBEZ-8rqadb58.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-v6ppm8dy.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-9j6bae14.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-56cpyt0g.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-yfdmspf4.js +0 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-qr5hdxm4.js +0 -8
- package/dist/client/static/js/treeView-Q6P3EWNA-vwpg3wp8.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-htfxwd32.js +0 -1
- package/dist/client/static/js/typescript-p3syh43m.js +0 -1
- package/dist/client/static/js/wardley-WFR3VGLG-hapfjkzq.js +0 -1
- package/dist/client/static/js/xml-4enq788a.js +0 -1
- package/dist/client/static/js/yaml-pjtt3jsc.js +0 -1
|
@@ -81,9 +81,25 @@ function setShellCall(call: (method: string, params?: Record<string, unknown>) =
|
|
|
81
81
|
shellWindow.__kabmoCall = call;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
+
/**
|
|
85
|
+
* Drop the mounted tree through PREACT, never by detaching its container.
|
|
86
|
+
*
|
|
87
|
+
* `mount()` cleared `document.body.innerHTML` before each render, which left the
|
|
88
|
+
* previous tree MOUNTED and subscribed — its shell poll kept running — so a
|
|
89
|
+
* later re-render landed after `afterEach` had restored the runner's globals:
|
|
90
|
+
* `ReferenceError: document is not defined` from preact's portal teardown,
|
|
91
|
+
* reported against whichever file ran next. Measured on the Windows gate of
|
|
92
|
+
* release run 44514562224.
|
|
93
|
+
*/
|
|
94
|
+
function resetDom() {
|
|
95
|
+
if (!container) return;
|
|
96
|
+
act(() => render(null, container as never));
|
|
97
|
+
win.document.body.innerHTML = '';
|
|
98
|
+
}
|
|
99
|
+
|
|
84
100
|
function mount(next: ShellServersState | Error, variant: 'nav' | 'chip' = 'nav', open = true) {
|
|
85
101
|
calls = [];
|
|
86
|
-
|
|
102
|
+
resetDom();
|
|
87
103
|
container = win.document.createElement('div') as unknown as HTMLElement;
|
|
88
104
|
win.document.body.appendChild(container as never);
|
|
89
105
|
setShellCall(async (method, params) => {
|
|
@@ -123,21 +139,21 @@ beforeEach(() => {
|
|
|
123
139
|
});
|
|
124
140
|
|
|
125
141
|
afterEach(() => {
|
|
126
|
-
|
|
142
|
+
resetDom();
|
|
127
143
|
restoreDomGlobals();
|
|
128
144
|
});
|
|
129
145
|
|
|
130
146
|
describe('ServerControl', () => {
|
|
131
147
|
test('a browser renders nothing, because there is no shell to control', async () => {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
win.document.body.appendChild(
|
|
148
|
+
resetDom();
|
|
149
|
+
container = win.document.createElement('div') as unknown as HTMLElement;
|
|
150
|
+
win.document.body.appendChild(container as never);
|
|
135
151
|
act(() => {
|
|
136
|
-
render(h(ServerControl, { variant: 'chip' }),
|
|
152
|
+
render(h(ServerControl, { variant: 'chip' }), container as never);
|
|
137
153
|
});
|
|
138
154
|
await settle();
|
|
139
|
-
expect((
|
|
140
|
-
expect(
|
|
155
|
+
expect((container.textContent ?? '').trim()).toBe('');
|
|
156
|
+
expect(container.querySelector('button')).toBeNull();
|
|
141
157
|
});
|
|
142
158
|
|
|
143
159
|
test('lists the stored servers, the detected ones, and marks the active row', async () => {
|
|
@@ -178,6 +194,50 @@ describe('ServerControl', () => {
|
|
|
178
194
|
expect(stops.map((button) => button.getAttribute('aria-label'))).toEqual(['Stop Local :3001']);
|
|
179
195
|
});
|
|
180
196
|
|
|
197
|
+
/**
|
|
198
|
+
* A server this shell spawned that has since died has no Stop (nothing to
|
|
199
|
+
* stop) — and Remove used to be gated on `!owned`, so the row had NO action at
|
|
200
|
+
* all and could not be cleared without reloading the page.
|
|
201
|
+
*/
|
|
202
|
+
test('a dead server this shell spawned can still be removed', async () => {
|
|
203
|
+
mount(state({
|
|
204
|
+
entries: [
|
|
205
|
+
{ id: 'local:3000', label: 'Local :3000', url: 'http://127.0.0.1:3000', kind: 'managed', port: 3000, running: false, owned: true, source: 'stored' },
|
|
206
|
+
],
|
|
207
|
+
}));
|
|
208
|
+
await settle();
|
|
209
|
+
expect(text()).toContain('Stopped');
|
|
210
|
+
expect(win.document.querySelector('[aria-label="Stop Local :3000"]')).toBeNull();
|
|
211
|
+
const remove = win.document.querySelector('[aria-label="Remove Local :3000"]');
|
|
212
|
+
expect(remove).not.toBeNull();
|
|
213
|
+
act(() => {
|
|
214
|
+
(remove as unknown as HTMLButtonElement).click();
|
|
215
|
+
});
|
|
216
|
+
await settle();
|
|
217
|
+
expect(calls.some((call) => call.command === 'servers_remove')).toBe(true);
|
|
218
|
+
});
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* The shell owns ONE local server. The store refuses a second, so the panel
|
|
222
|
+
* must not offer one; the note replaces the button while a server it started
|
|
223
|
+
* is running.
|
|
224
|
+
*/
|
|
225
|
+
test('Start is replaced by the running server, one at a time', async () => {
|
|
226
|
+
mount(DESKTOP);
|
|
227
|
+
await settle();
|
|
228
|
+
expect(text()).not.toContain('Start a local server');
|
|
229
|
+
expect(text()).toContain('Local :3001 is running');
|
|
230
|
+
|
|
231
|
+
// A recorded server that died does not block: starting again is the restart.
|
|
232
|
+
mount(state({
|
|
233
|
+
entries: [
|
|
234
|
+
{ id: 'local:3001', label: 'Local :3001', url: 'http://127.0.0.1:3001', kind: 'managed', port: 3001, running: false, owned: true, source: 'stored' },
|
|
235
|
+
],
|
|
236
|
+
}));
|
|
237
|
+
await settle();
|
|
238
|
+
expect(text()).toContain('Start a local server');
|
|
239
|
+
});
|
|
240
|
+
|
|
181
241
|
test('a phone is offered no Start, and no local discovery', async () => {
|
|
182
242
|
mount(PHONE, 'chip');
|
|
183
243
|
await settle();
|
|
@@ -195,7 +255,7 @@ describe('ServerControl', () => {
|
|
|
195
255
|
*/
|
|
196
256
|
test('the drawer header carries the chip, but only inside a shell', async () => {
|
|
197
257
|
const mountHeader = () => {
|
|
198
|
-
|
|
258
|
+
resetDom();
|
|
199
259
|
container = win.document.createElement('div') as unknown as HTMLElement;
|
|
200
260
|
win.document.body.appendChild(container as never);
|
|
201
261
|
act(() => {
|
|
@@ -61,27 +61,39 @@ export function VisibilityMenu({
|
|
|
61
61
|
|
|
62
62
|
useLayoutEffect(() => {
|
|
63
63
|
const el = menuRef.current;
|
|
64
|
-
|
|
64
|
+
const view = el?.ownerDocument.defaultView;
|
|
65
|
+
if (!el || !view) return;
|
|
65
66
|
const { width, height } = el.getBoundingClientRect();
|
|
66
67
|
const margin = 8;
|
|
67
68
|
const below = anchor.bottom + 4;
|
|
68
|
-
const top = below + height + margin <=
|
|
69
|
+
const top = below + height + margin <= view.innerHeight ? below : Math.max(margin, anchor.top - height - 4);
|
|
69
70
|
// A rail is on the RIGHT edge, so its menu opens to its left; the navbar
|
|
70
71
|
// spans the window, so its menu is right-aligned to the header's edge.
|
|
71
72
|
const desiredLeft = align === 'left' ? anchor.left - width - 4 : anchor.right - width - 4;
|
|
72
|
-
setPos({ top, left: Math.max(margin, Math.min(desiredLeft,
|
|
73
|
+
setPos({ top, left: Math.max(margin, Math.min(desiredLeft, view.innerWidth - width - margin)) });
|
|
73
74
|
}, [anchor, align]);
|
|
74
75
|
|
|
76
|
+
// Registered on the menu's OWN document rather than the global: this panel is
|
|
77
|
+
// portalled, so its document is the one it paints into, and the global can be
|
|
78
|
+
// absent by the time a deferred cleanup runs (measured under `bun test`:
|
|
79
|
+
// `ReferenceError: document is not defined` from this effect, reported against
|
|
80
|
+
// a later file).
|
|
75
81
|
useEffect(() => {
|
|
82
|
+
const doc = menuRef.current?.ownerDocument;
|
|
83
|
+
if (!doc) return;
|
|
76
84
|
const onKeyDown = (event: globalThis.KeyboardEvent) => {
|
|
77
85
|
if (event.key !== 'Escape') return;
|
|
78
86
|
event.preventDefault();
|
|
79
87
|
onClose();
|
|
80
88
|
};
|
|
81
|
-
|
|
82
|
-
return () =>
|
|
89
|
+
doc.addEventListener('keydown', onKeyDown);
|
|
90
|
+
return () => doc.removeEventListener('keydown', onKeyDown);
|
|
83
91
|
}, [onClose]);
|
|
84
92
|
|
|
93
|
+
// Nothing to portal into means nothing to draw; see `AnchoredMenu`.
|
|
94
|
+
const host = typeof document === 'undefined' ? null : document.body;
|
|
95
|
+
if (!host) return null;
|
|
96
|
+
|
|
85
97
|
return createPortal(
|
|
86
98
|
<div className="fixed inset-0 z-[70]" onClick={onClose} onContextMenu={(e) => { e.preventDefault(); onClose(); }}>
|
|
87
99
|
<div
|
|
@@ -128,6 +140,6 @@ export function VisibilityMenu({
|
|
|
128
140
|
})}
|
|
129
141
|
</div>
|
|
130
142
|
</div>,
|
|
131
|
-
|
|
143
|
+
host,
|
|
132
144
|
);
|
|
133
145
|
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The host that answers the composer's "Add new workspace" request.
|
|
8
|
+
*
|
|
9
|
+
* The picker only dispatches `omp:new-workspace`; this is the other half, and
|
|
10
|
+
* the case a reader would otherwise find only in a browser: the dialog is
|
|
11
|
+
* absent until the event arrives, and Cancel closes it.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import { afterAll, afterEach, beforeAll, describe, expect, test } from 'bun:test';
|
|
15
|
+
import { Window } from 'happy-dom';
|
|
16
|
+
import { h, render } from 'preact';
|
|
17
|
+
import { act } from 'preact/test-utils';
|
|
18
|
+
import { installDomGlobals, restoreDomGlobals } from '@/test-support/pristine-globals';
|
|
19
|
+
import { NewWorkspaceHost } from '@/client/components/layout/new-workspace-host';
|
|
20
|
+
import { NEW_WORKSPACE_EVENT } from '@/shared/lib/workspace/new-workspace';
|
|
21
|
+
|
|
22
|
+
const nativeFetch = globalThis.fetch;
|
|
23
|
+
const mounted: HTMLElement[] = [];
|
|
24
|
+
|
|
25
|
+
beforeAll(() => {
|
|
26
|
+
installDomGlobals(new Window({ url: 'http://localhost' }));
|
|
27
|
+
// The dialog lists a directory on mount; the listing is not what this test
|
|
28
|
+
// is about, so it answers with an empty one.
|
|
29
|
+
globalThis.fetch = (async () => new Response(JSON.stringify({
|
|
30
|
+
path: '/tmp',
|
|
31
|
+
parentPath: '/',
|
|
32
|
+
directories: [],
|
|
33
|
+
}), { headers: { 'Content-Type': 'application/json' } })) as unknown as typeof fetch;
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
afterEach(() => {
|
|
37
|
+
for (const host of mounted.splice(0)) {
|
|
38
|
+
render(null, host);
|
|
39
|
+
host.remove();
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
afterAll(() => {
|
|
44
|
+
globalThis.fetch = nativeFetch;
|
|
45
|
+
restoreDomGlobals();
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
async function mount(node: h.JSX.Element): Promise<HTMLElement> {
|
|
49
|
+
const host = document.createElement('div');
|
|
50
|
+
document.body.appendChild(host);
|
|
51
|
+
await act(async () => {
|
|
52
|
+
render(node, host);
|
|
53
|
+
});
|
|
54
|
+
mounted.push(host);
|
|
55
|
+
return host;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
describe('NewWorkspaceHost', () => {
|
|
59
|
+
test('the dialog is closed until the picker asks for it', async () => {
|
|
60
|
+
const host = await mount(h(NewWorkspaceHost, {}));
|
|
61
|
+
expect(host.textContent).not.toContain('New Workspace');
|
|
62
|
+
|
|
63
|
+
await act(async () => {
|
|
64
|
+
window.dispatchEvent(new CustomEvent(NEW_WORKSPACE_EVENT));
|
|
65
|
+
});
|
|
66
|
+
expect(host.textContent).toContain('New Workspace');
|
|
67
|
+
expect(host.textContent).toContain('Create Workspace');
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
test('Cancel closes the dialog', async () => {
|
|
71
|
+
const host = await mount(h(NewWorkspaceHost, {}));
|
|
72
|
+
await act(async () => {
|
|
73
|
+
window.dispatchEvent(new CustomEvent(NEW_WORKSPACE_EVENT));
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
const cancel = [...host.querySelectorAll('button')]
|
|
77
|
+
.find((button) => button.textContent?.trim() === 'Cancel') as HTMLButtonElement | undefined;
|
|
78
|
+
expect(cancel).toBeDefined();
|
|
79
|
+
await act(async () => {
|
|
80
|
+
cancel?.click();
|
|
81
|
+
});
|
|
82
|
+
expect(host.textContent).not.toContain('Create Workspace');
|
|
83
|
+
});
|
|
84
|
+
});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The New Workspace dialog, mounted by the chat that offers it.
|
|
8
|
+
*
|
|
9
|
+
* The composer's workspace picker has an "Add new workspace" row, and the
|
|
10
|
+
* dialog cannot live in either sidebar: the desktop dock unmounts the session
|
|
11
|
+
* list while it shows a plugin panel, and the phone's drawer is a screen the
|
|
12
|
+
* chat can be shown without. So the picker ASKS over `omp:new-workspace` and
|
|
13
|
+
* this host answers, for as long as the pending chat (the only view with that
|
|
14
|
+
* picker) is on screen.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { useState } from 'preact/hooks';
|
|
18
|
+
import { NewWorkspaceModal } from '@/client/components/layout/session-sidebar/Modals';
|
|
19
|
+
import { createWorkspaceFolder, cloneWorkspaceFolder } from '@/client/hooks/workspace/new-workspace';
|
|
20
|
+
import { NEW_WORKSPACE_EVENT } from '@/shared/lib/workspace/new-workspace';
|
|
21
|
+
import { useKabmoEvent } from '@/client/hooks/ui/window-event';
|
|
22
|
+
|
|
23
|
+
export function NewWorkspaceHost() {
|
|
24
|
+
const [open, setOpen] = useState(false);
|
|
25
|
+
useKabmoEvent(NEW_WORKSPACE_EVENT, () => setOpen(true));
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<NewWorkspaceModal
|
|
29
|
+
isOpen={open}
|
|
30
|
+
onClose={() => setOpen(false)}
|
|
31
|
+
onCreate={createWorkspaceFolder}
|
|
32
|
+
onClone={cloneWorkspaceFolder}
|
|
33
|
+
/>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
@@ -45,6 +45,19 @@ const DOM_GLOBALS = [
|
|
|
45
45
|
] as const;
|
|
46
46
|
const nativeGlobals: Partial<Record<(typeof DOM_GLOBALS)[number], unknown>> = {};
|
|
47
47
|
|
|
48
|
+
/**
|
|
49
|
+
* The session-state read, answered instead of attempted.
|
|
50
|
+
*
|
|
51
|
+
* The provider reads `/api/sessions/<id>/state` on mount, and this window's
|
|
52
|
+
* relative URL is invalid outside a page, so the read REJECTS. The rejection's
|
|
53
|
+
* continuation then lands after the case ended and re-renders the provider,
|
|
54
|
+
* which diffs away the header it had already dropped — and the header's menus
|
|
55
|
+
* clean up by touching `document`, which `afterAll` has removed by then. The
|
|
56
|
+
* subject here is the headers' markup, never the store, so the read answers an
|
|
57
|
+
* empty blob and nothing is left in flight.
|
|
58
|
+
*/
|
|
59
|
+
const realFetch = globalThis.fetch;
|
|
60
|
+
|
|
48
61
|
let win: Window;
|
|
49
62
|
let container: HTMLElement;
|
|
50
63
|
|
|
@@ -55,6 +68,8 @@ type Shell = {
|
|
|
55
68
|
};
|
|
56
69
|
|
|
57
70
|
beforeAll(() => {
|
|
71
|
+
globalThis.fetch = (async () =>
|
|
72
|
+
new Response(JSON.stringify({ state: {} }), { status: 200 })) as unknown as typeof fetch;
|
|
58
73
|
win = new Window({ url: 'http://localhost' });
|
|
59
74
|
const target = globalThis as unknown as Record<string, unknown>;
|
|
60
75
|
for (const key of DOM_GLOBALS) {
|
|
@@ -63,7 +78,19 @@ beforeAll(() => {
|
|
|
63
78
|
}
|
|
64
79
|
});
|
|
65
80
|
|
|
66
|
-
afterAll(() => {
|
|
81
|
+
afterAll(async () => {
|
|
82
|
+
// Flush anything still queued (a provider's continuation, a deferred commit)
|
|
83
|
+
// while `document` is installed. Preact schedules its effect/commit work
|
|
84
|
+
// through `requestAnimationFrame` with a 35 ms `setTimeout` fallback, and
|
|
85
|
+
// `requestAnimationFrame` is absent in this suite, so the fallback is what
|
|
86
|
+
// runs — a zero-delay drain misses it, and on Windows the callback then fires
|
|
87
|
+
// after the next file's compilation, i.e. after this `afterAll` removed the
|
|
88
|
+
// globals: `ReferenceError: document is not defined` from `preact.render`'s
|
|
89
|
+
// portal teardown, reported against the file that happens to run next.
|
|
90
|
+
await act(async () => {
|
|
91
|
+
await Bun.sleep(60);
|
|
92
|
+
});
|
|
93
|
+
globalThis.fetch = realFetch;
|
|
67
94
|
const target = globalThis as unknown as Record<string, unknown>;
|
|
68
95
|
for (const key of DOM_GLOBALS) {
|
|
69
96
|
const value = nativeGlobals[key];
|
|
@@ -81,9 +108,17 @@ beforeEach(() => {
|
|
|
81
108
|
document.body.appendChild(container);
|
|
82
109
|
});
|
|
83
110
|
|
|
84
|
-
afterEach(() => {
|
|
111
|
+
afterEach(async () => {
|
|
85
112
|
if (container) {
|
|
86
|
-
|
|
113
|
+
// Unmount INSIDE `act`, so every cleanup (the menus' keydown listener,
|
|
114
|
+
// above all) has run before the next step. A bare `render(null)` leaves
|
|
115
|
+
// Preact's debounced cleanup queued, and it then runs after `afterAll`
|
|
116
|
+
// restored the globals — measured on Windows as
|
|
117
|
+
// `ReferenceError: document is not defined` in anchored-menu, reported
|
|
118
|
+
// against this file.
|
|
119
|
+
await act(() => {
|
|
120
|
+
render(null, container);
|
|
121
|
+
});
|
|
87
122
|
container.remove();
|
|
88
123
|
}
|
|
89
124
|
restoreRealtime();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LucideIcon } from 'lucide-preact';
|
|
2
|
-
import { BarChart3, Bell, BookOpen, Bot, Boxes, Cloud, Coins, Cpu, FolderGit, Keyboard, Library, MessageSquare, Palette, Plug, Power, Puzzle, Radio, RefreshCw, Search, Sliders, Terminal, Waypoints, X } from 'lucide-preact';
|
|
2
|
+
import { BarChart3, Bell, BookOpen, Bot, Boxes, Cloud, Coins, Cpu, FolderGit, GitBranch, Keyboard, Library, MessageSquare, Palette, Plug, Power, Puzzle, Radio, RefreshCw, Search, Sliders, Terminal, Waypoints, X } from 'lucide-preact';
|
|
3
3
|
import { HarnessGlyph } from '@/client/components/common/harness-glyph';
|
|
4
4
|
import type { SettingsCategoryId } from '@/shared/types';
|
|
5
5
|
import { SETTINGS_SECTIONS, type SettingsSection } from '@/shared/lib/settings/sections';
|
|
@@ -32,6 +32,7 @@ export const SETTINGS_CATEGORIES: CategoryDef[] = [
|
|
|
32
32
|
{ id: 'connect', label: 'Connect', icon: Radio, section: 'CONNECT', description: 'Tunnels, addresses, and the devices paired to this server.' },
|
|
33
33
|
// WORKSPACE
|
|
34
34
|
{ id: 'projects', label: 'Projects', icon: FolderGit, section: 'WORKSPACE', description: 'Workspace directories, roots, and ignored paths.' },
|
|
35
|
+
{ id: 'git', label: 'Git', icon: GitBranch, section: 'WORKSPACE', description: 'Commit message generation, the agent that writes it, and the prompt template.' },
|
|
35
36
|
// OMP
|
|
36
37
|
{ id: 'omp', label: 'OMP Engine', icon: Cpu, section: 'OMP', description: 'Live agent state and native omp config keys.' },
|
|
37
38
|
{ id: 'providers', label: 'Providers', icon: Cloud, section: 'OMP', description: 'AI model engines, endpoints, and credentials.' },
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Settings → Git.
|
|
8
|
+
*
|
|
9
|
+
* The Source Control panel's own preferences. Today that is commit-message
|
|
10
|
+
* generation: which agent writes it, which model, and the prompt template. The
|
|
11
|
+
* category lives under WORKSPACE because the panel is a workspace surface, not
|
|
12
|
+
* a chat preference — the same reason Projects is there.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import type { SettingsState } from '@/shared/types';
|
|
16
|
+
import { IdentitySection } from '@/client/components/settings/categories/git-settings/IdentitySection';
|
|
17
|
+
import { CommitMessageSection } from '@/client/components/settings/categories/git-settings/CommitMessageSection';
|
|
18
|
+
|
|
19
|
+
interface GitSettingsProps {
|
|
20
|
+
settings: SettingsState;
|
|
21
|
+
onUpdate: (updater: Partial<SettingsState> | ((prev: SettingsState) => SettingsState)) => void;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function GitSettings({ settings, onUpdate }: GitSettingsProps) {
|
|
25
|
+
return (
|
|
26
|
+
<div className="w-full space-y-6 text-xs text-ink">
|
|
27
|
+
<IdentitySection settings={settings} onUpdate={onUpdate} />
|
|
28
|
+
<CommitMessageSection settings={settings} onUpdate={onUpdate} />
|
|
29
|
+
</div>
|
|
30
|
+
);
|
|
31
|
+
}
|