@schlessera/brain-ui-react 0.35.0 → 0.36.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 (755) hide show
  1. package/README.md +82 -4
  2. package/dist/components/activity/activity-page.d.ts +17 -5
  3. package/dist/components/activity/activity-page.d.ts.map +1 -1
  4. package/dist/components/activity/activity-page.js +144 -50
  5. package/dist/components/activity/activity-page.js.map +1 -1
  6. package/dist/components/activity/activity-run-detail.d.ts +16 -1
  7. package/dist/components/activity/activity-run-detail.d.ts.map +1 -1
  8. package/dist/components/activity/activity-run-detail.js +47 -4
  9. package/dist/components/activity/activity-run-detail.js.map +1 -1
  10. package/dist/components/activity/activity-run-list.d.ts +7 -1
  11. package/dist/components/activity/activity-run-list.d.ts.map +1 -1
  12. package/dist/components/activity/activity-run-list.js +16 -8
  13. package/dist/components/activity/activity-run-list.js.map +1 -1
  14. package/dist/components/activity/activity-views.d.ts +63 -0
  15. package/dist/components/activity/activity-views.d.ts.map +1 -0
  16. package/dist/components/activity/activity-views.js +52 -0
  17. package/dist/components/activity/activity-views.js.map +1 -0
  18. package/dist/components/activity/approval-card.d.ts +11 -0
  19. package/dist/components/activity/approval-card.d.ts.map +1 -0
  20. package/dist/components/activity/approval-card.js +46 -0
  21. package/dist/components/activity/approval-card.js.map +1 -0
  22. package/dist/components/activity/digest-card.d.ts +3 -0
  23. package/dist/components/activity/digest-card.d.ts.map +1 -1
  24. package/dist/components/activity/digest-card.js +20 -16
  25. package/dist/components/activity/digest-card.js.map +1 -1
  26. package/dist/components/activity/digest-summary.d.ts +19 -0
  27. package/dist/components/activity/digest-summary.d.ts.map +1 -0
  28. package/dist/components/activity/digest-summary.js +20 -0
  29. package/dist/components/activity/digest-summary.js.map +1 -0
  30. package/dist/components/activity/push-switch.d.ts +25 -0
  31. package/dist/components/activity/push-switch.d.ts.map +1 -0
  32. package/dist/components/activity/push-switch.js +14 -0
  33. package/dist/components/activity/push-switch.js.map +1 -0
  34. package/dist/components/activity/push-toggle.d.ts +7 -0
  35. package/dist/components/activity/push-toggle.d.ts.map +1 -1
  36. package/dist/components/activity/push-toggle.js +72 -47
  37. package/dist/components/activity/push-toggle.js.map +1 -1
  38. package/dist/components/activity/span-bits.d.ts.map +1 -1
  39. package/dist/components/activity/span-bits.js +9 -7
  40. package/dist/components/activity/span-bits.js.map +1 -1
  41. package/dist/components/chat/ask-user-card.d.ts +76 -3
  42. package/dist/components/chat/ask-user-card.d.ts.map +1 -1
  43. package/dist/components/chat/ask-user-card.js +208 -149
  44. package/dist/components/chat/ask-user-card.js.map +1 -1
  45. package/dist/components/chat/ask-user-typed.d.ts +42 -0
  46. package/dist/components/chat/ask-user-typed.d.ts.map +1 -0
  47. package/dist/components/chat/ask-user-typed.js +60 -0
  48. package/dist/components/chat/ask-user-typed.js.map +1 -0
  49. package/dist/components/chat/brain-markdown-links.d.ts +2 -1
  50. package/dist/components/chat/brain-markdown-links.d.ts.map +1 -1
  51. package/dist/components/chat/brain-markdown-links.js +3 -4
  52. package/dist/components/chat/brain-markdown-links.js.map +1 -1
  53. package/dist/components/chat/brain-markdown.d.ts.map +1 -1
  54. package/dist/components/chat/brain-markdown.js +4 -2
  55. package/dist/components/chat/brain-markdown.js.map +1 -1
  56. package/dist/components/chat/chat-page.d.ts.map +1 -1
  57. package/dist/components/chat/chat-page.js +24 -9
  58. package/dist/components/chat/chat-page.js.map +1 -1
  59. package/dist/components/chat/composer-view.d.ts +75 -0
  60. package/dist/components/chat/composer-view.d.ts.map +1 -0
  61. package/dist/components/chat/composer-view.js +31 -0
  62. package/dist/components/chat/composer-view.js.map +1 -0
  63. package/dist/components/chat/composer.d.ts +4 -0
  64. package/dist/components/chat/composer.d.ts.map +1 -1
  65. package/dist/components/chat/composer.js +76 -59
  66. package/dist/components/chat/composer.js.map +1 -1
  67. package/dist/components/chat/markdown-content.d.ts +16 -1
  68. package/dist/components/chat/markdown-content.d.ts.map +1 -1
  69. package/dist/components/chat/markdown-content.js +47 -3
  70. package/dist/components/chat/markdown-content.js.map +1 -1
  71. package/dist/components/chat/mermaid-block.d.ts +4 -0
  72. package/dist/components/chat/mermaid-block.d.ts.map +1 -1
  73. package/dist/components/chat/mermaid-block.js +13 -5
  74. package/dist/components/chat/mermaid-block.js.map +1 -1
  75. package/dist/components/chat/mermaid-share.d.ts +2 -1
  76. package/dist/components/chat/mermaid-share.d.ts.map +1 -1
  77. package/dist/components/chat/mermaid-share.js +7 -8
  78. package/dist/components/chat/mermaid-share.js.map +1 -1
  79. package/dist/components/chat/mermaid-viewer.d.ts.map +1 -1
  80. package/dist/components/chat/mermaid-viewer.js +3 -1
  81. package/dist/components/chat/mermaid-viewer.js.map +1 -1
  82. package/dist/components/chat/message-bubble.d.ts +8 -1
  83. package/dist/components/chat/message-bubble.d.ts.map +1 -1
  84. package/dist/components/chat/message-bubble.js +53 -24
  85. package/dist/components/chat/message-bubble.js.map +1 -1
  86. package/dist/components/chat/message-share.d.ts +2 -1
  87. package/dist/components/chat/message-share.d.ts.map +1 -1
  88. package/dist/components/chat/message-share.js +6 -7
  89. package/dist/components/chat/message-share.js.map +1 -1
  90. package/dist/components/chat/renderers/bind.d.ts +39 -0
  91. package/dist/components/chat/renderers/bind.d.ts.map +1 -0
  92. package/dist/components/chat/renderers/bind.js +43 -0
  93. package/dist/components/chat/renderers/bind.js.map +1 -0
  94. package/dist/components/chat/renderers/brain-ui-tools.d.ts +3 -0
  95. package/dist/components/chat/renderers/brain-ui-tools.d.ts.map +1 -0
  96. package/dist/components/chat/renderers/brain-ui-tools.js +41 -0
  97. package/dist/components/chat/renderers/brain-ui-tools.js.map +1 -0
  98. package/dist/components/chat/renderers/claude-tools.d.ts.map +1 -1
  99. package/dist/components/chat/renderers/claude-tools.js +3 -2
  100. package/dist/components/chat/renderers/claude-tools.js.map +1 -1
  101. package/dist/components/chat/renderers/index.d.ts +10 -2
  102. package/dist/components/chat/renderers/index.d.ts.map +1 -1
  103. package/dist/components/chat/renderers/index.js +15 -10
  104. package/dist/components/chat/renderers/index.js.map +1 -1
  105. package/dist/components/chat/session-drawer.d.ts +4 -0
  106. package/dist/components/chat/session-drawer.d.ts.map +1 -1
  107. package/dist/components/chat/session-drawer.js +32 -32
  108. package/dist/components/chat/session-drawer.js.map +1 -1
  109. package/dist/components/chat/session-list.d.ts +41 -0
  110. package/dist/components/chat/session-list.d.ts.map +1 -0
  111. package/dist/components/chat/session-list.js +10 -0
  112. package/dist/components/chat/session-list.js.map +1 -0
  113. package/dist/components/chat/share-block.d.ts.map +1 -1
  114. package/dist/components/chat/share-block.js +12 -11
  115. package/dist/components/chat/share-block.js.map +1 -1
  116. package/dist/components/chat/share-card.js +2 -2
  117. package/dist/components/chat/share-card.js.map +1 -1
  118. package/dist/components/chat/subagent-view.js +1 -1
  119. package/dist/components/chat/subagent-view.js.map +1 -1
  120. package/dist/components/chat/tool-call-timeline.d.ts.map +1 -1
  121. package/dist/components/chat/tool-call-timeline.js +37 -12
  122. package/dist/components/chat/tool-call-timeline.js.map +1 -1
  123. package/dist/components/chat/tool-cards/block-card.d.ts +28 -0
  124. package/dist/components/chat/tool-cards/block-card.d.ts.map +1 -0
  125. package/dist/components/chat/tool-cards/block-card.js +103 -0
  126. package/dist/components/chat/tool-cards/block-card.js.map +1 -0
  127. package/dist/components/chat/tool-cards/image-mask-card.d.ts +70 -0
  128. package/dist/components/chat/tool-cards/image-mask-card.d.ts.map +1 -0
  129. package/dist/components/chat/tool-cards/image-mask-card.js +142 -0
  130. package/dist/components/chat/tool-cards/image-mask-card.js.map +1 -0
  131. package/dist/components/chat/tool-cards/location-card.d.ts +45 -0
  132. package/dist/components/chat/tool-cards/location-card.d.ts.map +1 -0
  133. package/dist/components/chat/tool-cards/location-card.js +128 -0
  134. package/dist/components/chat/tool-cards/location-card.js.map +1 -0
  135. package/dist/components/chat/tool-views.d.ts +13 -2
  136. package/dist/components/chat/tool-views.d.ts.map +1 -1
  137. package/dist/components/chat/tool-views.js +20 -22
  138. package/dist/components/chat/tool-views.js.map +1 -1
  139. package/dist/components/chat/transcript-turn.d.ts +45 -0
  140. package/dist/components/chat/transcript-turn.d.ts.map +1 -0
  141. package/dist/components/chat/transcript-turn.js +25 -0
  142. package/dist/components/chat/transcript-turn.js.map +1 -0
  143. package/dist/components/chat/use-chat-commands.d.ts.map +1 -1
  144. package/dist/components/chat/use-chat-commands.js +13 -16
  145. package/dist/components/chat/use-chat-commands.js.map +1 -1
  146. package/dist/components/chat/welcome-state.d.ts +7 -0
  147. package/dist/components/chat/welcome-state.d.ts.map +1 -1
  148. package/dist/components/chat/welcome-state.js +13 -5
  149. package/dist/components/chat/welcome-state.js.map +1 -1
  150. package/dist/components/connectivity/connection-gate.d.ts.map +1 -1
  151. package/dist/components/connectivity/connection-gate.js +27 -21
  152. package/dist/components/connectivity/connection-gate.js.map +1 -1
  153. package/dist/components/connectivity/login-form.d.ts +31 -0
  154. package/dist/components/connectivity/login-form.d.ts.map +1 -0
  155. package/dist/components/connectivity/login-form.js +19 -0
  156. package/dist/components/connectivity/login-form.js.map +1 -0
  157. package/dist/components/connectivity/login-screen.d.ts +5 -2
  158. package/dist/components/connectivity/login-screen.d.ts.map +1 -1
  159. package/dist/components/connectivity/login-screen.js +41 -31
  160. package/dist/components/connectivity/login-screen.js.map +1 -1
  161. package/dist/components/dev/share-harness.js +1 -1
  162. package/dist/components/dev/share-harness.js.map +1 -1
  163. package/dist/components/files/file-panel.d.ts +1 -1
  164. package/dist/components/files/file-panel.d.ts.map +1 -1
  165. package/dist/components/files/file-panel.js +74 -0
  166. package/dist/components/files/file-panel.js.map +1 -1
  167. package/dist/components/files/file-tree-view.d.ts +45 -0
  168. package/dist/components/files/file-tree-view.d.ts.map +1 -0
  169. package/dist/components/files/file-tree-view.js +51 -0
  170. package/dist/components/files/file-tree-view.js.map +1 -0
  171. package/dist/components/files/file-tree.d.ts +6 -0
  172. package/dist/components/files/file-tree.d.ts.map +1 -1
  173. package/dist/components/files/file-tree.js +39 -43
  174. package/dist/components/files/file-tree.js.map +1 -1
  175. package/dist/components/files/file-viewer-binary.d.ts.map +1 -1
  176. package/dist/components/files/file-viewer-binary.js +3 -2
  177. package/dist/components/files/file-viewer-binary.js.map +1 -1
  178. package/dist/components/files/file-viewer-frame.d.ts +36 -0
  179. package/dist/components/files/file-viewer-frame.d.ts.map +1 -0
  180. package/dist/components/files/file-viewer-frame.js +26 -0
  181. package/dist/components/files/file-viewer-frame.js.map +1 -0
  182. package/dist/components/files/file-viewer.d.ts +5 -0
  183. package/dist/components/files/file-viewer.d.ts.map +1 -1
  184. package/dist/components/files/file-viewer.js +26 -32
  185. package/dist/components/files/file-viewer.js.map +1 -1
  186. package/dist/components/files/frontmatter-chips.d.ts +18 -0
  187. package/dist/components/files/frontmatter-chips.d.ts.map +1 -0
  188. package/dist/components/files/frontmatter-chips.js +11 -0
  189. package/dist/components/files/frontmatter-chips.js.map +1 -0
  190. package/dist/components/files/frontmatter-panel.d.ts +5 -1
  191. package/dist/components/files/frontmatter-panel.d.ts.map +1 -1
  192. package/dist/components/files/frontmatter-panel.js +7 -6
  193. package/dist/components/files/frontmatter-panel.js.map +1 -1
  194. package/dist/components/files/staleness.d.ts +18 -0
  195. package/dist/components/files/staleness.d.ts.map +1 -0
  196. package/dist/components/files/staleness.js +27 -0
  197. package/dist/components/files/staleness.js.map +1 -0
  198. package/dist/components/graph/graph-canvas.d.ts.map +1 -1
  199. package/dist/components/graph/graph-canvas.js +24 -1
  200. package/dist/components/graph/graph-canvas.js.map +1 -1
  201. package/dist/components/graph/graph-controls-column.d.ts +14 -0
  202. package/dist/components/graph/graph-controls-column.d.ts.map +1 -0
  203. package/dist/components/graph/graph-controls-column.js +44 -0
  204. package/dist/components/graph/graph-controls-column.js.map +1 -0
  205. package/dist/components/graph/graph-controls.d.ts +20 -5
  206. package/dist/components/graph/graph-controls.d.ts.map +1 -1
  207. package/dist/components/graph/graph-controls.js +58 -37
  208. package/dist/components/graph/graph-controls.js.map +1 -1
  209. package/dist/components/graph/graph-form.d.ts +82 -0
  210. package/dist/components/graph/graph-form.d.ts.map +1 -0
  211. package/dist/components/graph/graph-form.js +69 -0
  212. package/dist/components/graph/graph-form.js.map +1 -0
  213. package/dist/components/graph/graph-maintenance.d.ts.map +1 -1
  214. package/dist/components/graph/graph-maintenance.js +6 -10
  215. package/dist/components/graph/graph-maintenance.js.map +1 -1
  216. package/dist/components/graph/graph-node-rail.d.ts +13 -0
  217. package/dist/components/graph/graph-node-rail.d.ts.map +1 -0
  218. package/dist/components/graph/graph-node-rail.js +92 -0
  219. package/dist/components/graph/graph-node-rail.js.map +1 -0
  220. package/dist/components/graph/graph-page.d.ts +7 -0
  221. package/dist/components/graph/graph-page.d.ts.map +1 -1
  222. package/dist/components/graph/graph-page.js +102 -12
  223. package/dist/components/graph/graph-page.js.map +1 -1
  224. package/dist/components/graph/graph-scene.d.ts.map +1 -1
  225. package/dist/components/graph/graph-scene.js +100 -24
  226. package/dist/components/graph/graph-scene.js.map +1 -1
  227. package/dist/components/graph/lib/graph-helpers.d.ts +42 -12
  228. package/dist/components/graph/lib/graph-helpers.d.ts.map +1 -1
  229. package/dist/components/graph/lib/graph-helpers.js +33 -41
  230. package/dist/components/graph/lib/graph-helpers.js.map +1 -1
  231. package/dist/components/graph/node-card.d.ts +28 -0
  232. package/dist/components/graph/node-card.d.ts.map +1 -0
  233. package/dist/components/graph/node-card.js +7 -0
  234. package/dist/components/graph/node-card.js.map +1 -0
  235. package/dist/components/graph/node-popover.d.ts +6 -2
  236. package/dist/components/graph/node-popover.d.ts.map +1 -1
  237. package/dist/components/graph/node-popover.js +13 -31
  238. package/dist/components/graph/node-popover.js.map +1 -1
  239. package/dist/components/graph/use-graph-theme.d.ts +32 -4
  240. package/dist/components/graph/use-graph-theme.d.ts.map +1 -1
  241. package/dist/components/graph/use-graph-theme.js +44 -32
  242. package/dist/components/graph/use-graph-theme.js.map +1 -1
  243. package/dist/components/graph/use-node-actions.d.ts +26 -0
  244. package/dist/components/graph/use-node-actions.d.ts.map +1 -0
  245. package/dist/components/graph/use-node-actions.js +54 -0
  246. package/dist/components/graph/use-node-actions.js.map +1 -0
  247. package/dist/components/images/image-share.d.ts +2 -1
  248. package/dist/components/images/image-share.d.ts.map +1 -1
  249. package/dist/components/images/image-share.js +3 -3
  250. package/dist/components/images/image-share.js.map +1 -1
  251. package/dist/components/images/image-viewer.d.ts.map +1 -1
  252. package/dist/components/images/image-viewer.js +3 -1
  253. package/dist/components/images/image-viewer.js.map +1 -1
  254. package/dist/components/images/mask-editor.d.ts.map +1 -1
  255. package/dist/components/images/mask-editor.js +7 -5
  256. package/dist/components/images/mask-editor.js.map +1 -1
  257. package/dist/components/layout/app-shell.d.ts.map +1 -1
  258. package/dist/components/layout/app-shell.js +4 -1
  259. package/dist/components/layout/app-shell.js.map +1 -1
  260. package/dist/components/layout/desktop-palette.d.ts +23 -0
  261. package/dist/components/layout/desktop-palette.d.ts.map +1 -0
  262. package/dist/components/layout/desktop-palette.js +132 -0
  263. package/dist/components/layout/desktop-palette.js.map +1 -0
  264. package/dist/components/layout/key-cap.d.ts +9 -0
  265. package/dist/components/layout/key-cap.d.ts.map +1 -0
  266. package/dist/components/layout/key-cap.js +10 -0
  267. package/dist/components/layout/key-cap.js.map +1 -0
  268. package/dist/components/layout/mobile-tab-bar.d.ts +13 -0
  269. package/dist/components/layout/mobile-tab-bar.d.ts.map +1 -1
  270. package/dist/components/layout/mobile-tab-bar.js +58 -47
  271. package/dist/components/layout/mobile-tab-bar.js.map +1 -1
  272. package/dist/components/layout/shortcut-switch.d.ts +13 -0
  273. package/dist/components/layout/shortcut-switch.d.ts.map +1 -0
  274. package/dist/components/layout/shortcut-switch.js +22 -0
  275. package/dist/components/layout/shortcut-switch.js.map +1 -0
  276. package/dist/components/layout/side-rail.d.ts +24 -0
  277. package/dist/components/layout/side-rail.d.ts.map +1 -1
  278. package/dist/components/layout/side-rail.js +65 -27
  279. package/dist/components/layout/side-rail.js.map +1 -1
  280. package/dist/components/layout/slide-panel.d.ts +12 -2
  281. package/dist/components/layout/slide-panel.d.ts.map +1 -1
  282. package/dist/components/layout/slide-panel.js +11 -2
  283. package/dist/components/layout/slide-panel.js.map +1 -1
  284. package/dist/components/layout/theme.d.ts +22 -0
  285. package/dist/components/layout/theme.d.ts.map +1 -0
  286. package/dist/components/layout/theme.js +44 -0
  287. package/dist/components/layout/theme.js.map +1 -0
  288. package/dist/components/quick-actions/add-form.d.ts +44 -0
  289. package/dist/components/quick-actions/add-form.d.ts.map +1 -0
  290. package/dist/components/quick-actions/add-form.js +30 -0
  291. package/dist/components/quick-actions/add-form.js.map +1 -0
  292. package/dist/components/quick-actions/add-modal.d.ts +7 -0
  293. package/dist/components/quick-actions/add-modal.d.ts.map +1 -1
  294. package/dist/components/quick-actions/add-modal.js +23 -20
  295. package/dist/components/quick-actions/add-modal.js.map +1 -1
  296. package/dist/components/quick-actions/search-modal.d.ts.map +1 -1
  297. package/dist/components/quick-actions/search-modal.js +4 -3
  298. package/dist/components/quick-actions/search-modal.js.map +1 -1
  299. package/dist/components/quick-actions/streaming-modal.d.ts +6 -0
  300. package/dist/components/quick-actions/streaming-modal.d.ts.map +1 -1
  301. package/dist/components/quick-actions/streaming-modal.js +39 -17
  302. package/dist/components/quick-actions/streaming-modal.js.map +1 -1
  303. package/dist/components/quick-actions/streaming-output.d.ts +38 -0
  304. package/dist/components/quick-actions/streaming-output.d.ts.map +1 -0
  305. package/dist/components/quick-actions/streaming-output.js +22 -0
  306. package/dist/components/quick-actions/streaming-output.js.map +1 -0
  307. package/dist/components/quick-actions/whatsup-modal.d.ts +5 -0
  308. package/dist/components/quick-actions/whatsup-modal.d.ts.map +1 -1
  309. package/dist/components/quick-actions/whatsup-modal.js +36 -10
  310. package/dist/components/quick-actions/whatsup-modal.js.map +1 -1
  311. package/dist/components/settings/devices-agents-tab.d.ts +6 -1
  312. package/dist/components/settings/devices-agents-tab.d.ts.map +1 -1
  313. package/dist/components/settings/devices-agents-tab.js +55 -20
  314. package/dist/components/settings/devices-agents-tab.js.map +1 -1
  315. package/dist/components/settings/models-list.d.ts +39 -0
  316. package/dist/components/settings/models-list.d.ts.map +1 -0
  317. package/dist/components/settings/models-list.js +72 -0
  318. package/dist/components/settings/models-list.js.map +1 -0
  319. package/dist/components/settings/models-tab.d.ts +4 -0
  320. package/dist/components/settings/models-tab.d.ts.map +1 -1
  321. package/dist/components/settings/models-tab.js +52 -102
  322. package/dist/components/settings/models-tab.js.map +1 -1
  323. package/dist/components/settings/one-time-agent-credential.js +1 -1
  324. package/dist/components/settings/one-time-agent-credential.js.map +1 -1
  325. package/dist/components/settings/passkey-list.d.ts +35 -0
  326. package/dist/components/settings/passkey-list.d.ts.map +1 -0
  327. package/dist/components/settings/passkey-list.js +34 -0
  328. package/dist/components/settings/passkey-list.js.map +1 -0
  329. package/dist/components/settings/passkey-tab.d.ts +3 -0
  330. package/dist/components/settings/passkey-tab.d.ts.map +1 -1
  331. package/dist/components/settings/passkey-tab.js +53 -45
  332. package/dist/components/settings/passkey-tab.js.map +1 -1
  333. package/dist/components/settings/pi-accounts-list.d.ts +27 -0
  334. package/dist/components/settings/pi-accounts-list.d.ts.map +1 -0
  335. package/dist/components/settings/pi-accounts-list.js +15 -0
  336. package/dist/components/settings/pi-accounts-list.js.map +1 -0
  337. package/dist/components/settings/pi-accounts.d.ts +3 -0
  338. package/dist/components/settings/pi-accounts.d.ts.map +1 -1
  339. package/dist/components/settings/pi-accounts.js +73 -55
  340. package/dist/components/settings/pi-accounts.js.map +1 -1
  341. package/dist/components/settings/principal-list.d.ts +37 -0
  342. package/dist/components/settings/principal-list.d.ts.map +1 -0
  343. package/dist/components/settings/principal-list.js +18 -0
  344. package/dist/components/settings/principal-list.js.map +1 -0
  345. package/dist/components/settings/settings-panel.d.ts +10 -3
  346. package/dist/components/settings/settings-panel.d.ts.map +1 -1
  347. package/dist/components/settings/settings-panel.js +69 -8
  348. package/dist/components/settings/settings-panel.js.map +1 -1
  349. package/dist/components/settings/skills-list.d.ts +53 -0
  350. package/dist/components/settings/skills-list.d.ts.map +1 -0
  351. package/dist/components/settings/skills-list.js +28 -0
  352. package/dist/components/settings/skills-list.js.map +1 -0
  353. package/dist/components/settings/skills-tab.d.ts.map +1 -1
  354. package/dist/components/settings/skills-tab.js +65 -38
  355. package/dist/components/settings/skills-tab.js.map +1 -1
  356. package/dist/components/settings/tool-permissions-list.d.ts +18 -0
  357. package/dist/components/settings/tool-permissions-list.d.ts.map +1 -0
  358. package/dist/components/settings/tool-permissions-list.js +6 -0
  359. package/dist/components/settings/tool-permissions-list.js.map +1 -0
  360. package/dist/components/settings/tool-permissions.d.ts +2 -1
  361. package/dist/components/settings/tool-permissions.d.ts.map +1 -1
  362. package/dist/components/settings/tool-permissions.js +33 -16
  363. package/dist/components/settings/tool-permissions.js.map +1 -1
  364. package/dist/components/settings/web-search-chain.d.ts +41 -0
  365. package/dist/components/settings/web-search-chain.d.ts.map +1 -0
  366. package/dist/components/settings/web-search-chain.js +47 -0
  367. package/dist/components/settings/web-search-chain.js.map +1 -0
  368. package/dist/components/settings/web-search-settings.d.ts +4 -7
  369. package/dist/components/settings/web-search-settings.d.ts.map +1 -1
  370. package/dist/components/settings/web-search-settings.js +54 -76
  371. package/dist/components/settings/web-search-settings.js.map +1 -1
  372. package/dist/components/share/share-menu.d.ts.map +1 -1
  373. package/dist/components/share/share-menu.js +24 -4
  374. package/dist/components/share/share-menu.js.map +1 -1
  375. package/dist/components/voice/dictation-sheet.js +3 -3
  376. package/dist/components/voice/dictation-sheet.js.map +1 -1
  377. package/dist/components/voice/mic-button.js +1 -1
  378. package/dist/components/voice/mic-button.js.map +1 -1
  379. package/dist/components/voice/review-card.js +1 -1
  380. package/dist/components/voice/review-card.js.map +1 -1
  381. package/dist/config.d.ts +5 -2
  382. package/dist/config.d.ts.map +1 -1
  383. package/dist/config.js +15 -5
  384. package/dist/config.js.map +1 -1
  385. package/dist/connection.d.ts +12 -0
  386. package/dist/connection.d.ts.map +1 -0
  387. package/dist/connection.js +421 -0
  388. package/dist/connection.js.map +1 -0
  389. package/dist/default-root.d.ts +3 -0
  390. package/dist/default-root.d.ts.map +1 -0
  391. package/dist/default-root.js +16 -0
  392. package/dist/default-root.js.map +1 -0
  393. package/dist/hooks/use-color-scheme.d.ts +14 -0
  394. package/dist/hooks/use-color-scheme.d.ts.map +1 -0
  395. package/dist/hooks/use-color-scheme.js +37 -0
  396. package/dist/hooks/use-color-scheme.js.map +1 -0
  397. package/dist/hooks/use-hash-routes.d.ts.map +1 -1
  398. package/dist/hooks/use-hash-routes.js +4 -2
  399. package/dist/hooks/use-hash-routes.js.map +1 -1
  400. package/dist/hooks/use-media-query.d.ts +7 -0
  401. package/dist/hooks/use-media-query.d.ts.map +1 -0
  402. package/dist/hooks/use-media-query.js +34 -0
  403. package/dist/hooks/use-media-query.js.map +1 -0
  404. package/dist/hooks/use-share-intake.d.ts.map +1 -1
  405. package/dist/hooks/use-share-intake.js +37 -12
  406. package/dist/hooks/use-share-intake.js.map +1 -1
  407. package/dist/hooks/use-vpn-status.d.ts.map +1 -1
  408. package/dist/hooks/use-vpn-status.js +17 -18
  409. package/dist/hooks/use-vpn-status.js.map +1 -1
  410. package/dist/hooks/use-websocket.d.ts +5 -24
  411. package/dist/hooks/use-websocket.d.ts.map +1 -1
  412. package/dist/hooks/use-websocket.js +11 -384
  413. package/dist/hooks/use-websocket.js.map +1 -1
  414. package/dist/hooks/websocket-handlers/activity.d.ts +2 -2
  415. package/dist/hooks/websocket-handlers/activity.d.ts.map +1 -1
  416. package/dist/hooks/websocket-handlers/activity.js +4 -5
  417. package/dist/hooks/websocket-handlers/activity.js.map +1 -1
  418. package/dist/hooks/websocket-handlers/chat.d.ts +1 -0
  419. package/dist/hooks/websocket-handlers/chat.d.ts.map +1 -1
  420. package/dist/hooks/websocket-handlers/chat.js +27 -5
  421. package/dist/hooks/websocket-handlers/chat.js.map +1 -1
  422. package/dist/hooks/websocket-handlers/connection.d.ts.map +1 -1
  423. package/dist/hooks/websocket-handlers/connection.js +4 -6
  424. package/dist/hooks/websocket-handlers/connection.js.map +1 -1
  425. package/dist/hooks/websocket-handlers/mask.d.ts +1 -1
  426. package/dist/hooks/websocket-handlers/mask.d.ts.map +1 -1
  427. package/dist/hooks/websocket-handlers/mask.js +2 -3
  428. package/dist/hooks/websocket-handlers/mask.js.map +1 -1
  429. package/dist/hooks/websocket-handlers/provider.d.ts.map +1 -1
  430. package/dist/hooks/websocket-handlers/provider.js +4 -6
  431. package/dist/hooks/websocket-handlers/provider.js.map +1 -1
  432. package/dist/hooks/websocket-handlers/types.d.ts +6 -2
  433. package/dist/hooks/websocket-handlers/types.d.ts.map +1 -1
  434. package/dist/index.d.ts +5 -3
  435. package/dist/index.d.ts.map +1 -1
  436. package/dist/index.js +6 -3
  437. package/dist/index.js.map +1 -1
  438. package/dist/lib/api-client.d.ts +289 -0
  439. package/dist/lib/api-client.d.ts.map +1 -1
  440. package/dist/lib/api-client.js +243 -224
  441. package/dist/lib/api-client.js.map +1 -1
  442. package/dist/lib/backend.d.ts +19 -2
  443. package/dist/lib/backend.d.ts.map +1 -1
  444. package/dist/lib/backend.js +15 -9
  445. package/dist/lib/backend.js.map +1 -1
  446. package/dist/lib/diff.d.ts +8 -10
  447. package/dist/lib/diff.d.ts.map +1 -1
  448. package/dist/lib/diff.js +26 -53
  449. package/dist/lib/diff.js.map +1 -1
  450. package/dist/lib/light-dark.d.ts +37 -0
  451. package/dist/lib/light-dark.d.ts.map +1 -0
  452. package/dist/lib/light-dark.js +83 -0
  453. package/dist/lib/light-dark.js.map +1 -0
  454. package/dist/lib/mermaid-theme.d.ts +7 -2
  455. package/dist/lib/mermaid-theme.d.ts.map +1 -1
  456. package/dist/lib/mermaid-theme.js +125 -203
  457. package/dist/lib/mermaid-theme.js.map +1 -1
  458. package/dist/lib/passkeys.d.ts +6 -3
  459. package/dist/lib/passkeys.d.ts.map +1 -1
  460. package/dist/lib/passkeys.js +10 -4
  461. package/dist/lib/passkeys.js.map +1 -1
  462. package/dist/lib/push-registration.d.ts +4 -1
  463. package/dist/lib/push-registration.d.ts.map +1 -1
  464. package/dist/lib/push-registration.js +20 -2
  465. package/dist/lib/push-registration.js.map +1 -1
  466. package/dist/lib/share-intake.d.ts +2 -1
  467. package/dist/lib/share-intake.d.ts.map +1 -1
  468. package/dist/lib/share-intake.js +3 -3
  469. package/dist/lib/share-intake.js.map +1 -1
  470. package/dist/lib/share.d.ts +4 -3
  471. package/dist/lib/share.d.ts.map +1 -1
  472. package/dist/lib/share.js +6 -7
  473. package/dist/lib/share.js.map +1 -1
  474. package/dist/lib/single-key.d.ts +30 -0
  475. package/dist/lib/single-key.d.ts.map +1 -0
  476. package/dist/lib/single-key.js +45 -0
  477. package/dist/lib/single-key.js.map +1 -0
  478. package/dist/lib/tool-names.d.ts +8 -6
  479. package/dist/lib/tool-names.d.ts.map +1 -1
  480. package/dist/lib/tool-names.js +17 -7
  481. package/dist/lib/tool-names.js.map +1 -1
  482. package/dist/root-context.d.ts +229 -0
  483. package/dist/root-context.d.ts.map +1 -0
  484. package/dist/root-context.js +33 -0
  485. package/dist/root-context.js.map +1 -0
  486. package/dist/root.d.ts +38 -0
  487. package/dist/root.d.ts.map +1 -0
  488. package/dist/root.js +47 -0
  489. package/dist/root.js.map +1 -0
  490. package/dist/stores/activity-state.d.ts +29 -0
  491. package/dist/stores/activity-state.d.ts.map +1 -0
  492. package/dist/stores/activity-state.js +282 -0
  493. package/dist/stores/activity-state.js.map +1 -0
  494. package/dist/stores/activity-store.d.ts +10 -41
  495. package/dist/stores/activity-store.d.ts.map +1 -1
  496. package/dist/stores/activity-store.js +9 -271
  497. package/dist/stores/activity-store.js.map +1 -1
  498. package/dist/stores/chat-state.d.ts +212 -0
  499. package/dist/stores/chat-state.d.ts.map +1 -0
  500. package/dist/stores/chat-state.js +466 -0
  501. package/dist/stores/chat-state.js.map +1 -0
  502. package/dist/stores/chat-store.d.ts +4 -162
  503. package/dist/stores/chat-store.d.ts.map +1 -1
  504. package/dist/stores/chat-store.js +7 -418
  505. package/dist/stores/chat-store.js.map +1 -1
  506. package/dist/stores/connection-state.d.ts +40 -0
  507. package/dist/stores/connection-state.d.ts.map +1 -0
  508. package/dist/stores/connection-state.js +30 -0
  509. package/dist/stores/connection-state.js.map +1 -0
  510. package/dist/stores/connection-store.d.ts +4 -40
  511. package/dist/stores/connection-store.d.ts.map +1 -1
  512. package/dist/stores/connection-store.js +7 -27
  513. package/dist/stores/connection-store.js.map +1 -1
  514. package/dist/stores/create-stores.d.ts +23 -0
  515. package/dist/stores/create-stores.d.ts.map +1 -0
  516. package/dist/stores/create-stores.js +28 -0
  517. package/dist/stores/create-stores.js.map +1 -0
  518. package/dist/stores/file-state.d.ts +53 -0
  519. package/dist/stores/file-state.d.ts.map +1 -0
  520. package/dist/stores/file-state.js +341 -0
  521. package/dist/stores/file-state.js.map +1 -0
  522. package/dist/stores/file-store.d.ts +4 -52
  523. package/dist/stores/file-store.d.ts.map +1 -1
  524. package/dist/stores/file-store.js +7 -336
  525. package/dist/stores/file-store.js.map +1 -1
  526. package/dist/stores/graph-state.d.ts +95 -0
  527. package/dist/stores/graph-state.d.ts.map +1 -0
  528. package/dist/stores/graph-state.js +252 -0
  529. package/dist/stores/graph-state.js.map +1 -0
  530. package/dist/stores/graph-store.d.ts +7 -83
  531. package/dist/stores/graph-store.d.ts.map +1 -1
  532. package/dist/stores/graph-store.js +8 -249
  533. package/dist/stores/graph-store.js.map +1 -1
  534. package/dist/stores/mask-state.d.ts +21 -0
  535. package/dist/stores/mask-state.d.ts.map +1 -0
  536. package/dist/stores/mask-state.js +9 -0
  537. package/dist/stores/mask-state.js.map +1 -0
  538. package/dist/stores/mask-store.d.ts +4 -21
  539. package/dist/stores/mask-store.d.ts.map +1 -1
  540. package/dist/stores/mask-store.js +7 -6
  541. package/dist/stores/mask-store.js.map +1 -1
  542. package/dist/stores/principal-state.d.ts +16 -0
  543. package/dist/stores/principal-state.d.ts.map +1 -0
  544. package/dist/stores/principal-state.js +31 -0
  545. package/dist/stores/principal-state.js.map +1 -0
  546. package/dist/stores/principal-store.d.ts +4 -15
  547. package/dist/stores/principal-store.d.ts.map +1 -1
  548. package/dist/stores/principal-store.js +7 -28
  549. package/dist/stores/principal-store.js.map +1 -1
  550. package/dist/stores/provider-state.d.ts +24 -0
  551. package/dist/stores/provider-state.d.ts.map +1 -0
  552. package/dist/stores/provider-state.js +68 -0
  553. package/dist/stores/provider-state.js.map +1 -0
  554. package/dist/stores/provider-store.d.ts +4 -23
  555. package/dist/stores/provider-store.d.ts.map +1 -1
  556. package/dist/stores/provider-store.js +7 -64
  557. package/dist/stores/provider-store.js.map +1 -1
  558. package/dist/stores/share-state.d.ts +29 -0
  559. package/dist/stores/share-state.d.ts.map +1 -0
  560. package/dist/stores/share-state.js +21 -0
  561. package/dist/stores/share-state.js.map +1 -0
  562. package/dist/stores/share-store.d.ts +4 -28
  563. package/dist/stores/share-store.d.ts.map +1 -1
  564. package/dist/stores/share-store.js +7 -18
  565. package/dist/stores/share-store.js.map +1 -1
  566. package/dist/stores/store-environment.d.ts +10 -0
  567. package/dist/stores/store-environment.d.ts.map +1 -0
  568. package/dist/stores/store-environment.js +2 -0
  569. package/dist/stores/store-environment.js.map +1 -0
  570. package/dist/stores/ui-state.d.ts +71 -0
  571. package/dist/stores/ui-state.d.ts.map +1 -0
  572. package/dist/stores/ui-state.js +58 -0
  573. package/dist/stores/ui-state.js.map +1 -0
  574. package/dist/stores/ui-store.d.ts +4 -45
  575. package/dist/stores/ui-store.d.ts.map +1 -1
  576. package/dist/stores/ui-store.js +7 -36
  577. package/dist/stores/ui-store.js.map +1 -1
  578. package/dist/styles.css +1 -1
  579. package/dist/theme.css +150 -97
  580. package/dist/voice/asr-clients.d.ts +2 -1
  581. package/dist/voice/asr-clients.d.ts.map +1 -1
  582. package/dist/voice/asr-clients.js +16 -17
  583. package/dist/voice/asr-clients.js.map +1 -1
  584. package/dist/voice/use-dictation.d.ts.map +1 -1
  585. package/dist/voice/use-dictation.js +12 -8
  586. package/dist/voice/use-dictation.js.map +1 -1
  587. package/dist/voice/voice-state.d.ts +25 -0
  588. package/dist/voice/voice-state.d.ts.map +1 -0
  589. package/dist/voice/voice-state.js +29 -0
  590. package/dist/voice/voice-state.js.map +1 -0
  591. package/dist/voice/voice-store.d.ts +4 -25
  592. package/dist/voice/voice-store.d.ts.map +1 -1
  593. package/dist/voice/voice-store.js +7 -26
  594. package/dist/voice/voice-store.js.map +1 -1
  595. package/package.json +3 -2
  596. package/src/components/activity/activity-page.tsx +334 -160
  597. package/src/components/activity/activity-run-detail.tsx +81 -47
  598. package/src/components/activity/activity-run-list.tsx +27 -59
  599. package/src/components/activity/activity-views.tsx +155 -0
  600. package/src/components/activity/approval-card.tsx +80 -0
  601. package/src/components/activity/digest-card.tsx +25 -61
  602. package/src/components/activity/digest-summary.tsx +52 -0
  603. package/src/components/activity/push-switch.tsx +62 -0
  604. package/src/components/activity/push-toggle.tsx +51 -81
  605. package/src/components/activity/span-bits.tsx +8 -7
  606. package/src/components/chat/ask-user-card.tsx +292 -356
  607. package/src/components/chat/ask-user-typed.ts +77 -0
  608. package/src/components/chat/brain-markdown-links.tsx +4 -4
  609. package/src/components/chat/brain-markdown.tsx +4 -2
  610. package/src/components/chat/chat-page.tsx +38 -9
  611. package/src/components/chat/composer-view.tsx +194 -0
  612. package/src/components/chat/composer.tsx +117 -296
  613. package/src/components/chat/markdown-content.tsx +53 -2
  614. package/src/components/chat/mermaid-block.tsx +13 -5
  615. package/src/components/chat/mermaid-share.ts +8 -7
  616. package/src/components/chat/mermaid-viewer.tsx +3 -1
  617. package/src/components/chat/message-bubble.tsx +78 -94
  618. package/src/components/chat/message-share.ts +7 -7
  619. package/src/components/chat/renderers/bind.tsx +94 -0
  620. package/src/components/chat/renderers/brain-ui-tools.tsx +56 -0
  621. package/src/components/chat/renderers/claude-tools.tsx +3 -2
  622. package/src/components/chat/renderers/index.ts +15 -10
  623. package/src/components/chat/session-drawer.tsx +41 -138
  624. package/src/components/chat/session-list.tsx +113 -0
  625. package/src/components/chat/share-block.tsx +16 -12
  626. package/src/components/chat/share-card.tsx +2 -2
  627. package/src/components/chat/subagent-view.tsx +4 -4
  628. package/src/components/chat/tool-call-timeline.tsx +59 -22
  629. package/src/components/chat/tool-cards/block-card.tsx +145 -0
  630. package/src/components/chat/tool-cards/image-mask-card.tsx +214 -0
  631. package/src/components/chat/tool-cards/location-card.tsx +159 -0
  632. package/src/components/chat/tool-views.tsx +21 -60
  633. package/src/components/chat/transcript-turn.tsx +108 -0
  634. package/src/components/chat/use-chat-commands.ts +14 -16
  635. package/src/components/chat/welcome-state.tsx +36 -91
  636. package/src/components/connectivity/connection-gate.tsx +32 -24
  637. package/src/components/connectivity/login-form.tsx +122 -0
  638. package/src/components/connectivity/login-screen.tsx +45 -100
  639. package/src/components/dev/share-harness.tsx +2 -2
  640. package/src/components/files/file-panel.tsx +168 -0
  641. package/src/components/files/file-tree-view.tsx +127 -0
  642. package/src/components/files/file-tree.tsx +55 -109
  643. package/src/components/files/file-viewer-binary.tsx +3 -2
  644. package/src/components/files/file-viewer-frame.tsx +113 -0
  645. package/src/components/files/file-viewer.tsx +40 -95
  646. package/src/components/files/frontmatter-chips.tsx +42 -0
  647. package/src/components/files/frontmatter-panel.tsx +6 -71
  648. package/src/components/files/staleness.ts +29 -0
  649. package/src/components/graph/graph-canvas.tsx +24 -1
  650. package/src/components/graph/graph-controls-column.tsx +92 -0
  651. package/src/components/graph/graph-controls.tsx +83 -127
  652. package/src/components/graph/graph-form.tsx +183 -0
  653. package/src/components/graph/graph-maintenance.tsx +9 -14
  654. package/src/components/graph/graph-node-rail.tsx +147 -0
  655. package/src/components/graph/graph-page.tsx +189 -49
  656. package/src/components/graph/graph-scene.tsx +200 -30
  657. package/src/components/graph/lib/graph-helpers.ts +65 -43
  658. package/src/components/graph/node-card.tsx +64 -0
  659. package/src/components/graph/node-popover.tsx +28 -117
  660. package/src/components/graph/use-graph-theme.ts +69 -32
  661. package/src/components/graph/use-node-actions.ts +56 -0
  662. package/src/components/images/image-share.ts +4 -2
  663. package/src/components/images/image-viewer.tsx +3 -1
  664. package/src/components/images/mask-editor.tsx +7 -4
  665. package/src/components/layout/app-shell.tsx +5 -1
  666. package/src/components/layout/desktop-palette.tsx +151 -0
  667. package/src/components/layout/key-cap.tsx +15 -0
  668. package/src/components/layout/mobile-tab-bar.tsx +80 -157
  669. package/src/components/layout/shortcut-switch.tsx +32 -0
  670. package/src/components/layout/side-rail.tsx +70 -150
  671. package/src/components/layout/slide-panel.tsx +29 -2
  672. package/src/components/layout/theme.tsx +67 -0
  673. package/src/components/quick-actions/add-form.tsx +188 -0
  674. package/src/components/quick-actions/add-modal.tsx +32 -153
  675. package/src/components/quick-actions/search-modal.tsx +5 -3
  676. package/src/components/quick-actions/streaming-modal.tsx +42 -71
  677. package/src/components/quick-actions/streaming-output.tsx +112 -0
  678. package/src/components/quick-actions/whatsup-modal.tsx +38 -60
  679. package/src/components/settings/devices-agents-tab.tsx +60 -152
  680. package/src/components/settings/models-list.tsx +299 -0
  681. package/src/components/settings/models-tab.tsx +63 -337
  682. package/src/components/settings/one-time-agent-credential.tsx +1 -1
  683. package/src/components/settings/passkey-list.tsx +201 -0
  684. package/src/components/settings/passkey-tab.tsx +53 -197
  685. package/src/components/settings/pi-accounts-list.tsx +128 -0
  686. package/src/components/settings/pi-accounts.tsx +71 -170
  687. package/src/components/settings/principal-list.tsx +172 -0
  688. package/src/components/settings/settings-panel.tsx +232 -21
  689. package/src/components/settings/skills-list.tsx +276 -0
  690. package/src/components/settings/skills-tab.tsx +82 -269
  691. package/src/components/settings/tool-permissions-list.tsx +54 -0
  692. package/src/components/settings/tool-permissions.tsx +27 -46
  693. package/src/components/settings/web-search-chain.tsx +300 -0
  694. package/src/components/settings/web-search-settings.tsx +58 -328
  695. package/src/components/share/share-menu.tsx +19 -4
  696. package/src/components/voice/dictation-sheet.tsx +5 -5
  697. package/src/components/voice/mic-button.tsx +1 -1
  698. package/src/components/voice/review-card.tsx +1 -1
  699. package/src/config.ts +21 -7
  700. package/src/connection.ts +443 -0
  701. package/src/default-root.ts +16 -0
  702. package/src/hooks/use-color-scheme.ts +36 -0
  703. package/src/hooks/use-hash-routes.ts +4 -2
  704. package/src/hooks/use-media-query.ts +32 -0
  705. package/src/hooks/use-share-intake.ts +32 -12
  706. package/src/hooks/use-vpn-status.ts +18 -17
  707. package/src/hooks/use-websocket.ts +12 -428
  708. package/src/hooks/websocket-handlers/activity.ts +4 -5
  709. package/src/hooks/websocket-handlers/chat.ts +26 -5
  710. package/src/hooks/websocket-handlers/connection.ts +4 -6
  711. package/src/hooks/websocket-handlers/mask.ts +2 -3
  712. package/src/hooks/websocket-handlers/provider.ts +4 -6
  713. package/src/hooks/websocket-handlers/types.ts +6 -2
  714. package/src/index.ts +7 -3
  715. package/src/lib/api-client.ts +426 -384
  716. package/src/lib/backend.ts +20 -10
  717. package/src/lib/diff.ts +28 -62
  718. package/src/lib/light-dark.ts +83 -0
  719. package/src/lib/mermaid-theme.ts +183 -214
  720. package/src/lib/passkeys.ts +12 -4
  721. package/src/lib/push-registration.ts +19 -2
  722. package/src/lib/share-intake.ts +6 -3
  723. package/src/lib/share.ts +7 -4
  724. package/src/lib/single-key.ts +47 -0
  725. package/src/lib/tool-names.ts +31 -8
  726. package/src/root-context.tsx +40 -0
  727. package/src/root.ts +83 -0
  728. package/src/stores/activity-state.ts +295 -0
  729. package/src/stores/activity-store.ts +11 -285
  730. package/src/stores/chat-state.ts +795 -0
  731. package/src/stores/chat-store.ts +11 -705
  732. package/src/stores/connection-state.ts +78 -0
  733. package/src/stores/connection-store.ts +11 -76
  734. package/src/stores/create-stores.ts +31 -0
  735. package/src/stores/file-state.ts +399 -0
  736. package/src/stores/file-store.ts +9 -390
  737. package/src/stores/graph-state.ts +368 -0
  738. package/src/stores/graph-store.ts +10 -355
  739. package/src/stores/mask-state.ts +30 -0
  740. package/src/stores/mask-store.ts +10 -27
  741. package/src/stores/principal-state.ts +42 -0
  742. package/src/stores/principal-store.ts +10 -37
  743. package/src/stores/provider-state.ts +103 -0
  744. package/src/stores/provider-store.ts +10 -95
  745. package/src/stores/share-state.ts +56 -0
  746. package/src/stores/share-store.ts +11 -54
  747. package/src/stores/store-environment.ts +10 -0
  748. package/src/stores/ui-state.ts +143 -0
  749. package/src/stores/ui-store.ts +11 -93
  750. package/src/styles.css +4 -1
  751. package/src/theme.css +150 -97
  752. package/src/voice/asr-clients.ts +17 -17
  753. package/src/voice/use-dictation.ts +11 -8
  754. package/src/voice/voice-state.ts +57 -0
  755. package/src/voice/voice-store.ts +11 -55
