@schlessera/brain-ui-react 0.35.0 → 0.37.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 (761) 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 +148 -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 +29 -0
  19. package/dist/components/activity/approval-card.d.ts.map +1 -0
  20. package/dist/components/activity/approval-card.js +73 -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 +11 -0
  39. package/dist/components/activity/span-bits.d.ts.map +1 -1
  40. package/dist/components/activity/span-bits.js +50 -7
  41. package/dist/components/activity/span-bits.js.map +1 -1
  42. package/dist/components/chat/ask-user-card.d.ts +76 -3
  43. package/dist/components/chat/ask-user-card.d.ts.map +1 -1
  44. package/dist/components/chat/ask-user-card.js +208 -149
  45. package/dist/components/chat/ask-user-card.js.map +1 -1
  46. package/dist/components/chat/ask-user-typed.d.ts +42 -0
  47. package/dist/components/chat/ask-user-typed.d.ts.map +1 -0
  48. package/dist/components/chat/ask-user-typed.js +60 -0
  49. package/dist/components/chat/ask-user-typed.js.map +1 -0
  50. package/dist/components/chat/brain-markdown-links.d.ts +2 -1
  51. package/dist/components/chat/brain-markdown-links.d.ts.map +1 -1
  52. package/dist/components/chat/brain-markdown-links.js +3 -4
  53. package/dist/components/chat/brain-markdown-links.js.map +1 -1
  54. package/dist/components/chat/brain-markdown.d.ts.map +1 -1
  55. package/dist/components/chat/brain-markdown.js +4 -2
  56. package/dist/components/chat/brain-markdown.js.map +1 -1
  57. package/dist/components/chat/chat-page.d.ts.map +1 -1
  58. package/dist/components/chat/chat-page.js +27 -11
  59. package/dist/components/chat/chat-page.js.map +1 -1
  60. package/dist/components/chat/composer-view.d.ts +75 -0
  61. package/dist/components/chat/composer-view.d.ts.map +1 -0
  62. package/dist/components/chat/composer-view.js +31 -0
  63. package/dist/components/chat/composer-view.js.map +1 -0
  64. package/dist/components/chat/composer.d.ts +4 -0
  65. package/dist/components/chat/composer.d.ts.map +1 -1
  66. package/dist/components/chat/composer.js +76 -59
  67. package/dist/components/chat/composer.js.map +1 -1
  68. package/dist/components/chat/markdown-content.d.ts +16 -1
  69. package/dist/components/chat/markdown-content.d.ts.map +1 -1
  70. package/dist/components/chat/markdown-content.js +47 -3
  71. package/dist/components/chat/markdown-content.js.map +1 -1
  72. package/dist/components/chat/mermaid-block.d.ts +4 -0
  73. package/dist/components/chat/mermaid-block.d.ts.map +1 -1
  74. package/dist/components/chat/mermaid-block.js +13 -5
  75. package/dist/components/chat/mermaid-block.js.map +1 -1
  76. package/dist/components/chat/mermaid-share.d.ts +2 -1
  77. package/dist/components/chat/mermaid-share.d.ts.map +1 -1
  78. package/dist/components/chat/mermaid-share.js +7 -8
  79. package/dist/components/chat/mermaid-share.js.map +1 -1
  80. package/dist/components/chat/mermaid-viewer.d.ts.map +1 -1
  81. package/dist/components/chat/mermaid-viewer.js +3 -1
  82. package/dist/components/chat/mermaid-viewer.js.map +1 -1
  83. package/dist/components/chat/message-bubble.d.ts +8 -1
  84. package/dist/components/chat/message-bubble.d.ts.map +1 -1
  85. package/dist/components/chat/message-bubble.js +53 -24
  86. package/dist/components/chat/message-bubble.js.map +1 -1
  87. package/dist/components/chat/message-share.d.ts +2 -1
  88. package/dist/components/chat/message-share.d.ts.map +1 -1
  89. package/dist/components/chat/message-share.js +6 -7
  90. package/dist/components/chat/message-share.js.map +1 -1
  91. package/dist/components/chat/renderers/bind.d.ts +39 -0
  92. package/dist/components/chat/renderers/bind.d.ts.map +1 -0
  93. package/dist/components/chat/renderers/bind.js +43 -0
  94. package/dist/components/chat/renderers/bind.js.map +1 -0
  95. package/dist/components/chat/renderers/brain-ui-tools.d.ts +3 -0
  96. package/dist/components/chat/renderers/brain-ui-tools.d.ts.map +1 -0
  97. package/dist/components/chat/renderers/brain-ui-tools.js +41 -0
  98. package/dist/components/chat/renderers/brain-ui-tools.js.map +1 -0
  99. package/dist/components/chat/renderers/claude-tools.d.ts.map +1 -1
  100. package/dist/components/chat/renderers/claude-tools.js +3 -2
  101. package/dist/components/chat/renderers/claude-tools.js.map +1 -1
  102. package/dist/components/chat/renderers/index.d.ts +10 -2
  103. package/dist/components/chat/renderers/index.d.ts.map +1 -1
  104. package/dist/components/chat/renderers/index.js +15 -10
  105. package/dist/components/chat/renderers/index.js.map +1 -1
  106. package/dist/components/chat/session-drawer.d.ts +4 -0
  107. package/dist/components/chat/session-drawer.d.ts.map +1 -1
  108. package/dist/components/chat/session-drawer.js +32 -32
  109. package/dist/components/chat/session-drawer.js.map +1 -1
  110. package/dist/components/chat/session-list.d.ts +41 -0
  111. package/dist/components/chat/session-list.d.ts.map +1 -0
  112. package/dist/components/chat/session-list.js +10 -0
  113. package/dist/components/chat/session-list.js.map +1 -0
  114. package/dist/components/chat/share-block.d.ts.map +1 -1
  115. package/dist/components/chat/share-block.js +12 -11
  116. package/dist/components/chat/share-block.js.map +1 -1
  117. package/dist/components/chat/share-card.js +2 -2
  118. package/dist/components/chat/share-card.js.map +1 -1
  119. package/dist/components/chat/subagent-view.js +1 -1
  120. package/dist/components/chat/subagent-view.js.map +1 -1
  121. package/dist/components/chat/tool-call-timeline.d.ts.map +1 -1
  122. package/dist/components/chat/tool-call-timeline.js +45 -14
  123. package/dist/components/chat/tool-call-timeline.js.map +1 -1
  124. package/dist/components/chat/tool-cards/block-card.d.ts +28 -0
  125. package/dist/components/chat/tool-cards/block-card.d.ts.map +1 -0
  126. package/dist/components/chat/tool-cards/block-card.js +103 -0
  127. package/dist/components/chat/tool-cards/block-card.js.map +1 -0
  128. package/dist/components/chat/tool-cards/image-mask-card.d.ts +70 -0
  129. package/dist/components/chat/tool-cards/image-mask-card.d.ts.map +1 -0
  130. package/dist/components/chat/tool-cards/image-mask-card.js +142 -0
  131. package/dist/components/chat/tool-cards/image-mask-card.js.map +1 -0
  132. package/dist/components/chat/tool-cards/location-card.d.ts +45 -0
  133. package/dist/components/chat/tool-cards/location-card.d.ts.map +1 -0
  134. package/dist/components/chat/tool-cards/location-card.js +128 -0
  135. package/dist/components/chat/tool-cards/location-card.js.map +1 -0
  136. package/dist/components/chat/tool-views.d.ts +19 -2
  137. package/dist/components/chat/tool-views.d.ts.map +1 -1
  138. package/dist/components/chat/tool-views.js +28 -22
  139. package/dist/components/chat/tool-views.js.map +1 -1
  140. package/dist/components/chat/transcript-turn.d.ts +45 -0
  141. package/dist/components/chat/transcript-turn.d.ts.map +1 -0
  142. package/dist/components/chat/transcript-turn.js +25 -0
  143. package/dist/components/chat/transcript-turn.js.map +1 -0
  144. package/dist/components/chat/use-chat-commands.d.ts.map +1 -1
  145. package/dist/components/chat/use-chat-commands.js +13 -16
  146. package/dist/components/chat/use-chat-commands.js.map +1 -1
  147. package/dist/components/chat/welcome-state.d.ts +7 -0
  148. package/dist/components/chat/welcome-state.d.ts.map +1 -1
  149. package/dist/components/chat/welcome-state.js +13 -5
  150. package/dist/components/chat/welcome-state.js.map +1 -1
  151. package/dist/components/connectivity/connection-gate.d.ts.map +1 -1
  152. package/dist/components/connectivity/connection-gate.js +27 -21
  153. package/dist/components/connectivity/connection-gate.js.map +1 -1
  154. package/dist/components/connectivity/login-form.d.ts +31 -0
  155. package/dist/components/connectivity/login-form.d.ts.map +1 -0
  156. package/dist/components/connectivity/login-form.js +19 -0
  157. package/dist/components/connectivity/login-form.js.map +1 -0
  158. package/dist/components/connectivity/login-screen.d.ts +5 -2
  159. package/dist/components/connectivity/login-screen.d.ts.map +1 -1
  160. package/dist/components/connectivity/login-screen.js +41 -31
  161. package/dist/components/connectivity/login-screen.js.map +1 -1
  162. package/dist/components/dev/share-harness.js +1 -1
  163. package/dist/components/dev/share-harness.js.map +1 -1
  164. package/dist/components/files/file-panel.d.ts +1 -1
  165. package/dist/components/files/file-panel.d.ts.map +1 -1
  166. package/dist/components/files/file-panel.js +74 -0
  167. package/dist/components/files/file-panel.js.map +1 -1
  168. package/dist/components/files/file-tree-view.d.ts +45 -0
  169. package/dist/components/files/file-tree-view.d.ts.map +1 -0
  170. package/dist/components/files/file-tree-view.js +51 -0
  171. package/dist/components/files/file-tree-view.js.map +1 -0
  172. package/dist/components/files/file-tree.d.ts +6 -0
  173. package/dist/components/files/file-tree.d.ts.map +1 -1
  174. package/dist/components/files/file-tree.js +39 -43
  175. package/dist/components/files/file-tree.js.map +1 -1
  176. package/dist/components/files/file-viewer-binary.d.ts.map +1 -1
  177. package/dist/components/files/file-viewer-binary.js +3 -2
  178. package/dist/components/files/file-viewer-binary.js.map +1 -1
  179. package/dist/components/files/file-viewer-frame.d.ts +36 -0
  180. package/dist/components/files/file-viewer-frame.d.ts.map +1 -0
  181. package/dist/components/files/file-viewer-frame.js +26 -0
  182. package/dist/components/files/file-viewer-frame.js.map +1 -0
  183. package/dist/components/files/file-viewer.d.ts +5 -0
  184. package/dist/components/files/file-viewer.d.ts.map +1 -1
  185. package/dist/components/files/file-viewer.js +26 -32
  186. package/dist/components/files/file-viewer.js.map +1 -1
  187. package/dist/components/files/frontmatter-chips.d.ts +18 -0
  188. package/dist/components/files/frontmatter-chips.d.ts.map +1 -0
  189. package/dist/components/files/frontmatter-chips.js +11 -0
  190. package/dist/components/files/frontmatter-chips.js.map +1 -0
  191. package/dist/components/files/frontmatter-panel.d.ts +5 -1
  192. package/dist/components/files/frontmatter-panel.d.ts.map +1 -1
  193. package/dist/components/files/frontmatter-panel.js +7 -6
  194. package/dist/components/files/frontmatter-panel.js.map +1 -1
  195. package/dist/components/files/staleness.d.ts +18 -0
  196. package/dist/components/files/staleness.d.ts.map +1 -0
  197. package/dist/components/files/staleness.js +27 -0
  198. package/dist/components/files/staleness.js.map +1 -0
  199. package/dist/components/graph/graph-canvas.d.ts.map +1 -1
  200. package/dist/components/graph/graph-canvas.js +24 -1
  201. package/dist/components/graph/graph-canvas.js.map +1 -1
  202. package/dist/components/graph/graph-controls-column.d.ts +14 -0
  203. package/dist/components/graph/graph-controls-column.d.ts.map +1 -0
  204. package/dist/components/graph/graph-controls-column.js +44 -0
  205. package/dist/components/graph/graph-controls-column.js.map +1 -0
  206. package/dist/components/graph/graph-controls.d.ts +20 -5
  207. package/dist/components/graph/graph-controls.d.ts.map +1 -1
  208. package/dist/components/graph/graph-controls.js +58 -37
  209. package/dist/components/graph/graph-controls.js.map +1 -1
  210. package/dist/components/graph/graph-form.d.ts +82 -0
  211. package/dist/components/graph/graph-form.d.ts.map +1 -0
  212. package/dist/components/graph/graph-form.js +69 -0
  213. package/dist/components/graph/graph-form.js.map +1 -0
  214. package/dist/components/graph/graph-maintenance.d.ts.map +1 -1
  215. package/dist/components/graph/graph-maintenance.js +6 -10
  216. package/dist/components/graph/graph-maintenance.js.map +1 -1
  217. package/dist/components/graph/graph-node-rail.d.ts +13 -0
  218. package/dist/components/graph/graph-node-rail.d.ts.map +1 -0
  219. package/dist/components/graph/graph-node-rail.js +92 -0
  220. package/dist/components/graph/graph-node-rail.js.map +1 -0
  221. package/dist/components/graph/graph-page.d.ts +7 -0
  222. package/dist/components/graph/graph-page.d.ts.map +1 -1
  223. package/dist/components/graph/graph-page.js +102 -12
  224. package/dist/components/graph/graph-page.js.map +1 -1
  225. package/dist/components/graph/graph-scene.d.ts.map +1 -1
  226. package/dist/components/graph/graph-scene.js +100 -24
  227. package/dist/components/graph/graph-scene.js.map +1 -1
  228. package/dist/components/graph/lib/graph-helpers.d.ts +42 -12
  229. package/dist/components/graph/lib/graph-helpers.d.ts.map +1 -1
  230. package/dist/components/graph/lib/graph-helpers.js +33 -41
  231. package/dist/components/graph/lib/graph-helpers.js.map +1 -1
  232. package/dist/components/graph/node-card.d.ts +28 -0
  233. package/dist/components/graph/node-card.d.ts.map +1 -0
  234. package/dist/components/graph/node-card.js +7 -0
  235. package/dist/components/graph/node-card.js.map +1 -0
  236. package/dist/components/graph/node-popover.d.ts +6 -2
  237. package/dist/components/graph/node-popover.d.ts.map +1 -1
  238. package/dist/components/graph/node-popover.js +13 -31
  239. package/dist/components/graph/node-popover.js.map +1 -1
  240. package/dist/components/graph/use-graph-theme.d.ts +32 -4
  241. package/dist/components/graph/use-graph-theme.d.ts.map +1 -1
  242. package/dist/components/graph/use-graph-theme.js +44 -32
  243. package/dist/components/graph/use-graph-theme.js.map +1 -1
  244. package/dist/components/graph/use-node-actions.d.ts +26 -0
  245. package/dist/components/graph/use-node-actions.d.ts.map +1 -0
  246. package/dist/components/graph/use-node-actions.js +54 -0
  247. package/dist/components/graph/use-node-actions.js.map +1 -0
  248. package/dist/components/images/image-share.d.ts +2 -1
  249. package/dist/components/images/image-share.d.ts.map +1 -1
  250. package/dist/components/images/image-share.js +3 -3
  251. package/dist/components/images/image-share.js.map +1 -1
  252. package/dist/components/images/image-viewer.d.ts.map +1 -1
  253. package/dist/components/images/image-viewer.js +3 -1
  254. package/dist/components/images/image-viewer.js.map +1 -1
  255. package/dist/components/images/mask-editor.d.ts.map +1 -1
  256. package/dist/components/images/mask-editor.js +7 -5
  257. package/dist/components/images/mask-editor.js.map +1 -1
  258. package/dist/components/layout/app-shell.d.ts.map +1 -1
  259. package/dist/components/layout/app-shell.js +4 -1
  260. package/dist/components/layout/app-shell.js.map +1 -1
  261. package/dist/components/layout/desktop-palette.d.ts +23 -0
  262. package/dist/components/layout/desktop-palette.d.ts.map +1 -0
  263. package/dist/components/layout/desktop-palette.js +132 -0
  264. package/dist/components/layout/desktop-palette.js.map +1 -0
  265. package/dist/components/layout/key-cap.d.ts +9 -0
  266. package/dist/components/layout/key-cap.d.ts.map +1 -0
  267. package/dist/components/layout/key-cap.js +10 -0
  268. package/dist/components/layout/key-cap.js.map +1 -0
  269. package/dist/components/layout/mobile-tab-bar.d.ts +13 -0
  270. package/dist/components/layout/mobile-tab-bar.d.ts.map +1 -1
  271. package/dist/components/layout/mobile-tab-bar.js +58 -47
  272. package/dist/components/layout/mobile-tab-bar.js.map +1 -1
  273. package/dist/components/layout/shortcut-switch.d.ts +13 -0
  274. package/dist/components/layout/shortcut-switch.d.ts.map +1 -0
  275. package/dist/components/layout/shortcut-switch.js +22 -0
  276. package/dist/components/layout/shortcut-switch.js.map +1 -0
  277. package/dist/components/layout/side-rail.d.ts +28 -0
  278. package/dist/components/layout/side-rail.d.ts.map +1 -1
  279. package/dist/components/layout/side-rail.js +72 -27
  280. package/dist/components/layout/side-rail.js.map +1 -1
  281. package/dist/components/layout/slide-panel.d.ts +25 -2
  282. package/dist/components/layout/slide-panel.d.ts.map +1 -1
  283. package/dist/components/layout/slide-panel.js +13 -4
  284. package/dist/components/layout/slide-panel.js.map +1 -1
  285. package/dist/components/layout/theme.d.ts +22 -0
  286. package/dist/components/layout/theme.d.ts.map +1 -0
  287. package/dist/components/layout/theme.js +44 -0
  288. package/dist/components/layout/theme.js.map +1 -0
  289. package/dist/components/quick-actions/add-form.d.ts +44 -0
  290. package/dist/components/quick-actions/add-form.d.ts.map +1 -0
  291. package/dist/components/quick-actions/add-form.js +32 -0
  292. package/dist/components/quick-actions/add-form.js.map +1 -0
  293. package/dist/components/quick-actions/add-modal.d.ts +7 -0
  294. package/dist/components/quick-actions/add-modal.d.ts.map +1 -1
  295. package/dist/components/quick-actions/add-modal.js +23 -20
  296. package/dist/components/quick-actions/add-modal.js.map +1 -1
  297. package/dist/components/quick-actions/search-modal.d.ts.map +1 -1
  298. package/dist/components/quick-actions/search-modal.js +8 -5
  299. package/dist/components/quick-actions/search-modal.js.map +1 -1
  300. package/dist/components/quick-actions/streaming-modal.d.ts +6 -0
  301. package/dist/components/quick-actions/streaming-modal.d.ts.map +1 -1
  302. package/dist/components/quick-actions/streaming-modal.js +53 -18
  303. package/dist/components/quick-actions/streaming-modal.js.map +1 -1
  304. package/dist/components/quick-actions/streaming-output.d.ts +38 -0
  305. package/dist/components/quick-actions/streaming-output.d.ts.map +1 -0
  306. package/dist/components/quick-actions/streaming-output.js +22 -0
  307. package/dist/components/quick-actions/streaming-output.js.map +1 -0
  308. package/dist/components/quick-actions/whatsup-modal.d.ts +5 -0
  309. package/dist/components/quick-actions/whatsup-modal.d.ts.map +1 -1
  310. package/dist/components/quick-actions/whatsup-modal.js +51 -10
  311. package/dist/components/quick-actions/whatsup-modal.js.map +1 -1
  312. package/dist/components/settings/devices-agents-tab.d.ts +6 -1
  313. package/dist/components/settings/devices-agents-tab.d.ts.map +1 -1
  314. package/dist/components/settings/devices-agents-tab.js +55 -20
  315. package/dist/components/settings/devices-agents-tab.js.map +1 -1
  316. package/dist/components/settings/models-list.d.ts +39 -0
  317. package/dist/components/settings/models-list.d.ts.map +1 -0
  318. package/dist/components/settings/models-list.js +72 -0
  319. package/dist/components/settings/models-list.js.map +1 -0
  320. package/dist/components/settings/models-tab.d.ts +4 -0
  321. package/dist/components/settings/models-tab.d.ts.map +1 -1
  322. package/dist/components/settings/models-tab.js +52 -102
  323. package/dist/components/settings/models-tab.js.map +1 -1
  324. package/dist/components/settings/one-time-agent-credential.js +1 -1
  325. package/dist/components/settings/one-time-agent-credential.js.map +1 -1
  326. package/dist/components/settings/passkey-list.d.ts +35 -0
  327. package/dist/components/settings/passkey-list.d.ts.map +1 -0
  328. package/dist/components/settings/passkey-list.js +34 -0
  329. package/dist/components/settings/passkey-list.js.map +1 -0
  330. package/dist/components/settings/passkey-tab.d.ts +3 -0
  331. package/dist/components/settings/passkey-tab.d.ts.map +1 -1
  332. package/dist/components/settings/passkey-tab.js +53 -45
  333. package/dist/components/settings/passkey-tab.js.map +1 -1
  334. package/dist/components/settings/pi-accounts-list.d.ts +27 -0
  335. package/dist/components/settings/pi-accounts-list.d.ts.map +1 -0
  336. package/dist/components/settings/pi-accounts-list.js +15 -0
  337. package/dist/components/settings/pi-accounts-list.js.map +1 -0
  338. package/dist/components/settings/pi-accounts.d.ts +3 -0
  339. package/dist/components/settings/pi-accounts.d.ts.map +1 -1
  340. package/dist/components/settings/pi-accounts.js +73 -55
  341. package/dist/components/settings/pi-accounts.js.map +1 -1
  342. package/dist/components/settings/principal-list.d.ts +37 -0
  343. package/dist/components/settings/principal-list.d.ts.map +1 -0
  344. package/dist/components/settings/principal-list.js +18 -0
  345. package/dist/components/settings/principal-list.js.map +1 -0
  346. package/dist/components/settings/settings-panel.d.ts +10 -3
  347. package/dist/components/settings/settings-panel.d.ts.map +1 -1
  348. package/dist/components/settings/settings-panel.js +71 -10
  349. package/dist/components/settings/settings-panel.js.map +1 -1
  350. package/dist/components/settings/skills-list.d.ts +53 -0
  351. package/dist/components/settings/skills-list.d.ts.map +1 -0
  352. package/dist/components/settings/skills-list.js +28 -0
  353. package/dist/components/settings/skills-list.js.map +1 -0
  354. package/dist/components/settings/skills-tab.d.ts.map +1 -1
  355. package/dist/components/settings/skills-tab.js +65 -38
  356. package/dist/components/settings/skills-tab.js.map +1 -1
  357. package/dist/components/settings/tool-permissions-list.d.ts +18 -0
  358. package/dist/components/settings/tool-permissions-list.d.ts.map +1 -0
  359. package/dist/components/settings/tool-permissions-list.js +6 -0
  360. package/dist/components/settings/tool-permissions-list.js.map +1 -0
  361. package/dist/components/settings/tool-permissions.d.ts +2 -1
  362. package/dist/components/settings/tool-permissions.d.ts.map +1 -1
  363. package/dist/components/settings/tool-permissions.js +33 -16
  364. package/dist/components/settings/tool-permissions.js.map +1 -1
  365. package/dist/components/settings/web-search-chain.d.ts +41 -0
  366. package/dist/components/settings/web-search-chain.d.ts.map +1 -0
  367. package/dist/components/settings/web-search-chain.js +47 -0
  368. package/dist/components/settings/web-search-chain.js.map +1 -0
  369. package/dist/components/settings/web-search-settings.d.ts +4 -7
  370. package/dist/components/settings/web-search-settings.d.ts.map +1 -1
  371. package/dist/components/settings/web-search-settings.js +54 -76
  372. package/dist/components/settings/web-search-settings.js.map +1 -1
  373. package/dist/components/share/share-menu.d.ts.map +1 -1
  374. package/dist/components/share/share-menu.js +24 -4
  375. package/dist/components/share/share-menu.js.map +1 -1
  376. package/dist/components/voice/dictation-sheet.js +3 -3
  377. package/dist/components/voice/dictation-sheet.js.map +1 -1
  378. package/dist/components/voice/mic-button.js +1 -1
  379. package/dist/components/voice/mic-button.js.map +1 -1
  380. package/dist/components/voice/review-card.js +1 -1
  381. package/dist/components/voice/review-card.js.map +1 -1
  382. package/dist/config.d.ts +5 -2
  383. package/dist/config.d.ts.map +1 -1
  384. package/dist/config.js +15 -5
  385. package/dist/config.js.map +1 -1
  386. package/dist/connection.d.ts +12 -0
  387. package/dist/connection.d.ts.map +1 -0
  388. package/dist/connection.js +421 -0
  389. package/dist/connection.js.map +1 -0
  390. package/dist/default-root.d.ts +3 -0
  391. package/dist/default-root.d.ts.map +1 -0
  392. package/dist/default-root.js +16 -0
  393. package/dist/default-root.js.map +1 -0
  394. package/dist/hooks/use-color-scheme.d.ts +14 -0
  395. package/dist/hooks/use-color-scheme.d.ts.map +1 -0
  396. package/dist/hooks/use-color-scheme.js +37 -0
  397. package/dist/hooks/use-color-scheme.js.map +1 -0
  398. package/dist/hooks/use-fine-pointer.d.ts +12 -0
  399. package/dist/hooks/use-fine-pointer.d.ts.map +1 -0
  400. package/dist/hooks/use-fine-pointer.js +15 -0
  401. package/dist/hooks/use-fine-pointer.js.map +1 -0
  402. package/dist/hooks/use-hash-routes.d.ts.map +1 -1
  403. package/dist/hooks/use-hash-routes.js +4 -2
  404. package/dist/hooks/use-hash-routes.js.map +1 -1
  405. package/dist/hooks/use-media-query.d.ts +9 -0
  406. package/dist/hooks/use-media-query.d.ts.map +1 -0
  407. package/dist/hooks/use-media-query.js +38 -0
  408. package/dist/hooks/use-media-query.js.map +1 -0
  409. package/dist/hooks/use-share-intake.d.ts.map +1 -1
  410. package/dist/hooks/use-share-intake.js +37 -12
  411. package/dist/hooks/use-share-intake.js.map +1 -1
  412. package/dist/hooks/use-vpn-status.d.ts.map +1 -1
  413. package/dist/hooks/use-vpn-status.js +17 -18
  414. package/dist/hooks/use-vpn-status.js.map +1 -1
  415. package/dist/hooks/use-websocket.d.ts +5 -24
  416. package/dist/hooks/use-websocket.d.ts.map +1 -1
  417. package/dist/hooks/use-websocket.js +11 -384
  418. package/dist/hooks/use-websocket.js.map +1 -1
  419. package/dist/hooks/websocket-handlers/activity.d.ts +2 -2
  420. package/dist/hooks/websocket-handlers/activity.d.ts.map +1 -1
  421. package/dist/hooks/websocket-handlers/activity.js +4 -5
  422. package/dist/hooks/websocket-handlers/activity.js.map +1 -1
  423. package/dist/hooks/websocket-handlers/chat.d.ts +1 -0
  424. package/dist/hooks/websocket-handlers/chat.d.ts.map +1 -1
  425. package/dist/hooks/websocket-handlers/chat.js +28 -6
  426. package/dist/hooks/websocket-handlers/chat.js.map +1 -1
  427. package/dist/hooks/websocket-handlers/connection.d.ts.map +1 -1
  428. package/dist/hooks/websocket-handlers/connection.js +4 -6
  429. package/dist/hooks/websocket-handlers/connection.js.map +1 -1
  430. package/dist/hooks/websocket-handlers/mask.d.ts +1 -1
  431. package/dist/hooks/websocket-handlers/mask.d.ts.map +1 -1
  432. package/dist/hooks/websocket-handlers/mask.js +2 -3
  433. package/dist/hooks/websocket-handlers/mask.js.map +1 -1
  434. package/dist/hooks/websocket-handlers/provider.d.ts.map +1 -1
  435. package/dist/hooks/websocket-handlers/provider.js +4 -6
  436. package/dist/hooks/websocket-handlers/provider.js.map +1 -1
  437. package/dist/hooks/websocket-handlers/types.d.ts +6 -2
  438. package/dist/hooks/websocket-handlers/types.d.ts.map +1 -1
  439. package/dist/index.d.ts +5 -3
  440. package/dist/index.d.ts.map +1 -1
  441. package/dist/index.js +6 -3
  442. package/dist/index.js.map +1 -1
  443. package/dist/lib/api-client.d.ts +289 -0
  444. package/dist/lib/api-client.d.ts.map +1 -1
  445. package/dist/lib/api-client.js +243 -224
  446. package/dist/lib/api-client.js.map +1 -1
  447. package/dist/lib/backend.d.ts +19 -2
  448. package/dist/lib/backend.d.ts.map +1 -1
  449. package/dist/lib/backend.js +15 -9
  450. package/dist/lib/backend.js.map +1 -1
  451. package/dist/lib/diff.d.ts +8 -10
  452. package/dist/lib/diff.d.ts.map +1 -1
  453. package/dist/lib/diff.js +26 -53
  454. package/dist/lib/diff.js.map +1 -1
  455. package/dist/lib/light-dark.d.ts +37 -0
  456. package/dist/lib/light-dark.d.ts.map +1 -0
  457. package/dist/lib/light-dark.js +83 -0
  458. package/dist/lib/light-dark.js.map +1 -0
  459. package/dist/lib/mermaid-theme.d.ts +7 -2
  460. package/dist/lib/mermaid-theme.d.ts.map +1 -1
  461. package/dist/lib/mermaid-theme.js +125 -203
  462. package/dist/lib/mermaid-theme.js.map +1 -1
  463. package/dist/lib/passkeys.d.ts +6 -3
  464. package/dist/lib/passkeys.d.ts.map +1 -1
  465. package/dist/lib/passkeys.js +10 -4
  466. package/dist/lib/passkeys.js.map +1 -1
  467. package/dist/lib/push-registration.d.ts +4 -1
  468. package/dist/lib/push-registration.d.ts.map +1 -1
  469. package/dist/lib/push-registration.js +20 -2
  470. package/dist/lib/push-registration.js.map +1 -1
  471. package/dist/lib/share-intake.d.ts +2 -1
  472. package/dist/lib/share-intake.d.ts.map +1 -1
  473. package/dist/lib/share-intake.js +3 -3
  474. package/dist/lib/share-intake.js.map +1 -1
  475. package/dist/lib/share.d.ts +4 -3
  476. package/dist/lib/share.d.ts.map +1 -1
  477. package/dist/lib/share.js +6 -7
  478. package/dist/lib/share.js.map +1 -1
  479. package/dist/lib/single-key.d.ts +30 -0
  480. package/dist/lib/single-key.d.ts.map +1 -0
  481. package/dist/lib/single-key.js +45 -0
  482. package/dist/lib/single-key.js.map +1 -0
  483. package/dist/lib/tool-names.d.ts +8 -6
  484. package/dist/lib/tool-names.d.ts.map +1 -1
  485. package/dist/lib/tool-names.js +17 -7
  486. package/dist/lib/tool-names.js.map +1 -1
  487. package/dist/root-context.d.ts +229 -0
  488. package/dist/root-context.d.ts.map +1 -0
  489. package/dist/root-context.js +33 -0
  490. package/dist/root-context.js.map +1 -0
  491. package/dist/root.d.ts +38 -0
  492. package/dist/root.d.ts.map +1 -0
  493. package/dist/root.js +47 -0
  494. package/dist/root.js.map +1 -0
  495. package/dist/stores/activity-state.d.ts +29 -0
  496. package/dist/stores/activity-state.d.ts.map +1 -0
  497. package/dist/stores/activity-state.js +282 -0
  498. package/dist/stores/activity-state.js.map +1 -0
  499. package/dist/stores/activity-store.d.ts +10 -41
  500. package/dist/stores/activity-store.d.ts.map +1 -1
  501. package/dist/stores/activity-store.js +9 -271
  502. package/dist/stores/activity-store.js.map +1 -1
  503. package/dist/stores/chat-state.d.ts +233 -0
  504. package/dist/stores/chat-state.d.ts.map +1 -0
  505. package/dist/stores/chat-state.js +477 -0
  506. package/dist/stores/chat-state.js.map +1 -0
  507. package/dist/stores/chat-store.d.ts +4 -162
  508. package/dist/stores/chat-store.d.ts.map +1 -1
  509. package/dist/stores/chat-store.js +7 -418
  510. package/dist/stores/chat-store.js.map +1 -1
  511. package/dist/stores/connection-state.d.ts +40 -0
  512. package/dist/stores/connection-state.d.ts.map +1 -0
  513. package/dist/stores/connection-state.js +30 -0
  514. package/dist/stores/connection-state.js.map +1 -0
  515. package/dist/stores/connection-store.d.ts +4 -40
  516. package/dist/stores/connection-store.d.ts.map +1 -1
  517. package/dist/stores/connection-store.js +7 -27
  518. package/dist/stores/connection-store.js.map +1 -1
  519. package/dist/stores/create-stores.d.ts +23 -0
  520. package/dist/stores/create-stores.d.ts.map +1 -0
  521. package/dist/stores/create-stores.js +28 -0
  522. package/dist/stores/create-stores.js.map +1 -0
  523. package/dist/stores/file-state.d.ts +53 -0
  524. package/dist/stores/file-state.d.ts.map +1 -0
  525. package/dist/stores/file-state.js +341 -0
  526. package/dist/stores/file-state.js.map +1 -0
  527. package/dist/stores/file-store.d.ts +4 -52
  528. package/dist/stores/file-store.d.ts.map +1 -1
  529. package/dist/stores/file-store.js +7 -336
  530. package/dist/stores/file-store.js.map +1 -1
  531. package/dist/stores/graph-state.d.ts +95 -0
  532. package/dist/stores/graph-state.d.ts.map +1 -0
  533. package/dist/stores/graph-state.js +252 -0
  534. package/dist/stores/graph-state.js.map +1 -0
  535. package/dist/stores/graph-store.d.ts +7 -83
  536. package/dist/stores/graph-store.d.ts.map +1 -1
  537. package/dist/stores/graph-store.js +8 -249
  538. package/dist/stores/graph-store.js.map +1 -1
  539. package/dist/stores/mask-state.d.ts +21 -0
  540. package/dist/stores/mask-state.d.ts.map +1 -0
  541. package/dist/stores/mask-state.js +9 -0
  542. package/dist/stores/mask-state.js.map +1 -0
  543. package/dist/stores/mask-store.d.ts +4 -21
  544. package/dist/stores/mask-store.d.ts.map +1 -1
  545. package/dist/stores/mask-store.js +7 -6
  546. package/dist/stores/mask-store.js.map +1 -1
  547. package/dist/stores/principal-state.d.ts +16 -0
  548. package/dist/stores/principal-state.d.ts.map +1 -0
  549. package/dist/stores/principal-state.js +31 -0
  550. package/dist/stores/principal-state.js.map +1 -0
  551. package/dist/stores/principal-store.d.ts +4 -15
  552. package/dist/stores/principal-store.d.ts.map +1 -1
  553. package/dist/stores/principal-store.js +7 -28
  554. package/dist/stores/principal-store.js.map +1 -1
  555. package/dist/stores/provider-state.d.ts +24 -0
  556. package/dist/stores/provider-state.d.ts.map +1 -0
  557. package/dist/stores/provider-state.js +68 -0
  558. package/dist/stores/provider-state.js.map +1 -0
  559. package/dist/stores/provider-store.d.ts +4 -23
  560. package/dist/stores/provider-store.d.ts.map +1 -1
  561. package/dist/stores/provider-store.js +7 -64
  562. package/dist/stores/provider-store.js.map +1 -1
  563. package/dist/stores/share-state.d.ts +29 -0
  564. package/dist/stores/share-state.d.ts.map +1 -0
  565. package/dist/stores/share-state.js +21 -0
  566. package/dist/stores/share-state.js.map +1 -0
  567. package/dist/stores/share-store.d.ts +4 -28
  568. package/dist/stores/share-store.d.ts.map +1 -1
  569. package/dist/stores/share-store.js +7 -18
  570. package/dist/stores/share-store.js.map +1 -1
  571. package/dist/stores/store-environment.d.ts +10 -0
  572. package/dist/stores/store-environment.d.ts.map +1 -0
  573. package/dist/stores/store-environment.js +2 -0
  574. package/dist/stores/store-environment.js.map +1 -0
  575. package/dist/stores/ui-state.d.ts +71 -0
  576. package/dist/stores/ui-state.d.ts.map +1 -0
  577. package/dist/stores/ui-state.js +58 -0
  578. package/dist/stores/ui-state.js.map +1 -0
  579. package/dist/stores/ui-store.d.ts +4 -45
  580. package/dist/stores/ui-store.d.ts.map +1 -1
  581. package/dist/stores/ui-store.js +7 -36
  582. package/dist/stores/ui-store.js.map +1 -1
  583. package/dist/styles.css +1 -1
  584. package/dist/theme.css +150 -97
  585. package/dist/voice/asr-clients.d.ts +2 -1
  586. package/dist/voice/asr-clients.d.ts.map +1 -1
  587. package/dist/voice/asr-clients.js +16 -17
  588. package/dist/voice/asr-clients.js.map +1 -1
  589. package/dist/voice/use-dictation.d.ts.map +1 -1
  590. package/dist/voice/use-dictation.js +12 -8
  591. package/dist/voice/use-dictation.js.map +1 -1
  592. package/dist/voice/voice-state.d.ts +25 -0
  593. package/dist/voice/voice-state.d.ts.map +1 -0
  594. package/dist/voice/voice-state.js +29 -0
  595. package/dist/voice/voice-state.js.map +1 -0
  596. package/dist/voice/voice-store.d.ts +4 -25
  597. package/dist/voice/voice-store.d.ts.map +1 -1
  598. package/dist/voice/voice-store.js +7 -26
  599. package/dist/voice/voice-store.js.map +1 -1
  600. package/package.json +3 -2
  601. package/src/components/activity/activity-page.tsx +341 -160
  602. package/src/components/activity/activity-run-detail.tsx +81 -47
  603. package/src/components/activity/activity-run-list.tsx +27 -59
  604. package/src/components/activity/activity-views.tsx +155 -0
  605. package/src/components/activity/approval-card.tsx +117 -0
  606. package/src/components/activity/digest-card.tsx +25 -61
  607. package/src/components/activity/digest-summary.tsx +52 -0
  608. package/src/components/activity/push-switch.tsx +62 -0
  609. package/src/components/activity/push-toggle.tsx +51 -81
  610. package/src/components/activity/span-bits.tsx +60 -7
  611. package/src/components/chat/ask-user-card.tsx +292 -356
  612. package/src/components/chat/ask-user-typed.ts +77 -0
  613. package/src/components/chat/brain-markdown-links.tsx +4 -4
  614. package/src/components/chat/brain-markdown.tsx +4 -2
  615. package/src/components/chat/chat-page.tsx +41 -11
  616. package/src/components/chat/composer-view.tsx +194 -0
  617. package/src/components/chat/composer.tsx +117 -296
  618. package/src/components/chat/markdown-content.tsx +53 -2
  619. package/src/components/chat/mermaid-block.tsx +13 -5
  620. package/src/components/chat/mermaid-share.ts +8 -7
  621. package/src/components/chat/mermaid-viewer.tsx +3 -1
  622. package/src/components/chat/message-bubble.tsx +78 -94
  623. package/src/components/chat/message-share.ts +7 -7
  624. package/src/components/chat/renderers/bind.tsx +94 -0
  625. package/src/components/chat/renderers/brain-ui-tools.tsx +56 -0
  626. package/src/components/chat/renderers/claude-tools.tsx +3 -2
  627. package/src/components/chat/renderers/index.ts +15 -10
  628. package/src/components/chat/session-drawer.tsx +41 -138
  629. package/src/components/chat/session-list.tsx +113 -0
  630. package/src/components/chat/share-block.tsx +16 -12
  631. package/src/components/chat/share-card.tsx +2 -2
  632. package/src/components/chat/subagent-view.tsx +4 -4
  633. package/src/components/chat/tool-call-timeline.tsx +75 -26
  634. package/src/components/chat/tool-cards/block-card.tsx +145 -0
  635. package/src/components/chat/tool-cards/image-mask-card.tsx +214 -0
  636. package/src/components/chat/tool-cards/location-card.tsx +159 -0
  637. package/src/components/chat/tool-views.tsx +30 -60
  638. package/src/components/chat/transcript-turn.tsx +108 -0
  639. package/src/components/chat/use-chat-commands.ts +14 -16
  640. package/src/components/chat/welcome-state.tsx +36 -91
  641. package/src/components/connectivity/connection-gate.tsx +32 -24
  642. package/src/components/connectivity/login-form.tsx +122 -0
  643. package/src/components/connectivity/login-screen.tsx +45 -100
  644. package/src/components/dev/share-harness.tsx +2 -2
  645. package/src/components/files/file-panel.tsx +168 -0
  646. package/src/components/files/file-tree-view.tsx +127 -0
  647. package/src/components/files/file-tree.tsx +55 -109
  648. package/src/components/files/file-viewer-binary.tsx +3 -2
  649. package/src/components/files/file-viewer-frame.tsx +113 -0
  650. package/src/components/files/file-viewer.tsx +40 -95
  651. package/src/components/files/frontmatter-chips.tsx +42 -0
  652. package/src/components/files/frontmatter-panel.tsx +6 -71
  653. package/src/components/files/staleness.ts +29 -0
  654. package/src/components/graph/graph-canvas.tsx +24 -1
  655. package/src/components/graph/graph-controls-column.tsx +92 -0
  656. package/src/components/graph/graph-controls.tsx +83 -127
  657. package/src/components/graph/graph-form.tsx +183 -0
  658. package/src/components/graph/graph-maintenance.tsx +9 -14
  659. package/src/components/graph/graph-node-rail.tsx +147 -0
  660. package/src/components/graph/graph-page.tsx +189 -49
  661. package/src/components/graph/graph-scene.tsx +200 -30
  662. package/src/components/graph/lib/graph-helpers.ts +65 -43
  663. package/src/components/graph/node-card.tsx +64 -0
  664. package/src/components/graph/node-popover.tsx +28 -117
  665. package/src/components/graph/use-graph-theme.ts +69 -32
  666. package/src/components/graph/use-node-actions.ts +56 -0
  667. package/src/components/images/image-share.ts +4 -2
  668. package/src/components/images/image-viewer.tsx +3 -1
  669. package/src/components/images/mask-editor.tsx +7 -4
  670. package/src/components/layout/app-shell.tsx +5 -1
  671. package/src/components/layout/desktop-palette.tsx +151 -0
  672. package/src/components/layout/key-cap.tsx +15 -0
  673. package/src/components/layout/mobile-tab-bar.tsx +80 -157
  674. package/src/components/layout/shortcut-switch.tsx +32 -0
  675. package/src/components/layout/side-rail.tsx +77 -150
  676. package/src/components/layout/slide-panel.tsx +49 -6
  677. package/src/components/layout/theme.tsx +67 -0
  678. package/src/components/quick-actions/add-form.tsx +196 -0
  679. package/src/components/quick-actions/add-modal.tsx +32 -153
  680. package/src/components/quick-actions/search-modal.tsx +15 -5
  681. package/src/components/quick-actions/streaming-modal.tsx +57 -72
  682. package/src/components/quick-actions/streaming-output.tsx +112 -0
  683. package/src/components/quick-actions/whatsup-modal.tsx +53 -59
  684. package/src/components/settings/devices-agents-tab.tsx +60 -152
  685. package/src/components/settings/models-list.tsx +299 -0
  686. package/src/components/settings/models-tab.tsx +63 -337
  687. package/src/components/settings/one-time-agent-credential.tsx +1 -1
  688. package/src/components/settings/passkey-list.tsx +201 -0
  689. package/src/components/settings/passkey-tab.tsx +53 -197
  690. package/src/components/settings/pi-accounts-list.tsx +128 -0
  691. package/src/components/settings/pi-accounts.tsx +71 -170
  692. package/src/components/settings/principal-list.tsx +172 -0
  693. package/src/components/settings/settings-panel.tsx +239 -25
  694. package/src/components/settings/skills-list.tsx +276 -0
  695. package/src/components/settings/skills-tab.tsx +82 -269
  696. package/src/components/settings/tool-permissions-list.tsx +54 -0
  697. package/src/components/settings/tool-permissions.tsx +27 -46
  698. package/src/components/settings/web-search-chain.tsx +300 -0
  699. package/src/components/settings/web-search-settings.tsx +58 -328
  700. package/src/components/share/share-menu.tsx +19 -4
  701. package/src/components/voice/dictation-sheet.tsx +5 -5
  702. package/src/components/voice/mic-button.tsx +1 -1
  703. package/src/components/voice/review-card.tsx +1 -1
  704. package/src/config.ts +21 -7
  705. package/src/connection.ts +443 -0
  706. package/src/default-root.ts +16 -0
  707. package/src/hooks/use-color-scheme.ts +36 -0
  708. package/src/hooks/use-fine-pointer.ts +15 -0
  709. package/src/hooks/use-hash-routes.ts +4 -2
  710. package/src/hooks/use-media-query.ts +35 -0
  711. package/src/hooks/use-share-intake.ts +32 -12
  712. package/src/hooks/use-vpn-status.ts +18 -17
  713. package/src/hooks/use-websocket.ts +12 -428
  714. package/src/hooks/websocket-handlers/activity.ts +4 -5
  715. package/src/hooks/websocket-handlers/chat.ts +28 -6
  716. package/src/hooks/websocket-handlers/connection.ts +4 -6
  717. package/src/hooks/websocket-handlers/mask.ts +2 -3
  718. package/src/hooks/websocket-handlers/provider.ts +4 -6
  719. package/src/hooks/websocket-handlers/types.ts +6 -2
  720. package/src/index.ts +7 -3
  721. package/src/lib/api-client.ts +426 -384
  722. package/src/lib/backend.ts +20 -10
  723. package/src/lib/diff.ts +28 -62
  724. package/src/lib/light-dark.ts +83 -0
  725. package/src/lib/mermaid-theme.ts +183 -214
  726. package/src/lib/passkeys.ts +12 -4
  727. package/src/lib/push-registration.ts +19 -2
  728. package/src/lib/share-intake.ts +6 -3
  729. package/src/lib/share.ts +7 -4
  730. package/src/lib/single-key.ts +47 -0
  731. package/src/lib/tool-names.ts +31 -8
  732. package/src/root-context.tsx +40 -0
  733. package/src/root.ts +83 -0
  734. package/src/stores/activity-state.ts +295 -0
  735. package/src/stores/activity-store.ts +11 -285
  736. package/src/stores/chat-state.ts +822 -0
  737. package/src/stores/chat-store.ts +11 -705
  738. package/src/stores/connection-state.ts +78 -0
  739. package/src/stores/connection-store.ts +11 -76
  740. package/src/stores/create-stores.ts +31 -0
  741. package/src/stores/file-state.ts +399 -0
  742. package/src/stores/file-store.ts +9 -390
  743. package/src/stores/graph-state.ts +368 -0
  744. package/src/stores/graph-store.ts +10 -355
  745. package/src/stores/mask-state.ts +30 -0
  746. package/src/stores/mask-store.ts +10 -27
  747. package/src/stores/principal-state.ts +42 -0
  748. package/src/stores/principal-store.ts +10 -37
  749. package/src/stores/provider-state.ts +103 -0
  750. package/src/stores/provider-store.ts +10 -95
  751. package/src/stores/share-state.ts +56 -0
  752. package/src/stores/share-store.ts +11 -54
  753. package/src/stores/store-environment.ts +10 -0
  754. package/src/stores/ui-state.ts +143 -0
  755. package/src/stores/ui-store.ts +11 -93
  756. package/src/styles.css +4 -1
  757. package/src/theme.css +150 -97
  758. package/src/voice/asr-clients.ts +17 -17
  759. package/src/voice/use-dictation.ts +11 -8
  760. package/src/voice/voice-state.ts +57 -0
  761. package/src/voice/voice-store.ts +11 -55
