@kabmo-labs/kabmo 0.46.1 → 0.48.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.
Files changed (339) hide show
  1. package/dist/client/index.html +1 -1
  2. package/dist/client/index.js +506 -502
  3. package/dist/client/static/js/Body-3tspyjtk.js +3 -0
  4. package/dist/client/static/js/{CsvGrid-qdkmv8bj.js → CsvGrid-3pwsfmxp.js} +2 -2
  5. package/dist/client/static/js/{DocxView-k84ns803.js → DocxView-xcg9jktb.js} +3 -3
  6. package/dist/client/static/js/{DrawioView-r1n717f7.js → DrawioView-2q19tgkx.js} +2 -2
  7. package/dist/client/static/js/HtmlPreview-92cadvbr.js +1 -0
  8. package/dist/client/static/js/ImageView-pr4h38hb.js +1 -0
  9. package/dist/client/static/js/LayoutWrapper-n4tzhjes.js +2 -0
  10. package/dist/client/static/js/MergeDiffView-0t15nh9f.js +1 -0
  11. package/dist/client/static/js/{Modal-xe6h99jn.js → Modal-77hgx4dw.js} +20 -20
  12. package/dist/client/static/js/{PdfView-ffg4mccg.js → PdfView-gzxhvxe8.js} +1 -1
  13. package/dist/client/static/js/{SessionsView-cdcbsee9.js → SessionsView-2tdqrvk0.js} +1 -1
  14. package/dist/client/static/js/{SheetView-89sscpz6.js → SheetView-w5w2m2de.js} +22 -22
  15. package/dist/client/static/js/{SvgPreview-68c0ccbv.js → SvgPreview-mtk6de6h.js} +1 -1
  16. package/dist/client/static/js/{abnfDiagram-O67JEVCF-h3a5s259.js → abnfDiagram-O67JEVCF-tha4j2fn.js} +1 -1
  17. package/dist/client/static/js/architecture-7GRP2DOG-zs15nydj.js +1 -0
  18. package/dist/client/static/js/{architectureDiagram-NJMV4G6O-983p0jgn.js → architectureDiagram-NJMV4G6O-heep78p6.js} +6 -6
  19. package/dist/client/static/js/{astro-hyj5wege.js → astro-r4dp34pw.js} +1 -1
  20. package/dist/client/static/js/bash-8d3wrx5c.js +1 -0
  21. package/dist/client/static/js/{blockDiagram-BEXU5L5S-16pse5mh.js → blockDiagram-BEXU5L5S-6mzgfqh8.js} +5 -5
  22. package/dist/client/static/js/c-rn3z0csz.js +1 -0
  23. package/dist/client/static/js/{c4Diagram-YGBWAQC7-mvnb00zt.js → c4Diagram-YGBWAQC7-sfkcw7g9.js} +4 -4
  24. package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-kmpd91xb.js → classDiagram-v2-NBCMYWYE-v530ny5e.js} +6 -6
  25. package/dist/client/static/js/{cose-bilkent-JH36ORCC-3ek5r5se.js → cose-bilkent-JH36ORCC-ybv1ttbx.js} +1 -1
  26. package/dist/client/static/js/cpp-99ws9nak.js +1 -0
  27. package/dist/client/static/js/css-narcr42w.js +1 -0
  28. package/dist/client/static/js/cynefin-OW5HDTMX-p3y1b4ap.js +1 -0
  29. package/dist/client/static/js/{cynefinDiagram-VND7K2PF-jkbh84zn.js → cynefinDiagram-VND7K2PF-k8f3z0mm.js} +2 -2
  30. package/dist/client/static/js/{dagre-6A5THRUB-4fdc0sgn.js → dagre-6A5THRUB-gk0gp124.js} +2 -2
  31. package/dist/client/static/js/{diagram-22UHCM2B-hbk61nq9.js → diagram-22UHCM2B-2zh2957c.js} +15 -15
  32. package/dist/client/static/js/{diagram-3UASUU5V-hfpbr9qh.js → diagram-3UASUU5V-bzstt5e2.js} +2 -2
  33. package/dist/client/static/js/{diagram-ATOU4E4O-fn0nt71a.js → diagram-ATOU4E4O-16adx4g0.js} +3 -3
  34. package/dist/client/static/js/{diagram-CDSNMT55-ssswxjeb.js → diagram-CDSNMT55-1ja98ens.js} +5 -5
  35. package/dist/client/static/js/{diagram-MLGK6HIB-whnzxv6f.js → diagram-MLGK6HIB-f9nnyjbq.js} +2 -2
  36. package/dist/client/static/js/{diagram-MPIPVDR6-hk1chzxk.js → diagram-MPIPVDR6-3qgadfjz.js} +2 -2
  37. package/dist/client/static/js/{dockerfile-zmsj8r4g.js → dockerfile-04tc68pq.js} +1 -1
  38. package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-q1vkg5mr.js → ebnfDiagram-ZINNZB2B-022cz603.js} +1 -1
  39. package/dist/client/static/js/{elixir-80wq7gak.js → elixir-61gbjv6c.js} +1 -1
  40. package/dist/client/static/js/{elk-276RUBZZ-kt98vg8j.js → elk-276RUBZZ-2anf1c36.js} +1 -1
  41. package/dist/client/static/js/{erDiagram-OPXOYQCR-ey3avsn9.js → erDiagram-OPXOYQCR-ndd27fz1.js} +7 -7
  42. package/dist/client/static/js/{erlang-814e8qy5.js → erlang-bh5cbm8m.js} +1 -1
  43. package/dist/client/static/js/eventmodeling-NTZA5JFV-sx2cwkz3.js +1 -0
  44. package/dist/client/static/js/flowDiagram-KWPJA3E3-dsc17mty.js +1 -0
  45. package/dist/client/static/js/{ganttDiagram-FUAMR5RP-a9k1at43.js → ganttDiagram-FUAMR5RP-9gm6hkgn.js} +4 -4
  46. package/dist/client/static/js/gitGraph-4MIJSDKK-yqhbscsd.js +1 -0
  47. package/dist/client/static/js/{gitGraphDiagram-X574FWY7-gnekjfym.js → gitGraphDiagram-X574FWY7-78bxa67c.js} +8 -8
  48. package/dist/client/static/js/graphql-tr0jcndy.js +1 -0
  49. package/dist/client/static/js/html-n8fdvrdk.js +1 -0
  50. package/dist/client/static/js/index-0e51wknc.js +10 -0
  51. package/dist/client/static/js/{index-z25ss7xj.js → index-13g17wa3.js} +1 -1
  52. package/dist/client/static/js/index-1hb8fvw9.js +1 -0
  53. package/dist/client/static/js/{index-1c2jvnyh.js → index-2bsnywea.js} +2 -2
  54. package/dist/client/static/js/{index-g7s0wsag.js → index-2n1fgpjv.js} +2 -2
  55. package/dist/client/static/js/{index-3x7h2eqj.js → index-30a8py59.js} +2 -2
  56. package/dist/client/static/js/{index-qf3y3ahx.js → index-34aq5bz5.js} +2 -2
  57. package/dist/client/static/js/index-3en15m75.js +2 -0
  58. package/dist/client/static/js/{index-nw5mvcaj.js → index-417fbrqk.js} +2 -2
  59. package/dist/client/static/js/{index-z4530r3c.js → index-45p59fxq.js} +2 -2
  60. package/dist/client/static/js/index-4n7t26ap.js +2 -0
  61. package/dist/client/static/js/{index-kty4ncsr.js → index-55pqvh82.js} +2 -2
  62. package/dist/client/static/js/index-5mpv57fn.js +12 -0
  63. package/dist/client/static/js/{index-x9r7zfp4.js → index-7pz6n3pg.js} +2 -2
  64. package/dist/client/static/js/{index-1ax52p0q.js → index-7whstwc7.js} +2 -2
  65. package/dist/client/static/js/index-869vdnz8.js +2 -0
  66. package/dist/client/static/js/{index-fzngzhww.js → index-8tvrzce0.js} +2 -2
  67. package/dist/client/static/js/index-9a78xmkk.js +462 -0
  68. package/dist/client/static/js/{index-33qxg79j.js → index-a58rkn3f.js} +5 -5
  69. package/dist/client/static/js/{index-60v30k5h.js → index-aa3hmn6j.js} +64 -64
  70. package/dist/client/static/js/{index-wrcdc9vz.js → index-aabp7nt6.js} +1 -1
  71. package/dist/client/static/js/{index-64sqfr4a.js → index-abrrqhne.js} +2 -2
  72. package/dist/client/static/js/{index-9vv7wr1n.js → index-ac2q5903.js} +2 -2
  73. package/dist/client/static/js/index-axtm1aq8.js +2 -0
  74. package/dist/client/static/js/index-b2cs4c51.js +4 -0
  75. package/dist/client/static/js/{index-8g7q8mz4.js → index-c250nzm1.js} +3 -3
  76. package/dist/client/static/js/{index-abs635a1.js → index-dxnkwf39.js} +48 -48
  77. package/dist/client/static/js/{index-kbhrvep8.js → index-e6ny4gd9.js} +6 -6
  78. package/dist/client/static/js/index-ebf50mrs.js +9 -0
  79. package/dist/client/static/js/{index-trvqvb1v.js → index-ep6bqcmg.js} +2 -2
  80. package/dist/client/static/js/{index-qfxn7yh5.js → index-fb2s080r.js} +2 -2
  81. package/dist/client/static/js/index-fryp0kgf.js +2 -0
  82. package/dist/client/static/js/{index-2ks0m8ss.js → index-g3rg6vsd.js} +2 -2
  83. package/dist/client/static/js/{index-sa1675y0.js → index-g8rpydkr.js} +2 -2
  84. package/dist/client/static/js/{index-bsr7wmj2.js → index-gkmn4y1v.js} +1 -1
  85. package/dist/client/static/js/{index-xq5f3nxa.js → index-gpmcth0x.js} +2 -2
  86. package/dist/client/static/js/{index-e9cxje00.js → index-hcmhdpp4.js} +10 -10
  87. package/dist/client/static/js/{index-kb14dhrx.js → index-he4k2j91.js} +2 -2
  88. package/dist/client/static/js/{index-wbws16ag.js → index-hq28918s.js} +2 -2
  89. package/dist/client/static/js/{index-84fyq5a6.js → index-hwzxdwwg.js} +1 -1
  90. package/dist/client/static/js/{index-2a6qp9y6.js → index-jnkc9p53.js} +1 -1
  91. package/dist/client/static/js/{index-pavvxrsz.js → index-k39be93q.js} +1 -1
  92. package/dist/client/static/js/{index-c9e417cs.js → index-kaxvwh07.js} +2 -2
  93. package/dist/client/static/js/{index-ykm7a3cp.js → index-kjr68pcj.js} +2 -2
  94. package/dist/client/static/js/{index-b5dfvget.js → index-m0fatq7c.js} +4 -4
  95. package/dist/client/static/js/{index-atq9q1s7.js → index-m39gbcxn.js} +1 -1
  96. package/dist/client/static/js/{index-hnb66d3s.js → index-mqzgf7rw.js} +2 -2
  97. package/dist/client/static/js/{index-5wz0y88c.js → index-pzsp1src.js} +2 -2
  98. package/dist/client/static/js/{index-yf93db65.js → index-qe0vfv6s.js} +1 -1
  99. package/dist/client/static/js/{index-q9ytjey8.js → index-qek9mt5w.js} +1 -1
  100. package/dist/client/static/js/{index-d23eacf2.js → index-qxzj780x.js} +2 -2
  101. package/dist/client/static/js/index-rgxg0azs.css +1 -0
  102. package/dist/client/static/js/{index-m4k054wz.js → index-rq4dk4tp.js} +4 -4
  103. package/dist/client/static/js/{index-fj5rsp5v.js → index-seekt5k3.js} +2 -2
  104. package/dist/client/static/js/{index-561gkvve.js → index-sng4prpr.js} +2 -2
  105. package/dist/client/static/js/{index-vjmg7kn5.js → index-t4s10406.js} +2 -2
  106. package/dist/client/static/js/{index-b2e5pwx7.js → index-tzz5gp8a.js} +5 -5
  107. package/dist/client/static/js/index-vnv9z0a1.js +1 -0
  108. package/dist/client/static/js/{index-19x11s5w.js → index-x7rajphe.js} +2 -2
  109. package/dist/client/static/js/{index-dxvtjn6a.js → index-xny7vsfz.js} +2 -2
  110. package/dist/client/static/js/index-xr4hjv01.js +2 -0
  111. package/dist/client/static/js/{index-65afr75v.js → index-ya9yqj5w.js} +2 -2
  112. package/dist/client/static/js/{index-z0fkfphe.js → index-zcgqacvx.js} +2 -2
  113. package/dist/client/static/js/info-A6RAGUB7-0sd3zzgg.js +1 -0
  114. package/dist/client/static/js/{infoDiagram-VRGFBTTK-r1p25738.js → infoDiagram-VRGFBTTK-bxk0g0pe.js} +2 -2
  115. package/dist/client/static/js/ini-tnaw7zjy.js +1 -0
  116. package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-afgrqdrt.js → ishikawaDiagram-OU5B5YK6-d1kdkhth.js} +3 -3
  117. package/dist/client/static/js/java-m4dpc2vw.js +1 -0
  118. package/dist/client/static/js/javascript-8y26t991.js +1 -0
  119. package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-hepa4wk7.js → journeyDiagram-ZHPQQLJL-cahg3zjq.js} +4 -4
  120. package/dist/client/static/js/json-azm7bdqd.js +1 -0
  121. package/dist/client/static/js/jsx-p9j1k773.js +1 -0
  122. package/dist/client/static/js/{julia-yv2j8qd0.js → julia-2n5k898q.js} +1 -1
  123. package/dist/client/static/js/{kanban-definition-PNTS6WVX-jysft8ya.js → kanban-definition-PNTS6WVX-nq7t83en.js} +6 -6
  124. package/dist/client/static/js/lua-hbm9rhz9.js +1 -0
  125. package/dist/client/static/js/markdown-tk3cd3vs.js +1 -0
  126. package/dist/client/static/js/{mermaid.core-0m90b0s8.js → mermaid.core-6nw0853j.js} +8 -8
  127. package/dist/client/static/js/{mindmap-definition-NLK3R4M7-x2rrzpvr.js → mindmap-definition-NLK3R4M7-cm7ykxf2.js} +3 -3
  128. package/dist/client/static/js/one-dark-pro-2cdc2nk7.js +1 -0
  129. package/dist/client/static/js/one-light-bt6z4jf0.js +1 -0
  130. package/dist/client/static/js/packet-AYTQ26CC-13w2v5bb.js +1 -0
  131. package/dist/client/static/js/{pegDiagram-GJSIUBJH-z7vb7f1z.js → pegDiagram-GJSIUBJH-xwxz8nsq.js} +1 -1
  132. package/dist/client/static/js/{perl-917pjq5a.js → perl-66vb5pz7.js} +1 -1
  133. package/dist/client/static/js/{php-hwz75qzt.js → php-4e9we8am.js} +1 -1
  134. package/dist/client/static/js/pie-WAS4IAKB-swtnysgn.js +1 -0
  135. package/dist/client/static/js/{pieDiagram-5QR66LMP-jqv6v4e6.js → pieDiagram-5QR66LMP-n910k9th.js} +3 -3
  136. package/dist/client/static/js/properties-6911ckw7.js +1 -0
  137. package/dist/client/static/js/python-44cvj250.js +1 -0
  138. package/dist/client/static/js/{quadrantDiagram-O4NWA36T-w2h8yxrv.js → quadrantDiagram-O4NWA36T-dxkwxbqb.js} +6 -6
  139. package/dist/client/static/js/r-t3sepzm4.js +1 -0
  140. package/dist/client/static/js/radar-RG4KPBEZ-vtvxkx55.js +1 -0
  141. package/dist/client/static/js/railroad-74A4TZTK-5sp2d63r.js +1 -0
  142. package/dist/client/static/js/railroad-abnf-HS5TGJTU-kg706fan.js +1 -0
  143. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-4ra1gzx5.js +1 -0
  144. package/dist/client/static/js/railroad-peg-WCYAUIDC-hms3zpjm.js +1 -0
  145. package/dist/client/static/js/{railroadDiagram-XR7U4H2S-nd09yac3.js → railroadDiagram-XR7U4H2S-xb1smt7r.js} +1 -1
  146. package/dist/client/static/js/{requirementDiagram-PLB6GJNP-t61zxh5v.js → requirementDiagram-PLB6GJNP-6kb21b9f.js} +6 -6
  147. package/dist/client/static/js/{ruby-er7ayhte.js → ruby-v7nmcvyr.js} +1 -1
  148. package/dist/client/static/js/{rust-avnkhh0p.js → rust-5ersd7be.js} +1 -1
  149. package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-2f7h2cmw.js → sankeyDiagram-IPEJSGJF-74z0fskw.js} +4 -4
  150. package/dist/client/static/js/{sass-n47tt136.js → sass-h3nvy4c8.js} +1 -1
  151. package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-kfb5d7zd.js → sequenceDiagram-PO4LG4MO-apn6kezn.js} +17 -17
  152. package/dist/client/static/js/{sizeCapture-INFHLROL-amfg19se.js → sizeCapture-INFHLROL-2drzcjb8.js} +1 -1
  153. package/dist/client/static/js/sql-zdkawqx3.js +1 -0
  154. package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-k5hx7btx.js → stateDiagram-v2-GCMORJYK-ma09vhby.js} +3 -3
  155. package/dist/client/static/js/{svelte-2pmz35vx.js → svelte-dhspkgss.js} +1 -1
  156. package/dist/client/static/js/{swimlanes-2SLR337P-wv3rp8kk.js → swimlanes-2SLR337P-f6y9xqnx.js} +1 -1
  157. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-3dwas56m.js +8 -0
  158. package/dist/client/static/js/{timeline-definition-EJHVYXUP-0re95wtn.js → timeline-definition-EJHVYXUP-zmcmvq00.js} +5 -5
  159. package/dist/client/static/js/treeView-Q6P3EWNA-7t5k6rs2.js +1 -0
  160. package/dist/client/static/js/treemap-WGGIJYW6-w56ry3bg.js +1 -0
  161. package/dist/client/static/js/tsx-b7eabr17.js +1 -0
  162. package/dist/client/static/js/typescript-nnkvhwfy.js +1 -0
  163. package/dist/client/static/js/{usecaseDiagram-POWQR4AR-yrje14qp.js → usecaseDiagram-POWQR4AR-wfaa019a.js} +24 -24
  164. package/dist/client/static/js/{vennDiagram-UO4OBE2U-jxkmrfy5.js → vennDiagram-UO4OBE2U-46wf2pgd.js} +8 -8
  165. package/dist/client/static/js/{vue-d5gpjfgn.js → vue-ffngx2b3.js} +1 -1
  166. package/dist/client/static/js/wardley-WFR3VGLG-rtjb9kgv.js +1 -0
  167. package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-d3v2m9b1.js → wardleyDiagram-VNRHLVJA-10ph3bzq.js} +4 -4
  168. package/dist/client/static/js/xml-xy1tw6b2.js +1 -0
  169. package/dist/client/static/js/{xychartDiagram-PMCCYNJV-9a1s1rjt.js → xychartDiagram-PMCCYNJV-2ba825z9.js} +5 -5
  170. package/dist/client/static/js/yaml-0fexqg2d.js +1 -0
  171. package/marketplace/marketplace.json +34 -7
  172. package/marketplace/plugins/kanban/README.md +143 -0
  173. package/marketplace/plugins/kanban/icon.svg +5 -0
  174. package/marketplace/plugins/kanban/package.json +30 -0
  175. package/marketplace/plugins/kanban/src/app.tsx +34 -0
  176. package/marketplace/plugins/kanban/src/mcp-tools.ts +296 -0
  177. package/marketplace/plugins/kanban/src/mcp.test.ts +199 -0
  178. package/marketplace/plugins/kanban/src/mcp.ts +148 -0
  179. package/marketplace/plugins/kanban/src/panel/CardSheet.tsx +319 -0
  180. package/marketplace/plugins/kanban/src/panel/CardTile.tsx +97 -0
  181. package/marketplace/plugins/kanban/src/panel/StageColumn.tsx +116 -0
  182. package/marketplace/plugins/kanban/src/panel/StageSheet.tsx +249 -0
  183. package/marketplace/plugins/kanban/src/panel/catalogs.ts +114 -0
  184. package/marketplace/plugins/kanban/src/panel/index.tsx +327 -0
  185. package/marketplace/plugins/kanban/src/panel/panel.test.ts +219 -0
  186. package/marketplace/plugins/kanban/src/panel/start-work.ts +132 -0
  187. package/marketplace/plugins/kanban/src/panel/use-board.ts +148 -0
  188. package/marketplace/plugins/kanban/src/panel/use-card-detail.ts +70 -0
  189. package/marketplace/plugins/kanban/src/panel/use-writes.ts +123 -0
  190. package/marketplace/plugins/kanban/src/protocol.ts +180 -0
  191. package/marketplace/plugins/kanban/src/server.test.ts +113 -0
  192. package/marketplace/plugins/kanban/src/server.ts +227 -0
  193. package/marketplace/plugins/kanban/src/store/board.test.ts +311 -0
  194. package/marketplace/plugins/kanban/src/store/board.ts +147 -0
  195. package/marketplace/plugins/kanban/src/store/cards.ts +228 -0
  196. package/marketplace/plugins/kanban/src/store/fs.ts +159 -0
  197. package/marketplace/plugins/kanban/src/store/ops.ts +245 -0
  198. package/marketplace/plugins/kanban/src/store/resolve.test.ts +82 -0
  199. package/marketplace/plugins/kanban/src/store/resolve.ts +135 -0
  200. package/marketplace/plugins/kanban/tsconfig.json +26 -0
  201. package/package.json +2 -2
  202. package/src/client/components/common/file-icon/index.tsx +1 -1
  203. package/src/client/components/layout/desktop-layout/LeftColumn.tsx +12 -3
  204. package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +34 -7
  205. package/src/client/components/layout/desktop-layout/index.tsx +17 -22
  206. package/src/client/components/mobile/mobile-right-sidebar/EditorSurface.tsx +2 -0
  207. package/src/client/components/mobile/mobile-right-sidebar/FullEditor.tsx +11 -3
  208. package/src/client/components/settings/categories/appearance-settings/EditorThemeSection.test.tsx +21 -0
  209. package/src/client/components/settings/categories/appearance-settings/EditorThemeSection.tsx +8 -4
  210. package/src/client/components/settings/categories/appearance-settings/ThemeCard.tsx +8 -2
  211. package/src/client/components/settings/categories/appearance-settings/ThemeGrid.tsx +15 -4
  212. package/src/client/components/settings/categories/usage-settings/LimitsSection.tsx +10 -3
  213. package/src/client/components/settings/categories/usage-settings/ProviderDetail.tsx +27 -4
  214. package/src/client/components/settings/categories/usage-settings/TokenHarborCard.tsx +160 -0
  215. package/src/client/components/settings/categories/usage-settings/TokenPortalCard.tsx +104 -0
  216. package/src/client/components/settings/categories/usage-settings/format.ts +35 -0
  217. package/src/client/components/settings/categories/usage-settings/limits-section.test.tsx +16 -0
  218. package/src/client/components/settings/categories/usage-settings/providers.ts +26 -4
  219. package/src/client/components/settings/categories/usage-settings/token-harbor-card.test.tsx +114 -0
  220. package/src/client/components/settings/categories/usage-settings/token-harbor-hint.test.ts +68 -0
  221. package/src/client/components/settings/categories/usage-settings/token-portal-card.test.tsx +81 -0
  222. package/src/client/components/settings/categories/usage-settings/usage-and-picker.test.ts +66 -0
  223. package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.test.ts +21 -0
  224. package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.tsx +7 -1
  225. package/src/client/components/workspace/chat-timeline/chat-input/ThinkingLevelDropdown.tsx +3 -1
  226. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Read.tsx +1 -1
  227. package/src/client/components/workspace/chat-timeline/tool-renderers/shared/DiffView.test.ts +13 -0
  228. package/src/client/components/workspace/chat-timeline/tool-renderers/shared/DiffView.tsx +41 -18
  229. package/src/client/components/workspace/editor/BodyLazy.tsx +40 -0
  230. package/src/client/components/workspace/editor/FilePane.tsx +4 -2
  231. package/src/client/components/workspace/editor/Tabs.tsx +7 -1
  232. package/src/client/components/workspace/editor/Toolbar.tsx +7 -1
  233. package/src/client/components/workspace/editor/chrome-rows.test.tsx +126 -0
  234. package/src/client/components/workspace/editor/index.tsx +2 -2
  235. package/src/client/components/workspace/editor/viewers/HtmlPreview.test.tsx +94 -0
  236. package/src/client/components/workspace/editor/viewers/HtmlPreview.tsx +71 -0
  237. package/src/client/components/workspace/editor/viewers/bytes.ts +1 -1
  238. package/src/client/components/workspace/editor/viewers/dispatch.tsx +18 -2
  239. package/src/client/components/workspace/editor/viewers/viewers.test.ts +14 -1
  240. package/src/client/components/workspace/panel-header/index.test.tsx +2 -1
  241. package/src/client/components/workspace/panel-header/index.tsx +6 -4
  242. package/src/client/data/settings/omp-schema.json +33 -10
  243. package/src/client/hooks/editor/resolve-viewer.ts +1 -1
  244. package/src/client/hooks/editor/use-editor-drop.ts +14 -0
  245. package/src/client/hooks/editor/use-editor-tab-state.ts +5 -4
  246. package/src/client/hooks/ui/media-query.ts +27 -0
  247. package/src/client/hooks/workspace/file-tabs.ts +10 -0
  248. package/src/client/hooks/workspace/right-panel-presence.test.ts +152 -0
  249. package/src/client/hooks/workspace/right-panel-presence.ts +119 -0
  250. package/src/client/lib/router/search-params.test.ts +83 -0
  251. package/src/client/lib/router/search-params.ts +14 -3
  252. package/src/server/lib/mcp/session-mcp.test.ts +64 -1
  253. package/src/server/lib/mcp/session-overlay.server.ts +7 -4
  254. package/src/server/lib/omp/rpc/constants.test.ts +31 -0
  255. package/src/server/lib/omp/rpc/constants.ts +19 -0
  256. package/src/server/lib/omp/rpc/session-new.ts +78 -0
  257. package/src/server/lib/omp/rpc/session-registry.ts +22 -49
  258. package/src/server/lib/omp/rpc/spawn-mcp.ts +8 -1
  259. package/src/server/lib/omp/session/blobs.server.ts +2 -1
  260. package/src/server/lib/plugins/e2e.test.ts +71 -2
  261. package/src/server/lib/plugins/loader.server.ts +20 -1
  262. package/src/server/lib/plugins/module-import.server.ts +45 -0
  263. package/src/server/lib/usage/provider-key.ts +18 -0
  264. package/src/server/lib/usage/providers.server.ts +27 -3
  265. package/src/server/lib/usage/report.server.ts +24 -0
  266. package/src/server/lib/usage/token-harbor.test.ts +191 -0
  267. package/src/server/lib/usage/token-harbor.ts +207 -0
  268. package/src/server/lib/usage/token-portal.test.ts +140 -0
  269. package/src/server/lib/usage/token-portal.ts +179 -0
  270. package/src/server/lib/usage/vendor-http.test.ts +52 -0
  271. package/src/server/lib/usage/vendor-http.ts +9 -2
  272. package/src/server/routes/agent/new-prompt.test.ts +81 -0
  273. package/src/server/routes/agent/new.ts +78 -4
  274. package/src/server/routes/fs/raw.test.ts +12 -0
  275. package/src/server/routes/fs/raw.ts +2 -6
  276. package/src/server/routes/wiki/asset.ts +1 -1
  277. package/src/shared/lib/fs/document-kind.test.ts +39 -2
  278. package/src/shared/lib/fs/document-kind.ts +49 -1
  279. package/src/shared/lib/fs/file-kind.test.ts +30 -3
  280. package/src/shared/lib/fs/file-kind.ts +7 -104
  281. package/src/shared/lib/fs/mime.ts +159 -0
  282. package/src/shared/lib/omp/config/schema-releases.test.ts +22 -0
  283. package/src/shared/lib/workspace/sidebar-width.test.ts +34 -0
  284. package/src/shared/lib/workspace/sidebar-width.ts +33 -0
  285. package/src/shared/lib/workspace/workspace-panel-widths.test.ts +124 -0
  286. package/src/shared/lib/workspace/workspace-panel-widths.ts +115 -18
  287. package/src/shared/types/settings/usage.ts +89 -2
  288. package/dist/client/static/js/ImageView-jkrdrq8v.js +0 -1
  289. package/dist/client/static/js/LayoutWrapper-sh634350.js +0 -2
  290. package/dist/client/static/js/architecture-7GRP2DOG-pvb4d65d.js +0 -1
  291. package/dist/client/static/js/bash-8d8z8zrg.js +0 -1
  292. package/dist/client/static/js/c-acmn1zc9.js +0 -1
  293. package/dist/client/static/js/cpp-620mvjkk.js +0 -1
  294. package/dist/client/static/js/css-bt76kxbq.js +0 -1
  295. package/dist/client/static/js/cynefin-OW5HDTMX-gmx4vean.js +0 -1
  296. package/dist/client/static/js/eventmodeling-NTZA5JFV-vrnheyh7.js +0 -1
  297. package/dist/client/static/js/flowDiagram-KWPJA3E3-7gvtpn3d.js +0 -1
  298. package/dist/client/static/js/gitGraph-4MIJSDKK-n6wnc8st.js +0 -1
  299. package/dist/client/static/js/graphql-j1a6zp7m.js +0 -1
  300. package/dist/client/static/js/html-m0megrvb.js +0 -1
  301. package/dist/client/static/js/index-4cag7w6k.js +0 -479
  302. package/dist/client/static/js/index-5ka2tyf9.js +0 -3
  303. package/dist/client/static/js/index-83rkg916.js +0 -2
  304. package/dist/client/static/js/index-amsa0tfs.js +0 -2
  305. package/dist/client/static/js/index-dn7hg4em.js +0 -2
  306. package/dist/client/static/js/index-dpy3ewrn.css +0 -1
  307. package/dist/client/static/js/index-dt6q3rws.js +0 -12
  308. package/dist/client/static/js/index-hgzntg2j.js +0 -2
  309. package/dist/client/static/js/index-vkqb4dnt.js +0 -1
  310. package/dist/client/static/js/index-xwjbq003.js +0 -2
  311. package/dist/client/static/js/info-A6RAGUB7-1xtdxjz2.js +0 -1
  312. package/dist/client/static/js/ini-5f4zqtqr.js +0 -1
  313. package/dist/client/static/js/java-jj41mty3.js +0 -1
  314. package/dist/client/static/js/javascript-n9w9p97f.js +0 -1
  315. package/dist/client/static/js/json-rnh2h17x.js +0 -1
  316. package/dist/client/static/js/jsx-4gecrt29.js +0 -1
  317. package/dist/client/static/js/lua-zszaw2f7.js +0 -1
  318. package/dist/client/static/js/markdown-nm6gw4v4.js +0 -1
  319. package/dist/client/static/js/one-dark-pro-09d8p5vy.js +0 -1
  320. package/dist/client/static/js/one-light-g3ednt6p.js +0 -1
  321. package/dist/client/static/js/packet-AYTQ26CC-zm1r82x5.js +0 -1
  322. package/dist/client/static/js/pie-WAS4IAKB-sqa7321j.js +0 -1
  323. package/dist/client/static/js/properties-rkptax7r.js +0 -1
  324. package/dist/client/static/js/python-qf1se1mj.js +0 -1
  325. package/dist/client/static/js/r-ms0cygq2.js +0 -1
  326. package/dist/client/static/js/radar-RG4KPBEZ-z3z82syp.js +0 -1
  327. package/dist/client/static/js/railroad-74A4TZTK-z6swcqq2.js +0 -1
  328. package/dist/client/static/js/railroad-abnf-HS5TGJTU-33km6py4.js +0 -1
  329. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-1zbf1xmq.js +0 -1
  330. package/dist/client/static/js/railroad-peg-WCYAUIDC-wte1xzzy.js +0 -1
  331. package/dist/client/static/js/sql-hd42h8wx.js +0 -1
  332. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-6y8zdbm4.js +0 -8
  333. package/dist/client/static/js/treeView-Q6P3EWNA-pvgx6n22.js +0 -1
  334. package/dist/client/static/js/treemap-WGGIJYW6-3n9zm628.js +0 -1
  335. package/dist/client/static/js/tsx-gx7td06z.js +0 -1
  336. package/dist/client/static/js/typescript-1a808spn.js +0 -1
  337. package/dist/client/static/js/wardley-WFR3VGLG-7m07ewc4.js +0 -1
  338. package/dist/client/static/js/xml-3117mxd9.js +0 -1
  339. package/dist/client/static/js/yaml-dmvh8vyt.js +0 -1