package/README.md CHANGED
@@ -112,12 +112,46 @@ Two ways to get the CSS, pick one:
112
112
  @source "../node_modules/@schlessera/brain-ui-react/src";
113
113
  ```
114
114
 
115
- - **No Tailwind:** import the precompiled stylesheet:
115
+ `theme.css` imports the kit's `tokens.css` itself (not the kit's
116
+ `theme.css`, which carries the kit's own `@theme` scales and would redefine
117
+ `p-2`), so the `--bk-*` values the kit components inside this package read
118
+ arrive with it. Importing `@schlessera/brain-ui-kit/tokens.css` a second
119
+ time is harmless.
120
+
121
+ - **No Tailwind:** import the precompiled stylesheet, which already includes
122
+ the kit's tokens:
116
123
 
117
124
  ```ts
118
125
  import "@schlessera/brain-ui-react/styles.css";
119
126
  ```
120
127
 
128
+ ### Theme
129
+
130
+ The app is dark by default. Settings carries a three-way toggle (system /
131
+ paper / dark), stored per root under `brain-theme`, and `AppShell` writes it to
132
+ `<html data-theme>`; the kit's tokens switch on that attribute. Because the
133
+ attribute is applied in an effect, a host that wants a stored non-default
134
+ preference to paint correctly on the very first frame adds one inline line to
135
+ its HTML before the stylesheet:
136
+
137
+ ```html
138
+ <script>document.documentElement.dataset.theme = localStorage.getItem("brain-theme") || "dark";</script>
139
+ ```
140
+
141
+ The app types no colour of its own. Every utility colour `theme.css`
142
+ declares (`bg-surface`, `text-foreground`, `border-border`, …) is one of the
143
+ kit's `--bk-*` tokens, declared `@theme inline`, so the same attribute
144
+ switches the shell and the kit components inside it. Accents come in two
145
+ names, as the kit names them: `primary`, `accent` and `destructive` are the
146
+ inks — for text, borders and rings, dark on paper — and `primary-fill`,
147
+ `accent-fill` and `destructive-fill` are the fills, the same colour in both
148
+ themes, for backgrounds solid or with an alpha, with `primary-foreground` as
149
+ the ink that sits on a fill, and `primary-mark` / `accent-mark` /
150
+ `destructive-mark` for a status dot, which the kit darkens on paper because
151
+ a fill that small falls under 3:1. A host that styles its own elements with these
152
+ utilities follows the same split; `bg-primary` is the ink and reads as brown
153
+ on paper.
154
+
121
155
  ## Multi-session state
122
156
 
123
157
  `useChatStore` keeps a transcript buffer **per session** plus a draft buffer
@@ -126,11 +160,55 @@ in their own buffers while another session is in view. `activeChat(state)`
126
160
  selects the buffer in view; `anyStreaming(state)` is the "something is
127
161
  running" signal (used e.g. to defer service-worker update reloads).
128
162
 
163
+ ## UI roots
164
+
165
+ `createBrainUiRoot({ config, storagePrefix, storage, request, api })` constructs
166
+ independent stores, API access, renderer/ASR registries and a connection without
167
+ opening a socket. Pass it to `<BrainUiProvider root={root}>`. Store selector
168
+ hooks resolve the nearest provider; imperative code uses `root.stores` and
169
+ `root.connection`. `useBrainApi()` and `useBrainConfig()` expose its services.
170
+
171
+ A provider without a `root` owns a new root and disposes it on unmount. An
172
+ explicit root belongs to the caller, which must call `root.dispose()` when
173
+ finished. `useWebSocket()` acquires a connection lease: multiple consumers of
174
+ the same root share one socket until the last consumer unmounts.
175
+
176
+ Use a stable, distinct `storagePrefix` to restore an embedder's session,
177
+ provider choice and frontmatter preference. Omission generates an ephemeral
178
+ namespace; `storage: null` disables persistence. Outside a provider, hooks use
179
+ the default application root and its existing storage keys. Hook statics such
180
+ as `useChatStore.getState()` always address that default root; internal code
181
+ must use explicit roots, enforced by `check-root-stores.ts`.
182
+
183
+ Component requests, media URLs and branding follow the provider's root.
184
+ Browser resources remain shared: cookies, native credential/share UI, the
185
+ share-target stash and service-worker push subscriptions. Native media loading
186
+ uses backend URLs and browser credentials rather than the injected transport.
187
+ Separate roots do not establish a browser security boundary. One root serves
188
+ all agent backends on the same brain server; separate roots are only needed
189
+ for distinct application instances.
190
+
129
191
  ## Registries
130
192
 
131
- Tool renderers and ASR clients register at module load into the
132
- `@schlessera/brain-ui-sdk/client` registries (build-time composition no
133
- runtime plugin loading).
193
+ Tool renderers and ASR clients register synchronously on first render into the
194
+ current root's registries. Imports are inert. Repeated registration is safe;
195
+ resetting one root's registry leaves other roots untouched. This is build-time
196
+ composition, with no runtime plugin loading.
197
+
198
+ The chat UI's own tools render from their SDK contracts through
199
+ `bind(contract, Component)`: `get_current_location` as a map card,
200
+ `request_image_mask` as a receipt, and `show_block` as one of the kit's answer
201
+ blocks (comparison table, stat tiles, trend chart, data table, bar list,
202
+ receipt, step list, timeline, schedule, quote card, contact card). A block is
203
+ part of the answer, so the transcript draws it inline where the model called
204
+ it rather than inside the tool timeline; a call whose result does not parse
205
+ stays in the timeline with the result's own words.
206
+
207
+ The same `BlockCard` draws the blocks a host classifies out of the model's
208
+ markdown (`message_blocks`, rev 4): `MarkdownContent` cuts a text part at
209
+ each block's span and renders the kit block between the markdown pieces. A
210
+ message without blocks renders exactly as before, and a span that does not
211
+ fit the text is ignored.
134
212
 
135
213
  ## Versioning
136
214
 
@@ -1,11 +1,23 @@
1
1
  /**
2
- * The Activity surface: an INDEX of all agent activity live runs first,
3
- * then history with cost/token rollups. Deliberately not a residence:
4
- * a session run deep-links back into its chat, a subagent into the drill-in
5
- * stack; only a cron run (which has no chat around it) details here.
2
+ * The Actions surface (D37): one queue, three lenses`needs you` (pending
3
+ * approvals from every transcript, then the inbox), `running` (live runs),
4
+ * `done` (history and the rollups). "What needs me" and "what has been
5
+ * happening" are two lenses on one queue, so the rail has one destination
6
+ * and this page has a filter. Deliberately not a residence: a session run
7
+ * deep-links back into its chat, a subagent into the drill-in stack; only a
8
+ * cron run (which has no chat around it) details here.
6
9
  *
7
10
  * Live rows ride the index-view activity subscription while this surface is
8
- * open; history and rollups come from the REST activity API.
11
+ * open; history and rollups come from the REST activity API. The hash stays
12
+ * `#/activity` — the route is a contract with push notifications.
13
+ *
14
+ * Panes (D4): below `laptop:` the run detail replaces the queue, as on the
15
+ * phone. From `laptop:` the queue is a 360px list column beside the detail
16
+ * pane, and from `wide:` a 300px evidence rail on the right carries the
17
+ * run's trace and the last decision's receipt. Each pane scrolls on its own.
18
+ * The detail is one element at every width — the list hides under it below
19
+ * `laptop:` — so a deep link selects the same run everywhere.
9
20
  */
