@polderlabs/bizar 6.3.0 → 7.0.1

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 (264) hide show
  1. package/.claude/hooks/sessionend-recall.mjs +3 -3
  2. package/.claude/hooks/worker-suggest.mjs +110 -0
  3. package/.claude/settings.json +9 -0
  4. package/README.md +125 -47
  5. package/bizar-dash/dist/assets/{EnvVarsSection-B58aiJiE.js → EnvVarsSection-weVnLz3Z.js} +3 -3
  6. package/bizar-dash/dist/assets/EnvVarsSection-weVnLz3Z.js.map +1 -0
  7. package/bizar-dash/dist/assets/MobileChat-BRFjer8p.js +1 -0
  8. package/bizar-dash/dist/assets/{MobileChat-BJrqwVDd.js.map → MobileChat-BRFjer8p.js.map} +1 -1
  9. package/bizar-dash/dist/assets/MobileSettings-Dw5jyJWi.js +1 -0
  10. package/bizar-dash/dist/assets/MobileSettings-Dw5jyJWi.js.map +1 -0
  11. package/bizar-dash/dist/assets/{Toast-Cpl6-E63.js → Toast-WTxc3m2g.js} +1 -1
  12. package/bizar-dash/dist/assets/{Toast-Cpl6-E63.js.map → Toast-WTxc3m2g.js.map} +1 -1
  13. package/bizar-dash/dist/assets/flow-BpU0-gK2.js +1 -0
  14. package/bizar-dash/dist/assets/flow-BpU0-gK2.js.map +1 -0
  15. package/bizar-dash/dist/assets/fuzzy-l0sNRNKZ.js +1 -0
  16. package/bizar-dash/dist/assets/fuzzy-l0sNRNKZ.js.map +1 -0
  17. package/bizar-dash/dist/assets/{icons-Do5N2jmX.js → icons-B0AKnYI3.js} +98 -103
  18. package/bizar-dash/dist/assets/icons-B0AKnYI3.js.map +1 -0
  19. package/bizar-dash/dist/assets/main-BE4Uh9im.css +1 -0
  20. package/bizar-dash/dist/assets/main-DqC58FEZ.js +18 -0
  21. package/bizar-dash/dist/assets/main-DqC58FEZ.js.map +1 -0
  22. package/bizar-dash/dist/assets/markdown-w2bDDkAH.js +1 -0
  23. package/bizar-dash/dist/assets/markdown-w2bDDkAH.js.map +1 -0
  24. package/bizar-dash/dist/assets/mobile-DRZsK3ic.js +1 -0
  25. package/bizar-dash/dist/assets/{mobile-DYCHcUpq.js.map → mobile-DRZsK3ic.js.map} +1 -1
  26. package/bizar-dash/dist/assets/mobile-layout-BWLtwtfQ.css +1 -0
  27. package/bizar-dash/dist/assets/mobile-layout-Ckru3HKJ.js +2 -0
  28. package/bizar-dash/dist/assets/mobile-layout-Ckru3HKJ.js.map +1 -0
  29. package/bizar-dash/dist/assets/react-vendor-BnuhLJ6X.css +1 -0
  30. package/bizar-dash/dist/assets/react-vendor-D3pra6w-.js +46 -0
  31. package/bizar-dash/dist/assets/react-vendor-D3pra6w-.js.map +1 -0
  32. package/bizar-dash/dist/assets/useSlashCommands-BAxVOU_a.js +2 -0
  33. package/bizar-dash/dist/assets/useSlashCommands-BAxVOU_a.js.map +1 -0
  34. package/bizar-dash/dist/assets/vendor-Di7Cp-rw.js +45 -0
  35. package/bizar-dash/dist/assets/vendor-Di7Cp-rw.js.map +1 -0
  36. package/bizar-dash/dist/index.html +13 -11
  37. package/bizar-dash/dist/mobile.html +8 -5
  38. package/bizar-dash/src/server/api.mjs +11 -0
  39. package/bizar-dash/src/server/memory-consolidator.mjs +225 -0
  40. package/bizar-dash/src/server/memory-distillation.mjs +296 -0
  41. package/bizar-dash/src/server/routes/distill.mjs +129 -0
  42. package/bizar-dash/src/server/routes/goal-planner.mjs +236 -0
  43. package/bizar-dash/src/web/App.tsx +4 -0
  44. package/bizar-dash/src/web/components/Tag.tsx +18 -5
  45. package/bizar-dash/src/web/components/Topbar.tsx +3 -0
  46. package/bizar-dash/src/web/components/agents/CommunicationLog.tsx +126 -0
  47. package/bizar-dash/src/web/components/agents/DependencyGraph.tsx +163 -0
  48. package/bizar-dash/src/web/components/agents/QualityGates.tsx +123 -0
  49. package/bizar-dash/src/web/components/agents/RealTimeEventLog.tsx +127 -0
  50. package/bizar-dash/src/web/components/agents/RoutingDecisions.test.tsx +148 -0
  51. package/bizar-dash/src/web/components/agents/RoutingDecisions.tsx +160 -0
  52. package/bizar-dash/src/web/components/goals/GoalInput.tsx +86 -0
  53. package/bizar-dash/src/web/components/goals/PlanVisualization.tsx +111 -0
  54. package/bizar-dash/src/web/lib/goapPlanner.ts +614 -0
  55. package/bizar-dash/src/web/lib/types.ts +25 -0
  56. package/bizar-dash/src/web/mobile/MobileApp.tsx +33 -2
  57. package/bizar-dash/src/web/mobile/MobileBottomNav.tsx +2 -2
  58. package/bizar-dash/src/web/mobile/MobileEval.tsx +4 -4
  59. package/bizar-dash/src/web/mobile/MobileMemory.tsx +2 -2
  60. package/bizar-dash/src/web/mobile/MobileSettings.tsx +3 -3
  61. package/bizar-dash/src/web/mobile/MobileTasks.tsx +2 -2
  62. package/bizar-dash/src/web/mobile/components/MobileListItem.tsx +3 -3
  63. package/bizar-dash/src/web/styles/agents-redesign.css +311 -0
  64. package/bizar-dash/src/web/styles/main.css +251 -0
  65. package/bizar-dash/src/web/styles/mobile.css +41 -0
  66. package/bizar-dash/src/web/styles/tasks-redesign.css +253 -0
  67. package/bizar-dash/src/web/ui/controls/Button.tsx +77 -0
  68. package/bizar-dash/src/web/ui/controls/Checkbox.tsx +95 -0
  69. package/bizar-dash/src/web/ui/controls/IconButton.tsx +66 -0
  70. package/bizar-dash/src/web/ui/controls/Kbd.tsx +24 -0
  71. package/bizar-dash/src/web/ui/controls/NumberInput.tsx +77 -0
  72. package/bizar-dash/src/web/ui/controls/RadioGroup.tsx +109 -0
  73. package/bizar-dash/src/web/ui/controls/SearchInput.tsx +91 -0
  74. package/bizar-dash/src/web/ui/controls/Select.tsx +92 -0
  75. package/bizar-dash/src/web/ui/controls/Slider.tsx +70 -0
  76. package/bizar-dash/src/web/ui/controls/TextInput.tsx +67 -0
  77. package/bizar-dash/src/web/ui/controls/Textarea.tsx +56 -0
  78. package/bizar-dash/src/web/ui/controls/Toggle.tsx +79 -0
  79. package/bizar-dash/src/web/ui/controls/controls.css +476 -0
  80. package/bizar-dash/src/web/ui/controls/index.ts +35 -0
  81. package/bizar-dash/src/web/ui/data/BarChart.tsx +60 -0
  82. package/bizar-dash/src/web/ui/data/DataTable.tsx +216 -0
  83. package/bizar-dash/src/web/ui/data/EmptyState.tsx +60 -0
  84. package/bizar-dash/src/web/ui/data/ErrorState.tsx +56 -0
  85. package/bizar-dash/src/web/ui/data/KeyValueList.tsx +106 -0
  86. package/bizar-dash/src/web/ui/data/LoadingState.tsx +65 -0
  87. package/bizar-dash/src/web/ui/data/Sparkline.tsx +87 -0
  88. package/bizar-dash/src/web/ui/data/StatTile.tsx +87 -0
  89. package/bizar-dash/src/web/ui/data/data.css +535 -0
  90. package/bizar-dash/src/web/ui/data/index.ts +31 -0
  91. package/bizar-dash/src/web/ui/feedback/Badge.tsx +49 -0
  92. package/bizar-dash/src/web/ui/feedback/Dialog.tsx +209 -0
  93. package/bizar-dash/src/web/ui/feedback/ProgressBar.tsx +69 -0
  94. package/bizar-dash/src/web/ui/feedback/StatusDot.tsx +50 -0
  95. package/bizar-dash/src/web/ui/feedback/Toast.tsx +200 -0
  96. package/bizar-dash/src/web/ui/feedback/Tooltip.tsx +126 -0
  97. package/bizar-dash/src/web/ui/feedback/feedback.css +314 -0
  98. package/bizar-dash/src/web/ui/feedback/index.ts +43 -0
  99. package/bizar-dash/src/web/ui/index.ts +56 -0
  100. package/bizar-dash/src/web/ui/layout/AppShell.tsx +51 -0
  101. package/bizar-dash/src/web/ui/layout/Breadcrumbs.tsx +97 -0
  102. package/bizar-dash/src/web/ui/layout/Panel.tsx +73 -0
  103. package/bizar-dash/src/web/ui/layout/PanelHeader.tsx +39 -0
  104. package/bizar-dash/src/web/ui/layout/Sidebar.tsx +131 -0
  105. package/bizar-dash/src/web/ui/layout/Tabs.tsx +133 -0
  106. package/bizar-dash/src/web/ui/layout/Topbar.tsx +42 -0
  107. package/bizar-dash/src/web/ui/layout/ViewHeader.tsx +48 -0
  108. package/bizar-dash/src/web/ui/layout/index.ts +34 -0
  109. package/bizar-dash/src/web/ui/layout/layout.css +464 -0
  110. package/bizar-dash/src/web/ui/navigation/CommandPalette.tsx +199 -0
  111. package/bizar-dash/src/web/ui/navigation/NavGroup.tsx +95 -0
  112. package/bizar-dash/src/web/ui/navigation/NavLink.tsx +93 -0
  113. package/bizar-dash/src/web/ui/navigation/index.ts +17 -0
  114. package/bizar-dash/src/web/ui/navigation/navigation.css +343 -0
  115. package/bizar-dash/src/web/ui/primitives/Box.tsx +91 -0
  116. package/bizar-dash/src/web/ui/primitives/Grid.tsx +49 -0
  117. package/bizar-dash/src/web/ui/primitives/Inline.tsx +55 -0
  118. package/bizar-dash/src/web/ui/primitives/Separator.tsx +46 -0
  119. package/bizar-dash/src/web/ui/primitives/Stack.tsx +54 -0
  120. package/bizar-dash/src/web/ui/primitives/VisuallyHidden.tsx +26 -0
  121. package/bizar-dash/src/web/ui/primitives/index.ts +23 -0
  122. package/bizar-dash/src/web/ui/primitives/primitives.css +183 -0
  123. package/bizar-dash/src/web/ui/styles/globals.css +86 -0
  124. package/bizar-dash/src/web/ui/styles/reset.css +125 -0
  125. package/bizar-dash/src/web/ui/styles/tokens.css +208 -0
  126. package/bizar-dash/src/web/ui/theme/ThemeProvider.tsx +142 -0
  127. package/bizar-dash/src/web/ui/theme/tokens.ts +131 -0
  128. package/bizar-dash/src/web/ui/theme/useTheme.ts +22 -0
  129. package/bizar-dash/src/web/ui/utils/cx.ts +42 -0
  130. package/bizar-dash/src/web/views/Agents.tsx +516 -268
  131. package/bizar-dash/src/web/views/GoalPlanner.tsx +158 -0
  132. package/bizar-dash/src/web/views/Overview.tsx +985 -448
  133. package/bizar-dash/src/web/views/Tasks.tsx +271 -273
  134. package/bizar-dash/tests/communication-log.test.tsx +67 -0
  135. package/bizar-dash/tests/dep-graph.test.tsx +40 -0
  136. package/bizar-dash/tests/event-log.test.tsx +61 -0
  137. package/bizar-dash/tests/goal-input.test.tsx +72 -0
  138. package/bizar-dash/tests/goap-planner.test.ts +68 -0
  139. package/bizar-dash/tests/quality-gates.test.tsx +59 -0
  140. package/bizar-dash/tests/setup.ts +31 -1
  141. package/bizar-dash/tests/ui/controls/Button.test.tsx +50 -0
  142. package/bizar-dash/tests/ui/controls/Checkbox.test.tsx +44 -0
  143. package/bizar-dash/tests/ui/controls/IconButton.test.tsx +37 -0
  144. package/bizar-dash/tests/ui/controls/Kbd.test.tsx +39 -0
  145. package/bizar-dash/tests/ui/controls/NumberInput.test.tsx +56 -0
  146. package/bizar-dash/tests/ui/controls/RadioGroup.test.tsx +58 -0
  147. package/bizar-dash/tests/ui/controls/SearchInput.test.tsx +52 -0
  148. package/bizar-dash/tests/ui/controls/Select.test.tsx +66 -0
  149. package/bizar-dash/tests/ui/controls/Slider.test.tsx +41 -0
  150. package/bizar-dash/tests/ui/controls/TextInput.test.tsx +44 -0
  151. package/bizar-dash/tests/ui/controls/Textarea.test.tsx +56 -0
  152. package/bizar-dash/tests/ui/controls/Toggle.test.tsx +39 -0
  153. package/bizar-dash/tests/ui/data/BarChart.test.tsx +55 -0
  154. package/bizar-dash/tests/ui/data/DataTable.test.tsx +112 -0
  155. package/bizar-dash/tests/ui/data/EmptyState.test.tsx +57 -0
  156. package/bizar-dash/tests/ui/data/ErrorState.test.tsx +47 -0
  157. package/bizar-dash/tests/ui/data/KeyValueList.test.tsx +59 -0
  158. package/bizar-dash/tests/ui/data/LoadingState.test.tsx +37 -0
  159. package/bizar-dash/tests/ui/data/Sparkline.test.tsx +56 -0
  160. package/bizar-dash/tests/ui/data/StatTile.test.tsx +69 -0
  161. package/bizar-dash/tests/ui/feedback/Badge.test.tsx +41 -0
  162. package/bizar-dash/tests/ui/feedback/Dialog.test.tsx +99 -0
  163. package/bizar-dash/tests/ui/feedback/ProgressBar.test.tsx +66 -0
  164. package/bizar-dash/tests/ui/feedback/StatusDot.test.tsx +41 -0
  165. package/bizar-dash/tests/ui/feedback/Toast.test.tsx +124 -0
  166. package/bizar-dash/tests/ui/feedback/Tooltip.test.tsx +102 -0
  167. package/bizar-dash/tests/ui/layout/AppShell.test.tsx +50 -0
  168. package/bizar-dash/tests/ui/layout/Breadcrumbs.test.tsx +85 -0
  169. package/bizar-dash/tests/ui/layout/Panel.test.tsx +52 -0
  170. package/bizar-dash/tests/ui/layout/PanelHeader.test.tsx +32 -0
  171. package/bizar-dash/tests/ui/layout/Sidebar.test.tsx +95 -0
  172. package/bizar-dash/tests/ui/layout/Tabs.test.tsx +87 -0
  173. package/bizar-dash/tests/ui/layout/Topbar.test.tsx +41 -0
  174. package/bizar-dash/tests/ui/layout/ViewHeader.test.tsx +47 -0
  175. package/bizar-dash/tests/ui/navigation/CommandPalette.test.tsx +105 -0
  176. package/bizar-dash/tests/ui/navigation/NavGroup.test.tsx +55 -0
  177. package/bizar-dash/tests/ui/navigation/NavLink.test.tsx +61 -0
  178. package/bizar-dash/tests/ui/primitives/Box.test.tsx +49 -0
  179. package/bizar-dash/tests/ui/primitives/Grid.test.tsx +37 -0
  180. package/bizar-dash/tests/ui/primitives/Inline.test.tsx +33 -0
  181. package/bizar-dash/tests/ui/primitives/Separator.test.tsx +34 -0
  182. package/bizar-dash/tests/ui/primitives/Stack.test.tsx +45 -0
  183. package/bizar-dash/tests/ui/primitives/VisuallyHidden.test.tsx +27 -0
  184. package/bizar-dash/tests/views/Agents.test.tsx +359 -0
  185. package/bizar-dash/tests/views/Overview.test.tsx +413 -0
  186. package/bizar-dash/tests/views/Tasks.test.tsx +250 -0
  187. package/bizar-dash/vitest.config.ts +3 -1
  188. package/cli/__tests__/cost-gate.test.mjs +301 -0
  189. package/cli/__tests__/feature-list-bridge.test.mjs +371 -0
  190. package/cli/bin.mjs +38 -0
  191. package/cli/commands/claim.mjs +282 -0
  192. package/cli/commands/cost.mjs +279 -0
  193. package/cli/cost-gate.mjs +501 -0
  194. package/cli/feature-list-bridge.mjs +400 -0
  195. package/cli/memory-constants.mjs +17 -0
  196. package/cli/provision-claude.mjs +94 -0
  197. package/cli/worker-dispatcher.mjs +259 -0
  198. package/cli/worker-dispatcher.test.mjs +204 -0
  199. package/config/trigger-patterns.json +186 -0
  200. package/package.json +2 -2
  201. package/packages/sdk/package.json +1 -1
  202. package/packages/sdk/src/agent-registry.ts +304 -0
  203. package/packages/sdk/src/consensus/byzantine.ts +587 -0
  204. package/packages/sdk/src/consensus/index.ts +147 -0
  205. package/packages/sdk/src/consensus/queen.ts +173 -0
  206. package/packages/sdk/src/consensus/types.ts +199 -0
  207. package/packages/sdk/src/federation/audit.ts +156 -0
  208. package/packages/sdk/src/federation/budget.ts +269 -0
  209. package/packages/sdk/src/federation/envelope.ts +144 -0
  210. package/packages/sdk/src/federation/hmac.ts +160 -0
  211. package/packages/sdk/src/federation/index.ts +443 -0
  212. package/packages/sdk/src/federation/pii.ts +241 -0
  213. package/packages/sdk/src/federation/policy.ts +112 -0
  214. package/packages/sdk/src/federation/trust.ts +146 -0
  215. package/packages/sdk/src/index.ts +67 -0
  216. package/packages/sdk/src/mcp/server.ts +351 -1
  217. package/packages/sdk/src/router/codemod-intent.ts +125 -0
  218. package/packages/sdk/src/router/index.ts +247 -0
  219. package/packages/sdk/src/router/memory-distillation-shim.mjs +18 -0
  220. package/packages/sdk/src/router/memory-distillation.ts +249 -0
  221. package/packages/sdk/src/router/model-router.ts +235 -0
  222. package/packages/sdk/src/router/q-learning-router.ts +304 -0
  223. package/packages/sdk/src/swarm-topology.ts +279 -0
  224. package/packages/sdk/tests/agent-registry.test.ts +285 -0
  225. package/packages/sdk/tests/consensus.test.ts +376 -0
  226. package/packages/sdk/tests/federation/audit.test.ts +164 -0
  227. package/packages/sdk/tests/federation/budget.test.ts +189 -0
  228. package/packages/sdk/tests/federation/envelope.test.ts +120 -0
  229. package/packages/sdk/tests/federation/hmac.test.ts +194 -0
  230. package/packages/sdk/tests/federation/orchestrator.test.ts +176 -0
  231. package/packages/sdk/tests/federation/pii.test.ts +106 -0
  232. package/packages/sdk/tests/federation/policy.test.ts +140 -0
  233. package/packages/sdk/tests/federation/trust.test.ts +124 -0
  234. package/packages/sdk/tests/mcp-tools.test.ts +204 -0
  235. package/packages/sdk/tests/memory-distillation.test.mjs +186 -0
  236. package/packages/sdk/tests/model-router.test.mjs +108 -0
  237. package/packages/sdk/tests/q-learning-router.test.mjs +100 -0
  238. package/packages/sdk/tests/router-orchestrator.test.mjs +172 -0
  239. package/packages/sdk/tests/router.test.mjs +91 -0
  240. package/packages/sdk/tests/sdk.test.mjs +26 -2
  241. package/packages/sdk/tests/swarm-topology.test.ts +258 -0
  242. package/scripts/bh-full-e2e.mjs +11 -15
  243. package/bizar-dash/dist/assets/EnvVarsSection-B58aiJiE.js.map +0 -1
  244. package/bizar-dash/dist/assets/MobileChat-BJrqwVDd.js +0 -1
  245. package/bizar-dash/dist/assets/MobileSettings-CEQNJNLJ.js +0 -1
  246. package/bizar-dash/dist/assets/MobileSettings-CEQNJNLJ.js.map +0 -1
  247. package/bizar-dash/dist/assets/icons-Do5N2jmX.js.map +0 -1
  248. package/bizar-dash/dist/assets/main-IvfQAOfy.js +0 -18
  249. package/bizar-dash/dist/assets/main-IvfQAOfy.js.map +0 -1
  250. package/bizar-dash/dist/assets/main-ietCEg_R.css +0 -1
  251. package/bizar-dash/dist/assets/markdown-tOLaD6nm.js +0 -1
  252. package/bizar-dash/dist/assets/markdown-tOLaD6nm.js.map +0 -1
  253. package/bizar-dash/dist/assets/mobile-DYCHcUpq.js +0 -1
  254. package/bizar-dash/dist/assets/mobile-layout-CBHjpwsb.js +0 -2
  255. package/bizar-dash/dist/assets/mobile-layout-CBHjpwsb.js.map +0 -1
  256. package/bizar-dash/dist/assets/mobile-layout-CJnZNLy3.css +0 -1
  257. package/bizar-dash/dist/assets/react-vendor-Dn4wqh4Z.js +0 -40
  258. package/bizar-dash/dist/assets/react-vendor-Dn4wqh4Z.js.map +0 -1
  259. package/bizar-dash/dist/assets/useSlashCommands-Bd7_FA6U.js +0 -2
  260. package/bizar-dash/dist/assets/useSlashCommands-Bd7_FA6U.js.map +0 -1
  261. package/bizar-dash/dist/assets/vendor-C843201K.js +0 -29
  262. package/bizar-dash/dist/assets/vendor-C843201K.js.map +0 -1
  263. package/bizar-dash/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +0 -1
  264. package/packages/sdk/package-lock.json +0 -32
