@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
|
@@ -58,6 +58,15 @@ import { mountScopeWatch, stopOtherScopes } from './watch';
|
|
|
58
58
|
import { RPC, type CommandListing, type RunLog, type RunnerState } from './protocol';
|
|
59
59
|
import { useCustomDialog } from './panel/use-custom-dialog';
|
|
60
60
|
|
|
61
|
+
/**
|
|
62
|
+
* The empty per-command flag map.
|
|
63
|
+
*
|
|
64
|
+
* ONE object for both session slots (they are read-only fallbacks, never
|
|
65
|
+
* mutated), because `useSessionState` keys its read effect on the fallback's
|
|
66
|
+
* identity — see the call sites.
|
|
67
|
+
*/
|
|
68
|
+
const NO_FLAGS: Record<string, boolean> = {};
|
|
69
|
+
|
|
61
70
|
/** The right-panel view, wired to the plugin's own server half. */
|
|
62
71
|
function CommandRunnerPanel() {
|
|
63
72
|
const pluginId = usePluginId();
|
|
@@ -80,11 +89,17 @@ function CommandRunnerPanel() {
|
|
|
80
89
|
// Which FILES the reader expanded. Absent means COLLAPSED — a workspace seen
|
|
81
90
|
// for the first time opens as a list of command files rather than every
|
|
82
91
|
// command in the repository; only an explicit `false` keeps one open.
|
|
92
|
+
//
|
|
93
|
+
// The fallbacks are MODULE constants, never a `{}` written in the call: the
|
|
94
|
+
// hook's read effect is keyed on the fallback's identity, so a fresh literal
|
|
95
|
+
// re-arms it on every render — and since that effect writes the fallback into
|
|
96
|
+
// state, the panel re-renders forever (measured: 300 renders and still
|
|
97
|
+
// climbing, which hung the first app-level test written for this panel).
|
|
83
98
|
const [collapsedGroups, setCollapsedGroups] = useSessionState<Record<string, boolean>>(
|
|
84
99
|
'commandRunner.collapsedGroups',
|
|
85
|
-
|
|
100
|
+
NO_FLAGS,
|
|
86
101
|
);
|
|
87
|
-
const [background, setBackground] = useSessionState<Record<string, boolean>>('commandRunner.background',
|
|
102
|
+
const [background, setBackground] = useSessionState<Record<string, boolean>>('commandRunner.background', NO_FLAGS);
|
|
88
103
|
|
|
89
104
|
const [listing, setListing] = useState<CommandListing | null>(null);
|
|
90
105
|
const [listingError, setListingError] = useState<string | null>(null);
|
|
@@ -94,6 +109,10 @@ function CommandRunnerPanel() {
|
|
|
94
109
|
|
|
95
110
|
const scope = repo.root ? { root: repo.root, repo: repo.repo } : null;
|
|
96
111
|
const runs = state.value?.runs ?? [];
|
|
112
|
+
// The topic's own resync, held apart so the refresh handler can name it: a
|
|
113
|
+
// socket that missed a publish leaves a run on "running" forever, and asking
|
|
114
|
+
// for the snapshot is the only thing that repairs it.
|
|
115
|
+
const refreshRuns = state.refresh;
|
|
97
116
|
|
|
98
117
|
// `list.call` is a NEW function per render (the hook returns a fresh state
|
|
99
118
|
// object), so it must not be a dependency of the scan: doing so re-runs the scan
|
|
@@ -229,6 +248,21 @@ function CommandRunnerPanel() {
|
|
|
229
248
|
[pluginId],
|
|
230
249
|
);
|
|
231
250
|
|
|
251
|
+
/**
|
|
252
|
+
* The header's Rescan: every read this panel draws, not only the files.
|
|
253
|
+
*
|
|
254
|
+
* The scan re-reads the command listing. The run list is the plugin's topic,
|
|
255
|
+
* not the scan's answer, so it is resynced too — a socket that missed a
|
|
256
|
+
* publish leaves a finished run showing "running", and the button is the one
|
|
257
|
+
* place the reader can ask again. The open rows' logs follow: they are keyed
|
|
258
|
+
* on their run's byte count, so the resync re-reads exactly the rows whose
|
|
259
|
+
* output moved.
|
|
260
|
+
*/
|
|
261
|
+
const refresh = useCallback(() => {
|
|
262
|
+
void scan();
|
|
263
|
+
refreshRuns();
|
|
264
|
+
}, [scan, refreshRuns]);
|
|
265
|
+
|
|
232
266
|
return (
|
|
233
267
|
<PanelView
|
|
234
268
|
listing={listing}
|
|
@@ -242,7 +276,7 @@ function CommandRunnerPanel() {
|
|
|
242
276
|
showHeader={host.showHeader !== false}
|
|
243
277
|
onToggleGroup={handleToggleGroup}
|
|
244
278
|
onToggleBackground={handleToggleBackground}
|
|
245
|
-
onRefresh={
|
|
279
|
+
onRefresh={refresh}
|
|
246
280
|
onRun={handleRun}
|
|
247
281
|
onStop={handleStop}
|
|
248
282
|
onReadLog={handleReadLog}
|
|
@@ -16,8 +16,15 @@
|
|
|
16
16
|
* an unpressed toggle: the surrounding text colour is the state.
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
|
-
/**
|
|
20
|
-
|
|
19
|
+
/**
|
|
20
|
+
* One glyph. `size` defaults to the row's own 12px.
|
|
21
|
+
*
|
|
22
|
+
* `path` is one `d`, or several — a mark from an icon set that draws it as
|
|
23
|
+
* separate subpaths (lucide's refresh arrow does) keeps that shape, so the
|
|
24
|
+
* plugin's glyph and the host's are the same geometry rather than two drawings
|
|
25
|
+
* that look alike.
|
|
26
|
+
*/
|
|
27
|
+
export function Glyph({ path, size = 12 }: { path: string | readonly string[]; size?: number }) {
|
|
21
28
|
return (
|
|
22
29
|
<svg
|
|
23
30
|
width={size}
|
|
@@ -30,7 +37,9 @@ export function Glyph({ path, size = 12 }: { path: string; size?: number }) {
|
|
|
30
37
|
stroke-linejoin="round"
|
|
31
38
|
aria-hidden="true"
|
|
32
39
|
>
|
|
33
|
-
|
|
40
|
+
{(typeof path === 'string' ? [path] : path).map((d) => (
|
|
41
|
+
<path key={d} d={d} />
|
|
42
|
+
))}
|
|
34
43
|
</svg>
|
|
35
44
|
);
|
|
36
45
|
}
|
|
@@ -48,7 +57,16 @@ export const ICON = {
|
|
|
48
57
|
stop: 'M6 6h12v12H6z',
|
|
49
58
|
output: 'M4 6h16M4 12h16M4 18h9',
|
|
50
59
|
background: 'M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20zM12 7v5l4 2',
|
|
51
|
-
|
|
60
|
+
// The Files panel's refresh glyph — `RefreshCw` from `lucide-preact`, which
|
|
61
|
+
// the host's own `RefreshButton` draws — copied as its four subpaths. A plugin
|
|
62
|
+
// cannot import lucide (the host hands it only its two `@kabmo-labs/*`
|
|
63
|
+
// packages), so the geometry is what is shared.
|
|
64
|
+
refresh: [
|
|
65
|
+
'M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8',
|
|
66
|
+
'M21 3v5h-5',
|
|
67
|
+
'M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16',
|
|
68
|
+
'M8 16H3v5',
|
|
69
|
+
],
|
|
52
70
|
/** A pencil — "edit this stored command". */
|
|
53
71
|
edit: 'M12 20h9M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4z',
|
|
54
72
|
/** A bin — "delete this stored command". */
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "git-forge",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "Reads and acts on a repository's issues, pull/merge requests and releases on GitHub, GitLab, Gitea or Bitbucket.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"kabmo": {
|
|
8
8
|
"id": "git-forge",
|
|
9
9
|
"name": "Forge",
|
|
10
|
-
"version": "0.5.
|
|
10
|
+
"version": "0.5.1",
|
|
11
11
|
"description": "Reads and acts on a repository's issues, pull/merge requests and releases on GitHub, GitLab, Gitea or Bitbucket.",
|
|
12
12
|
"app": "dist/app.js",
|
|
13
13
|
"server": "dist/server.js",
|
|
@@ -18,7 +18,13 @@
|
|
|
18
18
|
* list scannable, not to replace the text a screen reader reads.
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
/**
|
|
22
|
+
* One glyph. `path` is one `d`, or several — a mark from an icon set that draws
|
|
23
|
+
* it as separate subpaths (lucide's refresh arrow does) keeps that shape, so the
|
|
24
|
+
* plugin's glyph and the host's are the same geometry rather than two drawings
|
|
25
|
+
* that look alike.
|
|
26
|
+
*/
|
|
27
|
+
export function Glyph({ path, size = 12 }: { path: string | readonly string[]; size?: number }) {
|
|
22
28
|
return (
|
|
23
29
|
<svg
|
|
24
30
|
width={size}
|
|
@@ -31,7 +37,9 @@ export function Glyph({ path, size = 12 }: { path: string; size?: number }) {
|
|
|
31
37
|
stroke-linejoin="round"
|
|
32
38
|
aria-hidden="true"
|
|
33
39
|
>
|
|
34
|
-
|
|
40
|
+
{(typeof path === 'string' ? [path] : path).map((d) => (
|
|
41
|
+
<path key={d} d={d} />
|
|
42
|
+
))}
|
|
35
43
|
</svg>
|
|
36
44
|
);
|
|
37
45
|
}
|
|
@@ -39,7 +47,18 @@ export function Glyph({ path, size = 12 }: { path: string; size?: number }) {
|
|
|
39
47
|
export const ICON = {
|
|
40
48
|
/** The panel's own mark, matching `icon.svg`. */
|
|
41
49
|
forge: 'M18 18a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM6 6a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM13 6h3a2 2 0 0 1 2 2v7M6 9v12',
|
|
42
|
-
|
|
50
|
+
// The Files panel's refresh glyph — `RefreshCw` from `lucide-preact`, which
|
|
51
|
+
// the host's own `RefreshButton` draws. Copied as its four subpaths rather
|
|
52
|
+
// than joined into one `d`, because overlapping round caps at the arrow tips
|
|
53
|
+
// composite differently inside one path; a plugin cannot import lucide (the
|
|
54
|
+
// host hands it only its two `@kabmo-labs/*` packages), so the geometry is
|
|
55
|
+
// what is shared.
|
|
56
|
+
refresh: [
|
|
57
|
+
'M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8',
|
|
58
|
+
'M21 3v5h-5',
|
|
59
|
+
'M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16',
|
|
60
|
+
'M8 16H3v5',
|
|
61
|
+
],
|
|
43
62
|
back: 'M19 12H5M12 19l-7-7 7-7',
|
|
44
63
|
external: 'M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6M15 3h6v6M10 14 21 3',
|
|
45
64
|
comment: 'M21 11.5a8.4 8.4 0 0 1-9 8.4 8.5 8.5 0 0 1-3.9-.9L3 21l1.9-5a8.4 8.4 0 0 1-.9-3.9 8.5 8.5 0 0 1 8.5-8.5 8.4 8.4 0 0 1 8.5 8z',
|
|
@@ -100,7 +100,15 @@ export function ForgePanel(_props: ForgePanelProps) {
|
|
|
100
100
|
const credential = useForgeCredential(scope, active);
|
|
101
101
|
const selected = pick && pick.scope === scopeKey && pick.section === section ? pick : null;
|
|
102
102
|
const detail = useForgeDetail(scope, section, selected?.id ?? null, active);
|
|
103
|
-
|
|
103
|
+
// A write closes the item, merges the change, or adds a comment: the detail
|
|
104
|
+
// owes a re-read for its body and conversation, and the LIST owes one for the
|
|
105
|
+
// row it came from — the state badge in the item's header is drawn from the
|
|
106
|
+
// list's copy of the item, and a closed issue that still says `open` in the
|
|
107
|
+
// list behind it is the same bug as a stale list after a refresh.
|
|
108
|
+
const write = useForgeWrite(scope, section, selected?.id ?? null, () => {
|
|
109
|
+
detail.reload();
|
|
110
|
+
void list.reload();
|
|
111
|
+
});
|
|
104
112
|
|
|
105
113
|
const provider = list.list?.provider ?? 'github';
|
|
106
114
|
const items = list.list?.sections[section]?.items ?? [];
|
|
@@ -155,6 +163,16 @@ export function ForgePanel(_props: ForgePanelProps) {
|
|
|
155
163
|
setPick({ scope: scopeKey, section, id: entry.id });
|
|
156
164
|
};
|
|
157
165
|
|
|
166
|
+
// The header's refresh re-reads EVERY page the panel is showing, not just the
|
|
167
|
+
// list: an open merge request is the page the reader is looking at, and a
|
|
168
|
+
// refresh that left its state, checks and conversation at their mount values
|
|
169
|
+
// is the one thing the control must not do. The credential is deliberately
|
|
170
|
+
// not re-read — it is resolved once per mount (see `useForgeCredential`).
|
|
171
|
+
const refresh = () => {
|
|
172
|
+
void list.reload();
|
|
173
|
+
if (selected) detail.reload();
|
|
174
|
+
};
|
|
175
|
+
|
|
158
176
|
// Same gate the other workspace-scoped views take: a forge hangs off a
|
|
159
177
|
// repository, so with no workspace there is nothing to read and the panel must
|
|
160
178
|
// say so rather than sit on a spinner no request will ever answer.
|
|
@@ -177,11 +195,11 @@ export function ForgePanel(_props: ForgePanelProps) {
|
|
|
177
195
|
list={list.list}
|
|
178
196
|
provider={provider}
|
|
179
197
|
filter={filter}
|
|
180
|
-
loading={list.loading}
|
|
198
|
+
loading={list.loading || detail.loading}
|
|
181
199
|
credential={credential}
|
|
182
200
|
target={scope}
|
|
183
201
|
onFilter={setFilter}
|
|
184
|
-
onRefresh={
|
|
202
|
+
onRefresh={refresh}
|
|
185
203
|
/>
|
|
186
204
|
|
|
187
205
|
<div className="flex min-h-0 flex-1 flex-col @[520px]:flex-row-reverse">
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The Forge panel's two re-reads: the header's Refresh and the one a write owes.
|
|
8
|
+
*
|
|
9
|
+
* Both are "fetch again" controls, and both were wrong in the same way — each
|
|
10
|
+
* moved only PART of what the panel draws:
|
|
11
|
+
*
|
|
12
|
+
* - **Refresh** called the list read alone. A reader who pressed it while an
|
|
13
|
+
* issue or merge request was open got a fresh list and an item whose state,
|
|
14
|
+
* CI verdict, files and conversation stayed at their mount values — the exact
|
|
15
|
+
* page they were looking at was the one the control did not touch.
|
|
16
|
+
* - **A write** re-read the detail alone, and the item's state badge is drawn
|
|
17
|
+
* from the LIST's row, so a closed issue still read `open` behind it.
|
|
18
|
+
*
|
|
19
|
+
* Kept in its own file because `index.test.tsx` is already past the repo's
|
|
20
|
+
* per-file ceiling; the harness is repeated there and in `write.test.tsx`.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, test } from 'bun:test';
|
|
24
|
+
import { Window } from 'happy-dom';
|
|
25
|
+
import { h, render } from 'preact';
|
|
26
|
+
import { act } from 'preact/test-utils';
|
|
27
|
+
import {
|
|
28
|
+
PanelHostProvider,
|
|
29
|
+
PluginIdProvider,
|
|
30
|
+
configureUiKit,
|
|
31
|
+
type RepoScope,
|
|
32
|
+
type UiKitServices,
|
|
33
|
+
} from '@kabmo-labs/kabmo-ui';
|
|
34
|
+
|
|
35
|
+
import { ForgePanel } from './index';
|
|
36
|
+
import type { ForgeDetail, ForgeList } from '../protocol';
|
|
37
|
+
import { detail, item, list } from './test-fixtures';
|
|
38
|
+
|
|
39
|
+
const DOM_GLOBALS = ['window', 'document', 'navigator', 'HTMLElement', 'Node', 'Text', 'Element', 'SVGElement'] as const;
|
|
40
|
+
const saved = new Map<string, unknown>();
|
|
41
|
+
|
|
42
|
+
let container: HTMLElement;
|
|
43
|
+
let calls: Array<{ method: string; input: unknown }>;
|
|
44
|
+
let listOutcome: { ok: true; value: ForgeList } | { ok: false; error: { code: string; message: string } };
|
|
45
|
+
let detailOutcome: { ok: true; value: ForgeDetail } | { ok: false; error: { code: string; message: string } };
|
|
46
|
+
let writeOutcome: { ok: true; value: unknown } | { ok: false; error: { code: string; message: string } };
|
|
47
|
+
let scope: RepoScope;
|
|
48
|
+
|
|
49
|
+
beforeAll(() => {
|
|
50
|
+
const win = new Window({ url: 'http://localhost/' });
|
|
51
|
+
const target = globalThis as unknown as Record<string, unknown>;
|
|
52
|
+
for (const key of DOM_GLOBALS) {
|
|
53
|
+
if (!saved.has(key)) saved.set(key, target[key]);
|
|
54
|
+
target[key] = (win as unknown as Record<string, unknown>)[key];
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
afterAll(() => {
|
|
59
|
+
const target = globalThis as unknown as Record<string, unknown>;
|
|
60
|
+
for (const key of DOM_GLOBALS) {
|
|
61
|
+
if (saved.has(key)) target[key] = saved.get(key);
|
|
62
|
+
else delete target[key];
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
beforeEach(() => {
|
|
67
|
+
calls = [];
|
|
68
|
+
listOutcome = { ok: true, value: list() };
|
|
69
|
+
detailOutcome = { ok: true, value: detail() };
|
|
70
|
+
writeOutcome = { ok: true, value: { item: item(), message: 'Comment posted.' } };
|
|
71
|
+
scope = {
|
|
72
|
+
root: '/ws',
|
|
73
|
+
repo: 'projects/alpha',
|
|
74
|
+
rows: [{ repo: '.', label: 'ws', short: 'ws' }],
|
|
75
|
+
scanning: false,
|
|
76
|
+
ready: true,
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
const services: UiKitServices = {
|
|
80
|
+
context: () => ({ sessionId: 's1', workspacePath: '/ws', theme: 'paper' }),
|
|
81
|
+
subscribe: () => () => {},
|
|
82
|
+
getSessionValue: () => null,
|
|
83
|
+
setSessionValue: () => {},
|
|
84
|
+
readWorkspaceFile: async () => '',
|
|
85
|
+
repoScope: () => scope,
|
|
86
|
+
setRepoScope: () => {},
|
|
87
|
+
subscribeRepoScope: () => () => {},
|
|
88
|
+
rescanRepoScope: () => {},
|
|
89
|
+
callRpc: async (_pluginId, method, input) => {
|
|
90
|
+
calls.push({ method, input });
|
|
91
|
+
if (method === 'detail') return detailOutcome;
|
|
92
|
+
if (method === 'write') return writeOutcome;
|
|
93
|
+
if (method === 'credential') return { ok: true, value: { source: 'cli', present: true, writeScope: null } };
|
|
94
|
+
return listOutcome;
|
|
95
|
+
},
|
|
96
|
+
};
|
|
97
|
+
configureUiKit(services);
|
|
98
|
+
|
|
99
|
+
container = document.createElement('div');
|
|
100
|
+
document.body.appendChild(container);
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
afterEach(() => {
|
|
104
|
+
if (container) {
|
|
105
|
+
render(null, container);
|
|
106
|
+
container.remove();
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
async function settle(): Promise<void> {
|
|
111
|
+
await act(async () => {
|
|
112
|
+
await Promise.resolve();
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/** Mount the panel, then open the first issue so the detail page is on screen. */
|
|
117
|
+
async function mount(): Promise<void> {
|
|
118
|
+
await act(async () => {
|
|
119
|
+
render(
|
|
120
|
+
h(PanelHostProvider, {
|
|
121
|
+
value: { sessionId: 's1', enabled: true, active: true, refreshKey: 0 },
|
|
122
|
+
children: h(PluginIdProvider, {
|
|
123
|
+
pluginId: 'git-forge',
|
|
124
|
+
children: h(ForgePanel, { sessionId: 's1', workspacePath: '/ws' }),
|
|
125
|
+
}),
|
|
126
|
+
}),
|
|
127
|
+
container,
|
|
128
|
+
);
|
|
129
|
+
});
|
|
130
|
+
await settle();
|
|
131
|
+
const row = [...container.querySelectorAll('button')].find((entry) =>
|
|
132
|
+
(entry.getAttribute('aria-label') ?? '').includes('Something is broken'),
|
|
133
|
+
);
|
|
134
|
+
await act(async () => {
|
|
135
|
+
row?.dispatchEvent(new window.MouseEvent('click', { bubbles: true }));
|
|
136
|
+
});
|
|
137
|
+
await settle();
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
function button(label: string): HTMLButtonElement | null {
|
|
141
|
+
const buttons = [...container.querySelectorAll('button')] as HTMLButtonElement[];
|
|
142
|
+
return (
|
|
143
|
+
buttons.find((entry) => (entry.getAttribute('aria-label') ?? '').trim() === label) ??
|
|
144
|
+
buttons.find((entry) => (entry.textContent ?? '').trim() === label) ??
|
|
145
|
+
null
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
const count = (method: string): number => calls.filter((call) => call.method === method).length;
|
|
150
|
+
|
|
151
|
+
describe('ForgePanel refresh', () => {
|
|
152
|
+
test('the header refresh re-reads the open item, not only the list', async () => {
|
|
153
|
+
await mount();
|
|
154
|
+
const listsBefore = count('list');
|
|
155
|
+
const detailsBefore = count('detail');
|
|
156
|
+
|
|
157
|
+
const refresh = button('Re-read from the host');
|
|
158
|
+
expect(refresh).not.toBeNull();
|
|
159
|
+
await act(async () => {
|
|
160
|
+
refresh?.dispatchEvent(new window.MouseEvent('click', { bubbles: true }));
|
|
161
|
+
});
|
|
162
|
+
await settle();
|
|
163
|
+
|
|
164
|
+
// The open merge request is the page on screen: a refresh that moved only
|
|
165
|
+
// the list would leave its state, checks and conversation stale.
|
|
166
|
+
expect(count('detail')).toBe(detailsBefore + 1);
|
|
167
|
+
expect(count('list')).toBe(listsBefore + 1);
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
test('a write re-reads the list as well as the item, so its state badge moves', async () => {
|
|
171
|
+
await mount();
|
|
172
|
+
const listsBefore = count('list');
|
|
173
|
+
const detailsBefore = count('detail');
|
|
174
|
+
|
|
175
|
+
const box = container.querySelector('textarea[aria-label="Comment"]') as HTMLTextAreaElement;
|
|
176
|
+
await act(async () => {
|
|
177
|
+
box.value = 'Looks good';
|
|
178
|
+
box.dispatchEvent(new window.Event('input', { bubbles: true }));
|
|
179
|
+
});
|
|
180
|
+
const post = button('Post a comment on #1');
|
|
181
|
+
expect(post).not.toBeNull();
|
|
182
|
+
await act(async () => {
|
|
183
|
+
post?.dispatchEvent(new window.MouseEvent('click', { bubbles: true }));
|
|
184
|
+
});
|
|
185
|
+
await settle();
|
|
186
|
+
|
|
187
|
+
// The badge in the item's header is drawn from the LIST's row, so a write
|
|
188
|
+
// that re-read only the detail leaves a closed issue reading `open`.
|
|
189
|
+
expect(count('detail')).toBe(detailsBefore + 1);
|
|
190
|
+
expect(count('list')).toBe(listsBefore + 1);
|
|
191
|
+
});
|
|
192
|
+
});
|
|
@@ -180,8 +180,10 @@ export interface ForgeWriteState {
|
|
|
180
180
|
*
|
|
181
181
|
* A success is NOT repainted from the answer alone: the host's reply is the item
|
|
182
182
|
* it changed, but the conversation, the files and the CI verdict all move with
|
|
183
|
-
* it, so the
|
|
184
|
-
*
|
|
183
|
+
* it, so the caller re-reads what it draws. The item's own state badge is drawn
|
|
184
|
+
* from the LIST's copy of the row, which is why the panel's `onDone` re-reads
|
|
185
|
+
* the list as well as the detail — a closed issue that still reads `open` in the
|
|
186
|
+
* list behind it is the defect this hook cannot fix from here.
|
|
185
187
|
*/
|
|
186
188
|
export function useForgeWrite(
|
|
187
189
|
scope: Scope | null,
|
|
@@ -249,6 +249,27 @@ describe('WriteBar', () => {
|
|
|
249
249
|
expect(container.textContent).toContain('Comment posted.');
|
|
250
250
|
});
|
|
251
251
|
|
|
252
|
+
test('a write re-reads the list as well as the item, so its state badge moves', async () => {
|
|
253
|
+
await mount();
|
|
254
|
+
const listsBefore = calls.filter((call) => call.method === 'list').length;
|
|
255
|
+
const detailsBefore = calls.filter((call) => call.method === 'detail').length;
|
|
256
|
+
|
|
257
|
+
const box = container.querySelector('textarea[aria-label="Comment"]') as HTMLTextAreaElement;
|
|
258
|
+
await act(async () => {
|
|
259
|
+
box.value = 'Looks good';
|
|
260
|
+
box.dispatchEvent(new window.Event('input', { bubbles: true }));
|
|
261
|
+
});
|
|
262
|
+
await click('Post a comment on #1');
|
|
263
|
+
await act(async () => {
|
|
264
|
+
await Promise.resolve();
|
|
265
|
+
});
|
|
266
|
+
|
|
267
|
+
// The item's header badge is drawn from the LIST's row, so a write that
|
|
268
|
+
// re-read only the detail leaves a closed issue reading `open`.
|
|
269
|
+
expect(calls.filter((call) => call.method === 'detail').length).toBe(detailsBefore + 1);
|
|
270
|
+
expect(calls.filter((call) => call.method === 'list').length).toBe(listsBefore + 1);
|
|
271
|
+
});
|
|
272
|
+
|
|
252
273
|
test('Escape cancels the confirmation and keeps the item', async () => {
|
|
253
274
|
detailOutcome = {
|
|
254
275
|
ok: true,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stats",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"private": true,
|
|
5
5
|
"description": "CPU and RAM used by the omp stack — Kabmo, every omp child, the daemons and the shells.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"kabmo": {
|
|
8
8
|
"id": "stats",
|
|
9
9
|
"name": "Stats",
|
|
10
|
-
"version": "0.5.
|
|
10
|
+
"version": "0.5.2",
|
|
11
11
|
"description": "CPU and RAM used by the omp stack — Kabmo, every omp child, the daemons and the shells.",
|
|
12
12
|
"app": "dist/app.js",
|
|
13
13
|
"server": "dist/server.js",
|
|
@@ -6,12 +6,14 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* The panel's refresh control: the glyph and the button.
|
|
8
8
|
*
|
|
9
|
-
* The glyph is
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
9
|
+
* The glyph is `RefreshCw` from `lucide-preact` — the same mark the host's own
|
|
10
|
+
* `RefreshButton` draws for the Files panel — transcribed rather than imported,
|
|
11
|
+
* and that is a build fact rather than a preference: the kit ships no icon set,
|
|
12
|
+
* and a plugin's `node_modules` carries only the two `@kabmo-labs/*` packages
|
|
13
|
+
* the host links into it, so a `lucide-preact` import would make this plugin's
|
|
14
|
+
* build depend on a package it was never given. The four subpaths are kept as
|
|
15
|
+
* four `<path>` elements, exactly as lucide draws them: merging them changes how
|
|
16
|
+
* the overlapping round caps at the arrow tips are composited.
|
|
15
17
|
*
|
|
16
18
|
* The button owns its own `disabled` state from the caller's `refreshing`, so a
|
|
17
19
|
* second click cannot queue a second sample while the first is in flight.
|
|
@@ -49,7 +51,7 @@ export function RefreshButton({ onRefresh, refreshing, className = '' }: Refresh
|
|
|
49
51
|
<path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" />
|
|
50
52
|
<path d="M21 3v5h-5" />
|
|
51
53
|
<path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" />
|
|
52
|
-
<path d="
|
|
54
|
+
<path d="M8 16H3v5" />
|
|
53
55
|
</svg>
|
|
54
56
|
</button>
|
|
55
57
|
);
|
|
@@ -84,6 +84,20 @@ function StatsPanel() {
|
|
|
84
84
|
// in-flight flag — the RPC call's own `pending` is the honest spinner.
|
|
85
85
|
const refreshing = sample.pending;
|
|
86
86
|
|
|
87
|
+
/**
|
|
88
|
+
* The Refresh control: one sample now, then the topic resync.
|
|
89
|
+
*
|
|
90
|
+
* The forced sample is what measures, and its publish is how every subscriber
|
|
91
|
+
* — this panel and the navbar readout — sees the result. The resync that
|
|
92
|
+
* follows is for the socket that missed that publish: without it the button
|
|
93
|
+
* spins and the panel keeps the numbers it already had, which reads as a
|
|
94
|
+
* measurement that found nothing new.
|
|
95
|
+
*/
|
|
96
|
+
async function refreshNow(): Promise<void> {
|
|
97
|
+
await sample.call({ force: true });
|
|
98
|
+
realtime.refresh();
|
|
99
|
+
}
|
|
100
|
+
|
|
87
101
|
/** Run the confirmed kill, then take a sample so the row disappears. */
|
|
88
102
|
async function confirmKill(): Promise<void> {
|
|
89
103
|
if (!killTarget) return;
|
|
@@ -144,7 +158,7 @@ function StatsPanel() {
|
|
|
144
158
|
return (
|
|
145
159
|
<Panel title="Stats">
|
|
146
160
|
<div class="-m-3 p-2 flex flex-col">
|
|
147
|
-
<TotalsBar snapshot={snapshot} onRefresh={() => void
|
|
161
|
+
<TotalsBar snapshot={snapshot} onRefresh={() => void refreshNow()} refreshing={refreshing} />
|
|
148
162
|
|
|
149
163
|
{history ? (
|
|
150
164
|
<div class="flex flex-col gap-1.5 border-b border-ink/10 px-3 py-2">
|