21
+ export type ActionsLens = "needs-you" | "running" | "done";
10
22
  export declare function ActivityPage(): import("react").JSX.Element;
11
23
  //# sourceMappingURL=activity-page.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"activity-page.d.ts","sourceRoot":"","sources":["../../../src/components/activity/activity-page.tsx"],"names":[],"mappings":"AA2BA;;;;;;;;GAQG;AACH,wBAAgB,YAAY,gCAsQ3B"}
1
+ {"version":3,"file":"activity-page.d.ts","sourceRoot":"","sources":["../../../src/components/activity/activity-page.tsx"],"names":[],"mappings":"AAyBA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,SAAS,GAAG,MAAM,CAAC;AAC3D,wBAAgB,YAAY,gCA0a3B"}
@@ -1,28 +1,25 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useEffect, useMemo, useState } from "react";
3
- import { Activity as ActivityIcon, AlertTriangle, RefreshCw, Timer, } from "lucide-react";
4
- import { api, } from "../../lib/api-client.js";
5
- import { sendClientMessage } from "../../hooks/use-websocket.js";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useBrainUiRoot } from "../../root-context.js";
3
+ import { useCallback, useEffect, useMemo, useRef, useState } from "react";
4
+ import { Activity as ActivityIcon, AlertTriangle, RefreshCw } from "lucide-react";
6
5
  import { useActivityStore } from "../../stores/activity-store.js";
7
- import { useChatStore } from "../../stores/chat-store.js";
8
- import { useUIStore } from "../../stores/ui-store.js";
6
+ import { useChatStore, pendingApprovals } from "../../stores/chat-store.js";
7
+ import { EmptyState, FilterRow, InlineToast, Label } from "@schlessera/brain-ui-kit";
9
8
  import { cn } from "../../lib/utils.js";
9
+ import { ApprovalCard } from "./approval-card.js";
10
+ import { useUIStore } from "../../stores/ui-store.js";
10
11
  import { formatRelativeTime } from "../chat/tool-views.js";
11
12
  import { RollupCards } from "./activity-rollups.js";
12
13
  import { LiveRow, RunRow } from "./activity-run-list.js";
13
- import { RunDetail } from "./activity-run-detail.js";
14
+ import { RunDetail, RunTraceSteps } from "./activity-run-detail.js";
15
+ import { IntentCard } from "./activity-views.js";
16
+ import { focusAfterDecision, singleKey } from "../../lib/single-key.js";
14
17
  import { PushToggle } from "./push-toggle.js";
15
18
  import { SettingsPanel } from "../settings/settings-panel.js";
16
- /**
17
- * The Activity surface: an INDEX of all agent activity — live runs first,
18
- * then history — with cost/token rollups. Deliberately not a residence:
19
- * a session run deep-links back into its chat, a subagent into the drill-in
20
- * stack; only a cron run (which has no chat around it) details here.
21
- *
22
- * Live rows ride the index-view activity subscription while this surface is
23
- * open; history and rollups come from the REST activity API.
24
- */
25
19
  export function ActivityPage() {
20
+ const root = useBrainUiRoot();
21
+ const api = root.api;
22
+ const request = useRef(0);
26
23
  const supported = useActivityStore((s) => s.supported);
27
24
  const connectionEpoch = useActivityStore((s) => s.connectionEpoch);
28
25
  const liveSpans = useActivityStore((s) => s.spans);
@@ -37,37 +34,84 @@ export function ActivityPage() {
37
34
  const [detailRunId, setDetailRunId] = useState(null);
38
35
  const [pricingStale, setPricingStale] = useState(false);
39
36
  const inbox = useActivityStore((s) => s.inbox);
37
+ // Derived from the buffer references, not selected as a fresh array: a
38
+ // selector returning a new array every call re-renders without end.
39
+ const buffers = useChatStore((s) => s.buffers);
40
+ const draft = useChatStore((s) => s.draft);
41
+ const approvals = useMemo(() => pendingApprovals({ buffers, draft }), [buffers, draft]);
42
+ const resolveToolApproval = useChatStore((s) => s.resolveToolApproval);
43
+ /**
44
+ * The lens the reader picked, or — until they pick one — the one that has
45
+ * something in it: what needs you, else what is running, else what is
46
+ * done. A page that opens on an empty "needs you" when a run is live would
47
+ * be reassurance in the wrong place.
48
+ */
49
+ const [picked, setLens] = useState(null);
50
+ /**
51
+ * The receipt for the last DECISION — Allowed, Always allowed, Denied —
52
+ * shown above the `EmptyState` that replaces a drained section (D37) and
53
+ * in the evidence rail: a keyboard user is told "that is done" instead of
54
+ * being dropped at the document top. A decision earns a toast by the
55
+ * sixth pass's own criterion (§4: "a toast is for effects you can take
56
+ * back or that happen out of sight"): its effect happens in the run, out
57
+ * of sight, and the card leaving says nothing about what the run did
58
+ * with the answer.
59
+ *
60
+ * A DISMISSAL sets no receipt. Acknowledging an inbox item is neither —
61
+ * it cannot be taken back (the activity API has no un-acknowledge) and
62
+ * the row vanishing under the cursor is the whole effect. An `InlineToast`
63
+ * whose point is Undo, shipped without Undo, "teaches that the kit's
64
+ * receipts are decorative"; so until un-acknowledge exists, dismissal is
65
+ * silent and the row leaving the list is the receipt. Grow un-acknowledge
66
+ * and the toast returns with its Undo.
67
+ */
68
+ const [receipt, setReceipt] = useState(null);
69
+ const [drained, setDrained] = useState(false);
40
70
  const loadInbox = useActivityStore((s) => s.loadInbox);
41
71
  const acknowledgeIntent = useActivityStore((s) => s.acknowledgeIntent);
42
72
  const acknowledgeAllIntents = useActivityStore((s) => s.acknowledgeAllIntents);
43
- const refresh = () => {
44
- api
45
- .activityRuns({ limit: 100 })
46
- .then(setRuns)
47
- .catch((err) => setError(err instanceof Error ? err.message : String(err)));
48
- api.activityRollups(7).then(setRollups).catch(() => { });
49
- // Surface the pricing warning only when the table is stale AND refreshes
50
- // are failing a merely-aging table heals itself. A rejection (including
51
- // 404 from a server that predates the route) means no signal: stay quiet.
52
- api
53
- .pricingState()
54
- .then((s) => setPricingStale(Boolean(s.stale && s.error)))
55
- .catch(() => setPricingStale(false));
73
+ const refresh = useCallback(() => {
74
+ const token = ++request.current;
75
+ const current = () => token === request.current;
76
+ setError(null);
77
+ api.activityRuns({ limit: 100 })
78
+ .then((runs) => { if (current())
79
+ setRuns(runs); })
80
+ .catch((err) => { if (current())
81
+ setError(err instanceof Error ? err.message : String(err)); });
82
+ api.activityRollups(7)
83
+ .then((rollups) => { if (current())
84
+ setRollups(rollups); })
85
+ .catch(() => { });
86
+ // A stale table is only a warning while refreshes are failing. Older
87
+ // servers have no pricing route, so a rejection remains a quiet state.
88
+ api.pricingState()
89
+ .then((s) => { if (current())
90
+ setPricingStale(Boolean(s.stale && s.error)); })
91
+ .catch(() => { if (current())
92
+ setPricingStale(false); });
56
93
  void loadInbox();
57
- };
58
- // Re-runs on every reconnect (connectionEpoch): the new socket has no
59
- // server-side subscriptions, and the REST refresh heals whatever finished
60
- // while disconnected.
94
+ }, [api, loadInbox]);
95
+ useEffect(() => {
96
+ setRuns(null);
97
+ setRollups(null);
98
+ setError(null);
99
+ setPricingStale(false);
100
+ setDetailRunId(null);
101
+ }, [root]);
102
+ // Reconnects heal the REST snapshot and establish a new subscription.
103
+ // Cleanup also invalidates responses from the old root or request generation.
61
104
  useEffect(() => {
62
105
  refresh();
63
- if (supported) {
64
- sendClientMessage({ type: "activity_subscribe", view: "index" });
65
- return () => {
66
- sendClientMessage({ type: "activity_unsubscribe", view: "index" });
67
- };
68
- }
69
- return undefined;
70
- }, [supported, connectionEpoch]);
106
+ if (supported)
107
+ root.connection.send({ type: "activity_subscribe", view: "index" });
108
+ const invalidate = () => { request.current++; };
109
+ return () => {
110
+ invalidate();
111
+ if (supported)
112
+ root.connection.send({ type: "activity_unsubscribe", view: "index" });
113
+ };
114
+ }, [supported, connectionEpoch, root, refresh]);
71
115
  // Deep-link consumer: `#/activity/<runId>` (the push notification landing
