@polderlabs/bizar 7.0.4 → 8.1.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 (627) hide show
  1. package/.claude/agents/agent-browser.md +1 -1
  2. package/.claude/agents/baldr.md +1 -1
  3. package/.claude/agents/forseti.md +1 -1
  4. package/.claude/agents/frigg.md +1 -1
  5. package/.claude/agents/heimdall.md +1 -1
  6. package/.claude/agents/hermod.md +1 -1
  7. package/.claude/agents/mimir.md +1 -1
  8. package/.claude/agents/odin.md +1 -1
  9. package/.claude/agents/quick.md +1 -1
  10. package/.claude/agents/semble-search.md +1 -1
  11. package/.claude/agents/thor.md +1 -1
  12. package/.claude/agents/tyr.md +1 -1
  13. package/.claude/agents/vidarr.md +1 -1
  14. package/.claude/agents/vor.md +1 -1
  15. package/.claude/commands/goal.md +98 -0
  16. package/.claude/settings.local.json +7 -0
  17. package/bizar-dash/DESIGN.md +729 -969
  18. package/bizar-dash/GLYPH.md +418 -0
  19. package/bizar-dash/PLAN.md +1135 -0
  20. package/bizar-dash/dist/assets/ActivityFeed-CqF6iSDQ.js +6 -0
  21. package/bizar-dash/dist/assets/ActivityFeed-CqF6iSDQ.js.map +1 -0
  22. package/bizar-dash/dist/assets/ActivityView-qdhDjRtL.js +1 -0
  23. package/bizar-dash/dist/assets/ActivityView-qdhDjRtL.js.map +1 -0
  24. package/bizar-dash/dist/assets/AgentsView-BwXkOayl.js +28 -0
  25. package/bizar-dash/dist/assets/AgentsView-BwXkOayl.js.map +1 -0
  26. package/bizar-dash/dist/assets/Badge-BH4C3aUF.js +1 -0
  27. package/bizar-dash/dist/assets/Badge-BH4C3aUF.js.map +1 -0
  28. package/bizar-dash/dist/assets/Button-RmN1RKhE.js +6 -0
  29. package/bizar-dash/dist/assets/Button-RmN1RKhE.js.map +1 -0
  30. package/bizar-dash/dist/assets/Card-BzJeYR2D.js +1 -0
  31. package/bizar-dash/dist/assets/Card-BzJeYR2D.js.map +1 -0
  32. package/bizar-dash/dist/assets/Chip-CN2bvm7a.js +1 -0
  33. package/bizar-dash/dist/assets/Chip-CN2bvm7a.js.map +1 -0
  34. package/bizar-dash/dist/assets/EmptyState-DEiBv4-r.js +1 -0
  35. package/bizar-dash/dist/assets/EmptyState-DEiBv4-r.js.map +1 -0
  36. package/bizar-dash/dist/assets/GoalsView-CvsrzEez.js +6 -0
  37. package/bizar-dash/dist/assets/GoalsView-CvsrzEez.js.map +1 -0
  38. package/bizar-dash/dist/assets/KanbanCard-DZEaAiEr.js +21 -0
  39. package/bizar-dash/dist/assets/KanbanCard-DZEaAiEr.js.map +1 -0
  40. package/bizar-dash/dist/assets/LibrariesView-CPgKGPpM.js +67 -0
  41. package/bizar-dash/dist/assets/LibrariesView-CPgKGPpM.js.map +1 -0
  42. package/bizar-dash/dist/assets/MemoryView-Bbez5pMN.js +13 -0
  43. package/bizar-dash/dist/assets/MemoryView-Bbez5pMN.js.map +1 -0
  44. package/bizar-dash/dist/assets/OverviewView-BDegBWgg.js +1 -0
  45. package/bizar-dash/dist/assets/OverviewView-BDegBWgg.js.map +1 -0
  46. package/bizar-dash/dist/assets/Select-xwxbK8Ed.js +16 -0
  47. package/bizar-dash/dist/assets/Select-xwxbK8Ed.js.map +1 -0
  48. package/bizar-dash/dist/assets/SettingsRow-CppSgkT_.js +10 -0
  49. package/bizar-dash/dist/assets/SettingsRow-CppSgkT_.js.map +1 -0
  50. package/bizar-dash/dist/assets/SettingsView-DUc2meHV.js +43 -0
  51. package/bizar-dash/dist/assets/SettingsView-DUc2meHV.js.map +1 -0
  52. package/bizar-dash/dist/assets/Sheet-C_sIEw35.js +1 -0
  53. package/bizar-dash/dist/assets/Sheet-C_sIEw35.js.map +1 -0
  54. package/bizar-dash/dist/assets/Sparkline-D664vGWW.js +1 -0
  55. package/bizar-dash/dist/assets/Sparkline-D664vGWW.js.map +1 -0
  56. package/bizar-dash/dist/assets/StatTile-BRsUIA6P.js +16 -0
  57. package/bizar-dash/dist/assets/StatTile-BRsUIA6P.js.map +1 -0
  58. package/bizar-dash/dist/assets/TasksView-DVyX5-DY.js +1 -0
  59. package/bizar-dash/dist/assets/TasksView-DVyX5-DY.js.map +1 -0
  60. package/bizar-dash/dist/assets/Textarea-Dk97nmjO.js +1 -0
  61. package/bizar-dash/dist/assets/Textarea-Dk97nmjO.js.map +1 -0
  62. package/bizar-dash/dist/assets/ViewHeader-dPd4zAyj.js +6 -0
  63. package/bizar-dash/dist/assets/ViewHeader-dPd4zAyj.js.map +1 -0
  64. package/bizar-dash/dist/assets/brain-BajPVibR.js +6 -0
  65. package/bizar-dash/dist/assets/brain-BajPVibR.js.map +1 -0
  66. package/bizar-dash/dist/assets/calendar-CaP_Bbgc.js +6 -0
  67. package/bizar-dash/dist/assets/calendar-CaP_Bbgc.js.map +1 -0
  68. package/bizar-dash/dist/assets/cmdk-BLWIhKrV.js +80 -0
  69. package/bizar-dash/dist/assets/cmdk-BLWIhKrV.js.map +1 -0
  70. package/bizar-dash/dist/assets/dnd-kit-DU8GZk7s.js +5 -0
  71. package/bizar-dash/dist/assets/dnd-kit-DU8GZk7s.js.map +1 -0
  72. package/bizar-dash/dist/assets/git-pull-request-CFRRwdxp.js +11 -0
  73. package/bizar-dash/dist/assets/git-pull-request-CFRRwdxp.js.map +1 -0
  74. package/bizar-dash/dist/assets/index-AL3OLUfz.js +1 -0
  75. package/bizar-dash/dist/assets/index-AL3OLUfz.js.map +1 -0
  76. package/bizar-dash/dist/assets/main-CcQfRfIJ.css +1 -0
  77. package/bizar-dash/dist/assets/main-LxX9zTRk.js +109 -0
  78. package/bizar-dash/dist/assets/main-LxX9zTRk.js.map +1 -0
  79. package/bizar-dash/dist/assets/plus-CVH1JB04.js +6 -0
  80. package/bizar-dash/dist/assets/plus-CVH1JB04.js.map +1 -0
  81. package/bizar-dash/dist/assets/terminal-B2sSd5t7.js +11 -0
  82. package/bizar-dash/dist/assets/terminal-B2sSd5t7.js.map +1 -0
  83. package/bizar-dash/dist/assets/trash-2-JtYRQ79q.js +6 -0
  84. package/bizar-dash/dist/assets/trash-2-JtYRQ79q.js.map +1 -0
  85. package/bizar-dash/dist/assets/triangle-alert-Nzbrm0I2.js +6 -0
  86. package/bizar-dash/dist/assets/triangle-alert-Nzbrm0I2.js.map +1 -0
  87. package/bizar-dash/dist/assets/useFetch-CoVWwbml.js +1 -0
  88. package/bizar-dash/dist/assets/useFetch-CoVWwbml.js.map +1 -0
  89. package/bizar-dash/dist/assets/useWebSocket-CVIQB8yG.js +1 -0
  90. package/bizar-dash/dist/assets/useWebSocket-CVIQB8yG.js.map +1 -0
  91. package/bizar-dash/dist/assets/wrench-B7go551L.js +6 -0
  92. package/bizar-dash/dist/assets/wrench-B7go551L.js.map +1 -0
  93. package/bizar-dash/dist/{mobile.html → v8.html} +6 -9
  94. package/bizar-dash/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
  95. package/bizar-dash/src/server/api.mjs +10 -0
  96. package/bizar-dash/src/server/bg-poller.mjs +81 -1
  97. package/bizar-dash/src/server/bg-poller.test.mjs +28 -0
  98. package/bizar-dash/src/server/progress-parser.mjs +221 -0
  99. package/bizar-dash/src/server/progress-parser.test.mjs +105 -0
  100. package/bizar-dash/src/server/routes/agents-cc.mjs +381 -0
  101. package/bizar-dash/src/server/routes/agents-cc.test.mjs +35 -0
  102. package/bizar-dash/src/server/routes/goals.mjs +307 -0
  103. package/bizar-dash/src/server/routes/tasks.mjs +11 -0
  104. package/bizar-dash/src/server/server.mjs +1 -57
  105. package/bizar-dash/src/web/v8/App.tsx +188 -0
  106. package/bizar-dash/src/web/v8/__tests__/App.test.tsx +102 -0
  107. package/bizar-dash/src/web/v8/__tests__/AppShell.test.tsx +79 -0
  108. package/bizar-dash/src/web/v8/__tests__/PageSkeleton.test.tsx +12 -0
  109. package/bizar-dash/src/web/v8/__tests__/SettingsView.test.tsx +84 -0
  110. package/bizar-dash/src/web/v8/__tests__/Sidebar.test.tsx +95 -0
  111. package/bizar-dash/src/web/v8/__tests__/activity.test.tsx +63 -0
  112. package/bizar-dash/src/web/v8/__tests__/agents.test.tsx +90 -0
  113. package/bizar-dash/src/web/v8/__tests__/control-plane.test.tsx +104 -0
  114. package/bizar-dash/src/web/v8/__tests__/controls.test.tsx +135 -0
  115. package/bizar-dash/src/web/v8/__tests__/cx.test.ts +25 -0
  116. package/bizar-dash/src/web/v8/__tests__/data.test.tsx +293 -0
  117. package/bizar-dash/src/web/v8/__tests__/feedback.test.tsx +213 -0
  118. package/bizar-dash/src/web/v8/__tests__/goals.test.tsx +105 -0
  119. package/bizar-dash/src/web/v8/__tests__/kanban.test.tsx +176 -0
  120. package/bizar-dash/src/web/v8/__tests__/libraries.test.tsx +70 -0
  121. package/bizar-dash/src/web/v8/__tests__/memory.test.tsx +60 -0
  122. package/bizar-dash/src/web/v8/__tests__/navigation.test.tsx +137 -0
  123. package/bizar-dash/src/web/v8/__tests__/settings.test.tsx +104 -0
  124. package/bizar-dash/src/web/v8/__tests__/theme.test.tsx +98 -0
  125. package/bizar-dash/src/web/v8/__tests__/useFetch.test.ts +92 -0
  126. package/bizar-dash/src/web/v8/__tests__/useWebSocket.test.ts +87 -0
  127. package/bizar-dash/src/web/v8/__tests__/views.test.tsx +182 -0
  128. package/bizar-dash/src/web/v8/data/fetcher.ts +59 -0
  129. package/bizar-dash/src/web/v8/data/types.ts +154 -0
  130. package/bizar-dash/src/web/v8/data/useFetch.ts +62 -0
  131. package/bizar-dash/src/web/v8/data/useWebSocket.ts +153 -0
  132. package/bizar-dash/src/web/v8/main.tsx +28 -0
  133. package/bizar-dash/src/web/v8/shell/AppShell.tsx +90 -0
  134. package/bizar-dash/src/web/v8/shell/PageSkeleton.tsx +29 -0
  135. package/bizar-dash/src/web/v8/shell/Sidebar.tsx +361 -0
  136. package/bizar-dash/src/web/v8/shell/StatusBar.tsx +63 -0
  137. package/bizar-dash/src/web/v8/shell/Topbar.tsx +113 -0
  138. package/bizar-dash/src/web/v8/shell/index.ts +15 -0
  139. package/bizar-dash/src/web/v8/ui/activity/ActivityFeed.tsx +137 -0
  140. package/bizar-dash/src/web/v8/ui/agents/AgentActivity.tsx +101 -0
  141. package/bizar-dash/src/web/v8/ui/agents/AgentCard.tsx +158 -0
  142. package/bizar-dash/src/web/v8/ui/agents/AgentDetail.tsx +252 -0
  143. package/bizar-dash/src/web/v8/ui/agents/AgentStreamPanel.tsx +371 -0
  144. package/bizar-dash/src/web/v8/ui/controls/Button.tsx +141 -0
  145. package/bizar-dash/src/web/v8/ui/controls/ButtonGroup.tsx +32 -0
  146. package/bizar-dash/src/web/v8/ui/controls/Checkbox.tsx +49 -0
  147. package/bizar-dash/src/web/v8/ui/controls/Field.tsx +78 -0
  148. package/bizar-dash/src/web/v8/ui/controls/Form.tsx +23 -0
  149. package/bizar-dash/src/web/v8/ui/controls/IconButton.tsx +112 -0
  150. package/bizar-dash/src/web/v8/ui/controls/Input.tsx +94 -0
  151. package/bizar-dash/src/web/v8/ui/controls/RadioGroup.tsx +74 -0
  152. package/bizar-dash/src/web/v8/ui/controls/Select.tsx +171 -0
  153. package/bizar-dash/src/web/v8/ui/controls/Slider.tsx +68 -0
  154. package/bizar-dash/src/web/v8/ui/controls/Switch.tsx +56 -0
  155. package/bizar-dash/src/web/v8/ui/controls/Textarea.tsx +64 -0
  156. package/bizar-dash/src/web/v8/ui/controls/Toggle.tsx +36 -0
  157. package/bizar-dash/src/web/v8/ui/controls/ToggleGroup.tsx +85 -0
  158. package/bizar-dash/src/web/v8/ui/data/Accordion.tsx +134 -0
  159. package/bizar-dash/src/web/v8/ui/data/Avatar.tsx +175 -0
  160. package/bizar-dash/src/web/v8/ui/data/Badge.tsx +93 -0
  161. package/bizar-dash/src/web/v8/ui/data/BarList.tsx +101 -0
  162. package/bizar-dash/src/web/v8/ui/data/Card.tsx +140 -0
  163. package/bizar-dash/src/web/v8/ui/data/Chip.tsx +96 -0
  164. package/bizar-dash/src/web/v8/ui/data/Kbd.tsx +42 -0
  165. package/bizar-dash/src/web/v8/ui/data/ProgressBar.tsx +93 -0
  166. package/bizar-dash/src/web/v8/ui/data/Sparkline.tsx +98 -0
  167. package/bizar-dash/src/web/v8/ui/data/StatTile.tsx +150 -0
  168. package/bizar-dash/src/web/v8/ui/data/Table.tsx +170 -0
  169. package/bizar-dash/src/web/v8/ui/data/Timeline.tsx +130 -0
  170. package/bizar-dash/src/web/v8/ui/data/ViewHeader.tsx +122 -0
  171. package/bizar-dash/src/web/v8/ui/feedback/Alert.tsx +95 -0
  172. package/bizar-dash/src/web/v8/ui/feedback/Banner.tsx +39 -0
  173. package/bizar-dash/src/web/v8/ui/feedback/ContextMenu.tsx +143 -0
  174. package/bizar-dash/src/web/v8/ui/feedback/Dialog.tsx +149 -0
  175. package/bizar-dash/src/web/v8/ui/feedback/Drawer.tsx +8 -0
  176. package/bizar-dash/src/web/v8/ui/feedback/DropdownMenu.tsx +231 -0
  177. package/bizar-dash/src/web/v8/ui/feedback/EmptyState.tsx +48 -0
  178. package/bizar-dash/src/web/v8/ui/feedback/Popover.tsx +56 -0
  179. package/bizar-dash/src/web/v8/ui/feedback/Sheet.tsx +103 -0
  180. package/bizar-dash/src/web/v8/ui/feedback/Skeleton.tsx +67 -0
  181. package/bizar-dash/src/web/v8/ui/feedback/Spinner.tsx +30 -0
  182. package/bizar-dash/src/web/v8/ui/feedback/Toast.tsx +66 -0
  183. package/bizar-dash/src/web/v8/ui/feedback/Tooltip.tsx +89 -0
  184. package/bizar-dash/src/web/v8/ui/goals/GoalCard.tsx +176 -0
  185. package/bizar-dash/src/web/v8/ui/goals/GoalDetail.tsx +245 -0
  186. package/bizar-dash/src/web/v8/ui/goals/KeyResult.tsx +115 -0
  187. package/bizar-dash/src/web/v8/ui/index.ts +322 -0
  188. package/bizar-dash/src/web/v8/ui/kanban/KanbanBoard.tsx +83 -0
  189. package/bizar-dash/src/web/v8/ui/kanban/KanbanCard.tsx +247 -0
  190. package/bizar-dash/src/web/v8/ui/kanban/KanbanColumn.tsx +186 -0
  191. package/bizar-dash/src/web/v8/ui/kanban/KanbanContextMenu.tsx +122 -0
  192. package/bizar-dash/src/web/v8/ui/kanban/KanbanQuickAdd.tsx +141 -0
  193. package/bizar-dash/src/web/v8/ui/libraries/LibraryGrid.tsx +30 -0
  194. package/bizar-dash/src/web/v8/ui/libraries/LibraryItem.tsx +161 -0
  195. package/bizar-dash/src/web/v8/ui/memory/MemoryVault.tsx +144 -0
  196. package/bizar-dash/src/web/v8/ui/navigation/CommandPalette.tsx +224 -0
  197. package/bizar-dash/src/web/v8/ui/navigation/NavLink.tsx +81 -0
  198. package/bizar-dash/src/web/v8/ui/navigation/Pagination.tsx +164 -0
  199. package/bizar-dash/src/web/v8/ui/navigation/Tabs.tsx +128 -0
  200. package/bizar-dash/src/web/v8/ui/navigation/useCommandPaletteHotkey.test.ts +79 -0
  201. package/bizar-dash/src/web/v8/ui/primitives/Box.tsx +144 -0
  202. package/bizar-dash/src/web/v8/ui/primitives/Center.tsx +40 -0
  203. package/bizar-dash/src/web/v8/ui/primitives/Cluster.tsx +67 -0
  204. package/bizar-dash/src/web/v8/ui/primitives/Grid.tsx +104 -0
  205. package/bizar-dash/src/web/v8/ui/primitives/Inline.tsx +77 -0
  206. package/bizar-dash/src/web/v8/ui/primitives/Portal.tsx +33 -0
  207. package/bizar-dash/src/web/v8/ui/primitives/ScrollArea.tsx +62 -0
  208. package/bizar-dash/src/web/v8/ui/primitives/Separator.tsx +42 -0
  209. package/bizar-dash/src/web/v8/ui/primitives/Stack.tsx +73 -0
  210. package/bizar-dash/src/web/v8/ui/primitives/VisuallyHidden.tsx +49 -0
  211. package/bizar-dash/src/web/v8/ui/settings/SettingsNav.tsx +91 -0
  212. package/bizar-dash/src/web/v8/ui/settings/SettingsRow.tsx +88 -0
  213. package/bizar-dash/src/web/v8/ui/settings/SettingsSection.tsx +109 -0
  214. package/bizar-dash/src/web/v8/ui/styles/globals.css +225 -0
  215. package/bizar-dash/src/web/v8/ui/styles/reset.css +57 -0
  216. package/bizar-dash/src/web/v8/ui/styles/tokens.css +217 -0
  217. package/bizar-dash/src/web/v8/ui/theme/DensityProvider.test.tsx +74 -0
  218. package/bizar-dash/src/web/v8/ui/theme/DensityProvider.tsx +66 -0
  219. package/bizar-dash/src/web/v8/ui/theme/ThemeProvider.test.tsx +86 -0
  220. package/bizar-dash/src/web/v8/ui/theme/ThemeProvider.tsx +94 -0
  221. package/bizar-dash/src/web/v8/ui/theme/ThemeToggle.tsx +88 -0
  222. package/bizar-dash/src/web/v8/ui/theme/useDensity.ts +15 -0
  223. package/bizar-dash/src/web/v8/ui/theme/useTheme.ts +16 -0
  224. package/bizar-dash/src/web/v8/ui/utils/cx.ts +19 -0
  225. package/bizar-dash/src/web/v8/views/Activity/ActivityView.tsx +71 -0
  226. package/bizar-dash/src/web/v8/views/Agents/AgentsView.tsx +172 -0
  227. package/bizar-dash/src/web/v8/views/CommandPalette/AppCommandPalette.test.tsx +142 -0
  228. package/bizar-dash/src/web/v8/views/CommandPalette/AppCommandPalette.tsx +247 -0
  229. package/bizar-dash/src/web/v8/views/Goals/GoalsView.tsx +193 -0
  230. package/bizar-dash/src/web/v8/views/Libraries/LibrariesView.tsx +108 -0
  231. package/bizar-dash/src/web/v8/views/Memory/MemoryView.tsx +77 -0
  232. package/bizar-dash/src/web/v8/views/Overview/OverviewView.tsx +152 -0
  233. package/bizar-dash/src/web/v8/views/Router.tsx +72 -0
  234. package/bizar-dash/src/web/v8/views/Settings/SettingsView.tsx +730 -0
  235. package/bizar-dash/src/web/v8/views/Tasks/CommandPalettePlaceholder.tsx +106 -0
  236. package/bizar-dash/src/web/v8/views/Tasks/TasksKanbanPlaceholder.tsx +62 -0
  237. package/bizar-dash/src/web/v8/views/Tasks/TasksView.tsx +165 -0
  238. package/bizar-dash/src/web/v8/vite-env.d.ts +15 -0
  239. package/bizar-dash/src/web/{mobile.html → v8.html} +4 -7
  240. package/bizar-dash/tests/components/Button.test.tsx +51 -14
  241. package/bizar-dash/tests/components/Card.test.tsx +37 -20
  242. package/bizar-dash/tests/components/Dialog.test.tsx +80 -0
  243. package/bizar-dash/tests/components/Toast.test.tsx +48 -95
  244. package/bizar-dash/tests/goals-decompose.test.mjs +177 -0
  245. package/bizar-dash/tests/setup.ts +47 -0
  246. package/bizar-dash/tests/ui/primitives/VisuallyHidden.test.tsx +30 -15
  247. package/bizar-dash/vite.config.ts +41 -2
  248. package/bizar-dash/vitest.config.ts +9 -4
  249. package/cli/bin.mjs +32 -0
  250. package/cli/install.mjs +26 -1
  251. package/cli/provision-claude.mjs +86 -0
  252. package/package.json +36 -3
  253. package/scripts/run-dev.mjs +84 -0
  254. package/bizar-dash/dist/assets/EnvVarsSection-BfhAz3ax.js +0 -114
  255. package/bizar-dash/dist/assets/EnvVarsSection-BfhAz3ax.js.map +0 -1
  256. package/bizar-dash/dist/assets/MobileChat-DLWdv6tQ.js +0 -1
  257. package/bizar-dash/dist/assets/MobileChat-DLWdv6tQ.js.map +0 -1
  258. package/bizar-dash/dist/assets/MobileSettings-Bxv62uPY.js +0 -1
  259. package/bizar-dash/dist/assets/MobileSettings-Bxv62uPY.js.map +0 -1
  260. package/bizar-dash/dist/assets/Toast-ATSAmbdi.js +0 -26
  261. package/bizar-dash/dist/assets/Toast-ATSAmbdi.js.map +0 -1
  262. package/bizar-dash/dist/assets/__vite-browser-external-BIHI7g3E.js +0 -1
  263. package/bizar-dash/dist/assets/__vite-browser-external-BIHI7g3E.js.map +0 -1
  264. package/bizar-dash/dist/assets/main-CJAtrosO.css +0 -1
  265. package/bizar-dash/dist/assets/main-DKKj9dsq.js +0 -430
  266. package/bizar-dash/dist/assets/main-DKKj9dsq.js.map +0 -1
  267. package/bizar-dash/dist/assets/mobile-C_naUN91.js +0 -1
  268. package/bizar-dash/dist/assets/mobile-C_naUN91.js.map +0 -1
  269. package/bizar-dash/dist/assets/mobile-layout-BWLtwtfQ.css +0 -1
  270. package/bizar-dash/dist/assets/mobile-layout-GZ3bE8L6.js +0 -211
  271. package/bizar-dash/dist/assets/mobile-layout-GZ3bE8L6.js.map +0 -1
  272. package/bizar-dash/dist/assets/useSlashCommands-BOwD7lNb.js +0 -65
  273. package/bizar-dash/dist/assets/useSlashCommands-BOwD7lNb.js.map +0 -1
  274. package/bizar-dash/dist/index.html +0 -43
  275. package/bizar-dash/src/web/App.tsx +0 -915
  276. package/bizar-dash/src/web/MobileApp.tsx +0 -414
  277. package/bizar-dash/src/web/components/ArtifactCreateDialog.tsx +0 -95
  278. package/bizar-dash/src/web/components/ArtifactListDialog.tsx +0 -55
  279. package/bizar-dash/src/web/components/ArtifactViewer.tsx +0 -144
  280. package/bizar-dash/src/web/components/AuditDialog.tsx +0 -79
  281. package/bizar-dash/src/web/components/AutosaveField.tsx +0 -50
  282. package/bizar-dash/src/web/components/BackupRestore.tsx +0 -330
  283. package/bizar-dash/src/web/components/BgStatusBadge.tsx +0 -32
  284. package/bizar-dash/src/web/components/Button.tsx +0 -56
  285. package/bizar-dash/src/web/components/CanvasContextMenu.tsx +0 -68
  286. package/bizar-dash/src/web/components/Card.tsx +0 -40
  287. package/bizar-dash/src/web/components/CollapsibleSection.tsx +0 -72
  288. package/bizar-dash/src/web/components/CommandDialog.tsx +0 -66
  289. package/bizar-dash/src/web/components/DoctorPanel.tsx +0 -160
  290. package/bizar-dash/src/web/components/EmptyState.tsx +0 -30
  291. package/bizar-dash/src/web/components/EnvVarManager.tsx +0 -430
  292. package/bizar-dash/src/web/components/EvalDiff.tsx +0 -157
  293. package/bizar-dash/src/web/components/EvalExportButton.tsx +0 -27
  294. package/bizar-dash/src/web/components/EvalRunCard.tsx +0 -78
  295. package/bizar-dash/src/web/components/FileBrowser.tsx +0 -633
  296. package/bizar-dash/src/web/components/HeadroomSettings.tsx +0 -418
  297. package/bizar-dash/src/web/components/HeadroomStatus.tsx +0 -158
  298. package/bizar-dash/src/web/components/HelpDialog.tsx +0 -55
  299. package/bizar-dash/src/web/components/InviteDialog.tsx +0 -205
  300. package/bizar-dash/src/web/components/KillConfirmDialog.tsx +0 -88
  301. package/bizar-dash/src/web/components/MobileBottomNav.tsx +0 -38
  302. package/bizar-dash/src/web/components/MobileDrawer.tsx +0 -68
  303. package/bizar-dash/src/web/components/MobileHeader.tsx +0 -50
  304. package/bizar-dash/src/web/components/MobileLayout.tsx +0 -63
  305. package/bizar-dash/src/web/components/Modal.tsx +0 -215
  306. package/bizar-dash/src/web/components/Notifications.tsx +0 -242
  307. package/bizar-dash/src/web/components/ScheduleTemplateCard.tsx +0 -72
  308. package/bizar-dash/src/web/components/ScreenshotCapture.tsx +0 -138
  309. package/bizar-dash/src/web/components/ScreenshotOCR.tsx +0 -42
  310. package/bizar-dash/src/web/components/SearchModal.tsx +0 -227
  311. package/bizar-dash/src/web/components/SettingsNav.tsx +0 -117
  312. package/bizar-dash/src/web/components/SettingsSearch.tsx +0 -328
  313. package/bizar-dash/src/web/components/Sidebar.tsx +0 -89
  314. package/bizar-dash/src/web/components/Spinner.tsx +0 -19
  315. package/bizar-dash/src/web/components/StatusBadge.tsx +0 -56
  316. package/bizar-dash/src/web/components/Tag.tsx +0 -41
  317. package/bizar-dash/src/web/components/TailscaleSettings.tsx +0 -161
  318. package/bizar-dash/src/web/components/TaskCard.tsx +0 -69
  319. package/bizar-dash/src/web/components/TaskCreateSheet.tsx +0 -76
  320. package/bizar-dash/src/web/components/Toast.tsx +0 -150
  321. package/bizar-dash/src/web/components/Toggle.tsx +0 -31
  322. package/bizar-dash/src/web/components/Topbar.tsx +0 -455
  323. package/bizar-dash/src/web/components/UsageChart.tsx +0 -250
  324. package/bizar-dash/src/web/components/UsageTable.tsx +0 -90
  325. package/bizar-dash/src/web/components/VirtualList.tsx +0 -53
  326. package/bizar-dash/src/web/components/VisualPlanDialog.tsx +0 -58
  327. package/bizar-dash/src/web/components/VoiceNotesPanel.tsx +0 -211
  328. package/bizar-dash/src/web/components/VoiceRecorder.tsx +0 -105
  329. package/bizar-dash/src/web/components/WorkspaceSelector.tsx +0 -158
  330. package/bizar-dash/src/web/components/agents/CommunicationLog.tsx +0 -126
  331. package/bizar-dash/src/web/components/agents/DependencyGraph.tsx +0 -163
  332. package/bizar-dash/src/web/components/agents/QualityGates.tsx +0 -123
  333. package/bizar-dash/src/web/components/agents/RealTimeEventLog.tsx +0 -127
  334. package/bizar-dash/src/web/components/agents/RoutingDecisions.test.tsx +0 -148
  335. package/bizar-dash/src/web/components/agents/RoutingDecisions.tsx +0 -160
  336. package/bizar-dash/src/web/components/background/AttachButton.tsx +0 -96
  337. package/bizar-dash/src/web/components/background/TmuxAttachCard.tsx +0 -122
  338. package/bizar-dash/src/web/components/chat/AgentChip.tsx +0 -68
  339. package/bizar-dash/src/web/components/chat/AgentNode.tsx +0 -127
  340. package/bizar-dash/src/web/components/chat/AgentTree.tsx +0 -80
  341. package/bizar-dash/src/web/components/chat/ChatBubble.tsx +0 -60
  342. package/bizar-dash/src/web/components/chat/ChatComposer.tsx +0 -72
  343. package/bizar-dash/src/web/components/chat/ChatInfoPanel.tsx +0 -370
  344. package/bizar-dash/src/web/components/chat/ChatRail.tsx +0 -387
  345. package/bizar-dash/src/web/components/chat/ChatThread.tsx +0 -127
  346. package/bizar-dash/src/web/components/chat/ChatTopBar.tsx +0 -50
  347. package/bizar-dash/src/web/components/chat/Composer.tsx +0 -166
  348. package/bizar-dash/src/web/components/chat/ConfirmModal.tsx +0 -54
  349. package/bizar-dash/src/web/components/chat/EmptyState.tsx +0 -21
  350. package/bizar-dash/src/web/components/chat/FirstRunGreeting.tsx +0 -18
  351. package/bizar-dash/src/web/components/chat/FloatingComposer.tsx +0 -38
  352. package/bizar-dash/src/web/components/chat/InfoPanel.tsx +0 -184
  353. package/bizar-dash/src/web/components/chat/JumpToLatest.tsx +0 -58
  354. package/bizar-dash/src/web/components/chat/LoadingSkeleton.tsx +0 -19
  355. package/bizar-dash/src/web/components/chat/MessageBlock.tsx +0 -260
  356. package/bizar-dash/src/web/components/chat/MessageBubble.tsx +0 -60
  357. package/bizar-dash/src/web/components/chat/SessionList.tsx +0 -163
  358. package/bizar-dash/src/web/components/chat/SessionRowMenu.tsx +0 -206
  359. package/bizar-dash/src/web/components/chat/StreamingIndicator.tsx +0 -37
  360. package/bizar-dash/src/web/components/chat/SuggestionCards.tsx +0 -55
  361. package/bizar-dash/src/web/components/chat/WelcomeScreen.tsx +0 -36
  362. package/bizar-dash/src/web/components/chat/_legacy.ts +0 -30
  363. package/bizar-dash/src/web/components/chat/index.ts +0 -31
  364. package/bizar-dash/src/web/components/chat/useAutoGrowTextarea.ts +0 -18
  365. package/bizar-dash/src/web/components/chat/useChat.ts +0 -1190
  366. package/bizar-dash/src/web/components/chat/useSlashCommands.ts +0 -47
  367. package/bizar-dash/src/web/components/goals/GoalInput.tsx +0 -86
  368. package/bizar-dash/src/web/components/goals/PlanVisualization.tsx +0 -111
  369. package/bizar-dash/src/web/components/tasks/BacklogPanel.css +0 -109
  370. package/bizar-dash/src/web/components/tasks/BacklogPanel.tsx +0 -209
  371. package/bizar-dash/src/web/hooks/useAutosave.ts +0 -107
  372. package/bizar-dash/src/web/hooks/useI18n.ts +0 -13
  373. package/bizar-dash/src/web/index.html +0 -37
  374. package/bizar-dash/src/web/lib/api.ts +0 -237
  375. package/bizar-dash/src/web/lib/goapPlanner.ts +0 -614
  376. package/bizar-dash/src/web/lib/i18n.ts +0 -25
  377. package/bizar-dash/src/web/lib/logger.ts +0 -30
  378. package/bizar-dash/src/web/lib/markdown.tsx +0 -59
  379. package/bizar-dash/src/web/lib/search.ts +0 -115
  380. package/bizar-dash/src/web/lib/types.ts +0 -894
  381. package/bizar-dash/src/web/lib/utils.ts +0 -114
  382. package/bizar-dash/src/web/lib/ws.ts +0 -177
  383. package/bizar-dash/src/web/locales/en.json +0 -52
  384. package/bizar-dash/src/web/main.tsx +0 -43
  385. package/bizar-dash/src/web/mobile/MobileApp.tsx +0 -309
  386. package/bizar-dash/src/web/mobile/MobileBottomNav.tsx +0 -38
  387. package/bizar-dash/src/web/mobile/MobileChat.tsx +0 -138
  388. package/bizar-dash/src/web/mobile/MobileDoctor.tsx +0 -80
  389. package/bizar-dash/src/web/mobile/MobileEval.tsx +0 -167
  390. package/bizar-dash/src/web/mobile/MobileMemory.tsx +0 -108
  391. package/bizar-dash/src/web/mobile/MobileOverview.tsx +0 -213
  392. package/bizar-dash/src/web/mobile/MobileSettings.tsx +0 -251
  393. package/bizar-dash/src/web/mobile/MobileTasks.tsx +0 -94
  394. package/bizar-dash/src/web/mobile/MobileTopbar.tsx +0 -115
  395. package/bizar-dash/src/web/mobile/components/MobileBottomSheet.tsx +0 -182
  396. package/bizar-dash/src/web/mobile/components/MobileListItem.tsx +0 -64
  397. package/bizar-dash/src/web/mobile/components/MobileModal.tsx +0 -123
  398. package/bizar-dash/src/web/mobile/views/MobileActivity.tsx +0 -273
  399. package/bizar-dash/src/web/mobile/views/MobileAgents.tsx +0 -374
  400. package/bizar-dash/src/web/mobile/views/MobileArtifactCanvas.tsx +0 -439
  401. package/bizar-dash/src/web/mobile/views/MobileArtifacts.tsx +0 -143
  402. package/bizar-dash/src/web/mobile/views/MobileChat.tsx +0 -257
  403. package/bizar-dash/src/web/mobile/views/MobileConfig.tsx +0 -175
  404. package/bizar-dash/src/web/mobile/views/MobileHistory.tsx +0 -191
  405. package/bizar-dash/src/web/mobile/views/MobileMods.tsx +0 -149
  406. package/bizar-dash/src/web/mobile/views/MobileMore.tsx +0 -121
  407. package/bizar-dash/src/web/mobile/views/MobileNotifications.tsx +0 -137
  408. package/bizar-dash/src/web/mobile/views/MobilePlans.tsx +0 -26
  409. package/bizar-dash/src/web/mobile/views/MobileSchedules.tsx +0 -685
  410. package/bizar-dash/src/web/mobile/views/MobileSearchModal.tsx +0 -172
  411. package/bizar-dash/src/web/mobile/views/MobileSettings.tsx +0 -363
  412. package/bizar-dash/src/web/mobile/views/MobileSkills.tsx +0 -153
  413. package/bizar-dash/src/web/mobile/views/MobileTasks.tsx +0 -564
  414. package/bizar-dash/src/web/mobile/views/QrCodePanel.tsx +0 -69
  415. package/bizar-dash/src/web/mobile.tsx +0 -14
  416. package/bizar-dash/src/web/styles/agents-redesign.css +0 -311
  417. package/bizar-dash/src/web/styles/chat.css +0 -1740
  418. package/bizar-dash/src/web/styles/glyphs.css +0 -960
  419. package/bizar-dash/src/web/styles/main.css +0 -10389
  420. package/bizar-dash/src/web/styles/memory.css +0 -1177
  421. package/bizar-dash/src/web/styles/minimax-usage.css +0 -842
  422. package/bizar-dash/src/web/styles/mobile-chat.css +0 -5
  423. package/bizar-dash/src/web/styles/mobile-layout.css +0 -233
  424. package/bizar-dash/src/web/styles/mobile.css +0 -2181
  425. package/bizar-dash/src/web/styles/settings.css +0 -775
  426. package/bizar-dash/src/web/styles/skills.css +0 -302
  427. package/bizar-dash/src/web/styles/tasks-redesign.css +0 -253
  428. package/bizar-dash/src/web/styles/tasks.css +0 -605
  429. package/bizar-dash/src/web/ui/controls/Button.tsx +0 -77
  430. package/bizar-dash/src/web/ui/controls/Checkbox.tsx +0 -95
  431. package/bizar-dash/src/web/ui/controls/IconButton.tsx +0 -66
  432. package/bizar-dash/src/web/ui/controls/Kbd.tsx +0 -24
  433. package/bizar-dash/src/web/ui/controls/NumberInput.tsx +0 -77
  434. package/bizar-dash/src/web/ui/controls/RadioGroup.tsx +0 -109
  435. package/bizar-dash/src/web/ui/controls/SearchInput.tsx +0 -91
  436. package/bizar-dash/src/web/ui/controls/Select.tsx +0 -92
  437. package/bizar-dash/src/web/ui/controls/Slider.tsx +0 -70
  438. package/bizar-dash/src/web/ui/controls/TextInput.tsx +0 -67
  439. package/bizar-dash/src/web/ui/controls/Textarea.tsx +0 -56
  440. package/bizar-dash/src/web/ui/controls/Toggle.tsx +0 -79
  441. package/bizar-dash/src/web/ui/controls/controls.css +0 -476
  442. package/bizar-dash/src/web/ui/controls/index.ts +0 -35
  443. package/bizar-dash/src/web/ui/data/BarChart.tsx +0 -60
  444. package/bizar-dash/src/web/ui/data/DataTable.tsx +0 -216
  445. package/bizar-dash/src/web/ui/data/EmptyState.tsx +0 -60
  446. package/bizar-dash/src/web/ui/data/ErrorState.tsx +0 -56
  447. package/bizar-dash/src/web/ui/data/KeyValueList.tsx +0 -106
  448. package/bizar-dash/src/web/ui/data/LoadingState.tsx +0 -65
  449. package/bizar-dash/src/web/ui/data/Sparkline.tsx +0 -87
  450. package/bizar-dash/src/web/ui/data/StatTile.tsx +0 -87
  451. package/bizar-dash/src/web/ui/data/data.css +0 -540
  452. package/bizar-dash/src/web/ui/data/index.ts +0 -31
  453. package/bizar-dash/src/web/ui/feedback/Badge.tsx +0 -49
  454. package/bizar-dash/src/web/ui/feedback/Dialog.tsx +0 -209
  455. package/bizar-dash/src/web/ui/feedback/ProgressBar.tsx +0 -69
  456. package/bizar-dash/src/web/ui/feedback/StatusDot.tsx +0 -50
  457. package/bizar-dash/src/web/ui/feedback/Toast.tsx +0 -200
  458. package/bizar-dash/src/web/ui/feedback/Tooltip.tsx +0 -126
  459. package/bizar-dash/src/web/ui/feedback/feedback.css +0 -314
  460. package/bizar-dash/src/web/ui/feedback/index.ts +0 -43
  461. package/bizar-dash/src/web/ui/index.ts +0 -57
  462. package/bizar-dash/src/web/ui/layout/AppShell.tsx +0 -51
  463. package/bizar-dash/src/web/ui/layout/Breadcrumbs.tsx +0 -97
  464. package/bizar-dash/src/web/ui/layout/Panel.tsx +0 -73
  465. package/bizar-dash/src/web/ui/layout/PanelHeader.tsx +0 -39
  466. package/bizar-dash/src/web/ui/layout/Sidebar.tsx +0 -131
  467. package/bizar-dash/src/web/ui/layout/Tabs.tsx +0 -133
  468. package/bizar-dash/src/web/ui/layout/Topbar.tsx +0 -42
  469. package/bizar-dash/src/web/ui/layout/ViewHeader.tsx +0 -48
  470. package/bizar-dash/src/web/ui/layout/index.ts +0 -34
  471. package/bizar-dash/src/web/ui/layout/layout.css +0 -464
  472. package/bizar-dash/src/web/ui/navigation/CommandPalette.tsx +0 -199
  473. package/bizar-dash/src/web/ui/navigation/NavGroup.tsx +0 -95
  474. package/bizar-dash/src/web/ui/navigation/NavLink.tsx +0 -93
  475. package/bizar-dash/src/web/ui/navigation/index.ts +0 -17
  476. package/bizar-dash/src/web/ui/navigation/navigation.css +0 -343
  477. package/bizar-dash/src/web/ui/primitives/Box.tsx +0 -91
  478. package/bizar-dash/src/web/ui/primitives/Grid.tsx +0 -49
  479. package/bizar-dash/src/web/ui/primitives/Inline.tsx +0 -55
  480. package/bizar-dash/src/web/ui/primitives/Separator.tsx +0 -46
  481. package/bizar-dash/src/web/ui/primitives/Stack.tsx +0 -54
  482. package/bizar-dash/src/web/ui/primitives/VisuallyHidden.tsx +0 -26
  483. package/bizar-dash/src/web/ui/primitives/index.ts +0 -23
  484. package/bizar-dash/src/web/ui/primitives/primitives.css +0 -183
  485. package/bizar-dash/src/web/ui/styles/globals.css +0 -86
  486. package/bizar-dash/src/web/ui/styles/reset.css +0 -125
  487. package/bizar-dash/src/web/ui/styles/tokens.css +0 -208
  488. package/bizar-dash/src/web/ui/theme/ThemeProvider.tsx +0 -142
  489. package/bizar-dash/src/web/ui/theme/tokens.ts +0 -131
  490. package/bizar-dash/src/web/ui/theme/useTheme.ts +0 -22
  491. package/bizar-dash/src/web/ui/utils/cx.ts +0 -42
  492. package/bizar-dash/src/web/views/Activity.tsx +0 -1221
  493. package/bizar-dash/src/web/views/Agents.tsx +0 -964
  494. package/bizar-dash/src/web/views/Artifacts.tsx +0 -1494
  495. package/bizar-dash/src/web/views/BackgroundAgents.tsx +0 -822
  496. package/bizar-dash/src/web/views/Chat.tsx +0 -532
  497. package/bizar-dash/src/web/views/Config.tsx +0 -3
  498. package/bizar-dash/src/web/views/Doctor.tsx +0 -317
  499. package/bizar-dash/src/web/views/Eval.tsx +0 -372
  500. package/bizar-dash/src/web/views/EvalReport.tsx +0 -353
  501. package/bizar-dash/src/web/views/GoalPlanner.tsx +0 -158
  502. package/bizar-dash/src/web/views/Harness.tsx +0 -306
  503. package/bizar-dash/src/web/views/History.tsx +0 -353
  504. package/bizar-dash/src/web/views/Memory.tsx +0 -193
  505. package/bizar-dash/src/web/views/MiniMaxUsage.tsx +0 -942
  506. package/bizar-dash/src/web/views/ModView.tsx +0 -207
  507. package/bizar-dash/src/web/views/Mods.tsx +0 -706
  508. package/bizar-dash/src/web/views/Overview.tsx +0 -1343
  509. package/bizar-dash/src/web/views/Providers.tsx +0 -302
  510. package/bizar-dash/src/web/views/Schedules.tsx +0 -902
  511. package/bizar-dash/src/web/views/Settings.tsx +0 -308
  512. package/bizar-dash/src/web/views/Skills.tsx +0 -383
  513. package/bizar-dash/src/web/views/SpawnAgentModal.tsx +0 -221
  514. package/bizar-dash/src/web/views/Tasks.tsx +0 -789
  515. package/bizar-dash/src/web/views/Workspace.tsx +0 -294
  516. package/bizar-dash/src/web/views/glyphs/GlyphRenderer.tsx +0 -844
  517. package/bizar-dash/src/web/views/glyphs/components.tsx +0 -1098
  518. package/bizar-dash/src/web/views/memory/ConfigPanel.tsx +0 -426
  519. package/bizar-dash/src/web/views/memory/FromScreenshotPanel.tsx +0 -23
  520. package/bizar-dash/src/web/views/memory/GitSyncPanel.tsx +0 -220
  521. package/bizar-dash/src/web/views/memory/LightragPanel.tsx +0 -310
  522. package/bizar-dash/src/web/views/memory/MemoryGraphLegend.tsx +0 -29
  523. package/bizar-dash/src/web/views/memory/MemoryGraphPanel.tsx +0 -192
  524. package/bizar-dash/src/web/views/memory/MemoryGraphView.tsx +0 -336
  525. package/bizar-dash/src/web/views/memory/MemoryOverview.tsx +0 -367
  526. package/bizar-dash/src/web/views/memory/MemoryStatusCard.tsx +0 -160
  527. package/bizar-dash/src/web/views/memory/ObsidianPanel.tsx +0 -650
  528. package/bizar-dash/src/web/views/memory/SemanticSearchPanel.tsx +0 -197
  529. package/bizar-dash/src/web/views/memory/VaultFromClipboardPanel.tsx +0 -101
  530. package/bizar-dash/src/web/views/settings/ActivitySection.tsx +0 -205
  531. package/bizar-dash/src/web/views/settings/AgentSection.tsx +0 -305
  532. package/bizar-dash/src/web/views/settings/AuthSection.tsx +0 -159
  533. package/bizar-dash/src/web/views/settings/EnvVarsSection.tsx +0 -15
  534. package/bizar-dash/src/web/views/settings/GeneralSection.tsx +0 -128
  535. package/bizar-dash/src/web/views/settings/HeadroomSection.tsx +0 -39
  536. package/bizar-dash/src/web/views/settings/MemorySection.tsx +0 -154
  537. package/bizar-dash/src/web/views/settings/NetworkSection.tsx +0 -87
  538. package/bizar-dash/src/web/views/settings/NotificationsSection.tsx +0 -34
  539. package/bizar-dash/src/web/views/settings/SystemLlmSection.tsx +0 -81
  540. package/bizar-dash/src/web/views/settings/ThemeSection.tsx +0 -168
  541. package/bizar-dash/src/web/views/settings/UpdatesSection.tsx +0 -256
  542. package/bizar-dash/src/web/views/settings/WorkspacesSection.tsx +0 -189
  543. package/packages/sdk/.harness/agents.json +0 -17
  544. package/packages/sdk/.harness/topology.json +0 -4
  545. /package/bizar-dash/tests/{BackgroundAgents.test.tsx → v7-archive/BackgroundAgents.test.tsx} +0 -0
  546. /package/bizar-dash/tests/{a11y → v7-archive/a11y}/forms.test.tsx +0 -0
  547. /package/bizar-dash/tests/{a11y.test.tsx → v7-archive/a11y.test.tsx} +0 -0
  548. /package/bizar-dash/tests/{autosave.test.tsx → v7-archive/autosave.test.tsx} +0 -0
  549. /package/bizar-dash/tests/{backup-restore.test.tsx → v7-archive/backup-restore.test.tsx} +0 -0
  550. /package/bizar-dash/tests/{chat-composer.test.tsx → v7-archive/chat-composer.test.tsx} +0 -0
  551. /package/bizar-dash/tests/{communication-log.test.tsx → v7-archive/communication-log.test.tsx} +0 -0
  552. /package/bizar-dash/tests/{components → v7-archive/components}/Modal.test.tsx +0 -0
  553. /package/bizar-dash/tests/{components → v7-archive/components}/Spinner.test.tsx +0 -0
  554. /package/bizar-dash/tests/{components → v7-archive/components}/StatusBadge.test.tsx +0 -0
  555. /package/bizar-dash/tests/{components → v7-archive/components}/doctor-panel.test.tsx +0 -0
  556. /package/bizar-dash/tests/{components → v7-archive/components}/screenshot-ocr.test.tsx +0 -0
  557. /package/bizar-dash/tests/{components → v7-archive/components}/settings-search.test.tsx +0 -0
  558. /package/bizar-dash/tests/{components → v7-archive/components}/workspace-selector.test.tsx +0 -0
  559. /package/bizar-dash/tests/{ui → v7-archive}/controls/Button.test.tsx +0 -0
  560. /package/bizar-dash/tests/{ui → v7-archive}/controls/Checkbox.test.tsx +0 -0
  561. /package/bizar-dash/tests/{ui → v7-archive}/controls/IconButton.test.tsx +0 -0
  562. /package/bizar-dash/tests/{ui → v7-archive}/controls/Kbd.test.tsx +0 -0
  563. /package/bizar-dash/tests/{ui → v7-archive}/controls/NumberInput.test.tsx +0 -0
  564. /package/bizar-dash/tests/{ui → v7-archive}/controls/RadioGroup.test.tsx +0 -0
  565. /package/bizar-dash/tests/{ui → v7-archive}/controls/SearchInput.test.tsx +0 -0
  566. /package/bizar-dash/tests/{ui → v7-archive}/controls/Select.test.tsx +0 -0
  567. /package/bizar-dash/tests/{ui → v7-archive}/controls/Slider.test.tsx +0 -0
  568. /package/bizar-dash/tests/{ui → v7-archive}/controls/TextInput.test.tsx +0 -0
  569. /package/bizar-dash/tests/{ui → v7-archive}/controls/Textarea.test.tsx +0 -0
  570. /package/bizar-dash/tests/{ui → v7-archive}/controls/Toggle.test.tsx +0 -0
  571. /package/bizar-dash/tests/{ui → v7-archive}/data/BarChart.test.tsx +0 -0
  572. /package/bizar-dash/tests/{ui → v7-archive}/data/DataTable.test.tsx +0 -0
  573. /package/bizar-dash/tests/{ui → v7-archive}/data/EmptyState.test.tsx +0 -0
  574. /package/bizar-dash/tests/{ui → v7-archive}/data/ErrorState.test.tsx +0 -0
  575. /package/bizar-dash/tests/{ui → v7-archive}/data/KeyValueList.test.tsx +0 -0
  576. /package/bizar-dash/tests/{ui → v7-archive}/data/LoadingState.test.tsx +0 -0
  577. /package/bizar-dash/tests/{ui → v7-archive}/data/Sparkline.test.tsx +0 -0
  578. /package/bizar-dash/tests/{ui → v7-archive}/data/StatTile.test.tsx +0 -0
  579. /package/bizar-dash/tests/{dep-graph.test.tsx → v7-archive/dep-graph.test.tsx} +0 -0
  580. /package/bizar-dash/tests/{eval-web-ui.test.tsx → v7-archive/eval-web-ui.test.tsx} +0 -0
  581. /package/bizar-dash/tests/{event-log.test.tsx → v7-archive/event-log.test.tsx} +0 -0
  582. /package/bizar-dash/tests/{ui → v7-archive}/feedback/Badge.test.tsx +0 -0
  583. /package/bizar-dash/tests/{ui → v7-archive}/feedback/Dialog.test.tsx +0 -0
  584. /package/bizar-dash/tests/{ui → v7-archive}/feedback/ProgressBar.test.tsx +0 -0
  585. /package/bizar-dash/tests/{ui → v7-archive}/feedback/StatusDot.test.tsx +0 -0
  586. /package/bizar-dash/tests/{ui → v7-archive}/feedback/Toast.test.tsx +0 -0
  587. /package/bizar-dash/tests/{ui → v7-archive}/feedback/Tooltip.test.tsx +0 -0
  588. /package/bizar-dash/tests/{goal-input.test.tsx → v7-archive/goal-input.test.tsx} +0 -0
  589. /package/bizar-dash/tests/{goap-planner.test.ts → v7-archive/goap-planner.test.ts} +0 -0
  590. /package/bizar-dash/tests/{hooks → v7-archive/hooks}/useModal.test.tsx +0 -0
  591. /package/bizar-dash/tests/{hooks → v7-archive/hooks}/useToast.test.tsx +0 -0
  592. /package/bizar-dash/tests/{ui → v7-archive}/layout/AppShell.test.tsx +0 -0
  593. /package/bizar-dash/tests/{ui → v7-archive}/layout/Breadcrumbs.test.tsx +0 -0
  594. /package/bizar-dash/tests/{ui → v7-archive}/layout/Panel.test.tsx +0 -0
  595. /package/bizar-dash/tests/{ui → v7-archive}/layout/PanelHeader.test.tsx +0 -0
  596. /package/bizar-dash/tests/{ui → v7-archive}/layout/Sidebar.test.tsx +0 -0
  597. /package/bizar-dash/tests/{ui → v7-archive}/layout/Tabs.test.tsx +0 -0
  598. /package/bizar-dash/tests/{ui → v7-archive}/layout/Topbar.test.tsx +0 -0
  599. /package/bizar-dash/tests/{ui → v7-archive}/layout/ViewHeader.test.tsx +0 -0
  600. /package/bizar-dash/tests/{lib → v7-archive/lib}/i18n.test.ts +0 -0
  601. /package/bizar-dash/tests/{lib → v7-archive/lib}/search-fuzzy.test.ts +0 -0
  602. /package/bizar-dash/tests/{lib → v7-archive/lib}/utils.test.ts +0 -0
  603. /package/bizar-dash/tests/{memory-graph-view.test.tsx → v7-archive/memory-graph-view.test.tsx} +0 -0
  604. /package/bizar-dash/tests/{mobile-chat.test.tsx → v7-archive/mobile-chat.test.tsx} +0 -0
  605. /package/bizar-dash/tests/{mobile-layout.test.tsx → v7-archive/mobile-layout.test.tsx} +0 -0
  606. /package/bizar-dash/tests/{mobile-overview.test.tsx → v7-archive/mobile-overview.test.tsx} +0 -0
  607. /package/bizar-dash/tests/{mobile-settings.test.tsx → v7-archive/mobile-settings.test.tsx} +0 -0
  608. /package/bizar-dash/tests/{mobile-tasks.test.tsx → v7-archive/mobile-tasks.test.tsx} +0 -0
  609. /package/bizar-dash/tests/{ui → v7-archive}/navigation/CommandPalette.test.tsx +0 -0
  610. /package/bizar-dash/tests/{ui → v7-archive}/navigation/NavGroup.test.tsx +0 -0
  611. /package/bizar-dash/tests/{ui → v7-archive}/navigation/NavLink.test.tsx +0 -0
  612. /package/bizar-dash/tests/{quality-gates.test.tsx → v7-archive/quality-gates.test.tsx} +0 -0
  613. /package/bizar-dash/tests/{settings-layout.test.tsx → v7-archive/settings-layout.test.tsx} +0 -0
  614. /package/bizar-dash/tests/{settings-mode-wiring.test.tsx → v7-archive/settings-mode-wiring.test.tsx} +0 -0
  615. /package/bizar-dash/tests/{settings-nav.test.tsx → v7-archive/settings-nav.test.tsx} +0 -0
  616. /package/bizar-dash/tests/{ui → v7-archive/ui}/primitives/Box.test.tsx +0 -0
  617. /package/bizar-dash/tests/{ui → v7-archive/ui}/primitives/Grid.test.tsx +0 -0
  618. /package/bizar-dash/tests/{ui → v7-archive/ui}/primitives/Inline.test.tsx +0 -0
  619. /package/bizar-dash/tests/{ui → v7-archive/ui}/primitives/Separator.test.tsx +0 -0
  620. /package/bizar-dash/tests/{ui → v7-archive/ui}/primitives/Stack.test.tsx +0 -0
  621. /package/bizar-dash/tests/{views → v7-archive/views}/Agents.test.tsx +0 -0
  622. /package/bizar-dash/tests/{views → v7-archive/views}/Memory.test.tsx +0 -0
  623. /package/bizar-dash/tests/{views → v7-archive/views}/Overview.test.tsx +0 -0
  624. /package/bizar-dash/tests/{views → v7-archive/views}/Tasks.test.tsx +0 -0
  625. /package/bizar-dash/tests/{views → v7-archive/views}/sidebar.test.tsx +0 -0
  626. /package/bizar-dash/tests/{views → v7-archive/views}/topbar.test.tsx +0 -0
  627. /package/bizar-dash/tests/{voice-recorder.test.tsx → v7-archive/voice-recorder.test.tsx} +0 -0