@@ -14,9 +14,9 @@
14
14
 
15
15
  'use strict';
16
16
 
17
- const fs = require('fs');
18
- const os = require('os');
19
- const path = require('path');
17
+ import fs from 'node:fs';
18
+ import os from 'node:os';
19
+ import path from 'node:path';
20
20
 
21
21
  let raw = '';
22
22
  process.stdin.setEncoding('utf8');
@@ -0,0 +1,110 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * .claude/hooks/worker-suggest.mjs
4
+ *
5
+ * Bizar Background Workers — UserPromptSubmit hook.
6
+ *
7
+ * Runs on every user prompt. Calls `dispatch()` from cli/worker-dispatcher.mjs
8
+ * to find Bizar skills/agents that should be suggested for the prompt text.
9
+ * Emits suggestions to stderr (stdout is reserved for Claude Code's hook
10
+ * protocol). Always exits 0 — this is a suggestion, not a gate.
11
+ *
12
+ * Claude Code stdin shape (UserPromptSubmit):
13
+ * {
14
+ * "session_id": "...",
15
+ * "transcript_path": "...",
16
+ * "cwd": "...",
17
+ * "hook_event_name": "UserPromptSubmit",
18
+ * "user_prompt": "raw prompt text"
19
+ * }
20
+ *
21
+ * Claude Code stdout shape (hookSpecificOutput.additionalContext):
22
+ * { "hookSpecificOutput": {
23
+ * "hookEventName": "UserPromptSubmit",
24
+ * "additionalContext": "Bizar workers suggest: …"
25
+ * }}
26
+ *
27
+ * On any unexpected error: log to stderr, write a no-op hook output,
28
+ * exit 0. Never block the user.
29
+ */
30
+ 'use strict';
31
+
32
+ import { dispatch } from '../../cli/worker-dispatcher.mjs';
33
+
34
+ let raw = '';
35
+ process.stdin.setEncoding('utf8');
36
+ process.stdin.on('data', (chunk) => { raw += chunk; });
37
+ process.stdin.on('end', () => {
38
+ let input = {};
39
+ try {
40
+ input = JSON.parse(raw || '{}');
41
+ } catch {
42
+ input = {};
43
+ }
44
+
45
+ const prompt = String(input.user_prompt || '').trim();
46
+
47
+ // Empty prompts get the silent treatment — the user has not yet
48
+ // committed any intent.
49
+ if (prompt.length === 0) {
50
+ process.stdout.write(JSON.stringify({
51
+ hookSpecificOutput: {
52
+ hookEventName: 'UserPromptSubmit',
53
+ additionalContext: '',
54
+ },
55
+ }) + '\n');
56
+ process.exit(0);
57
+ return;
58
+ }
59
+
60
+ let suggestions;
61
+ try {
62
+ suggestions = dispatch(prompt, { maxSuggestions: 3 });
63
+ } catch (err) {
64
+ process.stderr.write(
65
+ `[bizar.workers] WARN: dispatch failed: ${
66
+ err && err.message ? err.message : String(err)
67
+ }\n`,
68
+ );
69
+ process.stdout.write(JSON.stringify({
70
+ hookSpecificOutput: {
71
+ hookEventName: 'UserPromptSubmit',
72
+ additionalContext: '',
73
+ },
74
+ }) + '\n');
75
+ process.exit(0);
76
+ return;
77
+ }
78
+
79
+ // Emit one stderr line per suggestion (for operator visibility in logs).
80
+ for (const s of suggestions) {
81
+ const skill = s.skill ? `skill: ${s.skill}` : 'skill: (none)';
82
+ const agent = s.agent ? `, agent: ${s.agent}` : '';
83
+ process.stderr.write(
84
+ `[bizar.workers] suggested: ${s.workerId} (${skill}${agent}) via pattern "${s.matchedPattern}"\n`,
85
+ );
86
+ }
87
+
88
+ // Build additionalContext for the model so the next turn is primed.
89
+ let note;
90
+ if (suggestions.length === 0) {
91
+ note = '';
92
+ } else {
93
+ const lines = suggestions.map((s) => {
94
+ const skillPart = s.skill ? `, skill=${s.skill}` : '';
95
+ const agentPart = s.agent ? `, agent=${s.agent}` : '';
96
+ return `- ${s.workerId} (weight=${s.weight}${skillPart}${agentPart}) matched "${s.matchedPattern}"`;
97
+ });
98
+ note =
99
+ 'Bizar workers suggest the following skills/agents for this prompt:\n' +
100
+ lines.join('\n');
101
+ }
102
+
103
+ process.stdout.write(JSON.stringify({
104
+ hookSpecificOutput: {
105
+ hookEventName: 'UserPromptSubmit',
106
+ additionalContext: note,
107
+ },
108
+ }) + '\n');
109
+ process.exit(0);
110
+ });
@@ -88,6 +88,15 @@
88
88
  "timeout": 10