72
116
  // spot — the shell routes it here but leaves the hash intact) opens that
73
117
  // run's detail. Opening/closing detail writes the hash back via
@@ -128,14 +172,64 @@ export function ActivityPage() {
128
172
  showDetail(intent.runId);
129
173
  }
130
174
  }
131
- if (detailRunId) {
132
- return _jsx(RunDetail, { runId: detailRunId, onBack: () => showDetail(null) });
175
+ const keys = useUIStore((s) => s.singleKeyShortcuts);
176
+ const INTENT_CARD = "[data-intent-card] > [role=\"button\"]";
177
+ /**
178
+ * `j` / `k` move inside the focused list and `d` dismisses the focused
179
+ * card (D36): all three act only while a card in this list holds focus,
180
+ * and the footer prints them. After a dismiss, focus goes to the next
181
+ * card, else the previous, else the page heading.
182
+ */
183
+ function onInboxKeyDown(event) {
184
+ if (!keys)
185
+ return;
186
+ const key = singleKey(event);
187
+ if (key !== "j" && key !== "k" && key !== "d")
188
+ return;
189
+ const cards = [...event.currentTarget.querySelectorAll(INTENT_CARD)];
190
+ const here = cards.findIndex((card) => card.contains(event.target));
191
+ if (here === -1)
192
+ return;
193
+ event.preventDefault();
194
+ if (key === "d") {
195
+ const intent = inbox[here];
196
+ focusAfterDecision(cards[here], INTENT_CARD, "[data-needs-you-heading]");
197
+ if (intent)
198
+ dismiss(intent);
199
+ return;
200
+ }
201
+ cards[(here + (key === "j" ? 1 : -1) + cards.length) % cards.length]?.focus();
202
+ }
203
+ /** Silent by rule (see `receipt`): the row leaving is the receipt. `drained`
204
+ * still flips so the empty state's heading takes focus after the last one. */
205
+ function dismiss(intent) {
206
+ setDrained(inbox.length + approvals.length <= 1);
207
+ void acknowledgeIntent(intent.id);
208
+ }
209
+ function dismissAll() {
210
+ setDrained(approvals.length === 0);
211
+ void acknowledgeAllIntents();
212
+ }
213
+ function decideApproval(key, toolUseId, approved, always) {
214
+ const tool = approvals.find((a) => a.tool.id === toolUseId)?.tool;
215
+ setReceipt({ text: approved ? (always ? "Always allowed" : "Allowed") : "Denied", target: tool ? tool.name : toolUseId, effect: always ? "write_policy" : approved ? "tool_approval" : "tool_denial" });
216
+ setDrained(inbox.length + approvals.length <= 1);
217
+ resolveToolApproval(key, toolUseId, approved);
218
+ if (approved)
219
+ root.connection.send({ type: "tool_approval", toolUseId, ...(always ? { always: true } : {}) });
220
+ else
221
+ root.connection.send({ type: "tool_denial", toolUseId, message: "Denied by user" });
133
222
  }
134
- return (_jsxs("div", { className: "flex h-full flex-col overflow-y-auto", children: [_jsx(SettingsPanel, { open: settingsPanelOpen, onClose: () => setSettingsPanelOpen(false) }), _jsxs("div", { className: "flex items-center gap-2 border-b border-border-subtle px-4 py-3", children: [_jsx(ActivityIcon, { className: "h-4 w-4 text-muted-foreground" }), _jsx("h1", { className: "text-sm font-medium", children: "Activity" }), _jsxs("div", { className: "ml-auto flex items-center gap-2", children: [pricingStale && (_jsxs("button", { type: "button", onClick: () => openSettings("models"), className: "flex items-center gap-1 rounded-md p-1.5 text-amber-500 transition-colors hover:bg-surface-raised hover:text-amber-400", "aria-label": "Pricing refresh is failing \u2014 costs may use stale rates. Open Settings", title: "Pricing refresh is failing \u2014 costs may use stale rates. Open Settings", children: [_jsx(AlertTriangle, { className: "h-3.5 w-3.5" }), _jsx("span", { className: "hidden text-[10px] sm:inline", children: "Pricing stale" })] })), _jsx(PushToggle, {})] }), _jsx("button", { type: "button", onClick: refresh, className: "rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-surface-raised hover:text-foreground", "aria-label": "Refresh", children: _jsx(RefreshCw, { className: "h-3.5 w-3.5" }) })] }), _jsxs("div", { className: "mx-auto w-full max-w-3xl space-y-6 p-4", children: [error && (_jsxs("p", { className: "text-xs text-destructive", children: ["Could not load activity: ", error] })), inbox.length > 0 && (_jsxs("section", { children: [_jsxs("div", { className: "mb-2 flex items-center", children: [_jsx("h2", { className: "text-xs font-medium uppercase tracking-wide text-muted-foreground", children: "Needs attention" }), _jsx("button", { type: "button", onClick: () => void acknowledgeAllIntents(), className: "ml-auto text-[11px] text-muted-foreground transition-colors hover:text-foreground", children: "Dismiss all" })] }), _jsx("div", { className: "space-y-1", children: inbox.map((intent) => (_jsxs("div", { className: cn("flex items-center gap-2 rounded-lg border px-3 py-2 text-xs", intent.kind === "failure"
135
- ? "border-destructive/30 bg-destructive/5"
136
- : "border-border-subtle bg-surface"), children: [intent.kind === "failure" ? (_jsx(AlertTriangle, { className: "h-3.5 w-3.5 shrink-0 text-destructive" })) : intent.kind === "stuck" ? (_jsx(Timer, { className: "h-3.5 w-3.5 shrink-0 text-amber-500" })) : (_jsx(ActivityIcon, { className: "h-3.5 w-3.5 shrink-0 text-muted-foreground" })), _jsx("button", { type: "button", className: "min-w-0 flex-1 truncate text-left hover:underline", onClick: () => {
137
- void acknowledgeIntent(intent.id);
138
- openIntent(intent);
139
- }, children: intent.title }), _jsx("span", { className: "shrink-0 text-[10px] text-muted-foreground/60", children: formatRelativeTime(intent.createdAt) }), _jsx("button", { type: "button", onClick: () => void acknowledgeIntent(intent.id), className: "shrink-0 rounded p-1 text-muted-foreground transition-colors hover:text-foreground", "aria-label": "Dismiss", children: "\u00D7" })] }, intent.id))) })] })), rollups && _jsx(RollupCards, { rollups: rollups }), _jsxs("section", { children: [_jsx("h2", { className: "mb-2 text-xs font-medium uppercase tracking-wide text-muted-foreground", children: "Running now" }), liveRoots.length === 0 && restLive.length === 0 ? (_jsx("p", { className: "text-xs text-muted-foreground/70", children: "Nothing is running." })) : (_jsxs("div", { className: "space-y-1", children: [liveRoots.map((span) => (_jsx(LiveRow, { span: span, onOpen: openRun }, span.runId))), restLive.map((run) => (_jsx(RunRow, { run: run, onOpen: openRun }, run.runId)))] }))] }), _jsxs("section", { children: [_jsx("h2", { className: "mb-2 text-xs font-medium uppercase tracking-wide text-muted-foreground", children: "History" }), history.length === 0 ? (_jsx("p", { className: "text-xs text-muted-foreground/70", children: "No recorded runs yet." })) : (_jsx("div", { className: "space-y-1", children: history.map((run) => (_jsx(RunRow, { run: run, onOpen: openRun }, run.runId))) }))] })] })] }));
223
+ const needsYouCount = inbox.length + approvals.length;
224
+ const runningCount = liveRoots.length + restLive.length;
225
+ const lens = picked ?? (needsYouCount > 0 || drained ? "needs-you" : runningCount > 0 ? "running" : "done");
226
+ return (_jsxs("div", { className: "flex h-full min-h-0 flex-1 flex-col laptop:flex-row", children: [_jsx(SettingsPanel, { open: settingsPanelOpen, onClose: () => setSettingsPanelOpen(false) }), _jsxs("section", { "aria-label": "Actions queue", className: cn("min-h-0 flex-col overflow-y-auto laptop:flex laptop:w-[360px] laptop:flex-none laptop:border-r laptop:border-border-subtle", detailRunId ? "hidden" : "flex flex-1"), children: [_jsxs("div", { className: "flex items-center gap-2 border-b border-border-subtle px-4 py-3", children: [_jsx(ActivityIcon, { className: "h-4 w-4 text-muted-foreground" }), _jsx("h1", { className: "text-sm font-medium outline-none", tabIndex: -1, "data-activity-heading": "", children: "Actions" }), _jsxs("div", { className: "ml-auto flex items-center gap-2", children: [pricingStale && (_jsxs("button", { type: "button", onClick: () => openSettings("models"), className: "flex items-center gap-1 rounded-md p-1.5 text-primary transition-colors hover:bg-surface-raised hover:text-primary/80", "aria-label": "Pricing refresh is failing \u2014 costs may use stale rates. Open Settings", title: "Pricing refresh is failing \u2014 costs may use stale rates. Open Settings", children: [_jsx(AlertTriangle, { className: "h-3.5 w-3.5" }), _jsx("span", { className: "hidden text-[10px] sm:inline", children: "Pricing stale" })] })), _jsx(PushToggle, {})] }), _jsx("button", { type: "button", onClick: refresh, className: "rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-surface-raised hover:text-foreground", "aria-label": "Refresh", children: _jsx(RefreshCw, { className: "h-3.5 w-3.5" }) })] }), _jsxs("div", { className: "mx-auto w-full max-w-3xl space-y-6 p-4 laptop:max-w-none", children: [error && (_jsxs("p", { className: "text-xs text-destructive", children: ["Could not load activity: ", error] })), _jsx(FilterRow, { items: [
227
+ { label: `needs you ${needsYouCount}`, onClick: () => setLens("needs-you") },
228
+ { label: `running ${runningCount}`, onClick: () => setLens("running") },
229
+ { label: `done ${history.length}`, onClick: () => setLens("done") },
230
+ ], active: lens === "needs-you" ? 0 : lens === "running" ? 1 : 2 }), lens === "needs-you" && (_jsxs("section", { "aria-labelledby": "needs-you-heading", children: [_jsxs("div", { className: "mb-2 flex items-center", children: [_jsx("h2", { id: "needs-you-heading", className: "text-xs font-medium uppercase tracking-wide text-muted-foreground outline-none", tabIndex: -1, "data-needs-you-heading": "", children: "Needs you" }), inbox.length > 0 && (_jsx("button", { type: "button", onClick: dismissAll, className: "ml-auto text-[11px] text-muted-foreground transition-colors hover:text-foreground", children: "Dismiss all" }))] }), needsYouCount === 0 ? (_jsxs("div", { className: "flex flex-col gap-3", children: [receipt && _jsx(InlineToast, { text: receipt.text, target: receipt.target, effect: receipt.effect, tone: "teal", undoLabel: "" }), _jsx(EmptyState, { variant: "caught_up", meta: "", focusTitle: drained })] })) : (_jsxs(_Fragment, { children: [approvals.length > 0 && (_jsx("div", { className: "mb-3 space-y-2", children: approvals.map(({ key, tool }) => (_jsx(ApprovalCard, { tool: tool, origin: key ? `session ${key.slice(0, 8)}` : "this conversation", keys: keys, onDecide: (approved, always) => decideApproval(key, tool.id, approved, always) }, tool.id))) })), _jsx("div", { className: "space-y-2", onKeyDown: onInboxKeyDown, children: inbox.map((intent) => (_jsx("div", { "data-intent-card": "", children: _jsx(IntentCard, { intent: intent, when: formatRelativeTime(intent.createdAt), keyHint: keys, onOpen: () => {
231
+ void acknowledgeIntent(intent.id);
232
+ openIntent(intent);
233
+ }, onDismiss: () => dismiss(intent) }) }, intent.id))) }), keys && (_jsxs("p", { className: "mt-1.5 font-[family-name:var(--font-mono)] text-[10px] text-muted-foreground/70 laptop:hidden", children: ["j / k move \u00B7 d dismiss \u00B7 \u23CE open", approvals.length > 0 ? " · a allow" : ""] }))] }))] })), lens === "running" && (_jsxs("section", { children: [_jsx("h2", { className: "mb-2 text-xs font-medium uppercase tracking-wide text-muted-foreground", children: "Running now" }), liveRoots.length === 0 && restLive.length === 0 ? (_jsx("p", { className: "text-xs text-muted-foreground/70", children: "Nothing is running." })) : (_jsxs("div", { className: "space-y-1", children: [liveRoots.map((span) => (_jsx(LiveRow, { span: span, onOpen: openRun }, span.runId))), restLive.map((run) => (_jsx(RunRow, { run: run, onOpen: openRun }, run.runId)))] }))] })), lens === "done" && (_jsxs(_Fragment, { children: [rollups && _jsx(RollupCards, { rollups: rollups }), _jsxs("section", { children: [_jsx("h2", { className: "mb-2 text-xs font-medium uppercase tracking-wide text-muted-foreground", children: "History" }), history.length === 0 ? (_jsx("p", { className: "text-xs text-muted-foreground/70", children: "No recorded runs yet." })) : (_jsx("div", { className: "space-y-1", children: history.map((run) => (_jsx(RunRow, { run: run, onOpen: openRun }, run.runId))) }))] })] }))] }), keys && lens === "needs-you" && inbox.length > 0 && (_jsx("p", { className: "sticky bottom-0 mt-auto hidden border-t border-border-subtle bg-background px-4 py-2 font-[family-name:var(--font-mono)] text-[10px] text-muted-foreground/70 laptop:block", children: "j / k move \u00B7 d dismiss" }))] }), _jsx("div", { className: cn("min-h-0 min-w-0 flex-1 flex-col", detailRunId ? "flex" : "hidden laptop:flex"), children: detailRunId ? (_jsx(RunDetail, { runId: detailRunId, onBack: () => showDetail(null), embedded: true })) : (_jsx("div", { className: "flex h-full items-center justify-center overflow-y-auto p-4", children: _jsx(EmptyState, { variant: "quiet", title: "Pick a run", body: "Its trace, attempts and what it was holding show here.", meta: "", minHeight: 0 }) })) }), detailRunId && (_jsxs("aside", { "aria-label": "Run evidence", className: "hidden min-h-0 w-[300px] shrink-0 flex-col gap-4 overflow-y-auto border-l border-border-subtle bg-surface p-4 wide:flex", children: [_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { text: "Trace", icon: "steps", meta: "this run" }), _jsx(RunTraceSteps, { runId: detailRunId })] }), receipt && (_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { text: "Last decision", icon: "resolved" }), _jsx(InlineToast, { text: receipt.text, target: receipt.target, effect: receipt.effect, tone: "teal", undoLabel: "" })] }))] }))] }));
140
234
  }
141
235
  //# sourceMappingURL=activity-page.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"activity-page.js","sourceRoot":"","sources":["../../../src/components/activity/activity-page.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QA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,EAAE,CAAC,GACZ,GACE,CACP,GACG,EAIL,WAAW,IAAI,CACd,+BACa,cAAc,EACzB,SAAS,EAAC,yHAAyH,aAEnI,eAAK,SAAS,EAAC,qBAAqB,aAClC,KAAC,KAAK,IAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,UAAU,GAAG,EACnD,KAAC,aAAa,IAAC,KAAK,EAAE,WAAW,GAAI,IACjC,EACL,OAAO,IAAI,CACV,eAAK,SAAS,EAAC,qBAAqB,aAClC,KAAC,KAAK,IAAC,IAAI,EAAC,eAAe,EAAC,IAAI,EAAC,UAAU,GAAG,EAC9C,KAAC,WAAW,IAAC,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,IAAI,EAAC,MAAM,EAAC,SAAS,EAAC,EAAE,GAAG,IACxG,CACP,IACK,CACT,IACG,CACP,CAAC;AACJ,CAAC"}
@@ -3,9 +3,24 @@
3
3
  * view of one run: its rollup header, the span tree with per-span usage,
4
4
  * attributes and recorded events, and a raw-trace escape hatch for anything
5
5
  * the rendered view does not have an opinion about.
6
+ *
7
+ * `embedded` is the D4 desktop pane: the Actions list sits beside this view
8
+ * from `laptop:` up, so the back chevron only renders below that width, and
9
+ * from `wide:` the span tree moves out to the page's evidence rail
10
+ * (`RunTraceSteps`) — the same store slice, fetched once here.
6
11
  */
7
- export declare function RunDetail({ runId, onBack }: {
12
+ export declare function RunDetail({ runId, onBack, embedded, }: {
8
13
  runId: string;
9
14
  onBack: () => void;
15
+ embedded?: boolean;
16
+ }): import("react").JSX.Element;
17
+ /**
18
+ * The run's trace as the kit's list timeline, for the D4 evidence rail. Reads
19
+ * the store slice `RunDetail` filled — no second fetch — and stays a record:
20
+ * the rail's steps do not expand, the escape hatch for that is the detail's
21
+ * raw trace.
22
+ */
23
+ export declare function RunTraceSteps({ runId }: {
24
+ runId: string;
10
25
  }): import("react").JSX.Element;
11
26
  //# sourceMappingURL=activity-run-detail.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"activity-run-detail.d.ts","sourceRoot":"","sources":["../../../src/components/activity/activity-run-detail.tsx"],"names":[],"mappings":"AAuBA;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,IAAI,CAAA;CAAE,+BA8JjF"}
1
+ {"version":3,"file":"activity-run-detail.d.ts","sourceRoot":"","sources":["../../../src/components/activity/activity-run-detail.tsx"],"names":[],"mappings":"AA0BA;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,MAAM,EACN,QAAgB,GACjB,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,+BA4IA;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,+BAmBzD"}
@@ -3,18 +3,26 @@ import { Fragment, useEffect, useMemo, useState } from "react";
3
3
  import { ArrowLeft, ChevronRight } from "lucide-react";
4
4
  import { useShallow } from "zustand/react/shallow";
5
5
  import { isFailureOutcome } from "@schlessera/brain-ui-sdk/protocol";
6
- import { api } from "../../lib/api-client.js";
6
+ import { TraceSteps } from "@schlessera/brain-ui-kit";
7
7
  import { useActivityStore, narrativeEventsFor, runEvents, runSpans, } from "../../stores/activity-store.js";
8
+ import { useBrainApi } from "../../root-context.js";
8
9
  import { cn } from "../../lib/utils.js";
9
10
  import { formatDuration, formatRelativeTime } from "../chat/tool-views.js";
10
11
  import { SpanEventBlock, SpanPayload, SpanStatusDot, formatEffectiveCost, formatSpanUsage, spanToolLabel, } from "./span-bits.js";
12
+ import { RunRollupReceipt } from "./activity-views.js";
11
13
  /**
12
14
  * Chat-less run detail (cron runs; pruned runs show their rollup) — the full
13
15
  * view of one run: its rollup header, the span tree with per-span usage,
14
16
  * attributes and recorded events, and a raw-trace escape hatch for anything
15
17
  * the rendered view does not have an opinion about.
18
+ *
19
+ * `embedded` is the D4 desktop pane: the Actions list sits beside this view
20
+ * from `laptop:` up, so the back chevron only renders below that width, and
21
+ * from `wide:` the span tree moves out to the page's evidence rail
22
+ * (`RunTraceSteps`) — the same store slice, fetched once here.
16
23
  */
17
- export function RunDetail({ runId, onBack }) {
24
+ export function RunDetail({ runId, onBack, embedded = false, }) {
25
+ const api = useBrainApi();
18
26
  const streamed = useActivityStore(useShallow((s) => runSpans(s, runId)));
19
27
  const events = useActivityStore(useShallow((s) => runEvents(s, runId)));
20
28
  const applySnapshot = useActivityStore((s) => s.applySnapshot);
@@ -24,6 +32,10 @@ export function RunDetail({ runId, onBack }) {
24
32
  const [rawOpen, setRawOpen] = useState(false);
25
33
  useEffect(() => {
26
34
  let active = true;
35
+ setPruned(null);
36
+ setRollup(null);
37
+ setMissing(false);
38
+ setRawOpen(false);
27
39
  api
28
40
  // Payload bodies are excluded from run detail by default; this view's
29
41
  // rows expand to them, so opt in.
@@ -54,7 +66,7 @@ export function RunDetail({ runId, onBack }) {
54
66
  return () => {
55
67
  active = false;
56
68
  };
57
- }, [runId, applySnapshot]);
69
+ }, [runId, applySnapshot, api]);
58
70
  const root = streamed.find((s) => !s.parentSpanId);
59
71
  const title = rollup?.jobName ?? rollup?.name ?? (root ? spanToolLabel(root) : runId);
60
72
  // The root carries the run's usage for backend-recorded turns; a run whose
@@ -74,7 +86,38 @@ export function RunDetail({ runId, onBack }) {
74
86
  }), { inputTokens: 0, outputTokens: 0, cacheReadTokens: 0, cacheCreationTokens: 0 });
75
87
  return formatSpanUsage({ ...children[0], usage: { ...sum, model: undefined } });
76
88
  }, [root, streamed]);