@@ -0,0 +1,252 @@
1
+ import { createStore } from "zustand/vanilla";
2
+ import { buildQuery, mergeSubgraphs } from "../components/graph/lib/graph-helpers.js";
3
+ export function createGraphStore(env) {
4
+ const apiBase = env.apiBase;
5
+ const fetch = env.request;
6
+ /** Cache of scene responses, keyed by `${endpoint}?${query}|${computedAt}`. */
7
+ const sceneCache = new Map();
8
+ const SCENE_CACHE_MAX = 40;
9
+ /** Test/dev hook: drop every cached scene. */
10
+ function clearGraphSceneCache() {
11
+ sceneCache.clear();
12
+ }
13
+ /**
14
+ * Monotonic tokens for scene and meta fetches. Every call claims a new
15
+ * token; only the holder of the latest token may write results (success OR
16
+ * error), so a slow older response can never overwrite newer state. Meta
17
+ * needs this too: forced mount-time refetches can overlap when the view is
18
+ * toggled quickly, and an older /meta response landing last would restore a
19
+ * stale computedAt — which is the key every scene-cache lookup hangs off.
20
+ */
21
+ let disposed = false;
22
+ let sceneRequestToken = 0;
23
+ let metaRequestToken = 0;
24
+ function cachePut(key, value) {
25
+ if (sceneCache.size >= SCENE_CACHE_MAX) {
26
+ const oldest = sceneCache.keys().next().value;
27
+ if (oldest !== undefined)
28
+ sceneCache.delete(oldest);
29
+ }
30
+ sceneCache.set(key, value);
31
+ }
32
+ async function fetchGraphJson(pathAndQuery) {
33
+ const res = await fetch(`${apiBase()}/graph${pathAndQuery}`);
34
+ if (!res.ok) {
35
+ const body = await res.json().catch(() => ({}));
36
+ const err = new Error(body.error || `HTTP ${res.status}`);
37
+ err.status = res.status;
38
+ err.reason = body.reason;
39
+ throw err;
40
+ }
41
+ return res.json();
42
+ }
43
+ function toGraphError(err) {
44
+ const e = err;
45
+ if (e.status === 404) {
46
+ return {
47
+ kind: "unsupported",
48
+ message: "This server does not know the graph API yet.",
49
+ };
50
+ }
51
+ if (e.status === 503) {
52
+ return {
53
+ kind: "unavailable",
54
+ reason: e.reason === "schema" ? "schema" : "not_computed",
55
+ message: e.message || "graph_unavailable",
56
+ };
57
+ }
58
+ return { kind: "network", message: e.message || "Request failed" };
59
+ }
60
+ function sceneRequest(state) {
61
+ switch (state.mode) {
62
+ case "clusters":
63
+ return {
64
+ endpoint: "/clusters",
65
+ query: buildQuery({
66
+ community: state.clusters.community,
67
+ isolates: state.clusters.isolates ? 1 : null,
68
+ }),
69
+ };
70
+ case "discovery":
71
+ return {
72
+ endpoint: "/discovery",
73
+ query: buildQuery({
74
+ root: state.discovery.root,
75
+ maxDepth: state.discovery.maxDepth,
76
+ }),
77
+ };
78
+ case "local":
79
+ if (!state.local.center)
80
+ return null;
81
+ return {
82
+ endpoint: "/neighborhood",
83
+ query: buildQuery({
84
+ center: state.local.center,
85
+ depth: state.local.depth,
86
+ direction: state.local.direction,
87
+ }),
88
+ };
89
+ case "maintenance":
90
+ return {
91
+ endpoint: "/maintenance",
92
+ query: buildQuery({ staleDays: state.maintenance.staleDays }),
93
+ };
94
+ }
95
+ }
96
+ const store = createStore((set, get) => ({
97
+ /**
98
+ * Clusters, not Local.
99
+ *
100
+ * Local is centred on ONE node and has no center until the user picks one,
101
+ * so opening the graph landed on an empty canvas with a picker — which reads
102
+ * as "the graph is broken", not as "choose a starting point". Clusters is
103
+ * the only mode that answers the question someone opening a graph view is
104
+ * actually asking: what is in here, and what clumps together.
105
+ *
106
+ * Local stays one click away, and clicking any node still switches to it
107
+ * (node-popover.tsx) — that is the natural way in, rather than the landing
108
+ * state.
109
+ */
110
+ mode: "clusters",
111
+ meta: null,
112
+ metaState: "idle",
113
+ local: { center: null, depth: 1, direction: "both" },
114
+ discovery: { root: null, maxDepth: 8 },
115
+ clusters: { community: null, isolates: false },
116
+ maintenance: { staleDays: 180 },
117
+ subgraph: null,
118
+ findings: null,
119
+ dataState: "idle",
120
+ error: null,
121
+ sceneQuery: "",
122
+ clustersSizeBy: "degree",
123
+ discoveryColorBy: "distance",
124
+ maintenanceFilters: { orphans: true, unreachable: true, broken: true, stale: true },
125
+ selectedId: null,
126
+ hoveredId: null,
127
+ setMode: (mode) => {
128
+ if (mode === get().mode)
129
+ return;
130
+ set({ mode, subgraph: null, findings: null, dataState: "idle", error: null, selectedId: null, hoveredId: null, sceneQuery: "" });
131
+ void get().fetchScene();
132
+ },
133
+ setLocalParams: (params) => {
134
+ set((s) => ({ local: { ...s.local, ...params }, selectedId: null }));
135
+ if (get().mode === "local")
136
+ void get().fetchScene();
137
+ },
138
+ setDiscoveryParams: (params) => {
139
+ set((s) => ({ discovery: { ...s.discovery, ...params }, selectedId: null }));
140
+ if (get().mode === "discovery")
141
+ void get().fetchScene();
142
+ },
143
+ setClustersParams: (params) => {
144
+ set((s) => ({ clusters: { ...s.clusters, ...params }, selectedId: null }));
145
+ if (get().mode === "clusters")
146
+ void get().fetchScene();
147
+ },
148
+ setMaintenanceParams: (params) => {
149
+ set((s) => ({ maintenance: { ...s.maintenance, ...params } }));
150
+ if (get().mode === "maintenance")
151
+ void get().fetchScene();
152
+ },
153
+ setClustersSizeBy: (sizeBy) => set({ clustersSizeBy: sizeBy }),
154
+ setDiscoveryColorBy: (colorBy) => set({ discoveryColorBy: colorBy }),
155
+ setMaintenanceFilters: (filters) => set((s) => ({ maintenanceFilters: { ...s.maintenanceFilters, ...filters } })),
156
+ setSceneQuery: (q) => set({ sceneQuery: q }),
157
+ select: (id) => set({ selectedId: id }),
158
+ hover: (id) => set({ hoveredId: id }),
159
+ fetchMeta: async (force) => {
160
+ if (disposed)
161
+ return;
162
+ const { metaState } = get();
163
+ if (!force && (metaState === "loading" || metaState === "done"))
164
+ return;
165
+ const token = ++metaRequestToken;
166
+ set({ metaState: "loading" });
167
+ try {
168
+ const meta = await fetchGraphJson("/meta");
169
+ if (token !== metaRequestToken)
170
+ return;
171
+ set({ meta, metaState: "done" });
172
+ }
173
+ catch (err) {
174
+ if (token !== metaRequestToken)
175
+ return;
176
+ set({ metaState: "error", error: toGraphError(err) });
177
+ }
178
+ },
179
+ fetchScene: async () => {
180
+ if (disposed)
181
+ return;
182
+ const state = get();
183
+ const token = ++sceneRequestToken;
184
+ const req = sceneRequest(state);
185
+ if (!req) {
186
+ // Local mode without a center: nothing to fetch, the page shows the picker.
187
+ set({ subgraph: null, findings: null, dataState: "idle", error: null });
188
+ return;
189
+ }
190
+ const cacheKey = `${req.endpoint}?${req.query}|${state.meta?.computedAt ?? ""}`;
191
+ const cached = sceneCache.get(cacheKey);
192
+ if (cached) {
193
+ if (state.mode === "maintenance") {
194
+ set({ findings: cached, subgraph: null, dataState: "done", error: null });
195
+ }
196
+ else {
197
+ set({ subgraph: cached, findings: null, dataState: "done", error: null });
198
+ }
199
+ return;
200
+ }
201
+ set({ dataState: "loading", error: null });
202
+ const requestedMode = state.mode;
203
+ try {
204
+ const data = await fetchGraphJson(`${req.endpoint}${req.query ? `?${req.query}` : ""}`);
205
+ // The cache is always safe to fill; the visible scene belongs to the
206
+ // latest request only (rapid param changes race their responses).
207
+ if (disposed)
208
+ return;
209
+ cachePut(cacheKey, data);
210
+ if (token !== sceneRequestToken)
211
+ return;
212
+ if (requestedMode === "maintenance") {
213
+ set({ findings: data, subgraph: null, dataState: "done" });
214
+ }
215
+ else {
216
+ set({ subgraph: data, findings: null, dataState: "done" });
217
+ }
218
+ }
219
+ catch (err) {
220
+ if (token !== sceneRequestToken)
221
+ return;
222
+ set({ dataState: "error", error: toGraphError(err) });
223
+ }
224
+ },
225
+ expandNode: async (path) => {
226
+ const state = get();
227
+ if (disposed || state.mode !== "local" || !state.subgraph)
228
+ return;
229
+ try {
230
+ const ego = await fetchGraphJson(`/neighborhood?${buildQuery({ center: path, depth: 1, direction: "both" })}`);
231
+ const current = get();
232
+ if (disposed || current.mode !== "local" || !current.subgraph)
233
+ return;
234
+ set({ subgraph: mergeSubgraphs(current.subgraph, ego) });
235
+ }
236
+ catch {
237
+ // Expansion is additive sugar — a failure leaves the scene as-is.
238
+ }
239
+ },
240
+ reset: () => set({
241
+ subgraph: null,
242
+ findings: null,
243
+ dataState: "idle",
244
+ error: null,
245
+ selectedId: null,
246
+ hoveredId: null,
247
+ sceneQuery: "",
248
+ }),
249
+ }));
250
+ return Object.assign(store, { clearSceneCache: clearGraphSceneCache, dispose() { disposed = true; sceneRequestToken++; metaRequestToken++; sceneCache.clear(); } });
251
+ }
252
+ //# sourceMappingURL=graph-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graph-state.js","sourceRoot":"","sources":["../../src/stores/graph-state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAO9C,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AA6GtF,MAAM,UAAU,gBAAgB,CAAC,GAAqB;IACpD,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC;IAC5B,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC;IAE1B,+EAA+E;IAC/E,MAAM,UAAU,GAAG,IAAI,GAAG,EAA4D,CAAC;IACvF,MAAM,eAAe,GAAG,EAAE,CAAC;IAE3B,8CAA8C;IAC9C,SAAS,oBAAoB;QAC3B,UAAU,CAAC,KAAK,EAAE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AE,CAAC,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AACtK,CAAC"}
@@ -1,85 +1,9 @@
1
- import type { GraphMetaResponse, GraphSubgraphResponse, GraphMaintenanceResponse } from "@schlessera/brain-ui-sdk/protocol";
2
- export type GraphMode = "clusters" | "discovery" | "local" | "maintenance";
3
- export type LocalDirection = "in" | "out" | "both";
4
- /**
5
- * How a fetch failed. "unavailable" carries the server's gating reason
6
- * (schema too old / not yet computed); "unsupported" means the server predates
7
- * the graph API entirely (404 on /graph/meta).
8
- */
9
- export type GraphErrorKind = "unavailable" | "unsupported" | "network";
10
- interface GraphError {
11
- kind: GraphErrorKind;
12
- reason?: "schema" | "not_computed";
13
- message: string;
14
- }
15
- export interface LocalParams {
16
- center: string | null;
17
- depth: 1 | 2 | 3;
18
- direction: LocalDirection;
19
- }
20
- export interface DiscoveryParams {
21
- /** null = the precomputed default root (direction is fixed there). */
22
- root: string | null;
23
- maxDepth: number;
24
- }
25
- export interface ClustersParams {
26
- /** null = all communities. */
27
- community: number | null;
28
- isolates: boolean;
29
- }
30
- export interface MaintenanceParams {
31
- staleDays: number;
32
- }
33
- export type SizeBy = "degree" | "pagerank";
34
- export type DiscoveryColorBy = "distance" | "folder";
35
- /** Which finding sections are visible — a client-side filter, no refetch. */
36
- export interface MaintenanceFilters {
37
- orphans: boolean;
38
- unreachable: boolean;
39
- broken: boolean;
40
- stale: boolean;
41
- }
42
- type FetchState = "idle" | "loading" | "done" | "error";
43
- interface GraphState {
44
- mode: GraphMode;
45
- meta: GraphMetaResponse | null;
46
- metaState: FetchState;
47
- local: LocalParams;
48
- discovery: DiscoveryParams;
49
- clusters: ClustersParams;
50
- maintenance: MaintenanceParams;
51
- /** Scene for the current mode (subgraph modes). */
52
- subgraph: GraphSubgraphResponse | null;
53
- findings: GraphMaintenanceResponse | null;
54
- dataState: FetchState;
55
- error: GraphError | null;
56
- /** In-scene search query — highlights matching nodes, does not refetch. */
57
- sceneQuery: string;
58
- clustersSizeBy: SizeBy;
59
- discoveryColorBy: DiscoveryColorBy;
60
- maintenanceFilters: MaintenanceFilters;
61
- selectedId: number | null;
62
- hoveredId: number | null;
63
- setMode: (mode: GraphMode) => void;
64
- setLocalParams: (params: Partial<LocalParams>) => void;
65
- setDiscoveryParams: (params: Partial<DiscoveryParams>) => void;
66
- setClustersParams: (params: Partial<ClustersParams>) => void;
67
- setMaintenanceParams: (params: Partial<MaintenanceParams>) => void;
68
- setClustersSizeBy: (sizeBy: SizeBy) => void;
69
- setDiscoveryColorBy: (colorBy: DiscoveryColorBy) => void;
70
- setMaintenanceFilters: (filters: Partial<MaintenanceFilters>) => void;
71
- setSceneQuery: (q: string) => void;
72
- select: (id: number | null) => void;
73
- hover: (id: number | null) => void;
74
- fetchMeta: (force?: boolean) => Promise<void>;
75
- /** Fetch the scene for the current mode + params (cached per query + computedAt). */
76
- fetchScene: () => Promise<void>;
77
- /** Local mode: pull the depth-1 ego of a node and merge it into the scene. */
78
- expandNode: (path: string) => Promise<void>;
79
- reset: () => void;
80
- }
81
- /** Test/dev hook: drop every cached scene. */
1
+ import { defaultRoot } from "../default-root.js";
2
+ export * from "./graph-state.js";
3
+ /** Hook reads the current provider. Statics address the default app only. */
4
+ export declare const useGraphStore: (<T>(selector: (state: ReturnType<typeof defaultRoot.stores.graph.getState>) => T) => T) & import("zustand").StoreApi<import("./graph-state.js").GraphState> & {
5
+ clearSceneCache: () => void;
6
+ dispose(): void;
7
+ };
82
8
  export declare function clearGraphSceneCache(): void;
83
- export declare const useGraphStore: import("zustand").UseBoundStore<import("zustand").StoreApi<GraphState>>;
84
- export {};
85
9
  //# sourceMappingURL=graph-store.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"graph-store.d.ts","sourceRoot":"","sources":["../../src/stores/graph-store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,iBAAiB,EACjB,qBAAqB,EACrB,wBAAwB,EACzB,MAAM,mCAAmC,CAAC;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,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACpC,KAAK,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAEnC,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9C,qFAAqF;IACrF,UAAU,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAChC,8EAA8E;IAC9E,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAMD,8CAA8C;AAC9C,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C;AAyFD,eAAO,MAAM,aAAa,yEAgJvB,CAAC"}
1
+ {"version":3,"file":"graph-store.d.ts","sourceRoot":"","sources":["../../src/stores/graph-store.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,cAAc,kBAAkB,CAAC;AAEjC,6EAA6E;AAC7E,eAAO,MAAM,aAAa,IACD,CAAC,YAAY,CAAC,KAAK,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAG,CAAC;;;CAI3G,CAAC;AAEF,wBAAgB,oBAAoB,IAAI,IAAI,CAAgD"}
@@ -1,250 +1,9 @@
1
- import { create } from "zustand";
2
- import { apiBase } from "../lib/backend.js";
3
- import { registerDevHandle } from "../config.js";
4
- import { buildQuery, mergeSubgraphs } from "../components/graph/lib/graph-helpers.js";
5
- /** Cache of scene responses, keyed by `${endpoint}?${query}|${computedAt}`. */
6
- const sceneCache = new Map();
7
- const SCENE_CACHE_MAX = 40;
8
- /** Test/dev hook: drop every cached scene. */
9
- export function clearGraphSceneCache() {
10
- sceneCache.clear();
11
- }
12
- /**
13
- * Monotonic tokens for scene and meta fetches. Every call claims a new
14
- * token; only the holder of the latest token may write results (success OR
15
- * error), so a slow older response can never overwrite newer state. Meta
16
- * needs this too: forced mount-time refetches can overlap when the view is
17
- * toggled quickly, and an older /meta response landing last would restore a
18
- * stale computedAt — which is the key every scene-cache lookup hangs off.
19
- */
20
- let sceneRequestToken = 0;
21
- let metaRequestToken = 0;
22
- function cachePut(key, value) {
23
- if (sceneCache.size >= SCENE_CACHE_MAX) {
24
- const oldest = sceneCache.keys().next().value;
25
- if (oldest !== undefined)
26
- sceneCache.delete(oldest);
27
- }
28
- sceneCache.set(key, value);
29
- }
30
- async function fetchGraphJson(pathAndQuery) {
31
- const res = await fetch(`${apiBase()}/graph${pathAndQuery}`);
32
- if (!res.ok) {
33
- const body = await res.json().catch(() => ({}));
34
- const err = new Error(body.error || `HTTP ${res.status}`);
35
- err.status = res.status;
36
- err.reason = body.reason;
37
- throw err;
38
- }
39
- return res.json();
40
- }
41
- function toGraphError(err) {
42
- const e = err;
43
- if (e.status === 404) {
44
- return {
45
- kind: "unsupported",
46
- message: "This server does not know the graph API yet.",
47
- };
48
- }
49
- if (e.status === 503) {
50
- return {
51
- kind: "unavailable",
52
- reason: e.reason === "schema" ? "schema" : "not_computed",
53
- message: e.message || "graph_unavailable",
54
- };
55
- }
56
- return { kind: "network", message: e.message || "Request failed" };
57
- }
58
- function sceneRequest(state) {
59
- switch (state.mode) {
60
- case "clusters":
61
- return {
62
- endpoint: "/clusters",
63
- query: buildQuery({
64
- community: state.clusters.community,
65
- isolates: state.clusters.isolates ? 1 : null,
66
- }),
67
- };
68
- case "discovery":
69
- return {
70
- endpoint: "/discovery",
71
- query: buildQuery({
72
- root: state.discovery.root,
73
- maxDepth: state.discovery.maxDepth,
74
- }),
75
- };
76
- case "local":
77
- if (!state.local.center)
78
- return null;
79
- return {
80
- endpoint: "/neighborhood",
81
- query: buildQuery({
82
- center: state.local.center,
83
- depth: state.local.depth,
84
- direction: state.local.direction,
85
- }),
86
- };
87
- case "maintenance":
88
- return {
89
- endpoint: "/maintenance",
90
- query: buildQuery({ staleDays: state.maintenance.staleDays }),
91
- };
92
- }
93
- }
94
- export const useGraphStore = create((set, get) => ({
95
- /**
96
- * Clusters, not Local.
97
- *
98
- * Local is centred on ONE node and has no center until the user picks one,
99
- * so opening the graph landed on an empty canvas with a picker — which reads
100
- * as "the graph is broken", not as "choose a starting point". Clusters is
101
- * the only mode that answers the question someone opening a graph view is
102
- * actually asking: what is in here, and what clumps together.
103
- *
104
- * Local stays one click away, and clicking any node still switches to it
105
- * (node-popover.tsx) — that is the natural way in, rather than the landing
106
- * state.
107
- */
108
- mode: "clusters",
109
- meta: null,
110
- metaState: "idle",
111
- local: { center: null, depth: 1, direction: "both" },
112
- discovery: { root: null, maxDepth: 8 },
113
- clusters: { community: null, isolates: false },
114
- maintenance: { staleDays: 180 },
115
- subgraph: null,
116
- findings: null,
117
- dataState: "idle",
118
- error: null,
119
- sceneQuery: "",
120
- clustersSizeBy: "degree",
121
- discoveryColorBy: "distance",
122
- maintenanceFilters: { orphans: true, unreachable: true, broken: true, stale: true },
123
- selectedId: null,
124
- hoveredId: null,
125
- setMode: (mode) => {
126
- if (mode === get().mode)
127
- return;
128
- set({ mode, subgraph: null, findings: null, dataState: "idle", error: null, selectedId: null, hoveredId: null, sceneQuery: "" });
129
- void get().fetchScene();
130
- },
131
- setLocalParams: (params) => {
132
- set((s) => ({ local: { ...s.local, ...params }, selectedId: null }));
133
- if (get().mode === "local")
134
- void get().fetchScene();
135
- },
136
- setDiscoveryParams: (params) => {
137
- set((s) => ({ discovery: { ...s.discovery, ...params }, selectedId: null }));
138
- if (get().mode === "discovery")
139
- void get().fetchScene();
140
- },
141
- setClustersParams: (params) => {
142
- set((s) => ({ clusters: { ...s.clusters, ...params }, selectedId: null }));
143
- if (get().mode === "clusters")
144
- void get().fetchScene();
145
- },
146
- setMaintenanceParams: (params) => {
147
- set((s) => ({ maintenance: { ...s.maintenance, ...params } }));
148
- if (get().mode === "maintenance")
149
- void get().fetchScene();
150
- },
151
- setClustersSizeBy: (sizeBy) => set({ clustersSizeBy: sizeBy }),
152
- setDiscoveryColorBy: (colorBy) => set({ discoveryColorBy: colorBy }),
153
- setMaintenanceFilters: (filters) => set((s) => ({ maintenanceFilters: { ...s.maintenanceFilters, ...filters } })),
154
- setSceneQuery: (q) => set({ sceneQuery: q }),
155
- select: (id) => set({ selectedId: id }),
156
- hover: (id) => set({ hoveredId: id }),
157
- fetchMeta: async (force) => {
158
- const { metaState } = get();
159
- if (!force && (metaState === "loading" || metaState === "done"))
160
- return;
161
- const token = ++metaRequestToken;
162
- set({ metaState: "loading" });
163
- try {
164
- const meta = await fetchGraphJson("/meta");
165
- if (token !== metaRequestToken)
166
- return;
167
- set({ meta, metaState: "done" });
168
- }
169
- catch (err) {
170
- if (token !== metaRequestToken)
171
- return;
172
- set({ metaState: "error", error: toGraphError(err) });
173
- }
174
- },
175
- fetchScene: async () => {
176
- const state = get();
177
- const token = ++sceneRequestToken;
178
- const req = sceneRequest(state);
179
- if (!req) {
180
- // Local mode without a center: nothing to fetch, the page shows the picker.
181
- set({ subgraph: null, findings: null, dataState: "idle", error: null });
182
- return;
183
- }
184
- const cacheKey = `${req.endpoint}?${req.query}|${state.meta?.computedAt ?? ""}`;
185
- const cached = sceneCache.get(cacheKey);
186
- if (cached) {
187
- if (state.mode === "maintenance") {
188
- set({ findings: cached, subgraph: null, dataState: "done", error: null });
189
- }
190
- else {
191
- set({ subgraph: cached, findings: null, dataState: "done", error: null });
192
- }
193
- return;
194
- }
195
- set({ dataState: "loading", error: null });
196
- const requestedMode = state.mode;
197
- try {
198
- const data = await fetchGraphJson(`${req.endpoint}${req.query ? `?${req.query}` : ""}`);
199
- // The cache is always safe to fill; the visible scene belongs to the
200
- // latest request only (rapid param changes race their responses).
201
- cachePut(cacheKey, data);
202
- if (token !== sceneRequestToken)
203
- return;
204
- if (requestedMode === "maintenance") {
205
- set({ findings: data, subgraph: null, dataState: "done" });
206
- }
207
- else {
208
- set({ subgraph: data, findings: null, dataState: "done" });
209
- }
210
- }
211
- catch (err) {
212
- if (token !== sceneRequestToken)
213
- return;
214
- set({ dataState: "error", error: toGraphError(err) });
215
- }
216
- },
217
- expandNode: async (path) => {
218
- const state = get();
219
- if (state.mode !== "local" || !state.subgraph)
220
- return;
221
- try {
222
- const ego = await fetchGraphJson(`/neighborhood?${buildQuery({ center: path, depth: 1, direction: "both" })}`);
223
- const current = get();
224
- if (current.mode !== "local" || !current.subgraph)
225
- return;
226
- set({ subgraph: mergeSubgraphs(current.subgraph, ego) });
227
- }
228
- catch {
229
- // Expansion is additive sugar — a failure leaves the scene as-is.
230
- }
231
- },
232
- reset: () => set({
233
- subgraph: null,
234
- findings: null,
235
- dataState: "idle",
236
- error: null,
237
- selectedId: null,
238
- hoveredId: null,
239
- sceneQuery: "",
240
- }),
241
- }));
242
- // Dev-only handle for exercising the view with injected fixtures (the
243
- // window.__chatStore precedent), gated on the shell's `devTools` flag.
244
- registerDevHandle(() => {
245
- if (typeof window === "undefined")
246
- return;
247
- window.__graphStore =
248
- useGraphStore;
249
- });
1
+ import { useRootStore } from "../root-context.js";
2
+ import { defaultRoot } from "../default-root.js";
3
+ export * from "./graph-state.js";
4
+ /** Hook reads the current provider. Statics address the default app only. */
5
+ export const useGraphStore = Object.assign(function useGraphStore(selector) {
6
+ return useRootStore("graph", selector);
7
+ }, defaultRoot.stores.graph);
8
+ export function clearGraphSceneCache() { defaultRoot.stores.graph.clearSceneCache(); }
250
9
  //# sourceMappingURL=graph-store.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"graph-store.js","sourceRoot":"","sources":["../../src/stores/graph-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAMjC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;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