@@ -0,0 +1,97 @@
1
+ /**
2
+ * @license
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ /**
7
+ * One card, drawn as the control record it is.
8
+ *
9
+ * There is no description line because there is no description: decision 2 keeps
10
+ * the board a control surface, so a card shows what decides work — priority, the
11
+ * workspace it belongs to, whether it has a prompt, and the session working it.
12
+ * The prompt itself is one truncated line, because a card is an index and the
13
+ * sheet is the detail.
14
+ */
15
+
16
+ import type { CardSummary } from '../protocol';
17
+
18
+ /** Priority as the tag a reader scans for: P0 is the loudest. */
19
+ export function priorityLabel(priority: number): string {
20
+ return `P${Math.min(4, Math.max(0, priority))}`;
21
+ }
22
+
23
+ /** The one-line preview a card shows instead of the prompt. */
24
+ export function promptPreview(card: CardSummary): string {
25
+ if (!card.hasPrompt) return 'no prompt';
26
+ return card.imageCount > 0 ? `prompt · ${card.imageCount} image${card.imageCount === 1 ? '' : 's'}` : 'prompt';
27
+ }
28
+
29
+ /** The workspace's last path segment: `/Users/x/projects/kabmo` → `kabmo`. */
30
+ export function workspaceLabel(workspace: string | null): string {
31
+ if (!workspace) return 'unfiled';
32
+ const parts = workspace.split(/[\\/]/).filter(Boolean);
33
+ return parts[parts.length - 1] ?? workspace;
34
+ }
35
+
36
+ export interface CardTileProps {
37
+ card: CardSummary;
38
+ /** True when the board is showing every workspace, so the badge earns its space. */
39
+ showWorkspace: boolean;
40
+ /** The session's live state, from the host's own sidebar list. */
41
+ sessionState: 'running' | 'needs-you' | 'idle' | 'none';
42
+ onOpen: (id: string) => void;
43
+ onDragStart: (id: string) => void;
44
+ onDragEnd: () => void;
45
+ /** True while this card is the one being dragged. */
46
+ dragging: boolean;
47
+ }
48
+
49
+ /** One card. Pointer drag is the caller's job; this only reports intent. */
50
+ export function CardTile({
51
+ card,
52
+ showWorkspace,
53
+ sessionState,
54
+ onOpen,
55
+ onDragStart,
56
+ onDragEnd,
57
+ dragging,
58
+ }: CardTileProps) {
59
+ const session = sessionState === 'none' ? null : sessionState;
60
+ return (
61
+ <button
62
+ type="button"
63
+ draggable
64
+ onDragStart={() => onDragStart(card.id)}
65
+ onDragEnd={onDragEnd}
66
+ onClick={() => onOpen(card.id)}
67
+ class={[
68
+ 'w-full text-left rounded-lg border px-2.5 py-2 flex flex-col gap-1',
69
+ 'bg-paper border-ink/10 hover:border-ink/25 transition-colors',
70
+ dragging ? 'opacity-40' : '',
71
+ ].join(' ')}
72
+ aria-label={`${card.title} — ${priorityLabel(card.priority)}`}
73
+ >
74
+ <span class="flex items-center gap-2 min-w-0">
75
+ <span class="text-[10px] font-mono text-ink/40 flex-none">{card.id}</span>
76
+ <span class="text-[10px] font-mono text-ink/60 flex-none">{priorityLabel(card.priority)}</span>
77
+ {session ? (
78
+ <span class="ml-auto flex items-center gap-1 text-[10px] text-ink/60 flex-none">
79
+ <span
80
+ class={[
81
+ 'inline-block w-1.5 h-1.5 rounded-full',
82
+ session === 'running' ? 'bg-[var(--theme-success)]' : session === 'needs-you' ? 'bg-[var(--theme-warning)]' : 'bg-ink/30',
83
+ ].join(' ')}
84
+ aria-hidden="true"
85
+ />
86
+ {session === 'needs-you' ? 'needs you' : session}
87
+ </span>
88
+ ) : null}
89
+ </span>
90
+ <span class="text-xs text-ink leading-snug line-clamp-2">{card.title}</span>
91
+ <span class="flex items-center gap-2 text-[10px] text-ink/45 min-w-0">
92
+ {showWorkspace ? <span class="truncate">{workspaceLabel(card.workspace)}</span> : null}
93
+ <span class="truncate">{promptPreview(card)}</span>
94
+ </span>
95
+ </button>
96
+ );
97
+ }
@@ -0,0 +1,116 @@
1
+ /**
2
+ * @license
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ /**
7
+ * One stage column: its header, its count, and the drop target.
8
+ *
9
+ * A hidden stage that still holds cards KEEPS SHOWING — hiding is a way to quiet
10
+ * a lane, not a way to lose a card. The panel decides that; this component just
11
+ * renders what it is given, plus the "no cards" placeholder and the cap notice.
12
+ */
13
+
14
+ import type { CardSummary, Stage } from '../protocol';
15
+ import { CardTile } from './CardTile';
16
+
17
+ /** A lane draws at most this many cards; the rest are summarised. */
18
+ export const MAX_VISIBLE_CARDS = 120;
19
+
20
+ export interface StageColumnProps {
21
+ stage: Stage;
22
+ cards: CardSummary[];
23
+ showWorkspace: boolean;
24
+ sessionStateOf: (card: CardSummary) => 'running' | 'needs-you' | 'idle' | 'none';
25
+ draggingId: string | null;
26
+ dropTarget: string | null;
27
+ onOpenCard: (id: string) => void;
28
+ onAddCard: (stageId: string) => void;
29
+ onDragStart: (id: string) => void;
30
+ onDragEnd: () => void;
31
+ onDropOn: (stageId: string) => void;
32
+ onDragOver: (stageId: string | null) => void;
33
+ }
34
+
35
+ /** One lane. */
36
+ export function StageColumn({
37
+ stage,
38
+ cards,
39
+ showWorkspace,
40
+ sessionStateOf,
41
+ draggingId,
42
+ dropTarget,
43
+ onOpenCard,
44
+ onAddCard,
45
+ onDragStart,
46
+ onDragEnd,
47
+ onDropOn,
48
+ onDragOver,
49
+ }: StageColumnProps) {
50
+ const visible = cards.slice(0, MAX_VISIBLE_CARDS);
51
+ const overflow = cards.length - visible.length;
52
+ const active = dropTarget === stage.id;
53
+
54
+ return (
55
+ <section
56
+ class={[
57
+ 'flex flex-col h-full min-h-0 rounded-xl border transition-colors',
58
+ 'w-[200px] flex-none bg-[var(--theme-canvas)]',
59
+ active ? 'border-ink/40' : 'border-ink/10',
60
+ ].join(' ')}
61
+ aria-label={`${stage.label}, ${cards.length} card${cards.length === 1 ? '' : 's'}`}
62
+ onDragOver={(event) => {
63
+ event.preventDefault();
64
+ onDragOver(stage.id);
65
+ }}
66
+ onDragLeave={() => onDragOver(null)}
67
+ onDrop={(event) => {
68
+ event.preventDefault();
69
+ onDropOn(stage.id);
70
+ }}
71
+ >
72
+ <header class="flex items-center gap-1.5 px-2.5 h-9 flex-none">
73
+ <span class="text-xs font-medium text-ink truncate">{stage.label}</span>
74
+ <span class="text-[11px] text-ink/45">{cards.length}</span>
75
+ {stage.session ? (
76
+ <span class="text-[9px] uppercase font-mono text-ink/35" title="Cards here run a chat session">
77
+ session
78
+ </span>
79
+ ) : null}
80
+ <button
81
+ type="button"
82
+ class="ml-auto text-ink/50 hover:text-ink px-1"
83
+ title={`New card in ${stage.label}`}
84
+ aria-label={`New card in ${stage.label}`}
85
+ onClick={() => onAddCard(stage.id)}
86
+ >
87
+ +
88
+ </button>
89
+ </header>
90
+ <div class="flex-1 min-h-0 overflow-y-auto px-2 pb-2 flex flex-col gap-2">
91
+ {cards.length === 0 ? (
92
+ <p class="text-[11px] text-ink/35 text-center py-6 border border-dashed border-ink/10 rounded-lg">
93
+ No cards
94
+ </p>
95
+ ) : null}
96
+ {visible.map((card) => (
97
+ <CardTile
98
+ key={card.id}
99
+ card={card}
100
+ showWorkspace={showWorkspace}
101
+ sessionState={sessionStateOf(card)}
102
+ onOpen={onOpenCard}
103
+ onDragStart={onDragStart}
104
+ onDragEnd={onDragEnd}
105
+ dragging={draggingId === card.id}
106
+ />
107
+ ))}
108
+ {overflow > 0 ? (
109
+ <p class="text-[11px] text-ink/45 px-1">
110
+ {overflow} more — narrow the filter
111
+ </p>
112
+ ) : null}
113
+ </div>
114
+ </section>
115
+ );
116
+ }
@@ -0,0 +1,249 @@
1
+ /**
2
+ * @license
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ /**
7
+ * The stages sheet: what each lane DOES, not just what it is called.
8
+ *
9
+ * A stage owns three facts the rest of the board obeys — whether it runs a
10
+ * session, what agent a card landing there uses, and the system prompt that
11
+ * agent gets. The last two are why this sheet exists at all: decision 6 and 7 are
12
+ * configuration, and configuration that can only be edited by hand-editing
13
+ * `board.json` is not a feature.
14
+ *
15
+ * Every field left on "inherit" falls back to the board's defaults and then to
16
+ * the host, and the sheet says which level supplied the value it is showing.
17
+ */
18
+
19
+ import { useState } from 'preact/hooks';
20
+
21
+ import { MAX_PROMPT_CHARS, type AgentSpec, type Board, type Stage } from '../protocol';
22
+ import type { Catalogs } from './catalogs';
23
+ import type { WriteOutcome } from './use-writes';
24
+
25
+ export interface StageSheetProps {
26
+ board: Board;
27
+ catalogs: Catalogs;
28
+ onClose: () => void;
29
+ onSave: (stages: Stage[]) => Promise<WriteOutcome<unknown>>;
30
+ onSaveDefaults: (defaults: Record<string, unknown>) => Promise<WriteOutcome<unknown>>;
31
+ }
32
+
33
+ /** A spec's own text, for the form fields. Every field is a STRING: empty means inherit. */
34
+ interface SpecText {
35
+ harness: string;
36
+ thinking: string;
37
+ access: string;
38
+ prompt: string;
39
+ model: string;
40
+ }
41
+
42
+ function specOf(stage: Stage): SpecText {
43
+ return {
44
+ harness: stage.agent?.harness ?? '',
45
+ thinking: stage.agent?.thinking ?? '',
46
+ access: stage.agent?.access ?? '',
47
+ prompt: stage.agent?.prompt ?? '',
48
+ model: stage.agent?.model ? `${stage.agent.model.provider}/${stage.agent.model.modelId}` : '',
49
+ };
50
+ }
51
+
52
+ /** The stages sheet. */
53
+ export function StageSheet({ board, catalogs, onClose, onSave, onSaveDefaults }: StageSheetProps) {
54
+ const [drafts, setDrafts] = useState<Stage[]>(board.stages.map((stage) => ({ ...stage })));
55
+ const [defaults, setDefaults] = useState<Record<string, unknown>>({ ...board.defaults });
56
+ const [busy, setBusy] = useState(false);
57
+ const [error, setError] = useState<string | null>(null);
58
+ const [notice, setNotice] = useState<string | null>(null);
59
+
60
+ const edit = (id: string, change: (stage: Stage) => Stage) => {
61
+ setDrafts((current) => current.map((stage) => (stage.id === id ? change(stage) : stage)));
62
+ };
63
+
64
+ const setAgentField = (id: string, key: 'harness' | 'thinking' | 'access' | 'prompt', value: string) => {
65
+ edit(id, (stage) => {
66
+ const agent: AgentSpec = { ...(stage.agent ?? {}) };
67
+ if (value) {
68
+ if (key === 'prompt') agent.prompt = value;
69
+ else if (key === 'harness') agent.harness = value;
70
+ else if (key === 'thinking') agent.thinking = value;
71
+ else agent.access = value;
72
+ } else if (key === 'prompt') delete agent.prompt;
73
+ else if (key === 'harness') delete agent.harness;
74
+ else if (key === 'thinking') delete agent.thinking;
75
+ else delete agent.access;
76
+ return { ...stage, ...(Object.keys(agent).length ? { agent } : { agent: undefined }) };
77
+ });
78
+ };
79
+
80
+ const save = async () => {
81
+ setBusy(true);
82
+ setError(null);
83
+ setNotice(null);
84
+ const cleaned = drafts.map((stage) => ({ ...stage, agent: stage.agent && Object.keys(stage.agent).length ? stage.agent : undefined }));
85
+ const stagesOutcome = await onSave(cleaned);
86
+ if (!stagesOutcome.ok) {
87
+ setBusy(false);
88
+ setError(stagesOutcome.error);
89
+ return;
90
+ }
91
+ const defaultsOutcome = await onSaveDefaults(defaults);
92
+ setBusy(false);
93
+ if (!defaultsOutcome.ok) setError(defaultsOutcome.error);
94
+ else setNotice('Stages saved.');
95
+ };
96
+
97
+ return (
98
+ <aside class="flex flex-col h-full min-h-0 w-full md:w-[460px] md:flex-none border-l border-ink/10 bg-paper">
99
+ <header class="flex items-center gap-2 px-3 h-10 flex-none border-b border-ink/10">
100
+ <span class="text-xs font-medium text-ink">Stages</span>
101
+ <span class="text-[10px] text-ink/45">a hidden stage with cards keeps showing</span>
102
+ <button type="button" class="ml-auto text-ink/50 hover:text-ink px-1" aria-label="Close" onClick={onClose}>
103
+ ×
104
+ </button>
105
+ </header>
106
+
107
+ <div class="flex-1 min-h-0 overflow-y-auto px-3 py-3 flex flex-col gap-4">
108
+ <fieldset class="flex flex-col gap-2">
109
+ <legend class="text-[10px] uppercase font-mono text-ink/40">Board defaults</legend>
110
+ <label class="flex flex-col gap-1">
111
+ <span class="text-[10px] text-ink/45">Harness</span>
112
+ <select
113
+ class="rounded-md border border-ink/15 bg-paper px-2 py-1 text-xs text-ink"
114
+ value={typeof defaults.harness === 'string' ? defaults.harness : ''}
115
+ onChange={(event) => setDefaults({ ...defaults, harness: event.currentTarget.value || undefined })}
116
+ >
117
+ <option value="">host default (omp-rpc)</option>
118
+ {catalogs.harnesses.map((entry) => (
119
+ <option key={entry.id} value={entry.id}>
120
+ {entry.label}
121
+ </option>
122
+ ))}
123
+ </select>
124
+ </label>
125
+ <label class="flex flex-col gap-1">
126
+ <span class="text-[10px] text-ink/45">System prompt every stage inherits</span>
127
+ <textarea
128
+ class="w-full min-h-[64px] rounded-md border border-ink/15 bg-paper px-2 py-1 text-[11px] text-ink resize-y"
129
+ maxLength={MAX_PROMPT_CHARS}
130
+ value={typeof defaults.prompt === 'string' ? defaults.prompt : ''}
131
+ onInput={(event) => setDefaults({ ...defaults, prompt: event.currentTarget.value || undefined })}
132
+ />
133
+ </label>
134
+ </fieldset>
135
+
136
+ {drafts.map((stage) => {
137
+ const spec = specOf(stage);
138
+ return (
139
+ <fieldset key={stage.id} class="flex flex-col gap-2 border-t border-ink/10 pt-3">
140
+ <legend class="text-[10px] uppercase font-mono text-ink/40">{stage.id}</legend>
141
+ <div class="flex gap-2 items-end">
142
+ <label class="flex-1 flex flex-col gap-1">
143
+ <span class="text-[10px] text-ink/45">Label</span>
144
+ <input
145
+ class="rounded-md border border-ink/15 bg-paper px-2 py-1 text-xs text-ink"
146
+ value={stage.label}
147
+ onInput={(event) => {
148
+ const label = event.currentTarget.value;
149
+ edit(stage.id, (entry) => ({ ...entry, label }));
150
+ }}
151
+ />
152
+ </label>
153
+ <label class="flex items-center gap-1 text-[11px] text-ink/60">
154
+ <input
155
+ type="checkbox"
156
+ checked={stage.hidden}
157
+ onChange={(event) => {
158
+ const hidden = event.currentTarget.checked;
159
+ edit(stage.id, (entry) => ({ ...entry, hidden }));
160
+ }}
161
+ />
162
+ hidden
163
+ </label>
164
+ <label class="flex items-center gap-1 text-[11px] text-ink/60">
165
+ <input
166
+ type="checkbox"
167
+ checked={stage.session}
168
+ onChange={(event) => {
169
+ const session = event.currentTarget.checked;
170
+ edit(stage.id, (entry) => ({ ...entry, session }));
171
+ }}
172
+ />
173
+ runs a session
174
+ </label>
175
+ </div>
176
+
177
+ <div class="flex gap-2">
178
+ <label class="flex-1 flex flex-col gap-1">
179
+ <span class="text-[10px] text-ink/45">Harness</span>
180
+ <select
181
+ class="rounded-md border border-ink/15 bg-paper px-2 py-1 text-xs text-ink"
182
+ value={spec.harness}
183
+ onChange={(event) => setAgentField(stage.id, 'harness', event.currentTarget.value)}
184
+ >
185
+ <option value="">inherit</option>
186
+ {catalogs.harnesses.map((entry) => (
187
+ <option key={entry.id} value={entry.id}>
188
+ {entry.label}
189
+ </option>
190
+ ))}
191
+ </select>
192
+ </label>
193
+ <label class="flex-1 flex flex-col gap-1">
194
+ <span class="text-[10px] text-ink/45">Thinking</span>
195
+ <input
196
+ class="rounded-md border border-ink/15 bg-paper px-2 py-1 text-xs text-ink"
197
+ placeholder="inherit"
198
+ value={spec.thinking}
199
+ onInput={(event) => setAgentField(stage.id, 'thinking', event.currentTarget.value)}
200
+ />
201
+ </label>
202
+ <label class="flex-1 flex flex-col gap-1">
203
+ <span class="text-[10px] text-ink/45">Access</span>
204
+ <select
205
+ class="rounded-md border border-ink/15 bg-paper px-2 py-1 text-xs text-ink"
206
+ value={spec.access}
207
+ onChange={(event) => setAgentField(stage.id, 'access', event.currentTarget.value)}
208
+ >
209
+ <option value="">inherit</option>
210
+ <option value="always-ask">always-ask</option>
211
+ <option value="write">write</option>
212
+ <option value="yolo">yolo</option>
213
+ </select>
214
+ </label>
215
+ </div>
216
+
217
+ <label class="flex flex-col gap-1">
218
+ <span class="text-[10px] text-ink/45">
219
+ System prompt — appended on omp-rpc, prepended on an ACP harness
220
+ </span>
221
+ <textarea
222
+ class="w-full min-h-[72px] rounded-md border border-ink/15 bg-paper px-2 py-1 text-[11px] text-ink resize-y"
223
+ maxLength={MAX_PROMPT_CHARS}
224
+ value={spec.prompt}
225
+ placeholder="Leave empty to inherit."
226
+ onInput={(event) => setAgentField(stage.id, 'prompt', event.currentTarget.value)}
227
+ />
228
+ </label>
229
+ </fieldset>
230
+ );
231
+ })}
232
+
233
+ {error ? <p class="text-[11px] text-[var(--theme-error)]">{error}</p> : null}
234
+ {notice ? <p class="text-[11px] text-ink/50">{notice}</p> : null}
235
+ </div>
236
+
237
+ <footer class="flex items-center gap-2 px-3 h-11 flex-none border-t border-ink/10">
238
+ <button
239
+ type="button"
240
+ class="rounded-md border border-ink/20 bg-ink/5 px-2 py-1 text-[11px] text-ink disabled:opacity-40"
241
+ disabled={busy}
242
+ onClick={() => void save()}
243
+ >
244
+ {busy ? 'Saving…' : 'Save'}
245
+ </button>
246
+ </footer>
247
+ </aside>
248
+ );
249
+ }
@@ -0,0 +1,114 @@
1
+ /**
2
+ * @license
3
+ * SPDX-License-Identifier: MIT
4
+ */
5
+
6
+ /**
7
+ * The two catalogs the card sheet's pickers read, and the flattening they need.
8
+ *
9
+ * Both are Kabmo's own routes (`GET /api/harness`, `GET /api/models`), read
10
+ * through `useKabmoFetch` — the same endpoints the composer's pickers use, so the
11
+ * board cannot offer a harness or a model the chat would refuse. Nothing is
12
+ * cached here: the fetch hook pauses while the panel is hidden, which is the
13
+ * behaviour a plugin wants and a hand-rolled poll would forget.
14
+ *
15
+ * A harness whose models were never probed yields an EMPTY list plus the reason.
16
+ * Showing omp's registry under the `claude` tab would offer a model that agent
17
+ * cannot run — the rule `harnessModels` already enforces in the host.
18
+ */
19
+
20
+ import { useKabmoFetch } from '@kabmo-labs/kabmo-ui';
21
+
22
+ /**
23
+ * The part of `GET /api/harness` this panel reads.
24
+ *
25
+ * Deliberately a SUBSET: the route's own type lives in the host, and a plugin
26
+ * cannot import it. Every field here is optional so a host that grows or drops
27
+ * one leaves the pickers usable rather than broken.
28
+ */
29
+ interface HarnessSummary {
30
+ id: string;
31
+ label?: string;
32
+ enabled?: boolean;
33
+ probe?: {
34
+ models?: { value: string; name: string }[];
35
+ thinking?: { value: string; name: string }[];
36
+ } | null;
37
+ }
38
+
39
+ /** One row a model picker draws. */
40
+ export interface ModelChoice {
41
+ provider: string;
42
+ modelId: string;
43
+ label: string;
44
+ }
45
+
46
+ /** The pickers' data, and why a list may be empty. */
47
+ export interface Catalogs {
48
+ harnesses: { id: string; label: string; enabled: boolean }[];
49
+ modelsFor: (harness: string) => ModelChoice[];
50
+ thinkingFor: (harness: string) => string[];
51
+ /** A harness's own reason it cannot list models, when it has one. */
52
+ blockedFor: (harness: string) => string | null;
53
+ }
54
+
55
+ /** `provider/modelId` is how ACP spells a model; the row's provider is the prefix. */
56
+ function splitModel(value: string): { provider: string; modelId: string } {
57
+ const slash = value.indexOf('/');
58
+ if (slash <= 0) return { provider: '', modelId: value };
59
+ return { provider: value.slice(0, slash), modelId: value.slice(slash + 1) };
60
+ }
61
+
62
+ /** ACP's `models[]` in the picker's shape. */
63
+ function acpChoices(summary: HarnessSummary): ModelChoice[] {
64
+ const models = summary.probe?.models ?? [];
65
+ return models.map((option) => {
66
+ const split = splitModel(option.value);
67
+ return { ...split, label: option.name || option.value };
68
+ });
69
+ }
70
+
71
+ /** omp's registry in the picker's shape. */
72
+ function ompChoices(payload: unknown): ModelChoice[] {
73
+ const record = (payload ?? {}) as { modelList?: unknown };
74
+ const list = Array.isArray(record.modelList) ? record.modelList : [];
75
+ const choices: ModelChoice[] = [];
76
+ for (const entry of list) {
77
+ const row = (entry ?? {}) as Record<string, unknown>;
78
+ const provider = typeof row.provider === 'string' ? row.provider : '';
79
+ const modelId = typeof row.id === 'string' ? row.id : typeof row.modelId === 'string' ? row.modelId : '';
80
+ if (!provider || !modelId) continue;
81
+ choices.push({ provider, modelId, label: typeof row.name === 'string' && row.name ? row.name : modelId });
82
+ }
83
+ return choices;
84
+ }
85
+
86
+ /** Read both catalogs once, for the sheet's pickers. */
87
+ export function useCatalogs(enabled: boolean): Catalogs {
88
+ const harness = useKabmoFetch<HarnessSummary[]>('/api/harness', { enabled, pollMs: 0 });
89
+ const models = useKabmoFetch<unknown>('/api/models', { enabled, pollMs: 0 });
90
+ const summaries = Array.isArray(harness.data) ? harness.data : [];
91
+ const omp = ompChoices(models.data);
92
+
93
+ return {
94
+ harnesses: summaries
95
+ .filter((summary) => summary.enabled !== false)
96
+ .map((summary) => ({ id: summary.id, label: summary.label || summary.id, enabled: summary.enabled !== false })),
97
+ modelsFor: (id) => {
98
+ if (id === 'omp-rpc') return omp;
99
+ const summary = summaries.find((entry) => entry.id === id);
100
+ return summary ? acpChoices(summary) : [];
101
+ },
102
+ thinkingFor: (id) => {
103
+ const summary = summaries.find((entry) => entry.id === id);
104
+ return (summary?.probe?.thinking ?? []).map((option) => option.value);
105
+ },
106
+ blockedFor: (id) => {
107
+ if (id === 'omp-rpc') return omp.length === 0 ? 'omp has not reported its models yet' : null;
108
+ const summary = summaries.find((entry) => entry.id === id);
109
+ if (!summary) return 'This harness is not in the catalog';
110
+ if (!summary.probe) return 'This harness has not reported its models yet';
111
+ return (summary.probe.models?.length ?? 0) === 0 ? 'This harness reported no models' : null;
112
+ },
113
+ };
114
+ }