89
89
  }
90
90
  ]
91
+ },
92
+ {
93
+ "hooks": [
94
+ {
95
+ "type": "command",
96
+ "command": "node /home/drb0rk/Projects/BizarHarness/.claude/hooks/worker-suggest.mjs",
97
+ "timeout": 10
98
+ }
99
+ ]
91
100
  }
92
101
  ],
93
102
  "SessionStart": [
package/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
  Claude Code Agent SDK in-process — no subprocess, no port, no serve-info file.
9
9
 
10
10
  [![npm](https://img.shields.io/npm/v/@polderlabs/bizar?color=cb3837)](https://www.npmjs.com/package/@polderlabs/bizar)
11
- [![v6.3.0](https://img.shields.io/badge/v6.3.0-Claude%20Code-6366f1)](https://github.com/DrB0rk/BizarHarness)
11
+ [![v7.0.0](https://img.shields.io/badge/v7.0.0-F--040%20design-6366f1)](https://github.com/DrB0rk/BizarHarness)
12
12
  [![Claude Code](https://img.shields.io/badge/claude--code-%E2%9C%93-6366f1)](https://docs.claude.com/claude-code)
13
13
  [![Audit 73/73](https://img.shields.io/badge/audit-73%2F73-10b981)](https://github.com/DrB0rk/BizarHarness)
14
14
  [![Harness](https://img.shields.io/badge/harness-L01--L12-8A2BE2)](docs/INDEX.md)
@@ -26,50 +26,58 @@ Claude Code Agent SDK in-process — no subprocess, no port, no serve-info file.
26
26
 
27
27
  ## Table of Contents
28
28
 
29
- - [What's new in v6.3.0](#-whats-new-in-v630)
29
+ - [What's new in v7.0.0](#-whats-new-in-v700)
30
30
  - [Quick start](#-quick-start)
31
31
  - [The Pantheon](#-the-pantheon)
32
32
  - [Architecture](#-architecture)
33
- - [Tools (22 total)](#-tools-22-total)
34
- - [Hooks (4 + 2 safety)](#-hooks-4--2-safety)
33
+ - [Tools (23 total)](#-tools-23-total)
34
+ - [Hooks (7 total)](#-hooks-7-total)
35
35
  - [Safety — DANGEROUS_PATTERNS](#-safety--dangerous-patterns)
36
36
  - [Skill Curator — closed learning loop](#-skill-curator--closed-learning-loop)
37
37
  - [Knowledge Graph Tools](#-knowledge-graph-tools)
38
+ - [Agents and history dashboard](#-agents-and-history-dashboard)
38
39
  - [Harness engineering audit (73/73)](#-harness-engineering-audit-7373)
39
40
  - [Documentation](#-documentation)
40
- - [Migration from v6.2.x (Cline era)](#-migration-from-v62x-cline-era)
41
+ - [Migration from v6.3.x](#-migration-from-v63x)
41
42
  - [Historical: OpenCode → Cline (v5.6/v6.0)](#-historical-opencode--cline-v56v60)
42
43
  - [Contributing](#-contributing)
43
44
  - [License](#-license)
44
45
 
45
46
  ---
46
47
 
47
- ## ✨ What's new in v6.3.0
48
+ ## ✨ What's new in v7.0.0
48
49
 
49
- v6.3.0 is a **complete migration** from Cline to Claude Code. The plugin
50
- framework that previously lived as a Cline `AgentPlugin` is now expressed
51
- as Claude Code skills + MCP servers + `.claude/agents/` definitions.
52
- Claude Code's Agent SDK (`@anthropic-ai/claude-agent-sdk`) is embedded
53
- in-process no subprocess spawn, no port, no password, no serve-info
54
- file. Hooks execute in Claude Code's event loop; mistake recovery uses
55
- the Agent SDK's `onConsecutiveMistakeLimitReached`; subagent dispatch
56
- uses the Claude Code `Agent` tool.
50
+ v7.0.0 lands **F-040 the dashboard redesign** on top of the
51
+ v6.3.0 Claude Code migration. The dashboard ships a custom `ui/`
52
+ design system (42 components across controls, data, feedback,
53
+ layout, navigation, primitives, theme + tokens) and rewrites
54
+ the Overview, Agents, and Tasks views on top of it. v7.0.0 also
55
+ carries the v6.5.0 work (F-037 migration cleanup, F-038
56
+ federation skeleton, F-039 Byzantine consensus) that had been
57
+ prepared but not published.
57
58
 
58
59
  | Feature | Description |
59
60
  | --- | --- |
60
- | **Claude Code-native hooks** | `PreToolUse` / `PostToolUse` / `UserPromptSubmit` / `SessionStart` / `SessionEnd` typed payloads, idiomatic Claude Code shape. |
61
- | **22 tools, 4 hooks** | All use Claude Code `MCP tool registration`. 0 compat shims. |
62
- | **Skills + MCP** | `.claude/skills/<name>/SKILL.md` (auto-loaded) + `.claude/mcp.json` (Semble, Bizar memory, CubeSandbox). Replaces the previous "plugin" surface. |
63
- | **Agent dispatch** | Subagents dispatched via the Claude Code `Agent` tool with `run_in_background: true`. The previous `bizar_spawn_team` tool is now `Agent` with `agent_team: "<name>"`. |
64
- | **Knowledge graph tools** | `bizar_graph_query/path/explain` over `.bizar/graph/graph.json` (still file-based; unchanged). |
65
- | **DANGEROUS_PATTERNS gate** | 36 patterns (25 deny + 11 require-approval) checked in `PreToolUse`. |
66
- | **Skill curator** | Per-skill use/failure tracking. The differentiator (1/106 projects). |
67
- | **Pre-compaction memory flush** | Durable snapshot before summarizer. Closes the durability gap. |
68
- | **In-process memory vault** | Tools read/write `~/.bizar_memory/` directly. No dashboard needed. |
69
- | **Harness audit 73/73** | Full L01–L12 compliance. `make check-arch` enforces 7 rules. |
70
- | **Removed: plugin layer** | The `plugins/bizar/` plugin entry is now a Claude Code MCP server skills do the rest. v6.0.0–v6.2.5. |
71
-
72
- See the full [CHANGELOG.md](CHANGELOG.md) for v6.0.0 v6.3.0 history.
61
+ | **`bizar-dash/src/web/ui/` design system** | 42 components (Button, Checkbox, Select, Slider, Toggle, DataTable, BarChart, Sparkline, StatTile, Tooltip, Toast, Dialog, AppShell, Sidebar, Topbar, CommandPalette, Box, Stack, Grid, + 23 more), tokenized via `ui/styles/tokens.css`, themeable via `ui/theme/ThemeProvider.tsx`. |
62
+ | **Three view rewrites** | `Overview`, `Agents`, `Tasks` rebuilt on the design system. 123 dashboard test files (41 component tests + 82 view/integration tests). |
63
+ | **18 dashboard tabs** | Overview, Chat, Agents, Glyphs, Tasks, Activity, Active, Skills, Memory, Mods, Schedules, History, Usage, Eval, Doctor, Harness, Goals, Settings. |
64
+ | **Federation skeleton (F-038)** | 8 modules under `packages/sdk/src/federation/` HMAC+nonce envelopes, PII pipeline, TrustEvaluator, PolicyEngine, AuditService, FederationBudget. Exposed as the `federation_status` MCP tool. |
65
+ | **Byzantine consensus (F-039)** | 4 modules under `packages/sdk/src/consensus/` 3-of-5 majority for review/decision steps; PBFT pre-prepare/prepare/commit/reply. Exposed as the `consensus_propose` MCP tool. |
66
+ | **23 MCP tools, 7 hooks** | All Claude Code `MCP tool registration`; hooks cover bash + edit/write pre+post, session lifecycle, prompt tagging, and worker suggestion. |
67
+ | **Agents + History dashboard** | 11 `/api/agents/*` endpoints with on-disk status persistence; `/api/history` aggregator over activity log + tasks + plans + projects. See the [honest scope note](#-agents--history-dashboard) below. |
68
+
69
+ > **Honest scope note.** The Agents and History *infrastructure*
70
+ > is fully wired (REST, store, WebSocket broadcast, 11 endpoints).
71
+ > The *hook-driven auto-feed*hooks that POST to
72
+ > `/api/agents/:name/status` as Claude Code tools fire — is **not**
73
+ > wired in v7.0.0. That was in PR #2, deferred to a follow-up.
74
+ > Today the Agents view surfaces data from manual `status` POSTs
75
+ > and CLI operations; running-agent detection lights up once the
76
+ > hook layer lands (target v7.1).
77
+
78
+ See the full [CHANGELOG.md](CHANGELOG.md) and
79
+ [docs/releases/v7.0.0.md](docs/releases/v7.0.0.md) for what
80
+ landed, what's wired, and what's still to come.
73
81
 
74
82
  ---
75
83
 
@@ -80,7 +88,7 @@ Prerequisites: **Claude Code CLI** (`claude` on `PATH`; install via
80
88
  [the Claude Code install docs](https://docs.claude.com/claude-code/getting-started)).
81
89
 
82
90
  ```bash
83
- # Install (stable v6.3.0)
91
+ # Install (stable v7.0.0)
84
92
  npm install @polderlabs/bizar
85
93
 
86
94
  # Or try the latest beta
@@ -137,19 +145,20 @@ the full agent roster and routing rules.
137
145
  ```
138
146
  ┌────────────────────────────────────────────────────────────────────┐
139
147
  │ Layer 1: UI (bizar-dash/) │
140
- │ - React + TypeScript dashboard (17 tabs) │
148
+ │ - React + TypeScript dashboard (18 tabs) │
141
149
  │ - Express server (HTTP + WS) │
142
150
  │ - In-process Claude Code Agent SDK (no daemon / no subprocess) │
143
151
  │ - Harness engineering dashboard view │
144
152
  │ - Kanban board (5 columns + backlog) │
153
+ │ - Custom `ui/` design system (42 components, F-040) │
145
154
  └────────────────────────────────────────────────────────────────────┘
146
155
  ↕ HTTP REST + WebSocket
147
156
  ┌────────────────────────────────────────────────────────────────────┐
148
157
  │ Layer 0: Core (.claude/skills + .claude/agents + plugins/bizar/) │
149
158
  │ - Skills (SKILL.md + bundled scripts) │
150
159
  │ - Agents (Odin, Frigg, Vör, Mimir, Heimdall, ...) │
151
- │ - Bizar MCP server (plugins/bizar/, 19 tools) │
152
- │ - 4 hooks (PreToolUse, PostToolUse, ...)
160
+ │ - Bizar MCP server (plugins/bizar/, 23 tools) │
161
+ │ - 7 hooks (PreToolUse × 2, PostToolUse, SessionStart/End, ...)
153
162
  │ - In-process memory vault │
154
163
  │ - DANGEROUS_PATTERNS approval gate │
155
164
  │ - Skill curator (closed learning loop) │
@@ -171,33 +180,39 @@ model, module map, and inter-component contracts.
171
180
 
172
181
  ---
173
182
 
174
- ## 🛠 Tools (22 total)
183
+ ## 🛠 Tools (23 total)
175
184
 
176
- Bizar's 22 tools are exposed as a Claude Code MCP server (replacing
185
+ Bizar's 23 tools are exposed as a Claude Code MCP server (replacing
177
186
  Cline's `createTool` shape with the Claude Code MCP `tool`
178
187
  registration shape):
179
188
 
180
189
  | Category | Count | Tools |
181
190
  | --- | --- | --- |
182
- | **Background agents** | 9 | `bizar_spawn_background`, `bizar_status`, `bizar_collect`, `bizar_kill`, `bizar_pause`, `bizar_resume`, `bizar_send_message`, `bizar_get_comments`, `bizar_report_progress` |
183
- | **Memory** | 4 | `bizar_memory_list`, `bizar_memory_read`, `bizar_memory_write`, `bizar_memory_search` |
184
- | **Plan / Glyphs** | 4 | `bizar_plan_action`, `bizar_open_kb`, `bizar_wait_for_feedback`, `bizar_read_glyph_feedback` |
185
- | **Agent teams** | 2 | `bizar_spawn_team`, `bizar_team_status` |
186
- | **Knowledge graph** | 3 | `bizar_graph_query`, `bizar_graph_path`, `bizar_graph_explain` |
187
- | **Total** | **22** | All registered as MCP tools via the Claude Code MCP SDK |
191
+ | **Memory** | 4 | `memory_read`, `memory_write`, `memory_list`, `memory_search` |
192
+ | **Plan / Glyphs** | 2 | `plan_action`, `open_kb` |
193
+ | **Loop control** | 4 | `loop_list`, `loop_status`, `loop_start`, `loop_stop` |
194
+ | **Graph / Knowledge** | 3 | `graph_query`, `graph_path`, `graph_explain` |
195
+ | **Agents** | 3 | `agent_spawn`, `agent_list`, `agent_terminate` |
196
+ | **Swarm + routing** | 3 | `swarm_init`, `model_route`, `agent_route` |
197
+ | **Hooks + safety** | 2 | `hooks_route`, `danger_check` |
198
+ | **Distill + consensus + federation** | 2 | `memory_distill`, `consensus_propose`, `federation_status` |
199
+ | **Total** | **23** | All registered as MCP tools via the Claude Code MCP SDK |
188
200
 
189
201
  ---
190
202
 
191
- ## 🪝 Hooks (4 + 2 safety)
203
+ ## 🪝 Hooks (7 total)
192
204
 
193
205
  Claude Code-native hooks (typed event payloads, idiomatic shape):
194
206
 
195
207
  | Hook | Purpose |
196
208
  | --- | --- |
197
- | `PreToolUse` | Loop guard + **DANGEROUS_PATTERNS gate** |
198
- | `PostToolUse` | Per-tool-call log to `LogWriter` |
199
- | `UserPromptSubmit` | **Pre-compaction memory flush** (writes snapshot to vault) |
200
- | `SessionStart` / `SessionEnd` | `message-added` (slash commands) + `run-finished`/`run-failed` (memory write) |
209
+ | `pretooluse-bash` | Loop guard + **DANGEROUS_PATTERNS gate** (36 patterns) |
210
+ | `pretooluse-editwrite` | Edit/write pre-flight checks (loop guard, paths) |
211
+ | `posttooluse-editwrite` | Per-edit/write audit log entry |
212
+ | `sessionstart-prime` | Slash command interception + memory prime |
213
+ | `sessionend-recall` | Session-end memory write |
214
+ | `userpromptsubmit-tag` | Prompt tagging + worker suggestion trigger |
215
+ | `worker-suggest` (F-034) | Bizar background-worker dispatch based on prompt text |
201
216
 
202
217
  | Safety component | Purpose |
203
218
  | --- | --- |
@@ -280,9 +295,61 @@ See [docs/graph-tools.md](docs/graph-tools.md) for the full reference.
280
295
 
281
296
  ---
282
297
 
298
+ ## 🤖 Agents and history dashboard
299
+
300
+ v7.0.0 ships the Agents and History surfaces on the new design
301
+ system. The full data plane:
302
+
303
+ **Server side (fully wired in v7.0.0):**
304
+
305
+ - **11 `/api/agents/*` endpoints** under `bizar-dash/src/server/routes/agents.mjs` —
306
+ list, get, create, update, delete, plus `stuck`, `hierarchy`,
307
+ `invoke`, `status`, `heartbeat`, `restart`.
308
+ - **On-disk status persistence** in `agents-store.mjs` —
309
+ `~/.config/bizar/agent-status.json` survives restarts.
310
+ - **WebSocket broadcast** on every agent mutation
311
+ (`agents:change`).
312
+ - **Stuck detection** + **13-agent hierarchy** (Odin →
313
+ Tyr/Thor/Hermod/Baldr/Mimir → Heimdall/Frigg/Vor; Forseti as
314
+ auditor peer; Vidarr fallback; Quick standalone).
315
+ - **`/api/history`** aggregator — joins `activity-log` + tasks +
316
+ plans + projects with `?since=<iso>` filtering and a 2,000-event
317
+ cap.
318
+
319
+ **UI side (fully wired in v7.0.0):**
320
+
321
+ - **`Agents.tsx`** view (rewritten on F-040 design system) reads
322
+ from `/api/agents`, shows status, tags, category, hierarchy,
323
+ stuck indicators, modals for invoke/restart/delete.
324
+ - **`History.tsx`** view reads `/api/history` with timeline
325
+ rendering.
326
+
327
+ **Live data feed (deferred to v7.1 — was in PR #2):**
328
+
329
+ - Hook-driven status updates as Claude Code tools fire — no hook
330
+ currently POSTs to `/api/agents/:name/status`. Agents show
331
+ "idle" until manually updated.
332
+ - Session-end cleanup of stuck states — no hook flips
333
+ stuck→idle on session end.
334
+
335
+ To push status updates from anywhere today (CLI, scripts, other
336
+ hooks), POST to `/api/agents/:name/status`:
337
+
338
+ ```sh
339
+ curl -X POST http://localhost:7842/api/agents/odin/status \
340
+ -H 'content-type: application/json' \
341
+ -d '{"status":"working","currentTaskId":"F-040"}'
342
+ ```
343
+
344
+ See [docs/releases/v7.0.0.md](docs/releases/v7.0.0.md) for the
345
+ release notes and [docs/dashboard-ui-migration.md](docs/dashboard-ui-migration.md)
346
+ for the F-040 design-system migration guide.
347
+
348
+ ---
349
+
283
350
  ## 🛡 Harness engineering audit (73/73)
284
351
 
285
- v6.3.0 passes the full L01–L12 audit at **73/73 = 100%**:
352
+ v7.0.0 passes the full L01–L12 audit at **73/73 = 100%**:
286
353
 
287
354
  | Subsystem | Score |
288
355
  | --- | --- |
@@ -293,7 +360,7 @@ v6.3.0 passes the full L01–L12 audit at **73/73 = 100%**:
293
360
  | 5. Feedback | 7/7 (`make check/test/e2e/clean-check/arch/vcr/session-*`) |
294
361
  | 6. L05 Cross-session | 6/6 (Current State + clock-in/out + context anxiety) |
295
362
  | 7. L03 System of record | 4/4 (ACID: Durability, Consistency, Atomicity, Proximity) |
296
- | 8. L07 WIP=1 + VCR | 3/3 (WIP=1 + `make vcr` + VCR 31/31 = 1.0) |
363
+ | 8. L07 WIP=1 + VCR | 3/3 (WIP=1 + `make vcr` + VCR 39/39 = 1.0) |
297
364
  | 9. L08 Feature list | 6/6 (evidence + verify-feature + granularity + state machine) |
298
365
  | 10. L09 DoD | 5/5 (3-layer verification + runtime signals + repair instructions) |
299
366
  | 11. L10 E2E + Arch | 8/8 (`make e2e` + `make check-arch` + 7 arch rules + E2E requirement) |
@@ -334,7 +401,18 @@ See [PROGRESS.md](PROGRESS.md) § Current State and the
334
401
 
335
402
  ---
336
403
 
337
- ## 🔄 Migration from v6.2.x (Cline era)
404
+ ## 🔄 Migration from v6.3.x
405
+
406
+ Upgrading from v6.3.x? The Claude Code migration story is unchanged
407
+ (in-process Agent SDK, MCP tool surface, hook event bag). v7.0.0
408
+ adds the dashboard redesign without changing any plugin surface,
409
+ so existing installations work — the installer just needs
410
+ re-running to pick up the new dashboard assets:
411
+
412
+ ```sh
413
+ npm install -g @polderlabs/bizar@latest
414
+ ./install.sh
415
+ ```
338
416
 
339
417
  Upgrading from a Cline-era BizarHarness (v6.0.0 → v6.2.x)? See
340
418
  [docs/migration-guide.md](docs/migration-guide.md) for: