@kabmo-labs/kabmo 0.60.0 → 0.62.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/README.md +53 -49
- package/dist/client/index.html +1 -1
- package/dist/client/index.js +1157 -825
- package/dist/client/static/js/{Body-p82s28sj.js → Body-z6kstvk6.js} +3 -3
- package/dist/client/static/js/{CsvGrid-erc5mcvc.js → CsvGrid-f73c0s4e.js} +2 -2
- package/dist/client/static/js/{DocxView-x3faj0jv.js → DocxView-a1pb7nsb.js} +3 -3
- package/dist/client/static/js/{DrawioView-t7fh3ens.js → DrawioView-r61gcg24.js} +2 -2
- package/dist/client/static/js/{HtmlPreview-zy7x7jmm.js → HtmlPreview-vt7j0b05.js} +1 -1
- package/dist/client/static/js/ImageView-4nhr5dtm.js +1 -0
- package/dist/client/static/js/LayoutWrapper-vwhy0vhj.js +2 -0
- package/dist/client/static/js/MergeDiffView-f4h9ss71.js +1 -0
- package/dist/client/static/js/Modal-cadmjkak.js +60 -0
- package/dist/client/static/js/{PdfView-kqx472q7.js → PdfView-mppt2gkd.js} +1 -1
- package/dist/client/static/js/SessionsView-vvsaw9f0.js +1 -0
- package/dist/client/static/js/{SheetView-0n9fze50.js → SheetView-5s9zfx9g.js} +9 -9
- package/dist/client/static/js/{SvgPreview-6xc6ts46.js → SvgPreview-ff78xn3e.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-2xdkkqwg.js → abnfDiagram-O67JEVCF-p29sh3w2.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-83w3kytq.js +1 -0
- package/dist/client/static/js/{architectureDiagram-NJMV4G6O-ja8cx19z.js → architectureDiagram-NJMV4G6O-nbpdyea3.js} +3 -3
- package/dist/client/static/js/{astro-yphdvdty.js → astro-qtfmc8x7.js} +1 -1
- package/dist/client/static/js/bash-wcy12qjx.js +1 -0
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-ytf7s99c.js → blockDiagram-BEXU5L5S-t8xbexa6.js} +6 -6
- package/dist/client/static/js/c-vvantfth.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-5a0kdx0z.js → c4Diagram-YGBWAQC7-9fwf2zxk.js} +3 -3
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-hd98dvjw.js → classDiagram-v2-NBCMYWYE-nbapgqbs.js} +4 -4
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-man3fqcj.js → cose-bilkent-JH36ORCC-k54mmydp.js} +1 -1
- package/dist/client/static/js/cpp-5x63r6g0.js +1 -0
- package/dist/client/static/js/css-j2j6f03w.js +1 -0
- package/dist/client/static/js/css-qk59j6rj.js +1 -0
- package/dist/client/static/js/cynefin-OW5HDTMX-80z02zrj.js +1 -0
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-2f0kbbv2.js → cynefinDiagram-VND7K2PF-qdg32wah.js} +1 -1
- package/dist/client/static/js/{dagre-6A5THRUB-k7pyhgzn.js → dagre-6A5THRUB-qzshg1vs.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-qx0afa2m.js → diagram-22UHCM2B-197hemfa.js} +11 -11
- package/dist/client/static/js/{diagram-3UASUU5V-ydpe77sv.js → diagram-3UASUU5V-236gnjr6.js} +1 -1
- package/dist/client/static/js/{diagram-ATOU4E4O-e63v984n.js → diagram-ATOU4E4O-vjgpyaaq.js} +3 -3
- package/dist/client/static/js/{diagram-CDSNMT55-8c765h3a.js → diagram-CDSNMT55-ywvzcx7z.js} +4 -4
- package/dist/client/static/js/{diagram-MLGK6HIB-3pq0n7v8.js → diagram-MLGK6HIB-9ey7ev7j.js} +1 -1
- package/dist/client/static/js/{diagram-MPIPVDR6-638atzxz.js → diagram-MPIPVDR6-vrqbb6r7.js} +2 -2
- package/dist/client/static/js/{dockerfile-yehc914q.js → dockerfile-4nked309.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-3gv43zvm.js → ebnfDiagram-ZINNZB2B-hvnkevqy.js} +1 -1
- package/dist/client/static/js/{elixir-3nwnd9yw.js → elixir-3jvh6v4k.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-6s5pggfc.js → elk-276RUBZZ-nej6yy1c.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-x7cqyb89.js → erDiagram-OPXOYQCR-ww453xcy.js} +5 -5
- package/dist/client/static/js/{erlang-p5c4n3t0.js → erlang-4fz73a1q.js} +1 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-y9pq2709.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-e6v7513q.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-g97te4v1.js → ganttDiagram-FUAMR5RP-abc5wy70.js} +3 -3
- package/dist/client/static/js/gitGraph-4MIJSDKK-fzaf9azs.js +1 -0
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-sw4f94tc.js → gitGraphDiagram-X574FWY7-4acqzj2h.js} +7 -7
- package/dist/client/static/js/graphql-hpkvdvk7.js +1 -0
- package/dist/client/static/js/html-x12gb1wk.js +1 -0
- package/dist/client/static/js/{index-v88m5sva.js → index-0g82ph6h.js} +2 -2
- package/dist/client/static/js/{index-vejz38qt.js → index-0w1jzang.js} +5 -5
- package/dist/client/static/js/{index-bpcg34jp.js → index-1svt0cdw.js} +2 -2
- package/dist/client/static/js/{index-hgfyx8dt.js → index-1tb4py5v.js} +2 -2
- package/dist/client/static/js/index-2gt9krtj.js +4 -0
- package/dist/client/static/js/index-2x9m7s1a.js +1 -0
- package/dist/client/static/js/index-3fvqmz3m.js +4 -0
- package/dist/client/static/js/{index-pdz6j2g2.js → index-42wvbkm5.js} +2 -2
- package/dist/client/static/js/index-477vtt51.js +2 -0
- package/dist/client/static/js/{index-ca6tmamh.js → index-4px56qaz.js} +2 -2
- package/dist/client/static/js/{index-excgtjhx.js → index-5anvw7xg.js} +36 -36
- package/dist/client/static/js/index-5nb9k2ph.js +1 -0
- package/dist/client/static/js/{index-97sw4d9n.js → index-615je3km.js} +2 -2
- package/dist/client/static/js/{index-111bq6rs.js → index-66qxrh5n.js} +1 -1
- package/dist/client/static/js/{index-a145x0w2.js → index-7kct1sz1.js} +2 -2
- package/dist/client/static/js/{index-hwv7bfxc.js → index-8e0d8y30.js} +2 -2
- package/dist/client/static/js/{index-s4j2ghmx.js → index-90bq56xw.js} +2 -2
- package/dist/client/static/js/{index-wsy6y5em.js → index-b1gzh60t.js} +11 -11
- package/dist/client/static/js/{index-10vzyga1.js → index-bypkmjrz.js} +2 -2
- package/dist/client/static/js/{index-n8r7r86r.js → index-c1vd63yd.js} +2 -2
- package/dist/client/static/js/index-c9f0hejv.js +3 -0
- package/dist/client/static/js/{index-2dmew334.js → index-cgqj15g0.js} +2 -2
- package/dist/client/static/js/{index-mtav0rpf.js → index-cts5re1t.js} +2 -2
- package/dist/client/static/js/index-dxc14kmm.js +1 -0
- package/dist/client/static/js/{index-hwdkxe4n.js → index-dxyjxhm1.js} +2 -2
- package/dist/client/static/js/{index-43gmn7yb.js → index-edpyqz9f.js} +1 -1
- package/dist/client/static/js/{index-pdgc9ccr.js → index-eesepb70.js} +2 -2
- package/dist/client/static/js/{index-vec7m1yd.js → index-evh437bz.js} +2 -2
- package/dist/client/static/js/index-ey6v4t5b.js +1 -0
- package/dist/client/static/js/{index-025s3fp8.js → index-fsd7n336.js} +2 -2
- package/dist/client/static/js/{index-yfcy4cf6.js → index-h7a7fqag.js} +2 -2
- package/dist/client/static/js/{index-11qn05g9.js → index-hffgwnvz.js} +2 -2
- package/dist/client/static/js/index-j734ev6q.js +482 -0
- package/dist/client/static/js/{index-vcq6zfxx.js → index-jcbp1d9d.js} +6 -6
- package/dist/client/static/js/index-jg5h18sm.js +2 -0
- package/dist/client/static/js/{index-6qn9kygb.js → index-jtdve6xw.js} +7 -7
- package/dist/client/static/js/{index-4xbc0j7t.js → index-k0bqrb1y.js} +1 -1
- package/dist/client/static/js/{index-bdtftrym.js → index-kegevd10.js} +2 -2
- package/dist/client/static/js/{index-fr6wsqk8.js → index-kqcfxkch.js} +2 -2
- package/dist/client/static/js/{index-2n2evsg0.js → index-kv1xnem9.js} +2 -2
- package/dist/client/static/js/{index-8zct30zd.js → index-m54ctmxr.js} +1 -1
- package/dist/client/static/js/index-mgzbypt5.js +314 -0
- package/dist/client/static/js/{index-cf69bhjx.js → index-mh52531j.js} +2 -2
- package/dist/client/static/js/{index-0ze5bwvw.js → index-mhz5ywa4.js} +5 -5
- package/dist/client/static/js/{index-3j2he86h.js → index-nnwdbg3t.js} +2 -2
- package/dist/client/static/js/{index-9rz6kzsv.js → index-nxd6z7f9.js} +2 -2
- package/dist/client/static/js/{index-jfqd838j.js → index-pjrbt77c.js} +2 -2
- package/dist/client/static/js/index-r7h4pm42.js +2 -0
- package/dist/client/static/js/index-ratrdgc9.js +2 -0
- package/dist/client/static/js/{index-cfvc1zpk.js → index-rhmvh9w5.js} +2 -2
- package/dist/client/static/js/{index-twwsn91p.js → index-sqzjwy9h.js} +2 -2
- package/dist/client/static/js/{index-37apvxgj.js → index-tckzkw0f.js} +2 -2
- package/dist/client/static/js/index-tza9h3q6.css +1 -0
- package/dist/client/static/js/{index-qccydkze.js → index-vhjfr093.js} +2 -2
- package/dist/client/static/js/{index-z8k42dwz.js → index-w0j96eyy.js} +8 -8
- package/dist/client/static/js/{index-qkqkygrf.js → index-ws04kxy9.js} +1 -1
- package/dist/client/static/js/{index-a3bpmw2r.js → index-x1yqmzpr.js} +2 -2
- package/dist/client/static/js/{index-fb2fjndj.js → index-x2f7wykb.js} +6 -6
- package/dist/client/static/js/index-y8405hdg.js +10 -0
- package/dist/client/static/js/{index-sx83ans2.js → index-yxk7dgnb.js} +2 -2
- package/dist/client/static/js/{index-bkn6jtn1.js → index-zavecxak.js} +2 -2
- package/dist/client/static/js/{index-dv01prse.js → index-zg7q3kcb.js} +2 -2
- package/dist/client/static/js/{index-enm77k5z.js → index-zhn9vv3z.js} +2 -2
- package/dist/client/static/js/{index-ywp0sd1e.js → index-zy963qbh.js} +1 -1
- package/dist/client/static/js/info-A6RAGUB7-t7pbg7rt.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-pw2qaa27.js → infoDiagram-VRGFBTTK-9pe7w3r5.js} +2 -2
- package/dist/client/static/js/ini-522adp5a.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-d13jhvxy.js → ishikawaDiagram-OU5B5YK6-38arfrx5.js} +2 -2
- package/dist/client/static/js/java-z0rgs7v6.js +1 -0
- package/dist/client/static/js/javascript-fv87f565.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-20gb8a04.js → journeyDiagram-ZHPQQLJL-kcwzjgtz.js} +4 -4
- package/dist/client/static/js/json-1czq1ped.js +1 -0
- package/dist/client/static/js/jsx-1fch2jyr.js +1 -0
- package/dist/client/static/js/{julia-rpd1y9vh.js → julia-pzzxbptm.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-s78e158c.js → kanban-definition-PNTS6WVX-nmegwy9w.js} +15 -15
- package/dist/client/static/js/lua-nn8bpjev.js +1 -0
- package/dist/client/static/js/markdown-38tqrgkn.js +1 -0
- package/dist/client/static/js/{mermaid.core-xbm27k28.js → mermaid.core-3aae27b9.js} +7 -7
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-6y7xe2zm.js → mindmap-definition-NLK3R4M7-zsaq4e65.js} +12 -12
- package/dist/client/static/js/one-dark-pro-trnff03z.js +1 -0
- package/dist/client/static/js/one-light-ck31ptqs.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-rwac7scq.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-dmvewetf.js → pegDiagram-GJSIUBJH-2b6whj1p.js} +1 -1
- package/dist/client/static/js/{perl-kmtz9dnv.js → perl-zdkbbjd2.js} +1 -1
- package/dist/client/static/js/{php-bttrsbxy.js → php-ktaxff6g.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-gjz20apz.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-1q9e7rcm.js → pieDiagram-5QR66LMP-y09ar7vz.js} +3 -3
- package/dist/client/static/js/properties-kncqeqhn.js +1 -0
- package/dist/client/static/js/python-gx8ggmyh.js +1 -0
- package/dist/client/static/js/{quadrantDiagram-O4NWA36T-mvrem3n6.js → quadrantDiagram-O4NWA36T-mapfzs06.js} +3 -3
- package/dist/client/static/js/r-x8rftkm3.js +1 -0
- package/dist/client/static/js/radar-RG4KPBEZ-akwdknab.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-m5v4rfhx.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-k2gmqcjb.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-1zdsfjf4.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-e98evqb6.js +1 -0
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-axttcfhw.js → railroadDiagram-XR7U4H2S-70qy7qdh.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-5qx7erta.js → requirementDiagram-PLB6GJNP-2vb2gp3e.js} +3 -3
- package/dist/client/static/js/{ruby-dve3y59w.js → ruby-ytqv3pqz.js} +1 -1
- package/dist/client/static/js/{rust-b3ckax3e.js → rust-6sddyxnt.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-es87a3j6.js → sankeyDiagram-IPEJSGJF-9jd8ebrn.js} +3 -3
- package/dist/client/static/js/{sass-emxqt5p2.js → sass-dvbra5b6.js} +1 -1
- package/dist/client/static/js/{scss-4j4t3r6y.js → scss-sy7w8916.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-dgpnjrtk.js → sequenceDiagram-PO4LG4MO-w7z84f80.js} +7 -7
- package/dist/client/static/js/{sizeCapture-INFHLROL-kyw0p86n.js → sizeCapture-INFHLROL-q8w7ehgx.js} +1 -1
- package/dist/client/static/js/sql-99y0qnag.js +1 -0
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-vnsbw8y9.js → stateDiagram-v2-GCMORJYK-4978hapr.js} +3 -3
- package/dist/client/static/js/{svelte-dbsx1ehx.js → svelte-xvs3fkza.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-060q1rep.js → swimlanes-2SLR337P-eshg5fjy.js} +1 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-914e28hd.js +8 -0
- package/dist/client/static/js/timeline-definition-EJHVYXUP-5h5q357k.js +120 -0
- package/dist/client/static/js/treeView-Q6P3EWNA-fkm3a7gx.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-hm4ktxjf.js +1 -0
- package/dist/client/static/js/tsx-phngprp0.js +1 -0
- package/dist/client/static/js/typescript-m62a7zr2.js +1 -0
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-18sp73v7.js → usecaseDiagram-POWQR4AR-4j69y3zx.js} +20 -20
- package/dist/client/static/js/vennDiagram-UO4OBE2U-pa9p5jpw.js +34 -0
- package/dist/client/static/js/{vue-hyr58df9.js → vue-p4g4avm3.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-3y2rvdmy.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-q0kwmbzh.js → wardleyDiagram-VNRHLVJA-hjddd656.js} +3 -3
- package/dist/client/static/js/xml-59n0cjn6.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-y0gpmg6m.js → xychartDiagram-PMCCYNJV-8ng5m849.js} +4 -4
- package/dist/client/static/js/yaml-9fw908s4.js +1 -0
- package/dist/client/tailwindcss-oxide.linux-x64-gnu-c0fa36dv.node +0 -0
- package/dist/client/tailwindcss-oxide.linux-x64-musl-kr04sh0e.node +0 -0
- package/marketplace/plugins/command-runner/package.json +2 -2
- package/marketplace/plugins/command-runner/src/app.tsx +2 -5
- package/marketplace/plugins/command-runner/src/panel/CustomForm.tsx +35 -52
- package/marketplace/plugins/command-runner/src/panel/Groups.tsx +6 -5
- package/marketplace/plugins/command-runner/src/panel/Header.tsx +18 -54
- package/marketplace/plugins/command-runner/src/panel/Output.tsx +3 -7
- package/marketplace/plugins/command-runner/src/panel/Row.tsx +19 -38
- package/marketplace/plugins/command-runner/src/panel/index.tsx +1 -4
- package/marketplace/plugins/git-forge/package.json +2 -2
- package/marketplace/plugins/git-forge/src/app.tsx +2 -0
- package/marketplace/plugins/git-forge/src/panel/Credential.tsx +8 -15
- package/marketplace/plugins/git-forge/src/panel/Header.tsx +35 -66
- package/marketplace/plugins/git-forge/src/panel/ItemView.tsx +7 -13
- package/marketplace/plugins/git-forge/src/panel/List.tsx +28 -56
- package/marketplace/plugins/git-forge/src/panel/Row.tsx +7 -9
- package/marketplace/plugins/git-forge/src/panel/Sidebar.tsx +21 -31
- package/marketplace/plugins/git-forge/src/panel/Write.tsx +26 -40
- package/marketplace/plugins/git-forge/src/panel/index.tsx +0 -1
- package/marketplace/plugins/github-actions/package.json +2 -2
- package/marketplace/plugins/github-actions/src/app.tsx +2 -0
- package/marketplace/plugins/github-actions/src/panel/Actions.tsx +9 -17
- package/marketplace/plugins/github-actions/src/panel/LogView.tsx +4 -13
- package/marketplace/plugins/github-actions/src/panel/Row.tsx +4 -5
- package/marketplace/plugins/github-actions/src/panel/RunView.tsx +8 -15
- package/marketplace/plugins/github-actions/src/panel/index.test.tsx +3 -2
- package/marketplace/plugins/github-actions/src/panel/index.tsx +31 -37
- package/marketplace/plugins/kanban/package.json +2 -2
- package/marketplace/plugins/kanban/src/app.tsx +2 -0
- package/marketplace/plugins/kanban/src/panel/CardSheet.tsx +88 -98
- package/marketplace/plugins/kanban/src/panel/CardTile.tsx +6 -10
- package/marketplace/plugins/kanban/src/panel/StageColumn.tsx +22 -18
- package/marketplace/plugins/kanban/src/panel/StageSheet.tsx +59 -70
- package/marketplace/plugins/kanban/src/panel/index.tsx +37 -52
- package/marketplace/plugins/kanban/src/panel/use-board.ts +2 -0
- package/marketplace/plugins/session-info/package.json +2 -2
- package/marketplace/plugins/session-info/src/app.tsx +6 -3
- package/marketplace/plugins/stats/package.json +2 -2
- package/marketplace/plugins/stats/src/KillConfirm.test.tsx +6 -4
- package/marketplace/plugins/stats/src/KillConfirm.tsx +26 -76
- package/marketplace/plugins/stats/src/ProcessTable.tsx +8 -6
- package/marketplace/plugins/stats/src/RefreshButton.tsx +7 -5
- package/marketplace/plugins/stats/src/app.tsx +11 -9
- package/package.json +10 -10
- package/src/cli/lib/commands/plugin.js +8 -5
- package/src/client/bootstrap.d.ts +5 -0
- package/src/client/chat-title-overlay.test.ts +53 -0
- package/src/client/components/auth/login-screen/index.tsx +31 -3
- package/src/client/components/common/SignOutButton.tsx +4 -5
- package/src/client/components/common/account-badge/index.tsx +31 -0
- package/src/client/components/common/footer-version/index.tsx +40 -0
- package/src/client/components/common/fullscreen-viewer/fullscreen-viewer.test.tsx +24 -0
- package/src/client/components/common/fullscreen-viewer/index.tsx +22 -31
- package/src/client/components/common/header-controls/MoreMenu.tsx +5 -56
- package/src/client/components/common/header-controls/index.test.tsx +2 -6
- package/src/client/components/common/header-controls/index.tsx +9 -25
- package/src/client/components/common/header-controls/phone-row.test.tsx +3 -16
- package/src/client/components/common/shell-update-button/index.tsx +2 -2
- package/src/client/components/common/zoom-pan-stage/index.tsx +54 -50
- package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +4 -5
- package/src/client/components/layout/desktop-layout/index.tsx +2 -4
- package/src/client/components/layout/left-bar/index.tsx +25 -3
- package/src/client/components/layout/rail-toggle.test.tsx +112 -0
- package/src/client/components/layout/session-sidebar/CategoryHeader.accent.test.tsx +81 -0
- package/src/client/components/layout/session-sidebar/CategoryHeader.tsx +11 -3
- package/src/client/components/layout/session-sidebar/Footer.test.tsx +36 -0
- package/src/client/components/layout/session-sidebar/Footer.tsx +42 -61
- package/src/client/components/layout/session-sidebar/FooterHost.tsx +5 -1
- package/src/client/components/layout/session-sidebar/modern/WorkspaceHeader.tsx +30 -10
- package/src/client/components/layout/session-sidebar/modern/WorkspaceSection.tsx +4 -0
- package/src/client/components/layout/session-sidebar/modern/index.tsx +8 -1
- package/src/client/components/layout/session-sidebar/modern/workspace-header.test.tsx +25 -4
- package/src/client/components/layout/session-title-bar/index.tsx +13 -5
- package/src/client/components/layout/top-bars.test.tsx +4 -2
- package/src/client/components/mobile/LayoutWrapper.tsx +3 -1
- package/src/client/components/mobile/RightSidebar.tsx +12 -3
- package/src/client/components/mobile/SessionSidebar.tsx +6 -2
- package/src/client/components/mobile/drawer-layout.test.tsx +7 -3
- package/src/client/components/mobile/drawer-strip.tsx +9 -2
- package/src/client/components/mobile/mobile-main-view/Header.test.tsx +29 -9
- package/src/client/components/mobile/mobile-main-view/Header.tsx +43 -12
- package/src/client/components/mobile/mobile-right-sidebar/Chrome.tsx +12 -1
- package/src/client/components/mobile/mobile-right-sidebar/FullDiff.tsx +9 -2
- package/src/client/components/mobile/mobile-right-sidebar/FullEditor.tsx +1 -0
- package/src/client/components/mobile/mobile-right-sidebar/Header.tsx +9 -1
- package/src/client/components/mobile/mobile-right-sidebar/StatusBar.tsx +4 -2
- package/src/client/components/mobile/mobile-session-sidebar/Body.tsx +1 -1
- package/src/client/components/mobile/mobile-session-sidebar/Footer.tsx +48 -46
- package/src/client/components/mobile/mobile-session-sidebar/Header.tsx +18 -1
- package/src/client/components/mobile/mobile-session-sidebar/Item.test.tsx +4 -0
- package/src/client/components/mobile/mobile-session-sidebar/Item.tsx +4 -6
- package/src/client/components/mobile/right-drawer-nav.test.tsx +53 -1
- package/src/client/components/settings/Band.tsx +5 -2
- package/src/client/components/settings/Modal.tsx +8 -5
- package/src/client/components/settings/Sidebar.tsx +5 -3
- package/src/client/components/settings/apply-side-effects.ts +5 -0
- package/src/client/components/settings/categories/AccountSettings.tsx +266 -0
- package/src/client/components/settings/categories/ProjectSettings.tsx +2 -0
- package/src/client/components/settings/categories/account-settings/Dialogs.tsx +223 -0
- package/src/client/components/settings/categories/appearance-settings/BorderStyleSection.test.tsx +3 -4
- package/src/client/components/settings/categories/appearance-settings/ChromeStyleSection.tsx +66 -39
- package/src/client/components/settings/categories/connect-settings/DeviceTable.tsx +7 -4
- package/src/client/components/settings/categories/project-settings/DetailsForm.tsx +14 -1
- package/src/client/components/settings/categories/project-settings/ProjectSharing.tsx +130 -0
- package/src/client/components/settings/categories/project-settings/SidebarList.tsx +5 -0
- package/src/client/components/settings/category-content.tsx +3 -0
- package/src/client/components/workspace/chat-timeline/AiMessageFooterSheet.tsx +3 -1
- package/src/client/components/workspace/chat-timeline/ComposerDockFrame.tsx +2 -1
- package/src/client/components/workspace/chat-timeline/EmptyWorkspacePrompt.tsx +3 -1
- package/src/client/components/workspace/chat-timeline/SessionSkeleton.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/TimelineBody.tsx +1 -0
- package/src/client/components/workspace/chat-timeline/chat-input/ComposerRows.tsx +9 -2
- package/src/client/components/workspace/chat-timeline/chat-input/expansion.test.ts +1 -1
- package/src/client/components/workspace/chat-timeline/chat-input/expansion.ts +2 -1
- package/src/client/components/workspace/chat-timeline/chat-input/narrow.test.tsx +34 -0
- package/src/client/components/workspace/chat-timeline/composer-dock-frame.test.tsx +9 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/styles.test.tsx +4 -1
- package/src/client/components/workspace/editor/Tab.tsx +19 -26
- package/src/client/components/workspace/editor/Tabs.test.ts +13 -7
- package/src/client/components/workspace/git-panel/commit-modal/Header.tsx +1 -0
- package/src/client/components/workspace/git-panel/commit-modal/floating.test.ts +46 -0
- package/src/client/components/workspace/git-panel/commit-modal/index.tsx +2 -0
- package/src/client/components/workspace/model-dropdown/Fullscreen.tsx +4 -5
- package/src/client/components/workspace/panel-tabs/TabChip.tsx +40 -37
- package/src/client/components/workspace/panel-tabs/TabStrip.connected.test.tsx +76 -49
- package/src/client/components/workspace/panel-tabs/TabStrip.test.tsx +9 -9
- package/src/client/components/workspace/panel-tabs/TabStrip.tsx +14 -1
- package/src/client/components/workspace/panel-tabs/index.tsx +1 -1
- package/src/client/components/workspace/plugin-panel/catalog.tsx +22 -5
- package/src/client/components/workspace/plugin-panel/chrome.test.tsx +89 -0
- package/src/client/components/workspace/plugin-panel/chrome.tsx +62 -0
- package/src/client/data/settings/omp-schema.json +40 -4
- package/src/client/floating-phone.test.ts +189 -0
- package/src/client/floating.css +205 -2
- package/src/client/floating.test.ts +43 -0
- package/src/client/glass.css +47 -0
- package/src/client/hooks/chat/omp/index.ts +6 -5
- package/src/client/hooks/chat/omp/prompt-send.test.ts +18 -0
- package/src/client/hooks/chat/omp/prompt-send.ts +26 -8
- package/src/client/hooks/chat/omp/session-list.tsx +20 -8
- package/src/client/hooks/chat/timeline/deferred-model.ts +13 -5
- package/src/client/hooks/chat/timeline/index.ts +2 -0
- package/src/client/hooks/chat/timeline/send-props.ts +14 -0
- package/src/client/hooks/chat/timeline/send-steer.test.ts +11 -2
- package/src/client/hooks/chat/timeline/send-switch.test.ts +92 -0
- package/src/client/hooks/chat/timeline/send.test-util.ts +37 -7
- package/src/client/hooks/chat/timeline/send.test.ts +11 -2
- package/src/client/hooks/chat/timeline/send.ts +62 -42
- package/src/client/hooks/editor/image-generation.ts +24 -0
- package/src/client/hooks/editor/resolve-viewer.test.ts +26 -20
- package/src/client/hooks/editor/resolve-viewer.ts +14 -5
- package/src/client/hooks/editor/use-file-editor.test.ts +34 -0
- package/src/client/hooks/editor/use-file-editor.ts +6 -2
- package/src/client/hooks/settings/accounts.ts +162 -0
- package/src/client/hooks/ui/auth.ts +58 -3
- package/src/client/hooks/ui/border-style.test.ts +5 -4
- package/src/client/hooks/ui/border-style.ts +3 -2
- package/src/client/hooks/ui/mobile-chrome-style.ts +68 -0
- package/src/client/hooks/ui/navbar-controls.test.ts +1 -2
- package/src/client/hooks/ui/navbar-controls.ts +0 -3
- package/src/client/hooks/ui/zoom-gesture.ts +104 -0
- package/src/client/lib/desktop/titlebar.test.ts +21 -0
- package/src/client/lib/desktop/titlebar.ts +34 -0
- package/src/client/lib/plugins/bootstrap.test.ts +20 -0
- package/src/client/lib/plugins/bootstrap.tsx +10 -15
- package/src/client/lib/plugins/kit-components.test.tsx +119 -0
- package/src/client/lib/plugins/kit-components.tsx +79 -0
- package/src/client/lib/plugins/kit.ts +8 -0
- package/src/client/lib/plugins/slots.test.ts +34 -0
- package/src/client/lib/plugins/slots.ts +31 -4
- package/src/client/lib/plugins/stylesheets.ts +10 -11
- package/src/client/lib/ui/pinch.test.ts +74 -0
- package/src/client/lib/ui/pinch.ts +104 -0
- package/src/client/lib/ui/safe-area.test.ts +25 -0
- package/src/client/lib/ui/safe-area.ts +23 -0
- package/src/client/main.tsx +8 -1
- package/src/client/tailwind.css +54 -1
- package/src/server/index.ts +2 -0
- package/src/server/lib/assets/shell-attributes.server.ts +12 -4
- package/src/server/lib/assets/shell-attributes.test.ts +19 -18
- package/src/server/lib/auth/client-address.test.ts +2 -2
- package/src/server/lib/auth/guard.test.ts +2 -2
- package/src/server/lib/auth/guard.ts +81 -97
- package/src/server/lib/auth/handover-guard.test.ts +1 -1
- package/src/server/lib/auth/rate-limit.test.ts +2 -2
- package/src/server/lib/auth/token.test.ts +1 -1
- package/src/server/lib/auth/workspace-gate.server.ts +34 -0
- package/src/server/lib/bundler/css.test.ts +16 -0
- package/src/server/lib/connect/devices.server.test.ts +12 -0
- package/src/server/lib/connect/devices.server.ts +63 -19
- package/src/server/lib/connect/pairing.server.ts +5 -3
- package/src/server/lib/connect/status.server.ts +2 -2
- package/src/server/lib/db/schema.test.ts +3 -3
- package/src/server/lib/db/schema.ts +6 -0
- package/src/server/lib/harness/update-spawn.server.test.ts +97 -0
- package/src/server/lib/harness/update-spawn.server.ts +10 -0
- package/src/server/lib/models/provider-icon-override.server.test.ts +140 -0
- package/src/server/lib/models/provider-icon-override.server.ts +197 -0
- package/src/server/lib/models/provider-icon-store.server.ts +8 -0
- package/src/server/lib/models/provider-icon.server.ts +31 -6
- package/src/server/lib/omp/session/artifacts.server.test.ts +11 -7
- package/src/server/lib/omp/session/artifacts.server.ts +21 -17
- package/src/server/lib/panels/build.server.ts +19 -2
- package/src/server/lib/panels/css.server.test.ts +141 -0
- package/src/server/lib/panels/css.server.ts +255 -0
- package/src/server/lib/panels/plugin-ui-contract.test.ts +64 -0
- package/src/server/lib/panels/registry-stylesheet.server.test.ts +69 -0
- package/src/server/lib/panels/scan.server.ts +13 -7
- package/src/server/lib/panels/source-warnings.server.test.ts +65 -0
- package/src/server/lib/panels/source-warnings.server.ts +71 -0
- package/src/server/lib/realtime/topics/catalog.server.ts +3 -0
- package/src/server/lib/realtime/topics.server.ts +14 -0
- package/src/server/lib/sessions/last-opened-client.server.ts +1 -1
- package/src/server/lib/workspace/access.server.ts +108 -0
- package/src/server/lib/workspace/project-patch.server.ts +4 -2
- package/src/server/lib/workspace/register-folder.server.ts +19 -5
- package/src/server/lib/workspace/session-access.server.ts +55 -0
- package/src/server/lib/workspace/tenancy-schema.server.ts +40 -0
- package/src/server/plugins/ssr.ts +19 -3
- package/src/server/routes/accounts/index.ts +8 -0
- package/src/server/routes/accounts/management.test.ts +174 -0
- package/src/server/routes/accounts/management.ts +166 -0
- package/src/server/routes/auth/login.ts +22 -8
- package/src/server/routes/auth/logout.ts +1 -1
- package/src/server/routes/auth/password.ts +40 -33
- package/src/server/routes/auth/revoke.test.ts +1 -1
- package/src/server/routes/auth/revoke.ts +26 -8
- package/src/server/routes/auth/routes.test.ts +3 -3
- package/src/server/routes/auth/state.ts +14 -7
- package/src/server/routes/connect/devices.ts +7 -4
- package/src/server/routes/connect/pair.ts +4 -3
- package/src/server/routes/connect/status.ts +4 -2
- package/src/server/routes/connect/tunnels.ts +2 -1
- package/src/server/routes/folders/batch-delete.ts +12 -0
- package/src/server/routes/folders/clone.ts +7 -2
- package/src/server/routes/folders/create.ts +3 -1
- package/src/server/routes/folders/folder.ts +44 -4
- package/src/server/routes/folders/index.ts +3 -0
- package/src/server/routes/folders/shares.ts +62 -0
- package/src/server/routes/index.ts +2 -0
- package/src/server/routes/panels/build.ts +1 -1
- package/src/server/routes/panels/css.test.ts +22 -0
- package/src/server/routes/panels/css.ts +5 -7
- package/src/server/routes/realtime/ws.ts +16 -1
- package/src/server/routes/sessions/list.ts +3 -2
- package/src/server/routes/settings/projects.ts +46 -7
- package/src/server/routes/settings/provider-icon.ts +18 -0
- package/src/shared/lib/chat/timeline/tool-render-mode.test.ts +2 -2
- package/src/shared/lib/chat/timeline/tool-render-mode.ts +6 -3
- package/src/shared/lib/icons/tint-hues.generated.ts +38 -37
- package/src/shared/lib/omp/config/schema-releases-19-4.test.ts +27 -1
- package/src/shared/lib/omp/session/prewarm-misc.test.ts +1 -1
- package/src/shared/lib/realtime/protocol.ts +16 -0
- package/src/shared/lib/settings/defaults.ts +2 -1
- package/src/shared/lib/settings/sections.ts +1 -1
- package/src/shared/lib/theme/border-style.test.ts +11 -9
- package/src/shared/lib/theme/border-style.ts +7 -7
- package/src/shared/lib/theme/chrome-style.test.ts +15 -0
- package/src/shared/lib/theme/chrome-style.ts +16 -1
- package/src/shared/types/index.ts +1 -0
- package/src/shared/types/settings/state.ts +6 -5
- package/src/test-support/file-editor.test-util.ts +25 -6
- package/tsconfig.json +21 -0
- package/dist/client/static/js/ImageView-xc90jc1c.js +0 -1
- package/dist/client/static/js/LayoutWrapper-wyqe98kf.js +0 -2
- package/dist/client/static/js/MergeDiffView-bng34cpr.js +0 -1
- package/dist/client/static/js/Modal-89jk7wff.js +0 -60
- package/dist/client/static/js/SessionsView-6bpz1faj.js +0 -1
- package/dist/client/static/js/architecture-7GRP2DOG-sxrkxwbq.js +0 -1
- package/dist/client/static/js/bash-bcbct9gc.js +0 -1
- package/dist/client/static/js/c-fn9jz26e.js +0 -1
- package/dist/client/static/js/cpp-a1q64mke.js +0 -1
- package/dist/client/static/js/css-b92azee8.js +0 -1
- package/dist/client/static/js/css-sn00sq6v.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-g1xwa8b9.js +0 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-05p61bka.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-7sn6nwjv.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-z1yehwys.js +0 -1
- package/dist/client/static/js/graphql-8d8bn59j.js +0 -1
- package/dist/client/static/js/html-6hdrwtz2.js +0 -1
- package/dist/client/static/js/index-4h2zkrk1.js +0 -2
- package/dist/client/static/js/index-5nm8hm4k.js +0 -2
- package/dist/client/static/js/index-95jfphx5.js +0 -481
- package/dist/client/static/js/index-9pw441wc.js +0 -4
- package/dist/client/static/js/index-bjz54ht6.js +0 -1
- package/dist/client/static/js/index-bqapt2e8.js +0 -2
- package/dist/client/static/js/index-ddkjgv5h.js +0 -2
- package/dist/client/static/js/index-dekvtt2a.js +0 -314
- package/dist/client/static/js/index-fnwaxc6r.js +0 -1
- package/dist/client/static/js/index-h65zrhva.js +0 -1
- package/dist/client/static/js/index-hxsqw7sz.js +0 -4
- package/dist/client/static/js/index-hxy1sadd.js +0 -2
- package/dist/client/static/js/index-ja0ajnvq.js +0 -10
- package/dist/client/static/js/index-qkyy563e.js +0 -1
- package/dist/client/static/js/index-t6nqy2n5.css +0 -1
- package/dist/client/static/js/index-wrk99kks.js +0 -3
- package/dist/client/static/js/info-A6RAGUB7-dqyaxjc1.js +0 -1
- package/dist/client/static/js/ini-g6a5xsaw.js +0 -1
- package/dist/client/static/js/java-n596am4c.js +0 -1
- package/dist/client/static/js/javascript-zc1qnyyp.js +0 -1
- package/dist/client/static/js/json-7k70qbkj.js +0 -1
- package/dist/client/static/js/jsx-sndenqrc.js +0 -1
- package/dist/client/static/js/lua-djd3g9q5.js +0 -1
- package/dist/client/static/js/markdown-r2tpvxpn.js +0 -1
- package/dist/client/static/js/one-dark-pro-7bgqnyhm.js +0 -1
- package/dist/client/static/js/one-light-47y6etng.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-7jxzax4z.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-wc9wxr7f.js +0 -1
- package/dist/client/static/js/properties-brn72zdk.js +0 -1
- package/dist/client/static/js/python-g9mghwgm.js +0 -1
- package/dist/client/static/js/r-e247x4mw.js +0 -1
- package/dist/client/static/js/radar-RG4KPBEZ-kwj5padj.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-h8sdx3w5.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-2wmwx246.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-h4cdgw3y.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-q7m0tfd0.js +0 -1
- package/dist/client/static/js/sql-0kar81jy.js +0 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-y77g9dq0.js +0 -8
- package/dist/client/static/js/timeline-definition-EJHVYXUP-8a3yqmx0.js +0 -120
- package/dist/client/static/js/treeView-Q6P3EWNA-yv9640h3.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-7kpzjg21.js +0 -1
- package/dist/client/static/js/tsx-gjxfjnbk.js +0 -1
- package/dist/client/static/js/typescript-bm89v3gk.js +0 -1
- package/dist/client/static/js/vennDiagram-UO4OBE2U-gf4y1r3s.js +0 -34
- package/dist/client/static/js/wardley-WFR3VGLG-mggay64p.js +0 -1
- package/dist/client/static/js/xml-b7824nx0.js +0 -1
- package/dist/client/static/js/yaml-kqqktdv1.js +0 -1
- package/src/server/lib/auth/client-address.ts +0 -89
- package/src/server/lib/auth/config.ts +0 -133
- package/src/server/lib/auth/rate-limit.ts +0 -146
- package/src/server/lib/auth/token.ts +0 -220
package/src/client/main.tsx
CHANGED
|
@@ -10,6 +10,7 @@ import { initChatWidthMode } from '@/client/hooks/chat/timeline/width-mode';
|
|
|
10
10
|
import { initSurfaceStyle } from '@/client/hooks/ui/surface-style';
|
|
11
11
|
import { initBorderStyle } from '@/client/hooks/ui/border-style';
|
|
12
12
|
import { initChromeStyle } from '@/client/hooks/ui/chrome-style';
|
|
13
|
+
import { initMobileChromeStyle } from '@/client/hooks/ui/mobile-chrome-style';
|
|
13
14
|
import { initIconStyle } from '@/client/hooks/ui/icon-style';
|
|
14
15
|
import { primeWindowChrome } from '@/client/hooks/ui/window-chrome';
|
|
15
16
|
import { installAuthFetchBridge, primeAuthState } from '@/client/hooks/ui/auth';
|
|
@@ -44,7 +45,12 @@ const bootstrap = window.__OMP_BOOTSTRAP__;
|
|
|
44
45
|
// Both before the first render: the auth state decides whether the app or the
|
|
45
46
|
// login screen is mounted, and the fetch bridge must be in place before any
|
|
46
47
|
// hook issues a request, or a 401 during startup would go unnoticed.
|
|
47
|
-
primeAuthState(
|
|
48
|
+
primeAuthState(
|
|
49
|
+
bootstrap?.authenticated,
|
|
50
|
+
bootstrap?.authEnabled === true,
|
|
51
|
+
bootstrap?.account ?? null,
|
|
52
|
+
bootstrap?.accountCount ?? 1,
|
|
53
|
+
);
|
|
48
54
|
installAuthFetchBridge();
|
|
49
55
|
|
|
50
56
|
primeKabmoSettings(bootstrap?.appSettings);
|
|
@@ -69,6 +75,7 @@ initChatWidthMode();
|
|
|
69
75
|
initSurfaceStyle();
|
|
70
76
|
initBorderStyle();
|
|
71
77
|
initChromeStyle();
|
|
78
|
+
initMobileChromeStyle();
|
|
72
79
|
initIconStyle();
|
|
73
80
|
|
|
74
81
|
// BEFORE the theme init, which writes the chrome meta: a phone that repainted
|
package/src/client/tailwind.css
CHANGED
|
@@ -152,6 +152,18 @@
|
|
|
152
152
|
--theme-warning-hover: color-mix(in srgb, var(--theme-warning) 85%, var(--theme-ink));
|
|
153
153
|
color-scheme: light;
|
|
154
154
|
|
|
155
|
+
/* The bottom safe area of a phone surface.
|
|
156
|
+
*
|
|
157
|
+
* `env()` is the browser's answer, and on a `viewport-fit: cover` phone it
|
|
158
|
+
* is the home indicator or the navigation bar. Android WebView before 136
|
|
159
|
+
* reports it as `0px` even when the app is edge-to-edge on Android 15
|
|
160
|
+
* (`targetSdk` 35), so the 3-button navigation bar covered the phone
|
|
161
|
+
* footer's last row. The APK forwards the window's real navigation-bar
|
|
162
|
+
* inset as `--kabmo-inset-bottom` (CSS px, see `ShellInsets.kt`), and `max`
|
|
163
|
+
* takes whichever source answered — one value, never the two added
|
|
164
|
+
* together, so a WebView that reports both cannot pad twice. */
|
|
165
|
+
--kabmo-safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--kabmo-inset-bottom, 0px));
|
|
166
|
+
|
|
155
167
|
--paper-bg: var(--theme-canvas);
|
|
156
168
|
--ink-primary: var(--theme-ink);
|
|
157
169
|
}
|
|
@@ -197,7 +209,7 @@
|
|
|
197
209
|
* cannot ship a `p-4` that only looks right on a desk. */
|
|
198
210
|
.modal-safe {
|
|
199
211
|
padding-top: max(1rem, env(safe-area-inset-top, 0px));
|
|
200
|
-
padding-bottom: max(1rem,
|
|
212
|
+
padding-bottom: max(1rem, var(--kabmo-safe-bottom));
|
|
201
213
|
padding-left: max(1rem, env(safe-area-inset-left, 0px));
|
|
202
214
|
padding-right: max(1rem, env(safe-area-inset-right, 0px));
|
|
203
215
|
}
|
|
@@ -684,6 +696,11 @@
|
|
|
684
696
|
*/
|
|
685
697
|
:root {
|
|
686
698
|
--chat-column-max: 970px;
|
|
699
|
+
/* Bun's CSS bundler merges `:root` rules that no at-rule separates and keeps
|
|
700
|
+
only the LAST block: a second `:root` for this height silently deleted the
|
|
701
|
+
width above, so every `wide` chat rendered at the panel width instead of
|
|
702
|
+
970px (caught by `chat-width.e2e.ts`). One block, both defaults. */
|
|
703
|
+
--chat-title-height: 2.5rem;
|
|
687
704
|
}
|
|
688
705
|
|
|
689
706
|
/* `:root[data-chat-width]`, not a bare attribute selector: `[data-chat-width]`
|
|
@@ -704,6 +721,33 @@
|
|
|
704
721
|
margin-inline: auto;
|
|
705
722
|
}
|
|
706
723
|
|
|
724
|
+
/* ---- Session title overlay -----------------------------------------------
|
|
725
|
+
*
|
|
726
|
+
* The desktop title bar is an OVERLAY on the transcript (`chat-title-overlay`
|
|
727
|
+
* in `WorkspacePanels`), never a row above it, so the transcript's scroll
|
|
728
|
+
* content reserves the bar's height at its top. Without that reserve a chat
|
|
729
|
+
* whose rows do not fill the viewport — a new session's first user prompt —
|
|
730
|
+
* starts at `scrollTop: 0` with its first row painted underneath the bar.
|
|
731
|
+
*
|
|
732
|
+
* The reserve lives on the SCROLLER's padding, not on the pane: a longer
|
|
733
|
+
* transcript still slides UNDER the bar, which is what the bar's canvas
|
|
734
|
+
* gradient (and the glass mask) is for.
|
|
735
|
+
*
|
|
736
|
+
* `--chat-title-height` is declared with the chat widths above (two adjacent
|
|
737
|
+
* `:root` blocks lose the first in the bundler), and is also what sizes the bar
|
|
738
|
+
* itself, so the two cannot drift. The floating chrome raises it by its gutter
|
|
739
|
+
* in `floating.css`.
|
|
740
|
+
*/
|
|
741
|
+
[data-session-title] {
|
|
742
|
+
height: var(--chat-title-height);
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
.app-window[data-desktop] [data-chat-scroller] {
|
|
746
|
+
/* The bar plus the transcript's own 1rem: `p-4` alone only states the
|
|
747
|
+
reading gutter, which the overlay would eat. */
|
|
748
|
+
padding-top: calc(var(--chat-title-height) + 1rem);
|
|
749
|
+
}
|
|
750
|
+
|
|
707
751
|
/* ---- Composer style -------------------------------------------------------
|
|
708
752
|
*
|
|
709
753
|
* The composer's style states ORDER and STRUCTURE in JavaScript
|
|
@@ -1267,6 +1311,15 @@ html[data-theme-variant='dark'] .brand-wordmark-glow {
|
|
|
1267
1311
|
app-region: no-drag;
|
|
1268
1312
|
}
|
|
1269
1313
|
|
|
1314
|
+
/* A collapsed panel keeps its DOM — the chat owns the live run and the
|
|
1315
|
+
* composer — but a title row clipped with it must not keep its controls in the
|
|
1316
|
+
* tab order. The rail's toggle lives in this row while the chat is hidden
|
|
1317
|
+
* (`railToggleBelongsToTitle`); at width 0 the row is invisible, and only this
|
|
1318
|
+
* removes it from the accessibility tree as well. */
|
|
1319
|
+
[data-panel-collapsed]:not([data-panel-settling]) [data-session-title] {
|
|
1320
|
+
visibility: hidden;
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1270
1323
|
|
|
1271
1324
|
/* Collapsible-section reveal (Source Control's stash section, and any other
|
|
1272
1325
|
disclosure whose content height is unknown). `0fr → 1fr` interpolates the
|
package/src/server/index.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { setListener } from '@/server/lib/lifecycle/listener';
|
|
|
12
12
|
import { getDatabasePath } from '@/server/db.server';
|
|
13
13
|
import { initAgentTokens } from '@kabmo-labs/kabmo-session/relations/agent-token.server';
|
|
14
14
|
import { initDeviceTokens } from '@/server/lib/connect/devices.server';
|
|
15
|
+
import { initAccounts } from '@kabmo-labs/kabmo-auth/server/accounts';
|
|
15
16
|
import { logDetectedRegistry } from '@/server/lib/models/detected-registry.server';
|
|
16
17
|
import { ompStartupError, ompStartupLogLines } from '@kabmo-labs/kabmo-omp/install/startup';
|
|
17
18
|
import { readInstanceRecord, removeInstanceRecord, writeInstanceRecord } from '@/server/lib/lifecycle/instance';
|
|
@@ -76,6 +77,7 @@ console.log(`[kabmo] mock mode: ${isMockMode() ? 'true (demo presets)' : 'f
|
|
|
76
77
|
console.log(`[kabmo] ui auth: ${authNotice}${runPassword.source === 'argv' ? ' [from argv]' : ''}`);
|
|
77
78
|
for (const line of ompStartupLogLines()) console.log(`[kabmo] ${line}`);
|
|
78
79
|
console.log(`[kabmo] db: ${await getDatabasePath()}`);
|
|
80
|
+
await initAccounts();
|
|
79
81
|
await initAgentTokens();
|
|
80
82
|
await initDeviceTokens();
|
|
81
83
|
|
|
@@ -25,9 +25,10 @@
|
|
|
25
25
|
* emitting `data-surface="classic"` here would make the server and the client
|
|
26
26
|
* disagree about the document's own state — and every CSS rule keys on the
|
|
27
27
|
* value, not on its absence. This is NOT the same test as `DEFAULT_*`: the
|
|
28
|
-
* defaults are `classic` / `color`
|
|
29
|
-
*
|
|
30
|
-
* colour and its detached chrome
|
|
28
|
+
* defaults are `classic` (surface, omitted) / `color` (icons, emitted) /
|
|
29
|
+
* `hairline` (borders, omitted) / `floating` (chrome, emitted), so the first
|
|
30
|
+
* frame already has its colour and its detached chrome without restating the
|
|
31
|
+
* absent surface and hairlines.
|
|
31
32
|
*/
|
|
32
33
|
|
|
33
34
|
import type { ThemePalette } from '@kabmo-labs/kabmo-app-contracts/theme';
|
|
@@ -51,7 +52,9 @@ import {
|
|
|
51
52
|
import {
|
|
52
53
|
CHROME_ATTRIBUTE,
|
|
53
54
|
CHROME_STYLE_WITHOUT_ATTRIBUTE,
|
|
55
|
+
MOBILE_CHROME_ATTRIBUTE,
|
|
54
56
|
resolveChromeStyle,
|
|
57
|
+
resolveMobileChromeStyle,
|
|
55
58
|
} from '@/shared/lib/theme/chrome-style';
|
|
56
59
|
|
|
57
60
|
export interface ShellDocumentFacts {
|
|
@@ -63,6 +66,8 @@ export interface ShellDocumentFacts {
|
|
|
63
66
|
borderStyle: unknown;
|
|
64
67
|
/** The stored desktop chrome arrangement, same rule. */
|
|
65
68
|
chromeStyle?: unknown;
|
|
69
|
+
/** The stored PHONE chrome arrangement, same rule. */
|
|
70
|
+
mobileChromeStyle?: unknown;
|
|
66
71
|
iconStyle: unknown;
|
|
67
72
|
/** The `<meta name="theme-color">` value for this request. */
|
|
68
73
|
chromeColor: string;
|
|
@@ -80,15 +85,18 @@ export function styleAttributes(
|
|
|
80
85
|
palette?: ThemePalette,
|
|
81
86
|
borderStyle?: unknown,
|
|
82
87
|
chromeStyle?: unknown,
|
|
88
|
+
mobileChromeStyle?: unknown,
|
|
83
89
|
): string {
|
|
84
90
|
const surface = resolveSurfaceStyle(surfaceStyle);
|
|
85
91
|
const icon = resolveIconStyle(iconStyle);
|
|
86
92
|
const border = resolveBorderStyle(borderStyle);
|
|
87
93
|
const chrome = resolveChromeStyle(chromeStyle);
|
|
94
|
+
const mobileChrome = resolveMobileChromeStyle(mobileChromeStyle);
|
|
88
95
|
const parts: string[] = [];
|
|
89
96
|
if (surface !== SURFACE_STYLE_WITHOUT_ATTRIBUTE) parts.push(`${SURFACE_ATTRIBUTE}="${surface}"`);
|
|
90
97
|
if (border !== BORDER_STYLE_WITHOUT_ATTRIBUTE) parts.push(`${BORDER_ATTRIBUTE}="${border}"`);
|
|
91
98
|
if (chrome !== CHROME_STYLE_WITHOUT_ATTRIBUTE) parts.push(`${CHROME_ATTRIBUTE}="${chrome}"`);
|
|
99
|
+
if (mobileChrome !== CHROME_STYLE_WITHOUT_ATTRIBUTE) parts.push(`${MOBILE_CHROME_ATTRIBUTE}="${mobileChrome}"`);
|
|
92
100
|
if (icon !== ICON_STYLE_WITHOUT_ATTRIBUTE) parts.push(`${ICON_STYLE_ATTRIBUTE}="${icon}"`);
|
|
93
101
|
// The paper bucket is written for EVERY light palette, including the default
|
|
94
102
|
// one, because it is not a preference: without it the first frame paints the
|
|
@@ -109,7 +117,7 @@ export function applyShellDocumentFacts(html: string, facts: ShellDocumentFacts)
|
|
|
109
117
|
return html
|
|
110
118
|
.replace(
|
|
111
119
|
TEMPLATE_THEME,
|
|
112
|
-
`data-theme="${facts.palette.id}"${styleAttributes(facts.surfaceStyle, facts.iconStyle, facts.palette, facts.borderStyle, facts.chromeStyle)}`,
|
|
120
|
+
`data-theme="${facts.palette.id}"${styleAttributes(facts.surfaceStyle, facts.iconStyle, facts.palette, facts.borderStyle, facts.chromeStyle, facts.mobileChromeStyle)}`,
|
|
113
121
|
)
|
|
114
122
|
.replace(TEMPLATE_VARIANT, `data-theme-variant="${facts.palette.variant}"`)
|
|
115
123
|
.replace(TEMPLATE_META, `<meta name="theme-color" content="${facts.chromeColor}" />`);
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
* client's writers REMOVE the attribute for exactly those values, and a server
|
|
13
13
|
* that emitted `data-surface="classic"` would leave a document the client thinks
|
|
14
14
|
* is "explicitly classic" and a reload flipping between two spellings of the
|
|
15
|
-
* same state. The shipped DEFAULTS (`classic` / `color` / `
|
|
16
|
-
* `floating`) therefore emit
|
|
17
|
-
* already has its colour
|
|
15
|
+
* same state. The shipped DEFAULTS (`classic` / `color` / `hairline` /
|
|
16
|
+
* `floating`) therefore emit only the icon tone and the floating chrome, so the
|
|
17
|
+
* first frame already has its colour and its cards.
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
import { describe, expect, test } from 'bun:test';
|
|
@@ -39,27 +39,28 @@ const dark = THEMES.find((theme) => theme.variant === 'dark')!;
|
|
|
39
39
|
|
|
40
40
|
describe('styleAttributes', () => {
|
|
41
41
|
test('the styles CSS paints with no attribute add nothing', () => {
|
|
42
|
-
expect(styleAttributes('classic', 'monochrome', undefined, 'hairline', 'classic')).toBe('');
|
|
42
|
+
expect(styleAttributes('classic', 'monochrome', undefined, 'hairline', 'classic', 'classic')).toBe('');
|
|
43
43
|
});
|
|
44
44
|
|
|
45
|
-
test('the shipped defaults are emitted so the first frame is
|
|
46
|
-
const defaults = ' data-
|
|
45
|
+
test('the shipped defaults are emitted so the first frame is floating and coloured', () => {
|
|
46
|
+
const defaults = ' data-chrome="floating" data-mobile-chrome="floating" data-icon-style="color"';
|
|
47
47
|
expect(styleAttributes(undefined, undefined)).toBe(defaults);
|
|
48
48
|
expect(styleAttributes('nonsense', 'nonsense')).toBe(defaults);
|
|
49
|
-
|
|
49
|
+
// The desktop is classic here, but the PHONE's default is still floating.
|
|
50
|
+
expect(styleAttributes('classic', 'color', undefined, 'hairline', 'classic')).toBe(' data-mobile-chrome="floating" data-icon-style="color"');
|
|
50
51
|
});
|
|
51
52
|
|
|
52
53
|
test('each style contributes its own attribute independently', () => {
|
|
53
|
-
expect(styleAttributes('glass', 'monochrome', undefined, 'hairline', 'classic')).toBe(
|
|
54
|
+
expect(styleAttributes('glass', 'monochrome', undefined, 'hairline', 'classic', 'classic')).toBe(
|
|
54
55
|
' data-surface="glass"',
|
|
55
56
|
);
|
|
56
|
-
expect(styleAttributes('classic', 'color', undefined, 'hairline', 'classic')).toBe(
|
|
57
|
+
expect(styleAttributes('classic', 'color', undefined, 'hairline', 'classic', 'classic')).toBe(
|
|
57
58
|
' data-icon-style="color"',
|
|
58
59
|
);
|
|
59
|
-
expect(styleAttributes('glass', 'color', undefined, 'hairline', 'classic')).toBe(
|
|
60
|
+
expect(styleAttributes('glass', 'color', undefined, 'hairline', 'classic', 'classic')).toBe(
|
|
60
61
|
' data-surface="glass" data-icon-style="color"',
|
|
61
62
|
);
|
|
62
|
-
expect(styleAttributes('classic', 'color', undefined, 'borderless', 'floating')).toBe(
|
|
63
|
+
expect(styleAttributes('classic', 'color', undefined, 'borderless', 'floating', 'classic')).toBe(
|
|
63
64
|
' data-borders="borderless" data-chrome="floating" data-icon-style="color"',
|
|
64
65
|
);
|
|
65
66
|
});
|
|
@@ -68,11 +69,11 @@ describe('styleAttributes', () => {
|
|
|
68
69
|
// `hairline` IS what CSS paints with no attribute, so emitting
|
|
69
70
|
// `data-borders="hairline"` would make the served document disagree with
|
|
70
71
|
// the one the client's own writer produces.
|
|
71
|
-
expect(styleAttributes('classic', 'monochrome', undefined, 'hairline', 'classic')).toBe('');
|
|
72
|
-
expect(styleAttributes('classic', 'monochrome', undefined, 'borderless', 'classic')).toBe(
|
|
72
|
+
expect(styleAttributes('classic', 'monochrome', undefined, 'hairline', 'classic', 'classic')).toBe('');
|
|
73
|
+
expect(styleAttributes('classic', 'monochrome', undefined, 'borderless', 'classic', 'classic')).toBe(
|
|
73
74
|
' data-borders="borderless"',
|
|
74
75
|
);
|
|
75
|
-
expect(styleAttributes('glass', 'color', undefined, 'borderless', 'classic')).toBe(
|
|
76
|
+
expect(styleAttributes('glass', 'color', undefined, 'borderless', 'classic', 'classic')).toBe(
|
|
76
77
|
' data-surface="glass" data-borders="borderless" data-icon-style="color"',
|
|
77
78
|
);
|
|
78
79
|
});
|
|
@@ -81,11 +82,11 @@ describe('styleAttributes', () => {
|
|
|
81
82
|
// Not a preference: without it the first frame paints the `deep` tone table
|
|
82
83
|
// on a `mid` paper, one step darker than the palette allows, and the client's
|
|
83
84
|
// `applyIconPaper` then visibly corrects it.
|
|
84
|
-
expect(styleAttributes('classic', 'monochrome', light, 'hairline', 'classic')).toBe(
|
|
85
|
+
expect(styleAttributes('classic', 'monochrome', light, 'hairline', 'classic', 'classic')).toBe(
|
|
85
86
|
' data-icon-paper="mid"',
|
|
86
87
|
);
|
|
87
88
|
// A dark palette has one band, so it states nothing.
|
|
88
|
-
expect(styleAttributes('classic', 'monochrome', dark, 'hairline', 'classic')).toBe('');
|
|
89
|
+
expect(styleAttributes('classic', 'monochrome', dark, 'hairline', 'classic', 'classic')).toBe('');
|
|
89
90
|
});
|
|
90
91
|
});
|
|
91
92
|
|
|
@@ -100,7 +101,7 @@ describe('applyShellDocumentFacts', () => {
|
|
|
100
101
|
});
|
|
101
102
|
|
|
102
103
|
expect(html).toContain(
|
|
103
|
-
`<html lang="en" data-theme="${light.id}" data-
|
|
104
|
+
`<html lang="en" data-theme="${light.id}" data-chrome="floating" data-mobile-chrome="floating" data-icon-style="color" data-icon-paper="mid" data-theme-variant="${light.variant}">`,
|
|
104
105
|
);
|
|
105
106
|
expect(html).toContain('<meta name="theme-color" content="#123456" />');
|
|
106
107
|
});
|
|
@@ -115,7 +116,7 @@ describe('applyShellDocumentFacts', () => {
|
|
|
115
116
|
});
|
|
116
117
|
|
|
117
118
|
expect(html).toContain(
|
|
118
|
-
`<html lang="en" data-theme="${light.id}" data-surface="glass" data-
|
|
119
|
+
`<html lang="en" data-theme="${light.id}" data-surface="glass" data-chrome="floating" data-mobile-chrome="floating" data-icon-style="color" data-icon-paper="mid" data-theme-variant="${light.variant}">`,
|
|
119
120
|
);
|
|
120
121
|
});
|
|
121
122
|
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
import { describe, expect, test } from 'bun:test';
|
|
21
|
-
import { effectiveClientAddress } from '
|
|
22
|
-
import { UNKNOWN_CLIENT_KEY } from '
|
|
21
|
+
import { effectiveClientAddress } from '@kabmo-labs/kabmo-auth/server/client-address';
|
|
22
|
+
import { UNKNOWN_CLIENT_KEY } from '@kabmo-labs/kabmo-auth/server/rate-limit';
|
|
23
23
|
|
|
24
24
|
function request(headers: Record<string, string> = {}): Request {
|
|
25
25
|
return new Request('http://localhost:3000/api/auth/login', { method: 'POST', headers });
|
|
@@ -18,8 +18,8 @@ import os from 'node:os';
|
|
|
18
18
|
import path from 'node:path';
|
|
19
19
|
|
|
20
20
|
import { authGate, initAuth, isAuthEnabled, isPublicPath, loadAuthConfig, revokeAllSessions } from '@/server/lib/auth/guard';
|
|
21
|
-
import type { ActiveAuthConfig } from '
|
|
22
|
-
import { issueSessionToken, SESSION_TTL_MS } from '
|
|
21
|
+
import type { ActiveAuthConfig } from '@kabmo-labs/kabmo-auth/server/config';
|
|
22
|
+
import { issueSessionToken, SESSION_TTL_MS } from '@kabmo-labs/kabmo-auth/server/token';
|
|
23
23
|
|
|
24
24
|
describe('public paths', () => {
|
|
25
25
|
test('the endpoints the login flow needs are public', () => {
|
|
@@ -27,87 +27,19 @@
|
|
|
27
27
|
* effect on the next request without a restart.
|
|
28
28
|
*/
|
|
29
29
|
|
|
30
|
-
import { hashPassword, deriveCredentialKey, readSessionSecret, writeSessionSecret, type ActiveAuthConfig } from '
|
|
31
|
-
import { readSessionCookie, verifySessionToken } from '
|
|
30
|
+
import { hashPassword, deriveCredentialKey, readSessionSecret, writeSessionSecret, type ActiveAuthConfig } from '@kabmo-labs/kabmo-auth/server/config';
|
|
31
|
+
import { readSessionAccount, readSessionCookie, verifySessionToken } from '@kabmo-labs/kabmo-auth/server/token';
|
|
32
|
+
import { getAccount, rootAccount, type AccountRecord } from '@kabmo-labs/kabmo-auth/server/accounts';
|
|
32
33
|
import { agentGate } from '@/server/lib/auth/agent-gate.server';
|
|
33
34
|
import { bearerToken } from '@kabmo-labs/kabmo-session/relations/agent-token.server';
|
|
34
|
-
import { markDeviceConnected,
|
|
35
|
-
import { rememberClientAddress } from '
|
|
36
|
-
import
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* The login screen's path. One constant because three places depend on the same
|
|
40
|
-
* string agreeing: it is public (the way in), it is where an unauthenticated
|
|
41
|
-
* document request is sent, and it is where a signed-in visitor must NOT stay.
|
|
42
|
-
*/
|
|
43
|
-
const LOGIN_PATH = '/login';
|
|
35
|
+
import { markDeviceConnected, verifyDeviceAccount, readDeviceCookie } from '@/server/lib/connect/devices.server';
|
|
36
|
+
import { rememberClientAddress } from '@kabmo-labs/kabmo-auth/server/client-address';
|
|
37
|
+
import { workspaceGate } from '@/server/lib/auth/workspace-gate.server';
|
|
38
|
+
import { isPublicPath, LOGIN_PATH } from '@kabmo-labs/kabmo-auth/server/public-paths';
|
|
44
39
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
// The native shells' own update check. Android and iOS ask these from
|
|
49
|
-
// NATIVE code (`AppUpdateCheck.kt`, `SettingsViewController.fetchRelease`),
|
|
50
|
-
// which carries no WebView cookie — and the button exists precisely for a
|
|
51
|
-
// shell too stale to load the console, so it cannot depend on a session
|
|
52
|
-
// either. Both answer GitHub's public release list (a version and a download
|
|
53
|
-
// URL), which is the same data an unauthenticated browser can read from
|
|
54
|
-
// github.com; `/api/updates/desktop` stays gated because only the CONSOLE
|
|
55
|
-
// asks it, and the console is behind the login.
|
|
56
|
-
'/api/updates/android',
|
|
57
|
-
'/api/updates/ios',
|
|
58
|
-
'/api/auth/state',
|
|
59
|
-
'/api/auth/login',
|
|
60
|
-
'/api/auth/logout',
|
|
61
|
-
// A device redeeming a pairing code has no cookie yet — the one-time secret in
|
|
62
|
-
// the code IS its credential. Minting a code stays gated; only the redemption
|
|
63
|
-
// is public, and it is single-use with a two-minute life.
|
|
64
|
-
'/api/connect/pair/claim',
|
|
65
|
-
// The page a phone's camera opens. It carries no session and no data of its
|
|
66
|
-
// own: it reads the pairing payload from the URL fragment and posts it once.
|
|
67
|
-
'/pair',
|
|
68
|
-
LOGIN_PATH,
|
|
69
|
-
'/robots.txt',
|
|
70
|
-
'/sw.js',
|
|
71
|
-
'/manifest.webmanifest',
|
|
72
|
-
'/favicon.ico',
|
|
73
|
-
'/fonts.css',
|
|
74
|
-
'/_shell',
|
|
75
|
-
]);
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Prefixes whose contents are the app itself: bundle, styles, fonts, icons.
|
|
79
|
-
*
|
|
80
|
-
* Each ends at a real separator — `/fonts/`, `/icon.` — rather than at a word
|
|
81
|
-
* stem. A bare `/icon` would also exempt `/icons-secret`, and a public prefix
|
|
82
|
-
* that matches more than it names is an open door that nothing reports.
|
|
83
|
-
*/
|
|
84
|
-
const PUBLIC_PREFIXES = [
|
|
85
|
-
'/_bun/',
|
|
86
|
-
'/_dev-assets/',
|
|
87
|
-
'/fonts/',
|
|
88
|
-
'/static/',
|
|
89
|
-
'/.well-known/',
|
|
90
|
-
// The icons are served both by their stable names (`/icon.svg`, referenced
|
|
91
|
-
// absolutely from the manifest, which Bun does not rewrite) and by the hashed
|
|
92
|
-
// names the HTML loader emits for the ones `index.html` links.
|
|
93
|
-
'/icon.',
|
|
94
|
-
'/icon-',
|
|
95
|
-
'/apple-touch-icon.',
|
|
96
|
-
'/apple-touch-icon-',
|
|
97
|
-
// The generated palette + icon-paint sheet, content-hashed (`/theme-<hash>.css`).
|
|
98
|
-
// It is the login screen's own styling, so it has to load before a credential
|
|
99
|
-
// exists — the same reason `/static/` is here.
|
|
100
|
-
'/theme-',
|
|
101
|
-
];
|
|
102
|
-
|
|
103
|
-
/** True when `pathname` is reachable without a session. */
|
|
104
|
-
export function isPublicPath(pathname: string): boolean {
|
|
105
|
-
if (PUBLIC_EXACT.has(pathname)) return true;
|
|
106
|
-
for (const prefix of PUBLIC_PREFIXES) {
|
|
107
|
-
if (pathname.startsWith(prefix)) return true;
|
|
108
|
-
}
|
|
109
|
-
return false;
|
|
110
|
-
}
|
|
40
|
+
export { isPublicPath } from '@kabmo-labs/kabmo-auth/server/public-paths';
|
|
41
|
+
import type { CredentialHandover } from '@/shared/lib/auth/handover';
|
|
42
|
+
import type { AccountRole } from '@kabmo-labs/kabmo-auth/account';
|
|
111
43
|
|
|
112
44
|
/**
|
|
113
45
|
* The auth state of this process, or null when authentication is off.
|
|
@@ -237,6 +169,65 @@ export function isAuthEnabled(): boolean {
|
|
|
237
169
|
return active !== null;
|
|
238
170
|
}
|
|
239
171
|
|
|
172
|
+
export interface AuthenticatedAccount {
|
|
173
|
+
id: string;
|
|
174
|
+
name: string;
|
|
175
|
+
role: AccountRole;
|
|
176
|
+
epoch: number;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/** The public summary of an account record, for the bootstrap and responses. */
|
|
180
|
+
function summaryOf(record: AccountRecord): AuthenticatedAccount {
|
|
181
|
+
return { id: record.id, name: record.name, role: record.role, epoch: record.sessionEpoch };
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* The account a cookie or device token belongs to, or null.
|
|
186
|
+
*
|
|
187
|
+
* Synchronous by construction: the account cache is loaded at boot and updated
|
|
188
|
+
* by the account routes, so the gate costs one HMAC and one map lookup. Open
|
|
189
|
+
* instances answer the root account because there is no identity to check.
|
|
190
|
+
*/
|
|
191
|
+
export function authenticatedAccount(request: Request): AuthenticatedAccount | null {
|
|
192
|
+
if (!active) return summaryOf(rootAccount());
|
|
193
|
+
const token = readSessionCookie(request);
|
|
194
|
+
if (token) {
|
|
195
|
+
const claims = readSessionAccount(token);
|
|
196
|
+
if (claims) {
|
|
197
|
+
const record = getAccount(claims.accountId);
|
|
198
|
+
if (record && record.role !== 'root') {
|
|
199
|
+
if (
|
|
200
|
+
verifySessionToken(token, {
|
|
201
|
+
sessionSecret: active.sessionSecret,
|
|
202
|
+
credentialKey: record.credentialKey ?? '',
|
|
203
|
+
accountId: record.id,
|
|
204
|
+
epoch: record.sessionEpoch,
|
|
205
|
+
})
|
|
206
|
+
) {
|
|
207
|
+
return summaryOf(record);
|
|
208
|
+
}
|
|
209
|
+
} else if (record?.role === 'root' && claims.epoch === 0) {
|
|
210
|
+
if (
|
|
211
|
+
verifySessionToken(token, {
|
|
212
|
+
sessionSecret: active.sessionSecret,
|
|
213
|
+
credentialKey: active.credentialKey,
|
|
214
|
+
accountId: 'root',
|
|
215
|
+
epoch: 0,
|
|
216
|
+
})
|
|
217
|
+
) {
|
|
218
|
+
return summaryOf(record);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
const device = verifyDeviceAccount(bearerToken(request)) ?? verifyDeviceAccount(readDeviceCookie(request));
|
|
224
|
+
if (device) {
|
|
225
|
+
const record = getAccount(device.accountId);
|
|
226
|
+
if (record) return summaryOf(record);
|
|
227
|
+
}
|
|
228
|
+
return null;
|
|
229
|
+
}
|
|
230
|
+
|
|
240
231
|
/**
|
|
241
232
|
* Whether this request carries a valid session.
|
|
242
233
|
*
|
|
@@ -246,20 +237,7 @@ export function isAuthEnabled(): boolean {
|
|
|
246
237
|
*/
|
|
247
238
|
export function isAuthenticatedRequest(request: Request): boolean {
|
|
248
239
|
if (!active) return true;
|
|
249
|
-
|
|
250
|
-
verifySessionToken(readSessionCookie(request), {
|
|
251
|
-
sessionSecret: active.sessionSecret,
|
|
252
|
-
credentialKey: active.credentialKey,
|
|
253
|
-
})
|
|
254
|
-
) {
|
|
255
|
-
return true;
|
|
256
|
-
}
|
|
257
|
-
// A paired device carries its own token, and the gate accepts it for every
|
|
258
|
-
// path — so this must agree, or the shell renders the login screen to a device
|
|
259
|
-
// that is already authenticated. Measured: after pairing, the cookie was set
|
|
260
|
-
// and every API call answered 200, while the document still drew the password
|
|
261
|
-
// form because this function only knew about session cookies.
|
|
262
|
-
return verifyDeviceToken(bearerToken(request)) !== null || verifyDeviceToken(readDeviceCookie(request)) !== null;
|
|
240
|
+
return authenticatedAccount(request) !== null;
|
|
263
241
|
}
|
|
264
242
|
|
|
265
243
|
/** JSON body for a rejected API call, or a redirect for a document request. */
|
|
@@ -316,8 +294,14 @@ export async function authGate(request: Request, clientAddress?: string): Promis
|
|
|
316
294
|
|
|
317
295
|
if (!active) return undefined;
|
|
318
296
|
|
|
319
|
-
const
|
|
320
|
-
if (
|
|
297
|
+
const account = authenticatedAccount(request);
|
|
298
|
+
if (account) {
|
|
299
|
+
// Verification is the only reliable "last connect" signal for a paired
|
|
300
|
+
// device; a cookie session has no device to mark.
|
|
301
|
+
const device = verifyDeviceAccount(bearerToken(request)) ?? verifyDeviceAccount(readDeviceCookie(request));
|
|
302
|
+
if (device) await markDeviceConnected(device.deviceId);
|
|
303
|
+
const denial = await workspaceGate(pathname, account.id);
|
|
304
|
+
if (denial) return denial;
|
|
321
305
|
return undefined;
|
|
322
306
|
}
|
|
323
307
|
|
|
@@ -336,9 +320,9 @@ export async function authGate(request: Request, clientAddress?: string): Promis
|
|
|
336
320
|
// Verification is also the only reliable "last connect" signal: no shell
|
|
337
321
|
// reports after pairing, so a timestamp written by the claim route alone
|
|
338
322
|
// would show the pairing date. Throttled to one write per device per minute.
|
|
339
|
-
const
|
|
340
|
-
if (
|
|
341
|
-
await markDeviceConnected(deviceId);
|
|
323
|
+
const device = verifyDeviceAccount(bearerToken(request)) ?? verifyDeviceAccount(readDeviceCookie(request));
|
|
324
|
+
if (device) {
|
|
325
|
+
await markDeviceConnected(device.deviceId);
|
|
342
326
|
return undefined;
|
|
343
327
|
}
|
|
344
328
|
|
|
@@ -20,7 +20,7 @@ import os from 'node:os';
|
|
|
20
20
|
import path from 'node:path';
|
|
21
21
|
|
|
22
22
|
import { authGate, initAuth, initAuthFromHandover, isAuthEnabled, loadAuthConfig } from '@/server/lib/auth/guard';
|
|
23
|
-
import { issueSessionToken, SESSION_TTL_MS } from '
|
|
23
|
+
import { issueSessionToken, SESSION_TTL_MS } from '@kabmo-labs/kabmo-auth/server/token';
|
|
24
24
|
|
|
25
25
|
let tempDir: string | null = null;
|
|
26
26
|
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
import { beforeEach, describe, expect, test } from 'bun:test';
|
|
16
16
|
|
|
17
17
|
import { authGate } from '@/server/lib/auth/guard';
|
|
18
|
-
import { clientAddressFor } from '
|
|
18
|
+
import { clientAddressFor } from '@kabmo-labs/kabmo-auth/server/client-address';
|
|
19
19
|
import {
|
|
20
20
|
checkLoginRateLimit,
|
|
21
21
|
clearLoginRateLimit,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
recordLoginFailure,
|
|
27
27
|
resetLoginRateLimits,
|
|
28
28
|
UNKNOWN_CLIENT_KEY,
|
|
29
|
-
} from '
|
|
29
|
+
} from '@kabmo-labs/kabmo-auth/server/rate-limit';
|
|
30
30
|
|
|
31
31
|
const NOW = 1_700_000_000_000;
|
|
32
32
|
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The one account-scoped resource check that belongs in the gate rather than a
|
|
8
|
+
* handler: chat ids. Folder routes check their own row, and the session list is
|
|
9
|
+
* filtered in its producer.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { sessionAccess } from '@/server/lib/workspace/session-access.server';
|
|
13
|
+
|
|
14
|
+
/** Session routes whose next segment is a verb, not an id. */
|
|
15
|
+
const STATIC_SESSION_ROUTES: Record<string, true> = {
|
|
16
|
+
list: true,
|
|
17
|
+
spawn: true,
|
|
18
|
+
'batch-delete': true,
|
|
19
|
+
'batch-archive': true,
|
|
20
|
+
'last-opened': true,
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export async function workspaceGate(pathname: string, accountId: string): Promise<Response | undefined> {
|
|
24
|
+
const match = /^\/api\/sessions\/([^/]+)(?:\/|$)/.exec(pathname);
|
|
25
|
+
if (!match) return undefined;
|
|
26
|
+
const sessionId = decodeURIComponent(match[1]);
|
|
27
|
+
if (STATIC_SESSION_ROUTES[sessionId]) return undefined;
|
|
28
|
+
const access = await sessionAccess(accountId, sessionId);
|
|
29
|
+
if (access !== 'denied') return undefined;
|
|
30
|
+
return new Response(
|
|
31
|
+
JSON.stringify({ error: 'That chat is not in a workspace this account can use', code: 'workspace_forbidden' }),
|
|
32
|
+
{ status: 403, headers: { 'content-type': 'application/json; charset=utf-8', 'cache-control': 'no-store' } },
|
|
33
|
+
);
|
|
34
|
+
}
|
|
@@ -61,6 +61,22 @@ async function buildProjectStylesheet(): Promise<string> {
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
/**
|
|
65
|
+
* Bun merges `:root` rules that no at-rule separates and keeps only the LAST
|
|
66
|
+
* block's declarations, so two adjacent `:root` blocks silently delete the
|
|
67
|
+
* earlier one's variables. The chat column's default width vanished this way
|
|
68
|
+
* behind the title height's block: every `wide` chat rendered at the panel
|
|
69
|
+
* width and `chat-width.e2e.ts` failed in Chromium while the source CSS still
|
|
70
|
+
* read correctly. The two defaults now share one block; this pins the bundle.
|
|
71
|
+
*/
|
|
72
|
+
describe('css plugin — adjacent :root declarations survive', () => {
|
|
73
|
+
test('the chat column width and title height both reach the browser', async () => {
|
|
74
|
+
const out = await buildProjectStylesheet();
|
|
75
|
+
expect(out).toMatch(/--chat-column-max:\s*970px/);
|
|
76
|
+
expect(out).toMatch(/--chat-title-height:\s*2\.5rem/);
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
|
|
64
80
|
describe('css plugin — nested at-rules reach the browser flattened', () => {
|
|
65
81
|
test('a placeholder colour refinement survives as a top-level @supports', async () => {
|
|
66
82
|
const out = await buildThroughPlugin(`.probe::placeholder {
|