@@ -223,6 +223,84 @@ export async function buildSdk({ dryRun = false } = {}) {
223
223
  }
224
224
  }
225
225
 
226
+ /**
227
+ * Build the Bizar plugin shim (`plugins/bizar/`) so the loader can find
228
+ * `plugins/bizar/dist/index.js` at runtime. Same root cause as `buildSdk()`:
229
+ * the npm-installed package ships `plugins/bizar/index.ts` (TS source) but
230
+ * nothing at `dist/`. Without this build step, `bizar dash start` reports
231
+ * `Plugin source not found at .../plugins/bizar` from `cli/install.mjs:installPluginBizar`
232
+ * (which is misleading — the dir exists, just the compiled entry doesn't).
233
+ *
234
+ * v8.0.2 — same bun/npx/tsc strategy as `buildSdk()`. We compile the
235
+ * single TS entry `plugins/bizar/index.ts` to `plugins/bizar/dist/index.js`
236
+ * via the existing `plugins/bizar/tsconfig.json`.
237
+ *
238
+ * Idempotent: skips when `plugins/bizar/dist/index.js` already exists.
239
+ * Non-fatal: returns `{ ok: false, message }` rather than throwing.
240
+ */
241
+ export async function buildPlugin({ dryRun = false } = {}) {
242
+ const pluginRoot = join(REPO_ROOT, 'plugins', 'bizar');
243
+ const srcEntry = join(pluginRoot, 'index.ts');
244
+ const distEntry = join(pluginRoot, 'dist', 'index.js');
245
+
246
+ if (!existsSync(srcEntry)) {
247
+ return { ok: true, skipped: true, message: `Plugin src not found at ${srcEntry} — skipping build` };
248
+ }
249
+
250
+ if (existsSync(distEntry)) {
251
+ return { ok: true, skipped: true, message: `Plugin dist already present — skipping build (delete ${join(pluginRoot, 'dist')} to force)` };
252
+ }
253
+
254
+ if (dryRun) {
255
+ return { ok: true, skipped: false, message: `would build plugin at ${pluginRoot}` };
256
+ }
257
+
258
+ // Same PATH-resolution dance as buildSdk(): npm-global scripts may have
259
+ // a stripped PATH that doesn't include ~/.bun/bin or the npm bin dir,
260
+ // so bun's tsc shim isn't visible to the child shell.
261
+ const bunFromHome = join(process.env.HOME || '', '.bun', 'bin', 'bun');
262
+ let cmd, args, childEnv;
263
+ if (existsSync(bunFromHome)) {
264
+ cmd = bunFromHome;
265
+ args = ['x', 'tsc', '-p', 'plugins/bizar/tsconfig.json'];
266
+ const pathDelim = process.platform === 'win32' ? ';' : ':';
267
+ const bunBin = dirname(bunFromHome);
268
+ let npmGlobalBin = '';
269
+ try {
270
+ const npmRootG = execSync('npm root -g', { encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'] }).trim();
271
+ npmGlobalBin = join(dirname(npmRootG), '..', 'bin');
272
+ } catch {
273
+ npmGlobalBin = process.platform === 'win32'
274
+ ? join(process.env.APPDATA || '', 'npm')
275
+ : join(process.env.HOME || '', '.local', 'bin');
276
+ }
277
+ const pathParts = [bunBin];
278
+ if (npmGlobalBin && existsSync(npmGlobalBin)) pathParts.push(npmGlobalBin);
279
+ pathParts.push(process.env.PATH || '');
280
+ childEnv = { ...process.env, PATH: pathParts.join(pathDelim) };
281
+ } else if (haveCmd('bun')) {
282
+ cmd = 'bun';
283
+ args = ['x', 'tsc', '-p', 'plugins/bizar/tsconfig.json'];
284
+ childEnv = process.env;
285
+ } else {
286
+ cmd = 'npx';
287
+ args = ['--yes', 'tsc', '-p', 'plugins/bizar/tsconfig.json'];
288
+ childEnv = process.env;
289
+ }
290
+
291
+ try {
292
+ logInfo(`building plugin with \`${cmd} ${args.join(' ')}\` (REPO_ROOT=${REPO_ROOT})`);
293
+ execFileSync(cmd, args, { cwd: REPO_ROOT, stdio: 'pipe', timeout: 180_000, env: childEnv });
294
+ if (existsSync(distEntry)) {
295
+ return { ok: true, skipped: false, message: 'Plugin built (dist/index.js present)' };
296
+ }
297
+ return { ok: false, message: `build completed but ${distEntry} still missing — check tsconfig outDir` };
298
+ } catch (err) {
299
+ const stderr = err.stderr ? err.stderr.toString().split('\n').slice(0, 5).join(' | ') : '(no stderr)';
300
+ return { ok: false, message: `Plugin build failed: ${stderr}` };
301
+ }
302
+ }
303
+
226
304
  /**
227
305
  * Build the dashboard SPA (Vite production bundle) so the Node server
228
306
  * in `bizar-dash/src/server/server.mjs` can serve the React UI from
@@ -987,6 +1065,14 @@ export async function runProvision(opts = {}) {
987
1065
  // full story.
988
1066
  await runStep('Building SDK', () => buildSdk({ dryRun }));
989
1067
 
1068
+ // ── 4b.2. Build the Bizar plugin shim so dist/index.js exists. ────
1069
+ // The loader expects `plugins/bizar/dist/index.js`. Without this
1070
+ // step v8.0.x npm installs crash on `bizar dash start` with
1071
+ // `Plugin source not found at .../plugins/bizar` from
1072
+ // `cli/install.mjs:installPluginBizar` (the dir exists, but the
1073
+ // compiled entry does not). See `buildPlugin()` JSDoc.
1074
+ await runStep('Building plugin', () => buildPlugin({ dryRun }));
1075
+
990
1076
  // ── 4c. Build the dashboard SPA so dist/index.html exists. ───────────
991
1077
  // The Node server in `bizar-dash/src/server/server.mjs` serves the
992
1078
  // React UI from `bizar-dash/dist/`. The published npm tarball excludes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polderlabs/bizar",
3
- "version": "7.0.4",
3
+ "version": "8.1.0",
4
4
  "description": "Norse-pantheon multi-agent system for Claude Code — 14 agents across 4 cost tiers with cost-aware routing, plans, and a configurable agent harness. Ships as a single npm package with the dashboard server, Claude Code MCP server, and typed SDK.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -46,7 +46,10 @@
46
46
  "bun": ">=1.1.0"
47
47
  },
48
48
  "dependencies": {
49
- "@polderlabs/bizar-sdk": "^0.4.0",
49
+ "@dnd-kit/core": "^6.3.1",
50
+ "@dnd-kit/sortable": "^8.0.0",
51
+ "@dnd-kit/utilities": "^3.2.2",
52
+ "@hookform/resolvers": "^3.9.0",
50
53
  "@mdx-js/mdx": "^3.1.1",
51
54
  "@mdx-js/react": "^3.1.1",
52
55
  "@opentelemetry/api": "^1.9.1",
@@ -55,14 +58,39 @@
55
58
  "@opentelemetry/sdk-node": "^0.52.1",
56
59
  "@opentelemetry/sdk-trace-node": "^1.30.1",
57
60
  "@opentelemetry/semantic-conventions": "^1.41.1",
61
+ "@polderlabs/bizar-sdk": "^0.4.0",
62
+ "@radix-ui/react-accordion": "^1.2.16",
63
+ "@radix-ui/react-checkbox": "^1.1.2",
64
+ "@radix-ui/react-context-menu": "^2.2.2",
65
+ "@radix-ui/react-dialog": "^1.1.2",
66
+ "@radix-ui/react-dropdown-menu": "^2.1.2",
67
+ "@radix-ui/react-label": "^2.1.0",
68
+ "@radix-ui/react-popover": "^1.1.2",
69
+ "@radix-ui/react-radio-group": "^1.2.1",
70
+ "@radix-ui/react-select": "^2.1.2",
71
+ "@radix-ui/react-separator": "^1.1.0",
72
+ "@radix-ui/react-slider": "^1.2.1",
73
+ "@radix-ui/react-slot": "^1.1.0",
74
+ "@radix-ui/react-switch": "^1.1.1",
75
+ "@radix-ui/react-tabs": "^1.1.17",
76
+ "@radix-ui/react-toggle": "^1.1.0",
77
+ "@radix-ui/react-toggle-group": "^1.1.0",
78
+ "@radix-ui/react-tooltip": "^1.1.4",
79
+ "@tanstack/react-query": "^5.59.0",
80
+ "@tanstack/react-router": "^1.78.0",
81
+ "@tanstack/react-table": "^8.20.5",
82
+ "@tanstack/react-virtual": "^3.10.8",
58
83
  "@xyflow/react": "^12.11.1",
59
84
  "better-sqlite3": "^12.11.1",
60
85
  "blessed": "^0.1.81",
61
86
  "boxen": "^8.0.0",
62
87
  "chalk": "^5.4.0",
63
88
  "chokidar": "^3.6.0",
89
+ "clsx": "^2.1.1",
90
+ "cmdk": "^1.0.4",
64
91
  "cors": "^2.8.6",
65
92
  "croner": "^10.0.1",
93
+ "date-fns": "^4.1.0",
66
94
  "express": "^4.22.0",
67
95
  "formidable": "^3.5.0",
68
96
  "fuse.js": "^7.0.0",
@@ -73,11 +101,16 @@
73
101
  "qrcode.react": "^4.2.0",
74
102
  "react": "^18.3.0",
75
103
  "react-dom": "^18.3.0",
104
+ "react-hook-form": "^7.53.0",
76
105
  "react-markdown": "^9.0.0",
106
+ "recharts": "^2.13.0",
77
107
  "remark-gfm": "^4.0.0",
108
+ "sonner": "^1.5.0",
109
+ "tailwind-merge": "^2.5.4",
78
110
  "tesseract.js": "^5.1.1",
79
111
  "ws": "^8.18.0",
80
- "zod": "4.1.8"
112
+ "zod": "4.1.8",
113
+ "zustand": "^5.0.0"
81
114
  },
82
115
  "peerDependencies": {
83
116
  "@anthropic-ai/claude-agent-sdk": "*"
@@ -0,0 +1,84 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * scripts/run-dev.mjs — boots the dashboard backend (port 4098) and
4
+ * Vite dev server (port 5174) in the same process tree.
5
+ *
6
+ * The backend has no built-in CLI entrypoint, so we invoke
7
+ * `createServer({ port, projectRoot, clineConfigDir, bizarRoot })` here
8
+ * and call `server.listen` directly (mirrors tui.mjs:892).
9
+ */
10
+ import { spawn } from 'node:child_process';
11
+ import { dirname, resolve, join } from 'node:path';
12
+ import { fileURLToPath, pathToFileURL } from 'node:url';
13
+ import { homedir } from 'node:os';
14
+
15
+ const ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '..');
16
+ const DASH = resolve(ROOT, 'bizar-dash');
17
+ const PORT = Number(process.env.PORT || '4098');
18
+ const VITE_PORT = Number(process.env.VITE_PORT || '5174');
19
+ const HOME = homedir();
20
+ const PROJECT_ROOT = process.cwd();
21
+ const CLINE_CONFIG_DIR = join(HOME, '.config', 'cline');
22
+ const BIZAR_ROOT = DASH;
23
+
24
+ function run(name, cmd, args, cwd, env) {
25
+ const child = spawn(cmd, args, {
26
+ cwd,
27
+ env: { ...process.env, ...env, FORCE_COLOR: '0' },
28
+ stdio: ['ignore', 'pipe', 'pipe'],
29
+ });
30
+ const tag = `[${name}]`;
31
+ child.stdout.on('data', (d) => process.stdout.write(`${tag} ${d}`));
32
+ child.stderr.on('data', (d) => process.stderr.write(`${tag} ${d}`));
33
+ child.on('exit', (code, sig) => {
34
+ console.error(`${tag} exited (code=${code}, signal=${sig})`);
35
+ });
36
+ return child;
37
+ }
38
+
39
+ async function startBackend() {
40
+ const serverPath = pathToFileURL(join(DASH, 'src/server/server.mjs')).href;
41
+ const serverMod = await import(serverPath);
42
+ const { server, close } = await serverMod.createServer({
43
+ port: PORT,
44
+ projectRoot: PROJECT_ROOT,
45
+ clineConfigDir: CLINE_CONFIG_DIR,
46
+ bizarRoot: BIZAR_ROOT,
47
+ });
48
+ await new Promise((resolve, reject) => {
49
+ const onErr = (err) => { server.off('listening', onOk); reject(err); };
50
+ const onOk = () => { server.off('error', onErr); resolve(); };
51
+ server.once('error', onErr);
52
+ server.once('listening', onOk);
53
+ server.listen(PORT, '127.0.0.1');
54
+ });
55
+ console.log(`[backend] listening on http://127.0.0.1:${PORT}`);
56
+ return { close };
57
+ }
58
+
59
+ const backendHandle = await startBackend().catch((err) => {
60
+ console.error('[backend] failed to start:', err?.message || err);
61
+ process.exit(1);
62
+ });
63
+
64
+ const frontend = run(
65
+ 'frontend',
66
+ process.execPath,
67
+ [
68
+ resolve(ROOT, 'node_modules/vite/bin/vite.js'),
69
+ '--port', String(VITE_PORT),
70
+ '--host', '127.0.0.1',
71
+ '--strictPort',
72
+ ],
73
+ DASH,
74
+ { VITE_PORT: String(VITE_PORT) },
75
+ );
76
+
77
+ const shutdown = async (sig) => {
78
+ console.error(`\n[run-dev] ${sig} — stopping both`);
79
+ try { frontend.kill('SIGTERM'); } catch { /* */ }
80
+ try { await backendHandle.close(); } catch { /* */ }
81
+ setTimeout(() => process.exit(0), 600);
82
+ };
83
+ process.on('SIGINT', () => { void shutdown('SIGINT'); });
84
+ process.on('SIGTERM', () => { void shutdown('SIGTERM'); });
@@ -1,114 +0,0 @@
1
- import{c as C,r as o,j as e,h as T,W as ke,b,R as O,n as be,d as we,A as me,u as Ne,_ as Ce,g as ne,P as ze,X as ce,C as Se,q as Me,T as Ae}from"./mobile-layout-GZ3bE8L6.js";import{u as X,C as xe,T as oe,I as Le,a as Re}from"./Toast-ATSAmbdi.js";/**
2
- * @license lucide-react v0.460.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const Xe=C("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
7
- * @license lucide-react v0.460.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */const Ie=C("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
12
- * @license lucide-react v0.460.0 - ISC
13
- *
14
- * This source code is licensed under the ISC license.
15
- * See the LICENSE file in the root directory of this source tree.
16
- */const q=C("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
17
- * @license lucide-react v0.460.0 - ISC
18
- *
19
- * This source code is licensed under the ISC license.
20
- * See the LICENSE file in the root directory of this source tree.
21
- */const ae=C("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
22
- * @license lucide-react v0.460.0 - ISC
23
- *
24
- * This source code is licensed under the ISC license.
25
- * See the LICENSE file in the root directory of this source tree.
26
- */const Qe=C("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
27
- * @license lucide-react v0.460.0 - ISC
28
- *
29
- * This source code is licensed under the ISC license.
30
- * See the LICENSE file in the root directory of this source tree.
31
- */const Y=C("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
32
- * @license lucide-react v0.460.0 - ISC
33
- *
34
- * This source code is licensed under the ISC license.
35
- * See the LICENSE file in the root directory of this source tree.
36
- */const Ee=C("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
37
- * @license lucide-react v0.460.0 - ISC
38
- *
39
- * This source code is licensed under the ISC license.
40
- * See the LICENSE file in the root directory of this source tree.
41
- */const Be=C("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
42
- * @license lucide-react v0.460.0 - ISC
43
- *
44
- * This source code is licensed under the ISC license.
45
- * See the LICENSE file in the root directory of this source tree.
46
- */const re=C("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
47
- * @license lucide-react v0.460.0 - ISC
48
- *
49
- * This source code is licensed under the ISC license.
50
- * See the LICENSE file in the root directory of this source tree.
51
- */const Je=C("FolderInput",[["path",{d:"M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1",key:"fm4g5t"}],["path",{d:"M2 13h10",key:"pgb2dq"}],["path",{d:"m9 16 3-3-3-3",key:"6m91ic"}]]);/**
52
- * @license lucide-react v0.460.0 - ISC
53
- *
54
- * This source code is licensed under the ISC license.
55
- * See the LICENSE file in the root directory of this source tree.
56
- */const es=C("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
57
- * @license lucide-react v0.460.0 - ISC
58
- *
59
- * This source code is licensed under the ISC license.
60
- * See the LICENSE file in the root directory of this source tree.
61
- */const ss=C("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
62
- * @license lucide-react v0.460.0 - ISC
63
- *
64
- * This source code is licensed under the ISC license.
65
- * See the LICENSE file in the root directory of this source tree.
66
- */const ye=C("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
67
- * @license lucide-react v0.460.0 - ISC
68
- *
69
- * This source code is licensed under the ISC license.
70
- * See the LICENSE file in the root directory of this source tree.
71
- */const Pe=C("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/**
72
- * @license lucide-react v0.460.0 - ISC
73
- *
74
- * This source code is licensed under the ISC license.
75
- * See the LICENSE file in the root directory of this source tree.
76
- */const as=C("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
77
- * @license lucide-react v0.460.0 - ISC
78
- *
79
- * This source code is licensed under the ISC license.
80
- * See the LICENSE file in the root directory of this source tree.
81
- */const Te=C("Loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]]);/**
82
- * @license lucide-react v0.460.0 - ISC
83
- *
84
- * This source code is licensed under the ISC license.
85
- * See the LICENSE file in the root directory of this source tree.
86
- */const $e=C("PanelsTopLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]]);/**
87
- * @license lucide-react v0.460.0 - ISC
88
- *
89
- * This source code is licensed under the ISC license.
90
- * See the LICENSE file in the root directory of this source tree.
91
- */const de=C("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/**
92
- * @license lucide-react v0.460.0 - ISC
93
- *
94
- * This source code is licensed under the ISC license.
95
- * See the LICENSE file in the root directory of this source tree.
96
- */const ts=C("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/**
97
- * @license lucide-react v0.460.0 - ISC
98
- *
99
- * This source code is licensed under the ISC license.
100
- * See the LICENSE file in the root directory of this source tree.
101
- */const De=C("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
102
- * @license lucide-react v0.460.0 - ISC
103
- *
104
- * This source code is licensed under the ISC license.
105
- * See the LICENSE file in the root directory of this source tree.
106
- */const He=C("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
107
- * @license lucide-react v0.460.0 - ISC
108
- *
109
- * This source code is licensed under the ISC license.
110
- * See the LICENSE file in the root directory of this source tree.
111
- */const Ve=C("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),k=o.forwardRef(function({variant:s="secondary",size:l="md",iconOnly:c=!1,loading:r=!1,disabled:m,className:x,children:i,...n},h){return e.jsxs("button",{ref:h,type:n.type??"button",disabled:m||r,className:T("btn",`btn-${s}`,`btn-size-${l}`,c&&"btn-icon",r&&"btn-loading",x),...n,children:[r?e.jsx("span",{className:"btn-spinner","aria-hidden":!0}):null,i]})});function ns(...a){const s=[],l=c=>{if(c){if(typeof c=="string"||typeof c=="number"){s.push(String(c));return}if(Array.isArray(c)){for(const r of c)l(r);return}if(typeof c=="object")for(const r in c)c[r]&&s.push(r)}};for(const c of a)l(c);return s.join(" ")}function E({variant:a="elevated",interactive:s=!1,className:l,children:c,...r}){return e.jsx("div",{className:T("card",`card-${a}`,s&&"card-interactive",l),...r,children:c})}function B({children:a,className:s}){return e.jsx("h3",{className:T("card-title",s),children:a})}function P({children:a,className:s}){return e.jsx("div",{className:T("card-meta",s),children:a})}const te=[{id:"bizar",name:"Bizar CLI"},{id:"bizar-dash",name:"Dashboard"},{id:"bizar-plugin",name:"Opencode Plugin"}];function rs(){const a=X(),[s,l]=o.useState({current:{},latest:null,checking:!1,updating:!1,hasUpdates:!1,requiresRestart:!1,perPackage:{}});o.useEffect(()=>{const i=new ke;return i.on(n=>{(n.type==="update:progress"||n.type==="update:log"||n.type==="update:complete")&&l(h=>{if(n.type==="update:complete")return{...h,updating:!1,requiresRestart:!!n.requiresRestart};if(n.type==="update:log"){const g=n,v=h.perPackage[g.pkg]||{logs:[]};return{...h,perPackage:{...h.perPackage,[g.pkg]:{...v,logs:[...(v.logs||[]).slice(-50),g.line]}}}}const y=n;return{...h,perPackage:{...h.perPackage,[y.pkg]:{...h.perPackage[y.pkg],status:y.status,error:y.error,newVersion:y.newVersion}}}})}),()=>i.close()},[]),o.useEffect(()=>{b.get("/updates/status").then(i=>l(n=>({...n,current:i.current}))).catch(i=>l(n=>({...n,error:i.message})))},[]);const c=async()=>{l(i=>({...i,checking:!0,error:void 0}));try{const i=await b.get("/updates/check");l(n=>({...n,checking:!1,current:i.current,latest:i.latest,hasUpdates:i.hasUpdates}))}catch(i){l(n=>({...n,checking:!1,error:i.message}))}},r=async()=>{if(confirm("Update Bizar packages? The dashboard will restart automatically.")){l(i=>({...i,updating:!0,requiresRestart:!1,perPackage:{},error:void 0}));try{await b.post("/updates/apply",{packages:["bizar","bizar-dash","bizar-plugin"]})}catch(i){l(n=>({...n,updating:!1,error:i.message}))}}},m=async()=>{if(confirm("Restart the dashboard? You will be disconnected briefly."))try{await b.post("/restart"),a.info("Restarting…",3e3),setTimeout(()=>window.location.reload(),3e3)}catch{a.error("Restart failed")}},x=s.checking||s.updating;return e.jsxs(E,{id:"settings-updates","data-section":"updates",children:[e.jsxs(B,{children:[e.jsx(Y,{size:14})," Updates"]}),e.jsx(P,{children:"Check installed Bizar packages and apply dashboard updates."}),e.jsxs("div",{className:"updates-current",children:[e.jsx("h4",{children:"Installed versions"}),e.jsx("ul",{children:te.map(i=>e.jsxs("li",{children:[e.jsx("span",{children:i.name}),e.jsx("code",{className:"mono",children:s.current[i.id]||"—"})]},i.id))})]}),s.latest&&e.jsxs("div",{className:"updates-latest",children:[e.jsx("h4",{children:"Latest available"}),e.jsx("ul",{children:te.map(i=>{var g;const n=s.current[i.id],h=(g=s.latest)==null?void 0:g[i.id],y=n&&h&&n!==h;return e.jsxs("li",{className:y?"updates-outdated":"updates-current-version",children:[e.jsx("span",{children:i.name}),e.jsxs("code",{className:"mono",children:[h||"—",y&&e.jsx("span",{className:"updates-badge",children:"update available"})]})]},i.id)})})]}),s.updating&&e.jsx("div",{className:"updates-progress-rows",children:te.map(i=>{const n=s.perPackage[i.id]||{status:"idle",logs:[]};return e.jsxs("div",{className:"updates-pkg-row",children:[e.jsxs("div",{className:"updates-pkg-row-header",children:[e.jsx("span",{className:"updates-pkg-name",children:i.name}),e.jsxs("div",{className:"updates-pkg-status",children:[n.status==="starting"&&e.jsx("span",{className:"btn-spinner"}),n.status==="installing"&&e.jsx("span",{className:"btn-spinner"}),n.status==="done"&&e.jsx(q,{size:14,className:"icon-success"}),n.status==="error"&&e.jsx(xe,{size:14,className:"icon-error"}),e.jsx("span",{children:n.status}),n.newVersion&&e.jsxs("code",{className:"mono",style:{fontSize:11},children:["→ ",n.newVersion]})]})]}),n.logs.length>0&&e.jsxs("details",{className:"updates-pkg-logs",children:[e.jsxs("summary",{children:["npm output (",n.logs.length," lines)"]}),e.jsx("pre",{children:n.logs.join(`
112
- `)})]}),n.status==="error"&&n.error&&e.jsxs("div",{className:"updates-pkg-error",children:[e.jsx(oe,{size:12})," ",n.error]})]},i.id)})}),e.jsxs("div",{className:"updates-actions",children:[e.jsxs(k,{onClick:c,disabled:x,children:[s.checking?e.jsx("span",{className:"btn-spinner"}):e.jsx(O,{size:14}),"Check for updates"]}),e.jsxs(k,{variant:"primary",onClick:r,disabled:!s.hasUpdates||s.updating,children:[s.updating?e.jsx("span",{className:"btn-spinner"}):e.jsx(Y,{size:14}),s.updating?"Updating…":s.hasUpdates?"Update now":"Up to date"]}),s.requiresRestart&&e.jsxs(k,{variant:"danger",onClick:m,children:[e.jsx(O,{size:14})," Restart Dashboard"]})]}),s.error&&e.jsxs("div",{className:"updates-error",children:[e.jsx(oe,{size:14}),e.jsx("span",{children:s.error})]})]})}function Ue(a,s,{delay:l=800,onSaved:c,onError:r}={}){const[m,x]=o.useState(a),[i,n]=o.useState("idle"),h=o.useRef(null),y=o.useRef(null),g=o.useRef(a),v=o.useRef(!1),S=o.useCallback(async p=>{n("saving");try{await s(p),g.current=p,y.current=null,n("saved"),c==null||c(),setTimeout(()=>n("idle"),2e3)}catch(j){n("error"),r==null||r(j)}},[s,c,r]),R=o.useCallback(p=>{x(p),y.current=p,v.current=!0,h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{h.current=null,v.current=!1;const j=y.current;y.current=null,j!==null&&S(j)},l)},[l,S]),z=o.useCallback(()=>{h.current&&(clearTimeout(h.current),h.current=null,v.current=!1)},[]),u=o.useCallback(async()=>{if(h.current){clearTimeout(h.current),h.current=null,v.current=!1;const p=y.current;y.current=null,p!==null&&await S(p)}},[S]);return o.useEffect(()=>()=>{if(h.current){clearTimeout(h.current),h.current=null;const p=y.current;y.current=null,p!==null&&(n("saving"),s(p).then(()=>{g.current=p,n("saved"),c==null||c()}).catch(j=>{n("error"),r==null||r(j)}).finally(()=>{setTimeout(()=>n("idle"),2e3)}))}},[s,c,r]),{value:m,setValue:R,status:i,save:S,flush:u,clearDebounce:z,hasPendingDebounceRef:v,pendingValueRef:y}}function he({initialValue:a,saveFn:s,delay:l=800,render:c,className:r}){const{value:m,setValue:x,status:i,save:n,clearDebounce:h,hasPendingDebounceRef:y,pendingValueRef:g}=Ue(a,s,{delay:l}),v=be.useCallback(()=>{y.current&&(h(),g.current!==null&&n(g.current))},[h,y,n,g]);return e.jsxs("div",{className:`autosave-field ${r||""} ${i}`,children:[c({value:m,onChange:x,onBlur:v}),e.jsxs("span",{className:"autosave-status",role:"status","aria-live":"polite",children:[i==="saving"&&e.jsx(Te,{className:"spinning",size:12}),i==="saved"&&e.jsx(Ie,{size:12}),i==="error"&&e.jsx(xe,{size:12})]})]})}const _e=[{id:"topnav",label:"Top nav"},{id:"sidebar",label:"Sidebar"},{id:"both",label:"Both"}];function ls({settings:a,patchUi:s,patchTop:l,autoSave:c}){return e.jsxs(e.Fragment,{children:[e.jsxs(E,{id:"settings-layout","data-section":"layout",children:[e.jsxs(B,{children:[e.jsx($e,{size:14})," UI layout"]}),e.jsx(P,{children:"Choose how the dashboard's navigation is presented."}),e.jsx("div",{className:"layout-row","data-setting-id":"ui.layout",children:_e.map(r=>e.jsx("button",{type:"button",className:T("layout-card",a.ui.layout===r.id&&"layout-card-active"),onClick:()=>s({layout:r.id}),children:e.jsx("span",{className:"layout-card-label",children:r.label})},r.id))}),e.jsxs("label",{className:"checkbox-row","data-setting-id":"ui.showHeader",children:[e.jsx("input",{type:"checkbox",checked:a.ui.showHeader,onChange:r=>s({showHeader:r.target.checked})}),e.jsx("span",{children:"Show header"})]}),e.jsxs("label",{className:"checkbox-row","data-setting-id":"ui.showStatusBar",children:[e.jsx("input",{type:"checkbox",checked:a.ui.showStatusBar,onChange:r=>s({showStatusBar:r.target.checked})}),e.jsx("span",{children:"Show status bar"})]}),e.jsxs("div",{className:"field","data-setting-id":"ui.defaultTab",children:[e.jsx("label",{className:"field-label",children:"Default tab"}),e.jsxs("select",{className:"select",value:a.ui.defaultTab,onChange:r=>s({defaultTab:r.target.value}),children:[e.jsx("option",{value:"overview",children:"Overview"}),e.jsx("option",{value:"chat",children:"Chat"}),e.jsx("option",{value:"agents",children:"Agents"}),e.jsx("option",{value:"artifacts",children:"Plans"}),e.jsx("option",{value:"projects",children:"Projects"}),e.jsx("option",{value:"tasks",children:"Tasks"}),e.jsx("option",{value:"config",children:"Config"}),e.jsx("option",{value:"settings",children:"Settings"}),e.jsx("option",{value:"mods",children:"Mods"}),e.jsx("option",{value:"schedules",children:"Schedules"})]})]})]}),e.jsxs(E,{id:"settings-general","data-section":"general",children:[e.jsx(B,{children:"General"}),e.jsx(P,{children:"Default agent + model override."}),e.jsxs("div",{className:"field","data-setting-id":"defaultAgent",children:[e.jsx("label",{className:"field-label",htmlFor:"set-default-agent",children:"Default agent"}),e.jsx(he,{initialValue:a.defaultAgent||"",saveFn:async r=>{l("defaultAgent",r),c==null||c("defaultAgent",r)},render:({value:r,onChange:m,onBlur:x})=>e.jsx("input",{id:"set-default-agent",className:"input",type:"text",placeholder:"e.g. odin",value:r,onChange:i=>m(i.target.value),onBlur:x})})]}),e.jsxs("div",{className:"field","data-setting-id":"defaultModel",children:[e.jsx("label",{className:"field-label",htmlFor:"set-default-model",children:"Model override"}),e.jsx(he,{initialValue:a.defaultModel||"",saveFn:async r=>{l("defaultModel",r),c==null||c("defaultModel",r)},render:({value:r,onChange:m,onBlur:x})=>e.jsx("input",{id:"set-default-model",className:"input",type:"text",placeholder:"(leave empty for provider default)",value:r,onChange:i=>m(i.target.value),onBlur:x})})]})]})]})}function is({initialStatus:a}){var p;const[s,l]=o.useState(a??null),[c,r]=o.useState(""),[m,x]=o.useState(!1),[i,n]=o.useState(null);o.useEffect(()=>{s===null&&b.get("/tailscale/status").then(j=>l(j)).catch(()=>l(null))},[]);const h=async()=>{try{const j=await b.get("/tailscale/status");l(j)}catch{n("Failed to load Tailscale status")}},y=async()=>{if(c.trim()){x(!0),n(null);try{await b.post("/tailscale/setup",{authKey:c.trim()}),await h(),r("")}catch(j){n(j.message||"Authentication failed")}finally{x(!1)}}},g=async()=>{var j,w,M;if(s){x(!0),n(null);try{await b.post("/tailscale/setup",{port:((j=s.settings)==null?void 0:j.port)||4321,https:((w=s.settings)==null?void 0:w.https)!==!1,hostname:((M=s.settings)==null?void 0:M.hostname)||""}),await h()}catch($){n($.message||"Setup failed")}finally{x(!1)}}},v=async()=>{x(!0),n(null);try{await b.post("/tailscale/unserve"),await h()}catch(j){n(j.message||"Remove failed")}finally{x(!1)}},S=(s==null?void 0:s.installed)??!1,R=(s==null?void 0:s.authenticated)??!1,z=((p=s==null?void 0:s.settings)==null?void 0:p.enabled)??!1,u=z?`https://${(s==null?void 0:s.hostname)||"bizar-dash"}`:null;return S?e.jsxs(E,{id:"settings-tailscale-auth","data-section":"tailscale",children:[e.jsxs(B,{children:[e.jsx(de,{size:14})," Tailscale Integration"]}),e.jsx(P,{children:"Expose the dashboard over your Tailscale network using an auth key."}),i&&e.jsx("p",{style:{color:"var(--color-error, #f85149)",fontSize:"0.85rem"},children:i}),R?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"status-row",style:{display:"flex",alignItems:"center",gap:"0.5rem",marginBottom:"0.75rem"},children:[e.jsx(q,{size:16,style:{color:"var(--color-success, #3fb950)"}}),e.jsxs("span",{children:["Authenticated as ",e.jsx("strong",{children:(s==null?void 0:s.hostname)||"unknown"})]})]}),z&&u?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"status-row",style:{display:"flex",alignItems:"center",gap:"0.5rem",marginBottom:"0.75rem"},children:[e.jsx(Pe,{size:16}),e.jsx("a",{href:u,target:"_blank",rel:"noreferrer",children:u})]}),e.jsx(k,{variant:"secondary",size:"sm",onClick:v,disabled:m,children:"Remove serve"})]}):e.jsx(k,{variant:"primary",size:"sm",onClick:g,disabled:m,children:"Set up Tailscale serve"})]}):e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"muted",style:{marginBottom:"0.75rem"},children:"Not authenticated with Tailscale."}),e.jsxs("div",{style:{display:"flex",gap:"0.5rem",flexWrap:"wrap"},children:[e.jsx("input",{type:"text",className:"input",placeholder:"tskey-...",value:c,onChange:j=>r(j.target.value),style:{flex:1,minWidth:"200px"},disabled:m}),e.jsx(k,{variant:"primary",size:"sm",onClick:y,disabled:m||!c.trim(),children:"Authenticate"})]})]})]}):e.jsxs(E,{id:"settings-tailscale-auth","data-section":"tailscale",children:[e.jsxs(B,{children:[e.jsx(de,{size:14})," Tailscale Integration"]}),e.jsx(P,{children:"Tailscale is not installed on this machine."}),e.jsxs("p",{className:"muted",children:["Install from"," ",e.jsx("a",{href:"https://tailscale.com/download",target:"_blank",rel:"noreferrer",children:"tailscale.com/download"})]})]})}function cs({settings:a,patchTop:s}){var l,c,r;return e.jsxs(E,{id:"settings-system-llm","data-section":"system-llm",children:[e.jsxs(B,{children:[e.jsx(we,{size:14})," System LLM API"]}),e.jsx(P,{children:"Configures the LLM used for automatic title generation, prompt enhancement, summarization, and other system-level calls."}),e.jsxs("label",{className:"checkbox-row","data-setting-id":"systemLlm.enabled",children:[e.jsx("input",{type:"checkbox",checked:!!((l=a.systemLlm)!=null&&l.enabled),onChange:m=>{const x=a.systemLlm||{enabled:!0,provider:"cline",model:"cline/deepseek-v4-flash-free"};s("systemLlm",{...x,enabled:m.target.checked})}}),e.jsx("span",{children:"Enable system LLM calls"})]}),e.jsxs("div",{className:"field","data-setting-id":"systemLlm.provider",style:{marginTop:"var(--space-3)"},children:[e.jsx("label",{className:"field-label",htmlFor:"set-system-llm-provider",children:"Provider"}),e.jsxs("select",{id:"set-system-llm-provider",className:"select",value:((c=a.systemLlm)==null?void 0:c.provider)||"cline",onChange:m=>{const x=a.systemLlm||{enabled:!0,provider:"cline",model:"cline/deepseek-v4-flash-free"};s("systemLlm",{...x,provider:m.target.value})},children:[e.jsx("option",{value:"cline",children:"Cline"}),e.jsx("option",{value:"openrouter",children:"OpenRouter"}),e.jsx("option",{value:"minimax",children:"MiniMax"})]})]}),e.jsxs("div",{className:"field","data-setting-id":"systemLlm.model",children:[e.jsx("label",{className:"field-label",htmlFor:"set-system-llm-model",children:"Model"}),e.jsx("input",{id:"set-system-llm-model",className:"input mono",type:"text",placeholder:"cline/deepseek-v4-flash-free",value:((r=a.systemLlm)==null?void 0:r.model)||"cline/deepseek-v4-flash-free",onChange:m=>{const x=a.systemLlm||{enabled:!0,provider:"cline",model:"cline/deepseek-v4-flash-free"};s("systemLlm",{...x,model:m.target.value})}}),e.jsxs("p",{className:"field-help",children:["The API key is read from ",e.jsx("code",{children:"auth.json"})," for the selected provider. Leave the default model for best results."]})]}),e.jsxs("div",{style:{marginTop:"var(--space-4)"},children:[e.jsx("h4",{style:{margin:"0 0 var(--space-2)"},children:"Features using this API"}),e.jsxs("ul",{className:"settings-feature-list",style:{margin:0,paddingLeft:"var(--space-4)",lineHeight:1.8},children:[e.jsx("li",{children:"Auto-title generation for new chat sessions"}),e.jsx("li",{children:"Auto-title generation for new tasks"}),e.jsx("li",{children:'"Enhance prompt" button in the task input'}),e.jsx("li",{children:'"Enhance prompt" button in the chat composer'}),e.jsx("li",{className:"muted",style:{fontSize:12},children:"Future: summarization, name generation, and more"})]})]})]})}const qe=[{value:"anthropic",label:"Anthropic"},{value:"anyllm",label:"AnyLLM"},{value:"litellm-anthropic",label:"LiteLLM (Anthropic)"},{value:"litellm-openai",label:"LiteLLM (OpenAI)"}];function Oe({settings:a,onPatch:s}){const l=X(),[c,r]=o.useState(null),[m,x]=o.useState(null),[i,n]=o.useState(!1),[h,y]=o.useState(!1),[g,v]=o.useState(!1),[S,R]=o.useState(!1),[z,u]=o.useState(!1),[p,j]=o.useState(!1),w=o.useCallback(async()=>{n(!0);try{const[d,V]=await Promise.all([b.get("/headroom/status"),b.get("/headroom/stats?hours=24").catch(()=>({error:"no stats"}))]);r(d),V.error||x(V)}catch(d){l.error(`Failed to load Headroom status: ${d.message}`)}finally{n(!1)}},[l]);o.useEffect(()=>{w()},[w]);const M=async()=>{y(!0);try{const d=await b.post("/headroom/install",{force:!0});d.installed?(l.success(`Headroom installed via ${d.method}.`),await w()):l.error('Headroom install failed. Try: pip install "headroom-ai[all]"')}catch(d){l.error(`Install failed: ${d.message}`)}finally{y(!1)}},$=async()=>{v(!0);try{(await b.post("/headroom/wrap",{port:a.port})).ok?(l.success("cline wrapped with Headroom."),await w()):l.error("Wrap failed.")}catch(d){l.error(`Wrap failed: ${d.message}`)}finally{v(!1)}},U=async()=>{R(!0);try{(await b.post("/headroom/unwrap")).ok?(l.success("cline unwrapped from Headroom."),await w()):l.error("Unwrap failed.")}catch(d){l.error(`Unwrap failed: ${d.message}`)}finally{R(!1)}},W=async()=>{u(!0);try{(await b.post("/headroom/proxy/start",{port:a.port,host:a.host})).ok?(l.success(`Headroom proxy started on ${a.host}:${a.port}.`),await w()):l.error("Proxy start failed.")}catch(d){l.error(`Proxy start failed: ${d.message}`)}finally{u(!1)}},K=async()=>{j(!0);try{(await b.post("/headroom/proxy/stop")).ok?(l.success("Headroom proxy stopped."),await w()):l.error("Proxy stop failed.")}catch(d){l.error(`Proxy stop failed: ${d.message}`)}finally{j(!1)}},Z=async()=>{try{const{spawn:d}=await Ce(async()=>{const{spawn:V}=await import("./__vite-browser-external-BIHI7g3E.js");return{spawn:V}},[]);d("headroom",["dashboard"],{detached:!0,stdio:"ignore"})}catch{l.error("Could not open Headroom dashboard. Run `headroom dashboard` manually.")}},{installed:L,version:G,proxyRunning:D,proxyPort:Q,wrapped:A}=c||{},_=(m==null?void 0:m.compressionRatio)??0,H=(m==null?void 0:m.tokensSaved)??0;return e.jsx("div",{id:"settings-headroom","data-section":"headroom",children:e.jsxs(E,{children:[e.jsxs(B,{children:[e.jsx(me,{size:14,style:{color:D?"var(--success)":"var(--text-dim)"}}),"Headroom",L&&G&&e.jsxs("span",{style:{fontSize:11,color:"var(--text-dim)",marginLeft:6},children:["v",G," ",D?"✓":"✗"]}),!L&&e.jsx("span",{style:{fontSize:11,color:"var(--error)",marginLeft:6},children:"not installed"})]}),e.jsx(P,{children:"Context compression for token efficiency. Compresses tool outputs, logs, and conversation history by 60–95% before they reach the model."}),e.jsxs("div",{style:{display:"flex",gap:16,flexWrap:"wrap",marginTop:12,marginBottom:12},children:[e.jsxs("div",{className:"headroom-status-item",children:[L?e.jsx(q,{size:12,style:{color:"var(--success)"}}):e.jsx(ae,{size:12,style:{color:"var(--error)"}}),e.jsx("span",{children:L?"Installed":"Not installed"})]}),e.jsxs("div",{className:"headroom-status-item",children:[D?e.jsx(q,{size:12,style:{color:"var(--success)"}}):e.jsx(ae,{size:12,style:{color:"var(--text-dim)"}}),e.jsxs("span",{children:["Proxy ",D?`${Q} ✓`:"stopped"]})]}),e.jsxs("div",{className:"headroom-status-item",children:[A?e.jsx(q,{size:12,style:{color:"var(--success)"}}):e.jsx(ae,{size:12,style:{color:"var(--text-dim)"}}),e.jsxs("span",{children:["cline ",A?"wrapped":"not wrapped"]})]})]}),(H>0||_>0)&&e.jsxs("div",{style:{display:"flex",gap:24,marginBottom:12},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:20,fontWeight:700,color:"var(--success)"},children:_>0?`${Math.round(_*100)}%`:"—"}),e.jsx("div",{className:"muted",style:{fontSize:11},children:"Compression ratio"})]}),e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:20,fontWeight:700,color:"var(--accent)"},children:H>0?H.toLocaleString():"—"}),e.jsx("div",{className:"muted",style:{fontSize:11},children:"Tokens saved (24h)"})]})]}),e.jsxs("div",{style:{display:"flex",gap:8,flexWrap:"wrap",marginBottom:8},children:[L?e.jsxs(e.Fragment,{children:[e.jsxs(k,{variant:"secondary",size:"sm",onClick:$,disabled:g||A,title:A?"cline is already wrapped":"Wrap cline to route through Headroom proxy",children:[g?e.jsx("span",{className:"btn-spinner"}):e.jsx(Ve,{size:13}),g?"Wrapping…":A?"Wrapped ✓":"Wrap cline"]}),A&&e.jsxs(k,{variant:"ghost",size:"sm",onClick:U,disabled:S,children:[S?e.jsx("span",{className:"btn-spinner"}):e.jsx(O,{size:13}),S?"Unwrapping…":"Unwrap"]})]}):e.jsxs(k,{variant:"primary",size:"sm",onClick:M,disabled:h,children:[h?e.jsx("span",{className:"btn-spinner"}):e.jsx(Y,{size:13}),h?"Installing…":"Install Headroom"]}),L&&e.jsxs(e.Fragment,{children:[D?e.jsxs(k,{variant:"secondary",size:"sm",onClick:K,disabled:p,children:[p?e.jsx("span",{className:"btn-spinner"}):e.jsx(De,{size:13}),p?"Stopping…":"Stop proxy"]}):e.jsxs(k,{variant:"secondary",size:"sm",onClick:W,disabled:z,children:[z?e.jsx("span",{className:"btn-spinner"}):e.jsx(Ne,{size:13}),z?"Starting…":"Start proxy"]}),e.jsxs(k,{variant:"ghost",size:"sm",onClick:Z,children:[e.jsx(Ee,{size:13}),"Dashboard"]})]}),e.jsx(k,{variant:"ghost",size:"sm",onClick:w,disabled:i,children:e.jsx(O,{size:13,className:i?"spin":""})})]}),e.jsxs("div",{style:{marginTop:16},children:[e.jsxs("label",{className:"checkbox-row",children:[e.jsx("input",{type:"checkbox",checked:a.enabled,onChange:d=>s({enabled:d.target.checked})}),e.jsx("span",{children:"Enable Headroom"})]}),e.jsxs("label",{className:"checkbox-row",children:[e.jsx("input",{type:"checkbox",checked:a.autoInstall,onChange:d=>s({autoInstall:d.target.checked})}),e.jsx("span",{children:"Auto-install if missing on dashboard startup"})]}),e.jsxs("label",{className:"checkbox-row",children:[e.jsx("input",{type:"checkbox",checked:a.autoStart,onChange:d=>s({autoStart:d.target.checked})}),e.jsx("span",{children:"Auto-start proxy on dashboard startup"})]}),e.jsxs("label",{className:"checkbox-row",children:[e.jsx("input",{type:"checkbox",checked:a.autoWrap,onChange:d=>s({autoWrap:d.target.checked})}),e.jsx("span",{children:"Auto-wrap cline on dashboard startup"})]}),e.jsxs("label",{className:"checkbox-row",children:[e.jsx("input",{type:"checkbox",checked:a.routeAllProviders,onChange:d=>s({routeAllProviders:d.target.checked})}),e.jsx("span",{children:"Route all providers through Headroom proxy"})]}),e.jsxs("div",{className:"task-form-row",style:{marginTop:12},children:[e.jsxs("div",{className:"task-form-field",children:[e.jsx("label",{className:"field-label",children:"Proxy port"}),e.jsx("input",{type:"number",className:"input",value:a.port,min:1,max:65535,onChange:d=>s({port:Math.max(1,Math.min(65535,parseInt(d.target.value,10)||8787))})})]}),e.jsxs("div",{className:"task-form-field",children:[e.jsx("label",{className:"field-label",children:"Proxy host"}),e.jsx("input",{type:"text",className:"input",value:a.host,onChange:d=>s({host:d.target.value})})]})]}),e.jsxs("div",{className:"task-form-row",children:[e.jsxs("div",{className:"task-form-field",children:[e.jsx("label",{className:"field-label",children:"Backend"}),e.jsx("select",{className:"select",value:a.backend,onChange:d=>s({backend:d.target.value}),children:qe.map(d=>e.jsx("option",{value:d.value,children:d.label},d.value))})]}),e.jsxs("div",{className:"task-form-field",children:[e.jsx("label",{className:"field-label",children:"Monthly budget (USD)"}),e.jsx("input",{type:"number",className:"input",value:a.budget,min:0,step:1,onChange:d=>s({budget:Math.max(0,parseFloat(d.target.value)||0)})}),e.jsx("span",{className:"field-help",children:"0 = unlimited"})]})]}),e.jsxs("label",{className:"checkbox-row",children:[e.jsx("input",{type:"checkbox",checked:a.outputShaper,onChange:d=>s({outputShaper:d.target.checked})}),e.jsx("span",{children:"Enable output shaper"})]}),e.jsxs("label",{className:"checkbox-row",children:[e.jsx("input",{type:"checkbox",checked:a.telemetry,onChange:d=>s({telemetry:d.target.checked})}),e.jsx("span",{children:"Enable telemetry"})]})]})]})})}const ue={enabled:!0,autoInstall:!0,port:8787,host:"127.0.0.1",outputShaper:!1,telemetry:!1,budget:0,backend:"anthropic",autoStart:!0,autoWrap:!0,routeAllProviders:!0};function os({settings:a,setSettings:s,setDirty:l}){return e.jsx(Oe,{settings:a.headroom||ue,onPatch:c=>{s(r=>({...r,headroom:{...r.headroom||ue,...c}})),l(!0)}})}function Fe(){const a=X(),[s,l]=o.useState([]),[c,r]=o.useState(new Set),[m,x]=o.useState(!0),[i,n]=o.useState(""),[h,y]=o.useState(!0),g=o.useCallback(async()=>{x(!0);try{const[u,p]=await Promise.all([b.get("/activity"),b.get("/activity/hidden")]);l(Array.isArray(u.items)?u.items:[]),r(new Set(p.hidden||[]))}catch(u){a.error(`Load failed: ${u.message}`)}finally{x(!1)}},[a]);o.useEffect(()=>{g()},[g]);const v=(u,p)=>{const j=`${u.kind||""}|${u.ts||""}|${u.slug||""}|${p}`;let w=0;for(let M=0;M<j.length;M++)w=(w<<5)-w+j.charCodeAt(M)|0;return Math.abs(w).toString(16).padStart(8,"0").slice(0,16)},S=async()=>{try{await b.del("/activity/hide"),r(new Set),a.success("All hidden activity restored.")}catch(u){a.error(`Restore failed: ${u.message}`)}},R=async u=>{try{await b.del(`/activity/hide/${encodeURIComponent(u)}`);const p=new Set(c);p.delete(u),r(p)}catch(p){a.error(`Restore failed: ${p.message}`)}},z=s.filter((u,p)=>{const j=v(u,p);if(!h&&c.has(j))return!1;if(!i)return!0;const w=i.toLowerCase();return[u.kind,u.slug,u.message].some(M=>typeof M=="string"&&M.toLowerCase().includes(w))});return e.jsxs(E,{id:"settings-activity-log","data-section":"activity-log",children:[e.jsxs(B,{children:[e.jsx(me,{size:14})," Activity log",e.jsxs("span",{className:"muted",style:{fontWeight:400,marginLeft:8,fontSize:12},children:[s.length," total · ",c.size," hidden"]}),e.jsx(k,{variant:"ghost",size:"sm",style:{marginLeft:"auto"},onClick:g,title:"Reload",children:e.jsx(O,{size:12})})]}),e.jsxs(P,{children:["Full history from ",e.jsx("code",{children:"~/.bizar/activity.log"}),". Hiding an item in the Overview only hides it there — the entry stays here."]}),e.jsxs("div",{className:"activity-log-toolbar",children:[e.jsxs("div",{className:"activity-log-search",children:[e.jsx(ne,{size:12}),e.jsx("input",{type:"text",className:"input",placeholder:"Filter by kind, slug, or message…",value:i,onChange:u=>n(u.target.value)})]}),e.jsxs("label",{className:"activity-log-toggle",children:[e.jsx("input",{type:"checkbox",checked:h,onChange:u=>y(u.target.checked)}),"Show hidden"]}),e.jsxs(k,{variant:"ghost",size:"sm",disabled:c.size===0,onClick:S,title:"Restore all hidden items to the Overview",children:[e.jsx(re,{size:12})," Restore all"]})]}),m?e.jsx("div",{className:"muted",style:{padding:"12px 0",fontSize:12},children:"Loading…"}):z.length===0?e.jsx("div",{className:"muted",style:{padding:"12px 0",fontSize:12},children:s.length===0?"No activity yet.":"No items match the current filter."}):e.jsxs("div",{className:"activity-log-table-wrap",children:[e.jsxs("table",{className:"activity-log-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Kind"}),e.jsx("th",{children:"Detail"}),e.jsx("th",{children:"Time"}),e.jsx("th",{})]})}),e.jsx("tbody",{children:z.slice(0,200).map((u,p)=>{const j=v(u,p),w=c.has(j);return e.jsxs("tr",{className:T(w&&"activity-log-row-hidden"),children:[e.jsx("td",{className:"activity-log-kind",children:u.kind||"activity"}),e.jsx("td",{className:"activity-log-detail",children:u.message||u.slug||"—"}),e.jsx("td",{className:"activity-log-time mono",children:u.ts?new Date(u.ts).toLocaleString():"—"}),e.jsx("td",{children:w?e.jsx(k,{variant:"ghost",size:"sm",onClick:()=>R(j),title:"Restore to Overview",children:e.jsx(re,{size:12})}):e.jsx("span",{className:"activity-log-state-tag",children:"shown"})})]},`${u.ts}-${p}`)})})]}),z.length>200&&e.jsxs("div",{className:"muted",style:{fontSize:11,padding:"8px 0"},children:["Showing first 200 of ",z.length,"."]})]})]})}function We({about:a}){return e.jsxs(E,{id:"settings-about","data-section":"about",children:[e.jsxs(B,{children:[e.jsx(Le,{size:14})," About"]}),e.jsx(P,{children:"Build metadata."}),e.jsxs("dl",{className:"about-table",children:[e.jsx("dt",{children:"Version"}),e.jsx("dd",{className:"mono",children:(a==null?void 0:a.version)||"—"}),e.jsx("dt",{children:"Homepage"}),e.jsx("dd",{children:e.jsx("a",{href:(a==null?void 0:a.homepage)||"https://github.com/DrB0rk/BizarHarness",target:"_blank",rel:"noopener noreferrer",children:(a==null?void 0:a.homepage)||"https://github.com/DrB0rk/BizarHarness"})}),e.jsx("dt",{children:"License"}),e.jsx("dd",{children:(a==null?void 0:a.license)||"MIT"})]})]})}function ds({about:a}){return e.jsxs(e.Fragment,{children:[e.jsx(Fe,{}),e.jsx(We,{about:a})]})}function Ke({onError:a}){const s=X(),[l,c]=o.useState([]),[r,m]=o.useState(!1),[x,i]=o.useState(!1),[n,h]=o.useState(new Set),[y,g]=o.useState(null),[v,S]=o.useState(""),[R,z]=o.useState(!1),[u,p]=o.useState(""),[j,w]=o.useState(""),[M,$]=o.useState(!1),[U,W]=o.useState(""),[K,Z]=o.useState(!1),[L,G]=o.useState(""),[D,Q]=o.useState(new Set),A=o.useCallback(async()=>{m(!0);try{const t=await b.get("/env-vars");c(t)}catch(t){s.error(`Load failed: ${t.message}`),a==null||a(t.message)}finally{m(!1)}},[s,a]);o.useEffect(()=>{A()},[A]);const _=t=>{h(N=>{const f=new Set(N);return f.has(t)?f.delete(t):f.add(t),f})},H=async()=>{const t=u.trim().toUpperCase(),N=j.trim();if(!t||!/^BIZAR_[A-Z0-9_]+$/.test(t)){s.warning("Name must match BIZAR_<NAME> (e.g. BIZAR_MINIMAX_KEY)");return}if(!N){s.warning("Value is required.");return}if(l.some(f=>f.name===t)){s.warning(`${t} already exists.`);return}i(!0);try{await b.post("/env-vars",{name:t,value:N}),s.success(`${t} created.`),z(!1),p(""),w(""),await A()}catch(f){s.error(`Create failed: ${f.message}`)}finally{i(!1)}},d=t=>{g(t.name),S(t.value===t.value.replace(/\*/g,"")?t.value:""),h(N=>{const f=new Set(N);return f.add(t.name),f})},V=async t=>{if(!v.trim()){s.warning("Value cannot be empty.");return}i(!0);try{await b.put(`/env-vars/${encodeURIComponent(t)}`,{value:v.trim()}),s.success(`${t} updated.`),g(null),await A()}catch(N){s.error(`Update failed: ${N.message}`)}finally{i(!1)}},le=async t=>{if(confirm(`Delete ${t}? This cannot be undone.`))try{await b.del(`/env-vars/${encodeURIComponent(t)}`),s.success(`${t} deleted.`),await A()}catch(N){s.error(`Delete failed: ${N.message}`)}},ge=async()=>{if(!U.trim()){s.warning("Nothing to import.");return}Z(!0);try{const t=await b.post("/env-vars/bulk-import",{envContent:U});s.success(`Imported ${t.imported}, skipped ${t.skipped}.`),t.errors.length>0&&s.warning(`${t.errors.length} lines had errors: ${t.errors.slice(0,3).join("; ")}${t.errors.length>3?"…":""}`),W(""),$(!1),await A()}catch(t){s.error(`Bulk import failed: ${t.message}`)}finally{Z(!1)}},je=async()=>{try{const t=await b.get("/env-vars/export"),N=new Blob([t],{type:"text/plain"}),f=URL.createObjectURL(N),I=document.createElement("a");I.href=f,I.download=".env",I.click(),URL.revokeObjectURL(f),s.success("Exported .env file.")}catch(t){s.error(`Export failed: ${t.message}`)}},F=o.useMemo(()=>{if(!L.trim())return l;const t=L.toLowerCase();return l.filter(N=>N.name.toLowerCase().includes(t))},[l,L]),J=o.useMemo(()=>{const t={};for(const N of F){const f=N.name.split("_")[0]+"_";(t[f]??(t[f]=[])).push(N)}return t},[F]),fe=t=>{Q(N=>{const f=new Set(N);return f.has(t)?f.delete(t):f.add(t),f})},ie=o.useMemo(()=>{const t=["BIZAR_","PROVIDER_","MODEL_","API_"];return Object.keys(J).sort((f,I)=>{const ee=t.indexOf(f),se=t.indexOf(I);return ee===-1&&se===-1?f.localeCompare(I):ee===-1?1:se===-1?-1:ee-se})},[J]);if(r)return e.jsx("div",{className:"muted",style:{padding:"16px 0",fontSize:13},children:"Loading env vars…"});const ve=ie.length>1;return e.jsxs("div",{className:"env-var-manager",children:[e.jsxs("div",{className:"env-var-toolbar",children:[e.jsxs(k,{variant:"primary",size:"sm",onClick:()=>z(!0),children:[e.jsx(ze,{size:12})," New variable"]}),e.jsxs(k,{variant:"secondary",size:"sm",onClick:()=>$(t=>!t),className:M?"active":"",children:[e.jsx(He,{size:12})," Bulk import"]}),e.jsxs(k,{variant:"ghost",size:"sm",onClick:je,title:"Export as .env",children:[e.jsx(Y,{size:12})," Export"]}),e.jsxs("div",{className:"env-var-search-wrap",children:[e.jsx(ne,{size:12,className:"env-var-search-icon"}),e.jsx("input",{className:"env-var-search input",placeholder:"Filter…",value:L,onChange:t=>G(t.target.value)})]}),e.jsx(k,{variant:"ghost",size:"sm",onClick:A,title:"Reload",children:e.jsx(O,{size:12})})]}),M&&e.jsxs("div",{className:"env-var-bulk-panel",children:[e.jsxs("div",{className:"env-var-bulk-header",children:[e.jsxs("span",{children:["Paste ",e.jsx("code",{children:"KEY=value"})," lines (one per line):"]}),e.jsx(k,{variant:"ghost",size:"sm",onClick:()=>$(!1),children:e.jsx(ce,{size:12})})]}),e.jsx("textarea",{className:"input mono env-var-bulk-textarea",placeholder:`BIZAR_API_KEY=your-key-here
113
- PROVIDER_OPENAI_KEY=sk-...
114
- MODEL_KEY=gem-...`,value:U,onChange:t=>W(t.target.value),rows:6}),e.jsxs("div",{className:"env-var-bulk-footer",children:[e.jsx(k,{variant:"primary",size:"sm",onClick:ge,disabled:K||!U.trim(),children:K?"Importing…":"Import"}),e.jsx("span",{className:"muted",style:{fontSize:11},children:"Existing keys are skipped unless re-created individually. Invalid lines are reported."})]})]}),l.length===0&&!R&&e.jsxs("div",{className:"env-var-empty",children:[e.jsx(ye,{size:20}),e.jsx("span",{children:"No BIZAR_* env vars yet."}),e.jsx("span",{style:{fontSize:11},children:"Create one to store API keys securely."})]}),R&&e.jsxs("div",{className:"env-var-add-form",children:[e.jsxs("div",{className:"env-var-add-row",children:[e.jsx("input",{className:"input mono",style:{width:240},placeholder:"BIZAR_NAME",value:u,onChange:t=>p(t.target.value.toUpperCase()),onKeyDown:t=>{t.key==="Enter"&&H(),t.key==="Escape"&&z(!1)},autoFocus:!0}),e.jsx("input",{className:"input mono",type:"password",placeholder:"value (API key, token, etc.)",value:j,onChange:t=>w(t.target.value),onKeyDown:t=>{t.key==="Enter"&&H(),t.key==="Escape"&&z(!1)}}),e.jsxs(k,{variant:"primary",size:"sm",onClick:H,disabled:x,children:[e.jsx(q,{size:12})," Create"]}),e.jsx(k,{variant:"ghost",size:"sm",onClick:()=>{z(!1),p(""),w("")},children:e.jsx(ce,{size:12})})]}),e.jsxs("p",{style:{fontSize:11,color:"var(--text-dim)",margin:0},children:["Names must match ",e.jsxs("code",{children:["BIZAR_",e.jsx("var",{children:"NAME"})]})," (uppercase letters, digits, underscores)."]})]}),F.length>0&&(ve?e.jsx("div",{className:"env-var-groups",children:ie.map(t=>{const N=J[t],f=D.has(t);return e.jsxs("div",{className:"env-var-group",children:[e.jsxs("button",{type:"button",className:"env-var-group-header",onClick:()=>fe(t),children:[f?e.jsx(Se,{size:12}):e.jsx(Re,{size:12}),e.jsx("span",{className:"env-var-group-prefix mono",children:t}),e.jsxs("span",{className:"env-var-group-count muted",children:["(",N.length,")"]})]}),!f&&e.jsx("div",{className:"env-var-list",children:N.map(I=>e.jsx(pe,{v:I,editing:y,editValue:v,isRevealed:n.has(I.name),onToggleReveal:_,onStartEdit:d,onEditValueChange:S,onHandleUpdate:V,onCancelEdit:()=>g(null),onDelete:le,saving:x},I.name))})]},t)})}):e.jsx("div",{className:"env-var-list",children:F.map(t=>e.jsx(pe,{v:t,editing:y,editValue:v,isRevealed:n.has(t.name),onToggleReveal:_,onStartEdit:d,onEditValueChange:S,onHandleUpdate:V,onCancelEdit:()=>g(null),onDelete:le,saving:x},t.name))})),F.length===0&&l.length>0&&e.jsxs("div",{className:"env-var-empty",children:[e.jsx(ne,{size:16}),e.jsxs("span",{children:['No env vars match "',L,'"']})]})]})}function pe({v:a,editing:s,editValue:l,isRevealed:c,onToggleReveal:r,onStartEdit:m,onEditValueChange:x,onHandleUpdate:i,onCancelEdit:n,onDelete:h,saving:y}){const g=s===a.name;return e.jsxs("div",{className:T("env-var-row",g&&"env-var-row-editing"),children:[e.jsx("span",{className:"env-var-name mono",children:a.name}),g?e.jsx("input",{className:"input mono",type:"password",style:{flex:1,minWidth:200},value:l,onChange:v=>x(v.target.value),onKeyDown:v=>{v.key==="Enter"&&i(a.name),v.key==="Escape"&&n()},autoFocus:!0}):e.jsx("span",{className:T("env-var-value mono",!c&&"env-var-value-masked"),children:a.value}),e.jsx("span",{className:"env-var-source muted",children:a.source}),e.jsxs("div",{className:"env-var-actions",children:[!g&&e.jsx("button",{type:"button",className:"icon-btn",title:c?"Hide":"Reveal",onClick:()=>r(a.name),children:c?e.jsx(Be,{size:12}):e.jsx(re,{size:12})}),g?e.jsxs(e.Fragment,{children:[e.jsx(k,{variant:"primary",size:"sm",onClick:()=>i(a.name),disabled:y,children:"Save"}),e.jsx(k,{variant:"ghost",size:"sm",onClick:n,children:"Cancel"})]}):e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"icon-btn",title:"Edit",onClick:()=>m(a),children:e.jsx(Me,{size:12})}),e.jsx("button",{type:"button",className:"icon-btn icon-btn-danger",title:"Delete",onClick:()=>h(a.name),children:e.jsx(Ae,{size:12})})]})]})]})}function hs(){return e.jsxs(E,{id:"settings-env-vars","data-section":"env-vars",children:[e.jsxs(B,{children:[e.jsx(ye,{size:14})," Environment Variables"]}),e.jsxs(P,{children:["Manage BIZAR_* env vars (API keys, secrets). Values are stored in ",e.jsx("code",{children:"~/.config/bizar/env.json"})," (mode 0600)."]}),e.jsx(Ke,{})]})}export{he as A,Xe as B,Qe as C,Y as D,Ee as E,Je as F,es as G,os as H,ye as K,as as L,de as P,ts as S,is as T,rs as U,Ve as Z,k as a,Ie as b,ns as c,E as d,B as e,P as f,Be as g,re as h,ae as i,ss as j,ls as k,hs as l,cs as m,ds as n,He as o,De as p};