77
- return (_jsxs("div", { className: "flex h-full flex-col overflow-y-auto", children: [_jsxs("div", { className: "flex items-center gap-2 border-b border-border-subtle px-4 py-3", children: [_jsx("button", { type: "button", onClick: onBack, className: "rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-surface-raised hover:text-foreground", "aria-label": "Back", children: _jsx(ArrowLeft, { className: "h-4 w-4" }) }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("h1", { className: "truncate text-sm font-medium", children: title }), _jsx("p", { className: "truncate font-[family-name:var(--font-mono)] text-[10px] text-muted-foreground/60", children: runId })] })] }), _jsxs("div", { className: "mx-auto w-full max-w-3xl space-y-1 p-4", children: [missing && _jsx("p", { className: "text-xs text-muted-foreground", children: "Unknown run." }), rollup && (_jsxs("div", { className: "mb-2 flex flex-wrap items-center gap-x-3 gap-y-0.5 rounded-lg border border-border-subtle bg-surface px-3 py-2 text-[11px] text-muted-foreground", children: [_jsx("span", { className: "text-foreground/80", children: rollup.origin }), rollup.outcome && (_jsx("span", { className: cn(isFailureOutcome(rollup.outcome) && "text-destructive"), children: rollup.outcome })), _jsx("span", { children: formatRelativeTime(rollup.startedAt) }), rollup.durationMs !== null && _jsx("span", { children: formatDuration(rollup.durationMs) }), _jsxs("span", { children: ["list", " ", _jsx("span", { className: "font-[family-name:var(--font-mono)] text-foreground/80", children: formatEffectiveCost(rollup.costUsd) })] }), _jsxs("span", { children: ["effective", " ", _jsx("span", { className: "font-[family-name:var(--font-mono)] text-foreground/80", children: formatEffectiveCost(rollup.effectiveCostUsd, rollup.pricingEstimate, rollup.billingMode) })] }), rollup.billingMode && (_jsx("span", { children: rollup.billingMode === "api" ? "API billed" : "subscription billed" })), rollup.pricingEstimate && _jsx("span", { children: "~ estimated rates" }), totalUsage && (_jsx("span", { className: "font-[family-name:var(--font-mono)] text-foreground/80", children: totalUsage })), rollup.failureReason && (_jsx("span", { className: "w-full whitespace-pre-wrap break-words pt-1 text-destructive/80", children: rollup.failureReason }))] })), pruned && (_jsxs("div", { className: "rounded-lg border border-border-subtle bg-surface p-3 text-xs text-muted-foreground", children: ["Detail pruned \u2014 only the rollup remains.", _jsx("pre", { className: "mt-2 overflow-x-auto text-[11px]", children: JSON.stringify(pruned, null, 2) })] })), streamed.map((span) => (_jsx(DetailSpanRow, { span: span, depth: depthOf(span, streamed) }, span.spanId))), !pruned && !missing && streamed.length === 0 && (_jsx("p", { className: "text-xs text-muted-foreground", children: "No spans recorded for this run." })), streamed.length > 0 && (_jsxs("div", { className: "pt-3", children: [_jsxs("button", { type: "button", onClick: () => setRawOpen((v) => !v), className: "flex items-center gap-1 text-[11px] text-muted-foreground transition-colors hover:text-foreground", children: [_jsx(ChevronRight, { className: cn("h-3 w-3 transition-transform", rawOpen && "rotate-90") }), "Raw trace"] }), rawOpen && (_jsx("pre", { className: "mt-1 max-h-[60vh] overflow-auto rounded-lg border border-border-subtle bg-surface p-2 font-[family-name:var(--font-mono)] text-[10px] leading-relaxed text-muted-foreground", children: JSON.stringify({ runId, rollup, spans: streamed, events }, null, 2) }))] }))] })] }));
89
+ return (_jsxs("div", { className: "flex h-full flex-col overflow-y-auto", children: [_jsxs("div", { className: "flex items-center gap-2 border-b border-border-subtle px-4 py-3", children: [_jsx("button", { type: "button", onClick: onBack, className: cn("rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-surface-raised hover:text-foreground", embedded && "laptop:hidden"), "aria-label": "Back", children: _jsx(ArrowLeft, { className: "h-4 w-4" }) }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("h1", { className: "truncate text-sm font-medium", children: title }), _jsx("p", { className: "truncate font-[family-name:var(--font-mono)] text-[10px] text-muted-foreground/60", children: runId })] })] }), _jsxs("div", { className: "mx-auto w-full max-w-3xl space-y-1 p-4", children: [missing && _jsx("p", { className: "text-xs text-muted-foreground", children: "Unknown run." }), rollup && (_jsx(RunRollupReceipt, { origin: rollup.origin, outcome: rollup.outcome, when: formatRelativeTime(rollup.startedAt), duration: rollup.durationMs !== null ? formatDuration(rollup.durationMs) : null, listCost: formatEffectiveCost(rollup.costUsd), effectiveCost: formatEffectiveCost(rollup.effectiveCostUsd, rollup.pricingEstimate, rollup.billingMode), billing: rollup.billingMode ? (rollup.billingMode === "api" ? "API billed" : "subscription billed") : null, estimated: Boolean(rollup.pricingEstimate), usage: totalUsage, failureReason: rollup.failureReason })), pruned && (_jsxs("div", { className: "rounded-lg border border-border-subtle bg-surface p-3 text-xs text-muted-foreground", children: ["Detail pruned \u2014 only the rollup remains.", _jsx("pre", { className: "mt-2 overflow-x-auto text-[11px]", children: JSON.stringify(pruned, null, 2) })] })), _jsx("div", { className: cn("space-y-1", embedded && "wide:hidden"), children: streamed.map((span) => (_jsx(DetailSpanRow, { span: span, depth: depthOf(span, streamed) }, span.spanId))) }), !pruned && !missing && streamed.length === 0 && (_jsx("p", { className: "text-xs text-muted-foreground", children: "No spans recorded for this run." })), streamed.length > 0 && (_jsxs("div", { className: "pt-3", children: [_jsxs("button", { type: "button", onClick: () => setRawOpen((v) => !v), className: "flex items-center gap-1 text-[11px] text-muted-foreground transition-colors hover:text-foreground", children: [_jsx(ChevronRight, { className: cn("h-3 w-3 transition-transform", rawOpen && "rotate-90") }), "Raw trace"] }), rawOpen && (_jsx("pre", { className: "mt-1 max-h-[60vh] overflow-auto rounded-lg border border-border-subtle bg-surface p-2 font-[family-name:var(--font-mono)] text-[10px] leading-relaxed text-muted-foreground", children: JSON.stringify({ runId, rollup, spans: streamed, events }, null, 2) }))] }))] })] }));
90
+ }
91
+ /**
92
+ * The run's trace as the kit's list timeline, for the D4 evidence rail. Reads
93
+ * the store slice `RunDetail` filled — no second fetch — and stays a record:
94
+ * the rail's steps do not expand, the escape hatch for that is the detail's
95
+ * raw trace.
96
+ */
97
+ export function RunTraceSteps({ runId }) {
98
+ const streamed = useActivityStore(useShallow((s) => runSpans(s, runId)));
99
+ const steps = useMemo(() => streamed.map((span) => ({
100
+ state: traceState(span),
101
+ tool: spanToolLabel(span),
102
+ text: span.outcomeReason ?? (span.kind !== "tool" ? span.kind : undefined),
103
+ time: span.endedAt !== undefined
104
+ ? formatDuration(span.endedAt - (span.waitUntil ?? span.startedAt))
105
+ : undefined,
106
+ })), [streamed]);
107
+ if (steps.length === 0) {
108
+ return _jsx("p", { className: "text-xs text-muted-foreground/70", children: "No spans recorded for this run." });
109
+ }
110
+ return _jsx(TraceSteps, { variant: "list", steps: steps });
111
+ }
112
+ /** Same boundary `toolState` draws for the run cards: open is active, a
113
+ * failure outcome is failed and any other non-success outcome (cancelled,
114
+ * skipped) is skipped. */
115
+ function traceState(span) {
116
+ if (span.outcome === undefined || span.outcome === null)
117
+ return "active";
118
+ if (span.outcome === "success")
119
+ return "done";
120
+ return isFailureOutcome(span.outcome) ? "failed" : "skipped";
78
121
  }
79
122
  /**
80
123
  * One span tree row. EVERY span expands — a tool span to its recorded payload