@kabmo-labs/kabmo 0.37.0 → 0.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/index.html +1 -1
- package/dist/client/index.js +547 -528
- package/dist/client/static/js/{CsvGrid-xb429wvb.js → CsvGrid-90zfbn7f.js} +1 -1
- package/dist/client/static/js/{DocxView-g58e0bs7.js → DocxView-vwq2rf16.js} +2 -2
- package/dist/client/static/js/{DrawioView-1j66avvy.js → DrawioView-bvx7eqcz.js} +1 -1
- package/dist/client/static/js/{ImageView-kraqkypn.js → ImageView-q6xfmbrq.js} +1 -1
- package/dist/client/static/js/{LayoutWrapper-85dhbn62.js → LayoutWrapper-qatdaw3n.js} +2 -2
- package/dist/client/static/js/{Modal-f0nfya07.js → Modal-6jx1fvfb.js} +15 -15
- package/dist/client/static/js/{PdfView-nddkrky9.js → PdfView-tkv2d2zs.js} +1 -1
- package/dist/client/static/js/{SessionsView-a595m6g1.js → SessionsView-rbnecykz.js} +1 -1
- package/dist/client/static/js/{SheetView-s2p4sk6b.js → SheetView-t08g8kdr.js} +1 -1
- package/dist/client/static/js/{SvgPreview-ppdx4yb9.js → SvgPreview-9vh6mdcp.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-5cjzxcaq.js → abnfDiagram-O67JEVCF-bxcn33e1.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-r8sz34h3.js +1 -0
- package/dist/client/static/js/{architectureDiagram-NJMV4G6O-62mygavm.js → architectureDiagram-NJMV4G6O-40ggw6e8.js} +2 -2
- package/dist/client/static/js/{astro-80bs6hvg.js → astro-p3f5p9p2.js} +1 -1
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-s5yz9hcd.js → blockDiagram-BEXU5L5S-k41cvjrd.js} +6 -6
- package/dist/client/static/js/c-jkdstn33.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-rf9xkmrm.js → c4Diagram-YGBWAQC7-rdcmn6ac.js} +2 -2
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-zfm2cj2a.js → classDiagram-v2-NBCMYWYE-txbmbkxv.js} +5 -5
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-fmgpv55e.js → cose-bilkent-JH36ORCC-bxzh3qj1.js} +1 -1
- package/dist/client/static/js/cpp-9d3xdpe3.js +1 -0
- package/dist/client/static/js/css-r3wja1ze.js +1 -0
- package/dist/client/static/js/css-sebxkh5f.js +1 -0
- package/dist/client/static/js/cynefin-OW5HDTMX-w2f2vev7.js +1 -0
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-468r5xc2.js → cynefinDiagram-VND7K2PF-abx5343b.js} +1 -1
- package/dist/client/static/js/{dagre-6A5THRUB-w370qmgj.js → dagre-6A5THRUB-baj278kt.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-sfvfjjsy.js → diagram-22UHCM2B-vqvhdc5m.js} +7 -7
- package/dist/client/static/js/{diagram-3UASUU5V-3r2c8s14.js → diagram-3UASUU5V-w328rfx0.js} +2 -2
- package/dist/client/static/js/{diagram-ATOU4E4O-yathy97a.js → diagram-ATOU4E4O-zzcmwnm8.js} +2 -2
- package/dist/client/static/js/{diagram-CDSNMT55-kk437kxq.js → diagram-CDSNMT55-8yw39mmj.js} +1 -1
- package/dist/client/static/js/{diagram-MLGK6HIB-qdxfjjhf.js → diagram-MLGK6HIB-zgc386pv.js} +1 -1
- package/dist/client/static/js/{diagram-MPIPVDR6-dfqeqa1d.js → diagram-MPIPVDR6-efmvvscm.js} +1 -1
- package/dist/client/static/js/{dockerfile-yxrt509r.js → dockerfile-bp5dre33.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-s0b0vv4k.js → ebnfDiagram-ZINNZB2B-p66h0dzq.js} +1 -1
- package/dist/client/static/js/{elixir-rpa1g4gy.js → elixir-jwphgp8j.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-mtpw0spa.js → elk-276RUBZZ-g0jjxcqd.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-agjdsm1b.js → erDiagram-OPXOYQCR-39gat96z.js} +4 -4
- package/dist/client/static/js/eventmodeling-NTZA5JFV-k5n61zzh.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-f6jpcqyq.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-z6ywqqc1.js → ganttDiagram-FUAMR5RP-nsjv1zt4.js} +2 -2
- package/dist/client/static/js/gitGraph-4MIJSDKK-2gf053bx.js +1 -0
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-bvbmfw6h.js → gitGraphDiagram-X574FWY7-r4vnkcy3.js} +2 -2
- package/dist/client/static/js/graphql-p4cskvad.js +1 -0
- package/dist/client/static/js/html-f26r6vv5.js +1 -0
- package/dist/client/static/js/{index-83ts8zmk.js → index-0kxqzafy.js} +1 -1
- package/dist/client/static/js/{index-kzhtmrh0.js → index-11bdd235.js} +1 -1
- package/dist/client/static/js/{index-we1rpftn.js → index-1qszrvzk.js} +2 -2
- package/dist/client/static/js/{index-21b3zyrd.js → index-24yyj78e.js} +2 -2
- package/dist/client/static/js/{index-nmc30xaz.js → index-2drjp9ks.js} +1 -1
- package/dist/client/static/js/{index-w9zxmev3.js → index-2ndq1ngv.js} +1 -1
- package/dist/client/static/js/{index-0j518hqm.js → index-3az1w5f8.js} +2 -2
- package/dist/client/static/js/{index-8e0s9p45.js → index-50z4ek83.js} +1 -1
- package/dist/client/static/js/{index-sezz011q.js → index-5ebhb94w.js} +1 -1
- package/dist/client/static/js/{index-302d35e5.js → index-5y0bvq4q.js} +34 -34
- package/dist/client/static/js/{index-jpkj6vqp.js → index-6ax2z70w.js} +1 -1
- package/dist/client/static/js/{index-9t82sx0w.js → index-6k3e5dph.js} +2 -2
- package/dist/client/static/js/{index-09gx6edj.js → index-73jwm4d5.js} +1 -1
- package/dist/client/static/js/{index-zvfvqvn9.js → index-9wd9y6m0.js} +2 -2
- package/dist/client/static/js/{index-m3j5yx5f.js → index-9wtg6ywn.js} +4 -4
- package/dist/client/static/js/{index-j7r414hf.js → index-a74k07z2.js} +2 -2
- package/dist/client/static/js/{index-a0bdavdr.js → index-ashpbfqv.js} +1 -1
- package/dist/client/static/js/{index-72t6kqjx.js → index-b9b2nwdd.js} +2 -2
- package/dist/client/static/js/{index-cx89yk15.js → index-c15r8jd3.js} +2 -2
- package/dist/client/static/js/{index-49dhv8ry.js → index-da10qpns.js} +2 -2
- package/dist/client/static/js/{index-xearvz2z.js → index-dfgdn3fj.js} +7 -7
- package/dist/client/static/js/{index-0mvcbbmy.js → index-dkseg29t.js} +9 -9
- package/dist/client/static/js/{index-0sqa91wb.js → index-e1pr3k50.js} +2 -2
- package/dist/client/static/js/{index-k06med7d.js → index-fghst0kd.js} +12 -12
- package/dist/client/static/js/{index-vtbbfwx0.js → index-gr6jng0x.js} +2 -2
- package/dist/client/static/js/{index-5fn0agag.js → index-gwhx66f4.js} +1 -1
- package/dist/client/static/js/{index-z7qnffwj.js → index-h8h5c2r8.js} +1 -1
- package/dist/client/static/js/{index-qz8mbxm9.js → index-ha75kff0.js} +2 -2
- package/dist/client/static/js/{index-z0frtyje.js → index-hzx81cjq.js} +4 -4
- package/dist/client/static/js/{index-es3pt29g.js → index-k9xsvab3.js} +1 -1
- package/dist/client/static/js/{index-15zn3sns.js → index-nd4p98mc.js} +1 -1
- package/dist/client/static/js/{index-w7xbfv44.js → index-qn4pkjfh.js} +2 -2
- package/dist/client/static/js/{index-64mb65wx.js → index-r83kr4s5.js} +2 -2
- package/dist/client/static/js/{index-pd0140dx.js → index-ra38ggke.js} +1 -1
- package/dist/client/static/js/{index-m87yykre.js → index-rf0p3v7q.js} +5 -5
- package/dist/client/static/js/{index-1tyvk778.js → index-rgp69pa8.js} +1 -1
- package/dist/client/static/js/{index-actppd4z.js → index-rqrcw8nj.js} +2 -2
- package/dist/client/static/js/{index-qznwd6g8.js → index-st202rjv.js} +184 -184
- package/dist/client/static/js/{index-6q80csr0.js → index-t5t71dhp.js} +2 -2
- package/dist/client/static/js/{index-ntxm8pw3.js → index-tfsaj5d1.js} +2 -2
- package/dist/client/static/js/{index-059qyaj0.js → index-tv61v3t3.js} +1 -1
- package/dist/client/static/js/index-tzm90bsz.js +1 -0
- package/dist/client/static/js/{index-z6g74h7g.js → index-vb6t44dw.js} +2 -2
- package/dist/client/static/js/{index-t07b31ny.js → index-vnn7m9yp.js} +3 -3
- package/dist/client/static/js/{index-hbtk0c12.js → index-vxd4gykh.js} +2 -2
- package/dist/client/static/js/{index-a293pdg7.js → index-y3hdv561.js} +2 -2
- package/dist/client/static/js/{index-7sa2e8mn.js → index-z0cpp5bc.js} +2 -2
- package/dist/client/static/js/info-A6RAGUB7-3tr0y3s6.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-58bv28d4.js → infoDiagram-VRGFBTTK-e39pvm4j.js} +1 -1
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-tz6b0caw.js → ishikawaDiagram-OU5B5YK6-rqhszgvp.js} +2 -2
- package/dist/client/static/js/javascript-nyf39d5r.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-ydamm17a.js → journeyDiagram-ZHPQQLJL-wgy5qrsv.js} +3 -3
- package/dist/client/static/js/{julia-v7j460gw.js → julia-237yk557.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-7jxfsf17.js → kanban-definition-PNTS6WVX-b8bxn0h1.js} +3 -3
- package/dist/client/static/js/lua-86fjqj8v.js +1 -0
- package/dist/client/static/js/{mermaid.core-vty0aq6f.js → mermaid.core-vb5ehtre.js} +6 -6
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-ra4wrts4.js → mindmap-definition-NLK3R4M7-t4p38s38.js} +2 -2
- package/dist/client/static/js/one-dark-pro-dhybn1ff.js +1 -0
- package/dist/client/static/js/one-light-bqg77ay0.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-xbsyjzrh.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-ydjcfea9.js → pegDiagram-GJSIUBJH-3gp4madx.js} +1 -1
- package/dist/client/static/js/{perl-gg4jdkcr.js → perl-dvz4y1tb.js} +1 -1
- package/dist/client/static/js/{php-2q8fm6k8.js → php-n6y7dzhm.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-j2tpz0cs.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-wh04y7wp.js → pieDiagram-5QR66LMP-0cbm773h.js} +2 -2
- package/dist/client/static/js/{quadrantDiagram-O4NWA36T-4mhbag8n.js → quadrantDiagram-O4NWA36T-jwg7fc9f.js} +1 -1
- package/dist/client/static/js/radar-RG4KPBEZ-m3tsyfv0.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-5p202a4q.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-hj0y9tgn.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-8c5dct8f.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-3tx8z65q.js +1 -0
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-pagmr4hc.js → railroadDiagram-XR7U4H2S-38xh691s.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-jhfhp4eq.js → requirementDiagram-PLB6GJNP-gpddawxh.js} +4 -4
- package/dist/client/static/js/{ruby-vag6a82m.js → ruby-7zye3g0e.js} +1 -1
- package/dist/client/static/js/{rust-yntkm6hw.js → rust-bx3ecv4n.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-qrfxzvp3.js → sankeyDiagram-IPEJSGJF-s6t6bbhk.js} +1 -1
- package/dist/client/static/js/{sass-kbwea482.js → sass-m0h9yzfb.js} +1 -1
- package/dist/client/static/js/{scss-zphrqp25.js → scss-2pwwfkvn.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-fpznwnva.js → sequenceDiagram-PO4LG4MO-wkq51pmb.js} +3 -3
- package/dist/client/static/js/{sizeCapture-INFHLROL-3hz930jg.js → sizeCapture-INFHLROL-xtwexf8k.js} +1 -1
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-2m99syxm.js → stateDiagram-v2-GCMORJYK-jnwsqa7y.js} +3 -3
- package/dist/client/static/js/{svelte-mwtx07d9.js → svelte-x8f8c8hq.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-hmhd360r.js → swimlanes-2SLR337P-mnkkqcbx.js} +1 -1
- package/dist/client/static/js/{swimlanesDiagram-TC7HE7FX-a8b7z74e.js → swimlanesDiagram-TC7HE7FX-6xmrz03n.js} +1 -1
- package/dist/client/static/js/{timeline-definition-EJHVYXUP-765y3ssa.js → timeline-definition-EJHVYXUP-rxq6heqh.js} +2 -2
- package/dist/client/static/js/treeView-Q6P3EWNA-mf0rb2yv.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-0x5gf06b.js +1 -0
- package/dist/client/static/js/typescript-5nmrzgkj.js +1 -0
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-rex2j507.js → usecaseDiagram-POWQR4AR-dz94f57t.js} +13 -13
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-wd51qq26.js → vennDiagram-UO4OBE2U-5mmvkhsq.js} +1 -1
- package/dist/client/static/js/{vue-j8vb9d7r.js → vue-myjjd0gd.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-x7ej8dms.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-6jdqn8f7.js → wardleyDiagram-VNRHLVJA-dctdntpa.js} +1 -1
- package/dist/client/static/js/xml-3dd1pter.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-kcz8y04e.js → xychartDiagram-PMCCYNJV-njyfrqkv.js} +2 -2
- package/package.json +1 -1
- package/src/client/components/common/ComposerPicker.tsx +24 -12
- package/src/client/components/common/ComposerTextarea.tsx +1 -0
- package/src/client/components/layout/session-sidebar/scheduler-modal/ModelFields.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/chat-input/index.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/index.tsx +3 -3
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/FormAsk.test.tsx +210 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/FormAsk.tsx +342 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/LooseFieldAsk.tsx +44 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/OrphanAsks.test.tsx +44 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/OrphanAsks.tsx +10 -5
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/PluginPendingInteractions.test.ts +1 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/drafts.ts +19 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/form-picks.ts +52 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/index.test.ts +2 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/index.tsx +53 -4
- package/src/client/components/workspace/model-dropdown/index.tsx +1 -1
- package/src/client/components/workspace/model-dropdown/use-catalog.ts +3 -32
- package/src/client/data/settings/omp-schema.json +55 -1
- package/src/client/hooks/chat/composer/harness-model-picker.ts +84 -0
- package/src/client/hooks/chat/composer/index.ts +26 -6
- package/src/client/hooks/chat/timeline/ask-frames.test.ts +80 -7
- package/src/client/hooks/chat/timeline/ask-frames.ts +95 -21
- package/src/client/hooks/models/use-harnesses.ts +15 -2
- package/src/server/lib/auth/agent-gate.server.ts +64 -0
- package/src/server/lib/auth/agent-tree-gate.test.ts +121 -0
- package/src/server/lib/auth/guard.test.ts +18 -18
- package/src/server/lib/auth/guard.ts +15 -11
- package/src/server/lib/auth/handover-guard.test.ts +1 -1
- package/src/server/lib/changes/attach.server.ts +57 -0
- package/src/server/lib/changes/attach.test.ts +94 -0
- package/src/server/lib/changes/blobs.server.ts +52 -0
- package/src/server/lib/changes/capture-bash.server.ts +106 -0
- package/src/server/lib/changes/capture-fs.server.ts +64 -0
- package/src/server/lib/changes/capture-runs.test.ts +136 -0
- package/src/server/lib/changes/capture-test-util.ts +46 -0
- package/src/server/lib/changes/capture-types.ts +62 -0
- package/src/server/lib/changes/capture.server.ts +333 -0
- package/src/server/lib/changes/capture.test.ts +245 -0
- package/src/server/lib/changes/classify-command.test.ts +172 -0
- package/src/server/lib/changes/classify-command.ts +272 -0
- package/src/server/lib/changes/classify-git.ts +88 -0
- package/src/server/lib/changes/classify-paths.ts +112 -0
- package/src/server/lib/changes/classify-tokenize.ts +185 -0
- package/src/server/lib/changes/journal.server.ts +183 -0
- package/src/server/lib/changes/journal.test.ts +125 -0
- package/src/server/lib/changes/merge.test.ts +137 -0
- package/src/server/lib/changes/paths.server.ts +37 -0
- package/src/server/lib/changes/purge.server.ts +32 -0
- package/src/server/lib/changes/reader.server.ts +322 -0
- package/src/server/lib/changes/reader.test.ts +137 -0
- package/src/server/lib/changes/records.ts +120 -0
- package/src/server/lib/changes/scan.server.ts +89 -0
- package/src/server/lib/harness/register.server.ts +3 -0
- package/src/server/lib/omp/rpc/event-fanout.test.ts +58 -0
- package/src/server/lib/omp/rpc/event-fanout.ts +19 -0
- package/src/server/lib/omp/rpc/manager.ts +4 -3
- package/src/server/lib/omp/rpc/session-registration.ts +5 -0
- package/src/server/lib/omp/rpc/session-registry.ts +4 -5
- package/src/server/lib/omp/session/delete.server.ts +4 -0
- package/src/server/lib/sessions/agent-token.server.test.ts +28 -5
- package/src/server/lib/sessions/agent-token.server.ts +42 -6
- package/src/server/lib/sessions/relation-access.server.test.ts +96 -0
- package/src/server/lib/sessions/relation-access.server.ts +71 -0
- package/src/server/routes/sessions/changes.ts +1 -1
- package/src/shared/lib/chat/ask-form/fields.ts +1 -0
- package/src/shared/lib/chat/ask-form/types.ts +6 -0
- package/src/shared/lib/chat/ask-questions.ts +56 -3
- package/src/shared/lib/chat/composer/delegation.ts +2 -13
- package/src/shared/lib/chat/composer/filter.test.ts +39 -0
- package/src/shared/lib/chat/composer/filter.ts +23 -13
- package/src/shared/lib/chat/composer/harness-model-items.test.ts +54 -0
- package/src/shared/lib/chat/composer/harness-model-items.ts +41 -0
- package/src/shared/lib/chat/composer/trigger.test.ts +50 -0
- package/src/shared/lib/chat/composer/trigger.ts +29 -1
- package/src/shared/lib/chat/timeline/changed-files.test.ts +16 -0
- package/src/shared/lib/chat/timeline/changed-files.ts +102 -25
- package/src/shared/lib/harness/catalog.ts +21 -0
- package/src/{client/components/workspace/model-dropdown/harness-models.test.ts → shared/lib/harness/models.test.ts} +1 -1
- package/src/shared/lib/models/option.ts +46 -0
- package/src/shared/lib/omp/config/schema.test.ts +20 -0
- package/src/shared/types/chat.ts +12 -6
- package/src/shared/types/omp/agent.ts +9 -0
- package/src/shared/types/session-changes.ts +4 -0
- package/dist/client/static/js/architecture-7GRP2DOG-7ewrw5vc.js +0 -1
- package/dist/client/static/js/c-wkgxb1t1.js +0 -1
- package/dist/client/static/js/cpp-y0t6mynx.js +0 -1
- package/dist/client/static/js/css-r2nhvzff.js +0 -1
- package/dist/client/static/js/css-tf1s0nb7.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-yyyx3px0.js +0 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-cx3ztxfz.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-267mw6sv.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-eg9r85ak.js +0 -1
- package/dist/client/static/js/graphql-skw5krjr.js +0 -1
- package/dist/client/static/js/html-pv88ny12.js +0 -1
- package/dist/client/static/js/index-tcegdd2t.js +0 -1
- package/dist/client/static/js/info-A6RAGUB7-7qhah7fs.js +0 -1
- package/dist/client/static/js/javascript-4kw2j9t3.js +0 -1
- package/dist/client/static/js/lua-ke895s2q.js +0 -1
- package/dist/client/static/js/one-dark-pro-2pywnqrh.js +0 -1
- package/dist/client/static/js/one-light-vfgdt4wf.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-ag2g7tbk.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-nqcyj3x1.js +0 -1
- package/dist/client/static/js/radar-RG4KPBEZ-60gby7be.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-cnkmcjse.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-qgfdnazd.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-609h6cpx.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-xqnytjhg.js +0 -1
- package/dist/client/static/js/treeView-Q6P3EWNA-8djqab8k.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-hdztnffk.js +0 -1
- package/dist/client/static/js/typescript-0s2t05jj.js +0 -1
- package/dist/client/static/js/wardley-WFR3VGLG-avby77vv.js +0 -1
- package/dist/client/static/js/xml-81hxjjt4.js +0 -1
- /package/src/{client/components/workspace/model-dropdown/harness-models.ts → shared/lib/harness/models.ts} +0 -0
|
@@ -176,3 +176,42 @@ describe('filterComposerItems — command dispatch', () => {
|
|
|
176
176
|
expect(names(filterComposerItems(COMMANDS, trigger))).toEqual(['retry']);
|
|
177
177
|
});
|
|
178
178
|
});
|
|
179
|
+
|
|
180
|
+
describe('filterComposerItems — @harness:<id>: model phase', () => {
|
|
181
|
+
const MODELS: ComposerPickItem[] = [
|
|
182
|
+
{ id: 'm1', name: 'DeepSeek V4.1 Flash', description: 'kenari-jatis/deepseek-v4.1-flash', kind: 'model', source: 'model', token: 'kenari-jatis/deepseek-v4.1-flash' },
|
|
183
|
+
{ id: 'm2', name: 'Claude Fable 5', description: 'kenari/claude-fable-5', kind: 'model', source: 'model', token: 'kenari/claude-fable-5' },
|
|
184
|
+
{ id: 'm3', name: 'Opus', description: 'opus', kind: 'model', source: 'model', token: 'opus' },
|
|
185
|
+
];
|
|
186
|
+
const modelTrigger = (query: string): ComposerTrigger => ({
|
|
187
|
+
kind: 'mention',
|
|
188
|
+
query,
|
|
189
|
+
start: 0,
|
|
190
|
+
end: 17 + query.length,
|
|
191
|
+
phase: 'model',
|
|
192
|
+
replaceFrom: 17,
|
|
193
|
+
harness: 'omp-rpc',
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
test('an empty query lists the whole harness catalogue in order', () => {
|
|
197
|
+
expect(names(filterComposerItems(MODELS, modelTrigger('')))).toEqual([
|
|
198
|
+
'DeepSeek V4.1 Flash', 'Claude Fable 5', 'Opus',
|
|
199
|
+
]);
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
test('a model name ranks by the same tiers as every other mention', () => {
|
|
203
|
+
expect(names(filterComposerItems(MODELS, modelTrigger('opus')))).toEqual(['Opus']);
|
|
204
|
+
expect(names(filterComposerItems(MODELS, modelTrigger('claude')))).toEqual(['Claude Fable 5']);
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
test('a provider/value pasted into the tail matches the row description', () => {
|
|
208
|
+
expect(names(filterComposerItems(MODELS, modelTrigger('kenari-jatis/')))).toEqual(['DeepSeek V4.1 Flash']);
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
test('a `file:` prefix does NOT scope the model list to files', () => {
|
|
212
|
+
const rows: ComposerPickItem[] = [
|
|
213
|
+
{ id: 'm', name: 'file:model', description: '', kind: 'model', source: 'model', token: 'file:model' },
|
|
214
|
+
];
|
|
215
|
+
expect(names(filterComposerItems(rows, modelTrigger('file:')))).toEqual(['file:model']);
|
|
216
|
+
});
|
|
217
|
+
});
|
|
@@ -37,6 +37,22 @@ function rankComposerItem(
|
|
|
37
37
|
return null;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
function rankMentionItems(items: ComposerPickItem[], rankingQuery: string): ComposerMatchItem[] {
|
|
41
|
+
if (rankingQuery === '') {
|
|
42
|
+
return items.map((item) => ({ ...item, match: null }));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const ranked: RankedMatch[] = [];
|
|
46
|
+
items.forEach((item, index) => {
|
|
47
|
+
const score = rankComposerItem(item.name, item.description, rankingQuery);
|
|
48
|
+
if (score) ranked.push({ ...score, index });
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
ranked.sort((a, b) => a.tier - b.tier || a.index - b.index);
|
|
52
|
+
|
|
53
|
+
return ranked.map((entry) => ({ ...items[entry.index], match: entry.match }));
|
|
54
|
+
}
|
|
55
|
+
|
|
40
56
|
/**
|
|
41
57
|
* Filter `@` mention items by query, ranked by tier then original order.
|
|
42
58
|
*
|
|
@@ -51,23 +67,17 @@ function filterMentionItems(items: ComposerPickItem[], query: string): ComposerM
|
|
|
51
67
|
const pool = fileQuery ? items.filter((item) => item.source === 'file') : items;
|
|
52
68
|
const rankingQuery = fileQuery ? trimmed.replace(FILE_QUERY_PREFIX_RE, '').trim() : trimmed;
|
|
53
69
|
|
|
54
|
-
|
|
55
|
-
return pool.map((item) => ({ ...item, match: null }));
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
const ranked: RankedMatch[] = [];
|
|
59
|
-
pool.forEach((item, index) => {
|
|
60
|
-
const score = rankComposerItem(item.name, item.description, rankingQuery);
|
|
61
|
-
if (score) ranked.push({ ...score, index });
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
ranked.sort((a, b) => a.tier - b.tier || a.index - b.index);
|
|
65
|
-
|
|
66
|
-
return ranked.map((entry) => ({ ...pool[entry.index], match: entry.match }));
|
|
70
|
+
return rankMentionItems(pool, rankingQuery);
|
|
67
71
|
}
|
|
68
72
|
|
|
69
73
|
/** Dispatch on the trigger: mentions keep their own ranking, commands use omp's. */
|
|
70
74
|
export function filterComposerItems(items: ComposerPickItem[], trigger: ComposerTrigger): ComposerMatchItem[] {
|
|
75
|
+
// A harness's model list has no `file:` namespace of its own, so it ranks as
|
|
76
|
+
// a plain pool. Reusing the mention ranker keeps exact > prefix > substring >
|
|
77
|
+
// description identical to every other `@` row.
|
|
78
|
+
if (trigger.kind === 'mention' && trigger.phase === 'model') {
|
|
79
|
+
return rankMentionItems(items, trigger.query.trim());
|
|
80
|
+
}
|
|
71
81
|
if (trigger.kind === 'mention') return filterMentionItems(items, trigger.query);
|
|
72
82
|
if (trigger.phase === 'args' && trigger.command) {
|
|
73
83
|
return commandArgumentItems(items, trigger.command, trigger.query);
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The `@harness:<id>:` model rows.
|
|
8
|
+
*
|
|
9
|
+
* The token is what `kabmo session spawn --model` receives, so a wrong shape is
|
|
10
|
+
* a wrong model at spawn time — not a cosmetic bug. A harness with providers
|
|
11
|
+
* (omp) needs `provider/id`; an ACP agent that publishes bare values must not
|
|
12
|
+
* gain a `//` or an `unknown/` prefix.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { describe, expect, test } from 'bun:test';
|
|
16
|
+
import { harnessModelPickItems, harnessModelValue } from '@/shared/lib/chat/composer/harness-model-items';
|
|
17
|
+
import type { AIModelOption } from '@/shared/types';
|
|
18
|
+
|
|
19
|
+
const ompModel: AIModelOption = {
|
|
20
|
+
id: 'deepseek-v4.1-flash',
|
|
21
|
+
name: 'DeepSeek V4.1 Flash',
|
|
22
|
+
provider: 'kenari-jatis',
|
|
23
|
+
contextWindow: 1_000_000,
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const acpModel: AIModelOption = { id: 'opus', name: 'Opus', provider: '' };
|
|
27
|
+
|
|
28
|
+
describe('harnessModelValue', () => {
|
|
29
|
+
test('joins provider and id for a provider-publishing harness', () => {
|
|
30
|
+
expect(harnessModelValue(ompModel)).toBe('kenari-jatis/deepseek-v4.1-flash');
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
test('leaves a bare ACP value alone', () => {
|
|
34
|
+
expect(harnessModelValue(acpModel)).toBe('opus');
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
describe('harnessModelPickItems', () => {
|
|
39
|
+
test('a row inserts the model value, not the whole mention', () => {
|
|
40
|
+
const [row] = harnessModelPickItems([ompModel], 'omp-rpc');
|
|
41
|
+
if (!row) throw new Error('expected one row');
|
|
42
|
+
expect(row.token).toBe('kenari-jatis/deepseek-v4.1-flash');
|
|
43
|
+
expect(row.name).toBe('DeepSeek V4.1 Flash');
|
|
44
|
+
expect(row.description).toBe('kenari-jatis/deepseek-v4.1-flash · 1000000');
|
|
45
|
+
expect(row.kind).toBe('model');
|
|
46
|
+
expect(row.source).toBe('model');
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
test('ids stay unique per harness and per value', () => {
|
|
50
|
+
const rows = harnessModelPickItems([ompModel, acpModel], 'claude');
|
|
51
|
+
expect(new Set(rows.map((row) => row.id)).size).toBe(2);
|
|
52
|
+
expect(rows[0]?.id).toContain('claude');
|
|
53
|
+
});
|
|
54
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Model rows for the `@harness:<id>:` completion.
|
|
8
|
+
*
|
|
9
|
+
* The token is the value the delegation parser hands to
|
|
10
|
+
* `kabmo session spawn --model`: `<provider>/<id>` for a harness that publishes
|
|
11
|
+
* providers (omp's registry), or the bare id an ACP agent lists. It is NOT
|
|
12
|
+
* `@harness:<id>:<model>` — the trigger already scopes the replacement to the
|
|
13
|
+
* text after the second colon, so inserting the whole mention would duplicate
|
|
14
|
+
* the namespace the user typed.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import type { AIModelOption, ComposerPickItem } from '@/shared/types';
|
|
18
|
+
|
|
19
|
+
/** The exact `--model` value for one row. */
|
|
20
|
+
export function harnessModelValue(model: AIModelOption): string {
|
|
21
|
+
return model.provider ? `${model.provider}/${model.id}` : model.id;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** Map one harness's model list into popup rows. */
|
|
25
|
+
export function harnessModelPickItems(
|
|
26
|
+
models: readonly AIModelOption[],
|
|
27
|
+
harness: string,
|
|
28
|
+
): ComposerPickItem[] {
|
|
29
|
+
return models.map((model) => {
|
|
30
|
+
const value = harnessModelValue(model);
|
|
31
|
+
const context = model.contextWindow ? ` · ${model.contextWindow}` : '';
|
|
32
|
+
return {
|
|
33
|
+
id: `harness-model-${harness}-${value}`,
|
|
34
|
+
name: model.name || model.id,
|
|
35
|
+
description: `${value}${context}`,
|
|
36
|
+
kind: 'model',
|
|
37
|
+
source: 'model',
|
|
38
|
+
token: value,
|
|
39
|
+
};
|
|
40
|
+
});
|
|
41
|
+
}
|
|
@@ -192,6 +192,56 @@ describe('detectComposerTrigger — @ mentions', () => {
|
|
|
192
192
|
});
|
|
193
193
|
});
|
|
194
194
|
|
|
195
|
+
describe('detectComposerTrigger — @harness:<id>:[model]', () => {
|
|
196
|
+
test('the tail after the second colon is the model query', () => {
|
|
197
|
+
const text = '@harness:omp-rpc:';
|
|
198
|
+
expect(detectComposerTrigger(text, text.length)).toEqual({
|
|
199
|
+
kind: 'mention',
|
|
200
|
+
query: '',
|
|
201
|
+
start: 0,
|
|
202
|
+
end: text.length,
|
|
203
|
+
phase: 'model',
|
|
204
|
+
// Only the text AFTER `harness:<id>:` is replaced.
|
|
205
|
+
replaceFrom: text.length,
|
|
206
|
+
harness: 'omp-rpc',
|
|
207
|
+
});
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
test('a typed model is the query, and a slash stays inside it', () => {
|
|
211
|
+
const text = '@harness:claude:kenari/agnes';
|
|
212
|
+
expect(detectComposerTrigger(text, text.length)).toMatchObject({
|
|
213
|
+
kind: 'mention',
|
|
214
|
+
phase: 'model',
|
|
215
|
+
query: 'kenari/agnes',
|
|
216
|
+
harness: 'claude',
|
|
217
|
+
start: 0,
|
|
218
|
+
replaceFrom: '@harness:claude:'.length,
|
|
219
|
+
});
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
test('the alias resolves to the catalog id, so the rows are the agent’s own', () => {
|
|
223
|
+
const text = '@harness:omp:op';
|
|
224
|
+
expect(detectComposerTrigger(text, text.length)).toMatchObject({ phase: 'model', harness: 'omp-rpc', query: 'op' });
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
test('a bare harness mention is still a name-phase row', () => {
|
|
228
|
+
const text = '@harness:claude';
|
|
229
|
+
expect(detectComposerTrigger(text, text.length)).toMatchObject({ phase: 'name', query: 'harness:claude' });
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
test('accepting a model keeps the mention the user typed', () => {
|
|
233
|
+
const text = '@harness:omp-rpc:ken';
|
|
234
|
+
const trigger = detectComposerTrigger(text, text.length);
|
|
235
|
+
if (!trigger) throw new Error('expected a trigger');
|
|
236
|
+
|
|
237
|
+
const token = 'kenari-jatis/deepseek ';
|
|
238
|
+
expect(insertToken(text, trigger, token)).toEqual({
|
|
239
|
+
value: `@harness:omp-rpc:${token}`,
|
|
240
|
+
caret: `@harness:omp-rpc:${token}`.length,
|
|
241
|
+
});
|
|
242
|
+
});
|
|
243
|
+
});
|
|
244
|
+
|
|
195
245
|
describe('tokenForItem', () => {
|
|
196
246
|
const base: ComposerPickItem = {
|
|
197
247
|
id: 'x',
|
|
@@ -1,8 +1,19 @@
|
|
|
1
|
+
import { harnessIdForName } from '@/shared/lib/harness/catalog';
|
|
1
2
|
import type { CommandItem, ComposerMatchItem, ComposerPickItem, ComposerTrigger } from '@/shared/types';
|
|
2
3
|
|
|
3
4
|
/** Chars that may legally precede an `@` agent trigger (besides string start). */
|
|
4
5
|
const AT_PRECEDING_RE = /[\s([{]/;
|
|
5
6
|
|
|
7
|
+
/**
|
|
8
|
+
* `@harness:<id>:<model>` — the model tail the popup completes.
|
|
9
|
+
*
|
|
10
|
+
* The namespace is spelled out here rather than reused from the delegation
|
|
11
|
+
* parser: this is a TYPING rule about the token before the caret, and the
|
|
12
|
+
* parser's job is the whole paragraph after send. Both resolve the id through
|
|
13
|
+
* the same catalog alias table, so `@harness:omp:` scopes to `omp-rpc`.
|
|
14
|
+
*/
|
|
15
|
+
const SCOPED_HARNESS_MENTION_RE = /^harness:([a-z0-9][a-z0-9-]*):([^\s#]*)$/i;
|
|
16
|
+
|
|
6
17
|
/** oh-my-pi's `SKILL_NAMESPACE`: skills are addressed as `/skill:<name>`. */
|
|
7
18
|
export const SKILL_NAMESPACE = 'skill:';
|
|
8
19
|
|
|
@@ -167,7 +178,24 @@ export function detectComposerTrigger(text: string, caret: number): ComposerTrig
|
|
|
167
178
|
if (ch === '@') {
|
|
168
179
|
if (i === 0 || AT_PRECEDING_RE.test(beforeOnLine[i - 1])) {
|
|
169
180
|
const at = lineStart + i;
|
|
170
|
-
|
|
181
|
+
const mention = beforeOnLine.slice(i + 1);
|
|
182
|
+
const scoped = SCOPED_HARNESS_MENTION_RE.exec(mention);
|
|
183
|
+
if (scoped) {
|
|
184
|
+
const typed = scoped[1] ?? '';
|
|
185
|
+
// The tail after `harness:<id>:` is the model query, and accepting a
|
|
186
|
+
// row replaces ONLY that tail — `start` still names the `@` so the
|
|
187
|
+
// rest of the mention survives.
|
|
188
|
+
return {
|
|
189
|
+
kind: 'mention',
|
|
190
|
+
query: scoped[2] ?? '',
|
|
191
|
+
start: at,
|
|
192
|
+
end,
|
|
193
|
+
phase: 'model',
|
|
194
|
+
replaceFrom: at + 1 + 'harness:'.length + typed.length + 1,
|
|
195
|
+
harness: harnessIdForName(typed) ?? typed.toLowerCase(),
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
return { kind: 'mention', query: mention, start: at, end, phase: 'name', replaceFrom: at };
|
|
171
199
|
}
|
|
172
200
|
return null;
|
|
173
201
|
}
|
|
@@ -61,6 +61,22 @@ describe('bucketChangesByRun', () => {
|
|
|
61
61
|
expect(buckets.get(3)?.map((file) => file.displayPath)).toEqual(['b.ts']);
|
|
62
62
|
});
|
|
63
63
|
|
|
64
|
+
test('a run id wins over the wall-clock window', () => {
|
|
65
|
+
// `runAt` 900 is just before the first window (1000); the change at 2500 is
|
|
66
|
+
// outside every window, but the run id says it belongs to run 1.
|
|
67
|
+
const buckets = bucketChangesByRun(messages, footers, [
|
|
68
|
+
record({ at: 2500, runId: 'r1', runAt: 900, path: '/repo/late.ts', displayPath: 'late.ts' }),
|
|
69
|
+
]);
|
|
70
|
+
expect(buckets.get(1)?.map((file) => file.displayPath)).toEqual(['late.ts']);
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
test('a late subagent change keeps its run', () => {
|
|
74
|
+
const buckets = bucketChangesByRun(messages, footers, [
|
|
75
|
+
record({ at: 5000, runId: 'r1', runAt: 1000, path: '/repo/late.ts', displayPath: 'late.ts' }),
|
|
76
|
+
]);
|
|
77
|
+
expect(buckets.get(1)?.map((file) => file.displayPath)).toEqual(['late.ts']);
|
|
78
|
+
});
|
|
79
|
+
|
|
64
80
|
test('a write outside every window is dropped', () => {
|
|
65
81
|
const buckets = bucketChangesByRun(messages, footers, [record({ at: 2500 })]);
|
|
66
82
|
expect(buckets.size).toBe(0);
|
|
@@ -6,9 +6,15 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* Bucket the agent change journal into chat runs.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
9
|
+
* A record that carries a `runId` belongs to the run that id names, and the
|
|
10
|
+
* run's `runAt` (its `agent_start` time) maps it to the chat row that owns the
|
|
11
|
+
* run. That is exact where the wall-clock window is not: a subagent that writes
|
|
12
|
+
* after the parent's terminal `agent_end` still carries the parent's run id, so
|
|
13
|
+
* its change lands in the run that started it instead of the next one.
|
|
14
|
+
*
|
|
15
|
+
* A record with no `runId` (a journal written before runs, or a session whose
|
|
16
|
+
* first frame was a tool call) falls back to the wall-clock window — the run's
|
|
17
|
+
* opening row's start to its owner row's end (`runWindowMs`).
|
|
12
18
|
*
|
|
13
19
|
* One file can be written several times in a run; the list shows the NET change
|
|
14
20
|
* — the first record's `before` to the last record's `after` — because that is
|
|
@@ -39,33 +45,104 @@ export function bucketChangesByRun(
|
|
|
39
45
|
if (records.length === 0) return byOwner;
|
|
40
46
|
const sorted = [...records].sort((a, b) => a.at - b.at);
|
|
41
47
|
|
|
48
|
+
// Run id → the footer that owns it, from the run's start time.
|
|
49
|
+
const runStart = new Map<string, number>();
|
|
50
|
+
for (const record of sorted) {
|
|
51
|
+
if (record.runId && record.runAt !== undefined && !runStart.has(record.runId)) {
|
|
52
|
+
runStart.set(record.runId, record.runAt);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
const ownerByRun = new Map<string, number>();
|
|
56
|
+
for (const [runId, at] of runStart) {
|
|
57
|
+
const owner = ownerForRunAt(messages, footers, at);
|
|
58
|
+
if (owner !== null) ownerByRun.set(runId, owner);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const byOwnerRecords = new Map<number, SessionChangeRecord[]>();
|
|
62
|
+
for (const record of sorted) {
|
|
63
|
+
const owner = record.runId ? ownerByRun.get(record.runId) : undefined;
|
|
64
|
+
if (owner !== undefined) {
|
|
65
|
+
push(byOwnerRecords, owner, record);
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
// Fallback: the wall-clock window (old journals, or a run with no footer).
|
|
69
|
+
for (const slot of footers) {
|
|
70
|
+
if (!slot) continue;
|
|
71
|
+
const window = runWindowMs(messages, slot.runStartIndex, slot.ownerIndex);
|
|
72
|
+
if (!window) continue;
|
|
73
|
+
if (record.at >= window.start && record.at <= window.end) {
|
|
74
|
+
push(byOwnerRecords, slot.ownerIndex, record);
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
for (const [owner, list] of byOwnerRecords) {
|
|
81
|
+
const files = filesForRecords(list);
|
|
82
|
+
if (files.length > 0) byOwner.set(owner, files);
|
|
83
|
+
}
|
|
84
|
+
return byOwner;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* The footer whose run contains `at`, or the nearest one after it.
|
|
89
|
+
*
|
|
90
|
+
* `agent_start` lands ~120 ms BEFORE the user message that opens the run's
|
|
91
|
+
* window, so containment alone misses the first run; the nearest start at or
|
|
92
|
+
* after `at` is that run. A late subagent change is after every window, so the
|
|
93
|
+
* nearest start before it is the run it belongs to.
|
|
94
|
+
*/
|
|
95
|
+
function ownerForRunAt(
|
|
96
|
+
messages: ChatMessageData[],
|
|
97
|
+
footers: (RunFooterSlot | null)[],
|
|
98
|
+
at: number,
|
|
99
|
+
): number | null {
|
|
100
|
+
let next: { owner: number; start: number } | null = null;
|
|
101
|
+
let previous: { owner: number; start: number } | null = null;
|
|
42
102
|
for (const slot of footers) {
|
|
43
103
|
if (!slot) continue;
|
|
44
104
|
const window = runWindowMs(messages, slot.runStartIndex, slot.ownerIndex);
|
|
45
105
|
if (!window) continue;
|
|
46
|
-
|
|
47
|
-
if (
|
|
48
|
-
|
|
49
|
-
const byPath = new Map<string, PathSpan>();
|
|
50
|
-
for (const record of inWindow) {
|
|
51
|
-
const span = byPath.get(record.path);
|
|
52
|
-
if (span) span.last = record;
|
|
53
|
-
else byPath.set(record.path, { first: record, last: record });
|
|
106
|
+
if (at >= window.start && at <= window.end) return slot.ownerIndex;
|
|
107
|
+
if (window.start >= at && (!next || window.start < next.start)) {
|
|
108
|
+
next = { owner: slot.ownerIndex, start: window.start };
|
|
54
109
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
for (const [path, { first, last }] of byPath) {
|
|
58
|
-
// Created and deleted in the same run: no net change.
|
|
59
|
-
if (first.before === null && last.after === null) continue;
|
|
60
|
-
// Written back to the same content: no net change. Only a real blob key
|
|
61
|
-
// can prove that; `undefined` means "not stored", not "unchanged".
|
|
62
|
-
if (typeof first.before === 'string' && first.before === last.after) continue;
|
|
63
|
-
const status = first.before === null ? 'added' : last.after === null ? 'deleted' : 'modified';
|
|
64
|
-
files.push({ path, displayPath: last.displayPath, status, agent: last.agent });
|
|
110
|
+
if (window.start <= at && (!previous || window.start > previous.start)) {
|
|
111
|
+
previous = { owner: slot.ownerIndex, start: window.start };
|
|
65
112
|
}
|
|
66
|
-
if (files.length === 0) continue;
|
|
67
|
-
files.sort((a, b) => a.displayPath.localeCompare(b.displayPath));
|
|
68
|
-
byOwner.set(slot.ownerIndex, files);
|
|
69
113
|
}
|
|
70
|
-
return
|
|
114
|
+
return next?.owner ?? previous?.owner ?? null;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function push(
|
|
118
|
+
map: Map<number, SessionChangeRecord[]>,
|
|
119
|
+
owner: number,
|
|
120
|
+
record: SessionChangeRecord,
|
|
121
|
+
): void {
|
|
122
|
+
const list = map.get(owner);
|
|
123
|
+
if (list) list.push(record);
|
|
124
|
+
else map.set(owner, [record]);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/** The net change of one run's records, one entry per path. */
|
|
128
|
+
function filesForRecords(records: SessionChangeRecord[]): ChangedFile[] {
|
|
129
|
+
const byPath = new Map<string, PathSpan>();
|
|
130
|
+
for (const record of records) {
|
|
131
|
+
const span = byPath.get(record.path);
|
|
132
|
+
if (span) span.last = record;
|
|
133
|
+
else byPath.set(record.path, { first: record, last: record });
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
const files: ChangedFile[] = [];
|
|
137
|
+
for (const [path, { first, last }] of byPath) {
|
|
138
|
+
// Created and deleted in the same run: no net change.
|
|
139
|
+
if (first.before === null && last.after === null) continue;
|
|
140
|
+
// Written back to the same content: no net change. Only a real blob key
|
|
141
|
+
// can prove that; `undefined` means "not stored", not "unchanged".
|
|
142
|
+
if (typeof first.before === 'string' && first.before === last.after) continue;
|
|
143
|
+
const status = first.before === null ? 'added' : last.after === null ? 'deleted' : 'modified';
|
|
144
|
+
files.push({ path, displayPath: last.displayPath, status, agent: last.agent });
|
|
145
|
+
}
|
|
146
|
+
files.sort((a, b) => a.displayPath.localeCompare(b.displayPath));
|
|
147
|
+
return files;
|
|
71
148
|
}
|
|
@@ -217,6 +217,27 @@ export function harnessDescriptor(id: string | null | undefined): HarnessDescrip
|
|
|
217
217
|
return (HARNESS_CATALOG as Record<string, HarnessDescriptor | undefined>)[id] ?? customDescriptors.get(id);
|
|
218
218
|
}
|
|
219
219
|
|
|
220
|
+
/**
|
|
221
|
+
* The names users type that are not catalog ids. `omp` is the default RPC
|
|
222
|
+
* surface; `claude-code` is the vendor's name for the `claude` adapter.
|
|
223
|
+
*
|
|
224
|
+
* One table because TWO readers must agree: the delegation parser refuses an
|
|
225
|
+
* unknown `@harness:` name, and the composer's model completion scopes the list
|
|
226
|
+
* by the same resolved id. A second copy is how `@harness:omp:` could delegate
|
|
227
|
+
* to omp while its model popup offered nothing.
|
|
228
|
+
*/
|
|
229
|
+
export const HARNESS_NAME_ALIASES: Readonly<Record<string, HarnessId>> = {
|
|
230
|
+
omp: 'omp-rpc',
|
|
231
|
+
'claude-code': 'claude',
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
/** Resolve an alias or a catalog id (case-insensitively), or null. */
|
|
235
|
+
export function harnessIdForName(name: string | null | undefined): HarnessId | null {
|
|
236
|
+
if (!name) return null;
|
|
237
|
+
const lower = name.toLowerCase();
|
|
238
|
+
return HARNESS_NAME_ALIASES[lower] ?? (harnessDescriptor(lower) ? (lower as HarnessId) : null);
|
|
239
|
+
}
|
|
240
|
+
|
|
220
241
|
/**
|
|
221
242
|
* The row's badge text: the label, with omp's two surfaces told apart.
|
|
222
243
|
*
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { describe, expect, test } from 'bun:test';
|
|
16
|
-
import { acpModelOption, harnessModels, pickerHarnesses } from '@/
|
|
16
|
+
import { acpModelOption, harnessModels, pickerHarnesses } from '@/shared/lib/harness/models';
|
|
17
17
|
import type { HarnessSummary } from '@/shared/types/harness';
|
|
18
18
|
import type { AIModelOption } from '@/shared/types';
|
|
19
19
|
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* One registry entry as a picker row.
|
|
8
|
+
*
|
|
9
|
+
* `/api/models` answers `ModelEntry` (omp's registry, numbers for cost) while
|
|
10
|
+
* every picker surface renders `AIModelOption` (display strings). One mapper
|
|
11
|
+
* keeps the two from drifting: the model dropdown, the composer's
|
|
12
|
+
* `@harness:<id>:` completion and any future reader describe the same row the
|
|
13
|
+
* same way.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import type { AIModelOption, ModelEntry } from '@/shared/types';
|
|
17
|
+
|
|
18
|
+
export function modelEntryOption(entry: ModelEntry): AIModelOption {
|
|
19
|
+
const ladder = Array.isArray(entry.thinkingLevels) ? entry.thinkingLevels : [];
|
|
20
|
+
const cost = entry.cost;
|
|
21
|
+
return {
|
|
22
|
+
id: entry.id,
|
|
23
|
+
name: entry.name || entry.id,
|
|
24
|
+
// A row without a provider still has to render. `/api/models` is read from
|
|
25
|
+
// omp's registry, and a partial entry (a custom provider whose `provider`
|
|
26
|
+
// field never landed) used to crash the whole picker — `buildPickerGroups`
|
|
27
|
+
// upper-cased `undefined` and the composer's model pill took the chat input
|
|
28
|
+
// down with it. `unknown` keeps the row visible and gives it a stable
|
|
29
|
+
// section instead of dropping a model the user may have selected.
|
|
30
|
+
provider: entry.provider || 'unknown',
|
|
31
|
+
// The provider's fetched web icon, when the server has one. Carried through
|
|
32
|
+
// so the picker's section header and the selected model's mark can draw the
|
|
33
|
+
// site's own logo instead of the initials of a provider nobody has drawn.
|
|
34
|
+
...(entry.providerIconUrl ? { providerIconUrl: entry.providerIconUrl } : {}),
|
|
35
|
+
contextWindow: entry.contextWindow,
|
|
36
|
+
thinkingLevel: ladder[0] ?? 'off',
|
|
37
|
+
thinkingLevels: ladder,
|
|
38
|
+
capabilities: ladder.length > 1 ? ['Tool calling', 'Reasoning'] : ['Tool calling'],
|
|
39
|
+
cost: cost ? {
|
|
40
|
+
input: cost.input !== undefined ? `$${cost.input}` : '—',
|
|
41
|
+
output: cost.output !== undefined ? `$${cost.output}` : '—',
|
|
42
|
+
cacheRead: cost.cacheRead !== undefined ? `$${cost.cacheRead}` : undefined,
|
|
43
|
+
cacheWrite: cost.cacheWrite !== undefined ? `$${cost.cacheWrite}` : undefined,
|
|
44
|
+
} : undefined,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
@@ -161,6 +161,26 @@ describe('OMP_SCHEMA', () => {
|
|
|
161
161
|
// …and `edit.mode` gained `none`, which removes the `edit` tool.
|
|
162
162
|
expect(OMP_SCHEMA.entries['edit.mode']?.values).toContain('none');
|
|
163
163
|
});
|
|
164
|
+
|
|
165
|
+
test("18.20.3's three Mnemopi rows are present and gated on the backend", () => {
|
|
166
|
+
// The generator only emits a row for a setting that carries a `ui` block,
|
|
167
|
+
// so a row dropped here means the panel lost its only editor. All three
|
|
168
|
+
// are upstream-gated on `mnemopiActive`; a missing condition would show a
|
|
169
|
+
// Mnemopi-only row to every user.
|
|
170
|
+
const rows = {
|
|
171
|
+
'mnemopi.recallRelevance': { type: 'enum', default: 'off' },
|
|
172
|
+
'mnemopi.embeddingQueryPrefix': { type: 'string', default: undefined },
|
|
173
|
+
'mnemopi.embeddingInputType': { type: 'boolean', default: false },
|
|
174
|
+
} as const;
|
|
175
|
+
for (const [key, want] of Object.entries(rows)) {
|
|
176
|
+
const entry = OMP_SCHEMA.entries[key];
|
|
177
|
+
expect({ key, entry: entry && { type: entry.type, tab: entry.ui.tab, group: entry.ui.group, condition: entry.ui.condition, default: entry.default } }).toEqual({
|
|
178
|
+
key,
|
|
179
|
+
entry: { ...want, tab: 'memory', group: 'Mnemopi', condition: 'mnemopiActive' },
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
expect(OMP_SCHEMA.entries['mnemopi.recallRelevance']?.values).toEqual(['auto', 'on', 'off']);
|
|
183
|
+
});
|
|
164
184
|
});
|
|
165
185
|
|
|
166
186
|
describe('ALL_SCHEMA_ENTRIES', () => {
|
package/src/shared/types/chat.ts
CHANGED
|
@@ -262,14 +262,15 @@ export interface QueuedMessage {
|
|
|
262
262
|
/** Trigger group that opened the composer autocomplete: `@` → mention, `/` → command. */
|
|
263
263
|
export type ComposerPickKind = 'mention' | 'command';
|
|
264
264
|
/** Origin of a pickable item: an `@` mention is an agent or a workspace file. */
|
|
265
|
-
export type ComposerPickSource = 'agent' | 'harness' | 'file' | 'command' | 'skill';
|
|
265
|
+
export type ComposerPickSource = 'agent' | 'harness' | 'model' | 'file' | 'command' | 'skill';
|
|
266
266
|
|
|
267
267
|
/**
|
|
268
|
-
* Which part of
|
|
269
|
-
*
|
|
270
|
-
*
|
|
268
|
+
* Which part of an invocation the popup is completing. oh-my-pi splits these
|
|
269
|
+
* the same way: `name` completes the command token itself, `args` completes a
|
|
270
|
+
* declarative subcommand after `<command> `, and `model` completes the
|
|
271
|
+
* `[:<model>]` tail of an `@harness:<id>:` mention.
|
|
271
272
|
*/
|
|
272
|
-
export type ComposerTriggerPhase = 'name' | 'args';
|
|
273
|
+
export type ComposerTriggerPhase = 'name' | 'args' | 'model';
|
|
273
274
|
|
|
274
275
|
/** A detected trigger: the `@`/`/` char plus the query typed after it. */
|
|
275
276
|
export interface ComposerTrigger {
|
|
@@ -279,10 +280,15 @@ export interface ComposerTrigger {
|
|
|
279
280
|
start: number;
|
|
280
281
|
/** Caret index when detected. */
|
|
281
282
|
end: number;
|
|
282
|
-
/** Command completion phase;
|
|
283
|
+
/** Command completion phase; a plain `@` mention completes its `name`. */
|
|
283
284
|
phase: ComposerTriggerPhase;
|
|
284
285
|
/** Index the accepted text replaces from — equals `start` in the `name` phase. */
|
|
285
286
|
replaceFrom: number;
|
|
287
|
+
/**
|
|
288
|
+
* The harness whose model the `model` phase completes (`@harness:<id>:`),
|
|
289
|
+
* resolved through the catalog's alias table (`omp` → `omp-rpc`).
|
|
290
|
+
*/
|
|
291
|
+
harness?: string;
|
|
286
292
|
/** Command the `args` phase belongs to (name or alias as typed). */
|
|
287
293
|
command?: string;
|
|
288
294
|
/**
|
|
@@ -264,6 +264,15 @@ export interface ExtensionUiDialogRequest {
|
|
|
264
264
|
* plain text. Present only on `method: "input"`.
|
|
265
265
|
*/
|
|
266
266
|
secret?: boolean;
|
|
267
|
+
/**
|
|
268
|
+
* RPC `select` fields describing a MULTI-select control (omp 18.18.3's
|
|
269
|
+
* per-field walk). `selectionMarker: "checkbox"` says the rows toggle instead
|
|
270
|
+
* of answering, and `checkedIndices` is authoritative for what is currently
|
|
271
|
+
* ticked after each re-ask.
|
|
272
|
+
*/
|
|
273
|
+
selectionMarker?: 'radio' | 'checkbox';
|
|
274
|
+
checkedIndices?: number[];
|
|
275
|
+
markableCount?: number;
|
|
267
276
|
/**
|
|
268
277
|
* Present only on the GROUPED `ask` request, which omp sends after
|
|
269
278
|
* `set_ask_dialog {enabled:true}`: every question of one `ask` tool call in a
|
|
@@ -17,6 +17,10 @@
|
|
|
17
17
|
export interface SessionChangeRecord {
|
|
18
18
|
/** Epoch ms the write landed. */
|
|
19
19
|
at: number;
|
|
20
|
+
/** The run this record belongs to; absent on a journal written before runs. */
|
|
21
|
+
runId?: string;
|
|
22
|
+
/** The run's `agent_start` time, for mapping the run to a chat row. */
|
|
23
|
+
runAt?: number;
|
|
20
24
|
/** Registry id of the agent that wrote (`Main`, `AuthLoader`). */
|
|
21
25
|
agent: string;
|
|
22
26
|
/** Parent agent id; absent for the root agent. */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{lf}from"./index-k06med7d.js";export{lf as createArchitectureServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{qi}from"./index-9t82sx0w.js";export{qi as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$l}from"./index-vtbbfwx0.js";import"./index-9t82sx0w.js";export{$l as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{rd,as,ih,oh,sh,lh}from"./index-z6g74h7g.js";export{ih as css,lh as gss,as as keywords,sh as less,rd as mkCSS,oh as sCSS};
|