@polderlabs/bizar 4.7.0 → 4.7.2

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 (75) hide show
  1. package/bizar-dash/dist/assets/main-DHZmbnxQ.js +361 -0
  2. package/bizar-dash/dist/assets/main-DHZmbnxQ.js.map +1 -0
  3. package/bizar-dash/dist/assets/main-DX_Jh8Wc.css +1 -0
  4. package/bizar-dash/dist/assets/{mobile-CWqPoGaT.js → mobile-BK8-ythT.js} +2 -2
  5. package/bizar-dash/dist/assets/mobile-BK8-ythT.js.map +1 -0
  6. package/bizar-dash/dist/assets/{mobile-i4Uv9eW8.js → mobile-Chvf9u_B.js} +1 -1
  7. package/bizar-dash/dist/assets/{mobile-i4Uv9eW8.js.map → mobile-Chvf9u_B.js.map} +1 -1
  8. package/bizar-dash/dist/index.html +3 -3
  9. package/bizar-dash/dist/mobile.html +2 -2
  10. package/bizar-dash/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
  11. package/bizar-dash/skills/publishing/SKILL.md +146 -0
  12. package/bizar-dash/src/server/api.mjs +8 -0
  13. package/bizar-dash/src/server/backup-store.mjs +525 -0
  14. package/bizar-dash/src/server/digest-store.mjs +558 -0
  15. package/bizar-dash/src/server/lib/rate-limit.mjs +122 -0
  16. package/bizar-dash/src/server/routes/backup.mjs +112 -0
  17. package/bizar-dash/src/server/routes/chat.mjs +14 -0
  18. package/bizar-dash/src/server/routes/digests.mjs +82 -0
  19. package/bizar-dash/src/server/routes-v2/events.mjs +14 -0
  20. package/bizar-dash/src/server/schedules-runner.mjs +126 -0
  21. package/bizar-dash/src/server/server.mjs +17 -0
  22. package/bizar-dash/src/web/App.tsx +8 -1
  23. package/bizar-dash/src/web/components/BackupRestore.tsx +330 -0
  24. package/bizar-dash/src/web/components/SearchModal.tsx +3 -1
  25. package/bizar-dash/src/web/components/chat/Composer.tsx +2 -0
  26. package/bizar-dash/src/web/styles/main.css +70 -8
  27. package/bizar-dash/src/web/views/Activity.tsx +11 -1
  28. package/bizar-dash/src/web/views/Agents.tsx +57 -42
  29. package/bizar-dash/src/web/views/Artifacts.tsx +38 -25
  30. package/bizar-dash/src/web/views/Chat.tsx +8 -0
  31. package/bizar-dash/src/web/views/History.tsx +4 -1
  32. package/bizar-dash/src/web/views/MiniMaxUsage.tsx +21 -4
  33. package/bizar-dash/src/web/views/Mods.tsx +30 -17
  34. package/bizar-dash/src/web/views/Overview.tsx +8 -1
  35. package/bizar-dash/src/web/views/Providers.tsx +16 -16
  36. package/bizar-dash/src/web/views/Schedules.tsx +33 -15
  37. package/bizar-dash/src/web/views/Settings.tsx +97 -1751
  38. package/bizar-dash/src/web/views/Skills.tsx +4 -1
  39. package/bizar-dash/src/web/views/Tasks.tsx +11 -2
  40. package/bizar-dash/src/web/views/memory/ConfigPanel.tsx +8 -2
  41. package/bizar-dash/src/web/views/memory/LightragPanel.tsx +3 -0
  42. package/bizar-dash/src/web/views/memory/ObsidianPanel.tsx +12 -4
  43. package/bizar-dash/src/web/views/memory/SemanticSearchPanel.tsx +3 -0
  44. package/bizar-dash/src/web/views/settings/ActivitySection.tsx +205 -0
  45. package/bizar-dash/src/web/views/settings/AgentSection.tsx +294 -0
  46. package/bizar-dash/src/web/views/settings/AuthSection.tsx +159 -0
  47. package/bizar-dash/src/web/views/settings/BackupSection.tsx +16 -0
  48. package/bizar-dash/src/web/views/settings/EnvVarsSection.tsx +16 -0
  49. package/bizar-dash/src/web/views/settings/GeneralSection.tsx +105 -0
  50. package/bizar-dash/src/web/views/settings/HeadroomSection.tsx +39 -0
  51. package/bizar-dash/src/web/views/settings/MemorySection.tsx +16 -0
  52. package/bizar-dash/src/web/views/settings/NetworkSection.tsx +87 -0
  53. package/bizar-dash/src/web/views/settings/NotificationsSection.tsx +34 -0
  54. package/bizar-dash/src/web/views/settings/ProvidersSection.tsx +16 -0
  55. package/bizar-dash/src/web/views/settings/SkillsSection.tsx +16 -0
  56. package/bizar-dash/src/web/views/settings/SystemLlmSection.tsx +81 -0
  57. package/bizar-dash/src/web/views/settings/ThemeSection.tsx +168 -0
  58. package/bizar-dash/src/web/views/settings/UpdatesSection.tsx +256 -0
  59. package/bizar-dash/tests/a11y.test.tsx +206 -0
  60. package/bizar-dash/tests/backup-restore.test.mjs +217 -0
  61. package/bizar-dash/tests/backup-restore.test.tsx +123 -0
  62. package/bizar-dash/tests/backup-store.test.mjs +300 -0
  63. package/bizar-dash/tests/cli-error-visibility.test.mjs +153 -0
  64. package/bizar-dash/tests/digest-generation.test.mjs +191 -0
  65. package/bizar-dash/tests/digest-store.test.mjs +264 -0
  66. package/bizar-dash/tests/rate-limit.test.mjs +298 -0
  67. package/cli/bin.mjs +96 -2
  68. package/cli/commands/minimax.mjs +20 -0
  69. package/cli/commands/util.mjs +154 -1
  70. package/cli/digest.mjs +149 -0
  71. package/package.json +1 -1
  72. package/bizar-dash/dist/assets/main-DAlLdW8I.css +0 -1
  73. package/bizar-dash/dist/assets/main-DGGq-iZI.js +0 -361
  74. package/bizar-dash/dist/assets/main-DGGq-iZI.js.map +0 -1
  75. package/bizar-dash/dist/assets/mobile-CWqPoGaT.js.map +0 -1
@@ -1 +1 @@
1
- import{am as r,j as o,r as e,an as n}from"./mobile-CWqPoGaT.js";const t=document.getElementById("root");if(!t)throw new Error("Root element #root not found");r(t).render(o.jsx(e.StrictMode,{children:o.jsx(n,{})}));
1
+ import{aj as r,j as o,r as e,ak as n}from"./mobile-BK8-ythT.js";const t=document.getElementById("root");if(!t)throw new Error("Root element #root not found");r(t).render(o.jsx(e.StrictMode,{children:o.jsx(n,{})}));
@@ -1 +1 @@
1
- {"version":3,"file":"mobile-i4Uv9eW8.js","sources":["../../src/web/mobile.tsx"],"sourcesContent":["// src/mobile.tsx — entry point for mobile dashboard.\nimport { StrictMode } from 'react';\nimport { createRoot } from 'react-dom/client';\nimport { MobileApp } from './MobileApp';\nimport './styles/mobile.css';\n\nconst root = document.getElementById('root');\nif (!root) throw new Error('Root element #root not found');\ncreateRoot(root).render(\n <StrictMode>\n <MobileApp />\n </StrictMode>,\n);\n"],"names":["root","createRoot","jsx","StrictMode","MobileApp"],"mappings":"gEAMA,MAAMA,EAAO,SAAS,eAAe,MAAM,EAC3C,GAAI,CAACA,EAAM,MAAM,IAAI,MAAM,8BAA8B,EACzDC,EAAWD,CAAI,EAAE,OACfE,EAAAA,IAACC,EAAAA,WAAA,CACC,SAAAD,EAAAA,IAACE,EAAA,CAAA,CAAU,CAAA,CACb,CACF"}
1
+ {"version":3,"file":"mobile-Chvf9u_B.js","sources":["../../src/web/mobile.tsx"],"sourcesContent":["// src/mobile.tsx — entry point for mobile dashboard.\nimport { StrictMode } from 'react';\nimport { createRoot } from 'react-dom/client';\nimport { MobileApp } from './MobileApp';\nimport './styles/mobile.css';\n\nconst root = document.getElementById('root');\nif (!root) throw new Error('Root element #root not found');\ncreateRoot(root).render(\n <StrictMode>\n <MobileApp />\n </StrictMode>,\n);\n"],"names":["root","createRoot","jsx","StrictMode","MobileApp"],"mappings":"gEAMA,MAAMA,EAAO,SAAS,eAAe,MAAM,EAC3C,GAAI,CAACA,EAAM,MAAM,IAAI,MAAM,8BAA8B,EACzDC,EAAWD,CAAI,EAAE,OACfE,EAAAA,IAACC,EAAAA,WAAA,CACC,SAAAD,EAAAA,IAACE,EAAA,CAAA,CAAU,CAAA,CACb,CACF"}
@@ -29,10 +29,10 @@
29
29
  }
30
30
  })();
31
31
  </script>
32
- <script type="module" crossorigin src="/assets/main-DGGq-iZI.js"></script>
33
- <link rel="modulepreload" crossorigin href="/assets/mobile-CWqPoGaT.js">
32
+ <script type="module" crossorigin src="/assets/main-DHZmbnxQ.js"></script>
33
+ <link rel="modulepreload" crossorigin href="/assets/mobile-BK8-ythT.js">
34
34
  <link rel="stylesheet" crossorigin href="/assets/mobile-CsZQAswA.css">
35
- <link rel="stylesheet" crossorigin href="/assets/main-DAlLdW8I.css">
35
+ <link rel="stylesheet" crossorigin href="/assets/main-DX_Jh8Wc.css">
36
36
  </head>
37
37
  <body>
38
38
  <div id="root"></div>
@@ -12,8 +12,8 @@
12
12
  <link rel="preconnect" href="https://fonts.googleapis.com" />
13
13
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
14
14
  <link rel="stylesheet" href="https://rsms.me/inter/inter.css" />
15
- <script type="module" crossorigin src="/assets/mobile-i4Uv9eW8.js"></script>
16
- <link rel="modulepreload" crossorigin href="/assets/mobile-CWqPoGaT.js">
15
+ <script type="module" crossorigin src="/assets/mobile-Chvf9u_B.js"></script>
16
+ <link rel="modulepreload" crossorigin href="/assets/mobile-BK8-ythT.js">
17
17
  <link rel="stylesheet" crossorigin href="/assets/mobile-CsZQAswA.css">
18
18
  </head>
19
19
  <body>
@@ -1 +1 @@
1
- {"version":"4.1.9","results":[[":tests/lib/utils.test.ts",{"duration":20.207488999999953,"failed":false}],[":tests/components/Button.test.tsx",{"duration":65.99081000000001,"failed":false}],[":tests/components/Card.test.tsx",{"duration":24.894168999999977,"failed":false}],[":tests/hooks/useModal.test.tsx",{"duration":91.24809300000004,"failed":false}],[":tests/components/Toast.test.tsx",{"duration":112.40757200000002,"failed":false}],[":tests/components/Modal.test.tsx",{"duration":113.472669,"failed":false}],[":tests/lib/i18n.test.ts",{"duration":3.547411000000011,"failed":false}],[":tests/components/StatusBadge.test.tsx",{"duration":25.80152300000003,"failed":false}],[":tests/hooks/useToast.test.tsx",{"duration":74.72992599999998,"failed":false}],[":tests/components/Spinner.test.tsx",{"duration":43.51148800000004,"failed":false}]]}
1
+ {"version":"4.1.9","results":[[":tests/lib/utils.test.ts",{"duration":18.560040000000015,"failed":false}],[":tests/components/Button.test.tsx",{"duration":64.33624699999996,"failed":false}],[":tests/components/Card.test.tsx",{"duration":26.467094999999972,"failed":false}],[":tests/hooks/useModal.test.tsx",{"duration":82.54429499999998,"failed":false}],[":tests/components/Toast.test.tsx",{"duration":98.25438599999995,"failed":false}],[":tests/components/Modal.test.tsx",{"duration":103.29611399999999,"failed":false}],[":tests/lib/i18n.test.ts",{"duration":4.320750000000032,"failed":false}],[":tests/components/StatusBadge.test.tsx",{"duration":26.31683799999996,"failed":false}],[":tests/hooks/useToast.test.tsx",{"duration":69.66249899999997,"failed":false}],[":tests/components/Spinner.test.tsx",{"duration":39.154809,"failed":false}],[":tests/backup-restore.test.tsx",{"duration":3092.207656,"failed":true}],[":tests/a11y.test.tsx",{"duration":567.891542,"failed":false}]]}
@@ -0,0 +1,146 @@
1
+ ---
2
+ name: publishing
3
+ description: Cut and publish a release of BizarHarness (@polderlabs/bizar). Use when bumping version, updating CHANGELOG, committing release commits, tagging, pushing, or publishing to npm. Covers the 4 test runners, version bump rules, hotfixes, and 10 known pitfalls.
4
+ ---
5
+
6
+ # Publishing BizarHarness
7
+
8
+ Cut a release of `@polderlabs/bizar`. Read `/home/drb0rk/Projects/BizarHarness/docs/RELEASING.md` for the comprehensive guide; this skill is the action-oriented checklist.
9
+
10
+ ## Pre-flight (must all be true)
11
+
12
+ ```bash
13
+ git status --short # empty
14
+ git branch --show-current # master
15
+ npm whoami # drb0rk
16
+ ```
17
+
18
+ ## Test gate (all 4 runners must pass)
19
+
20
+ ```bash
21
+ npx tsc --noEmit # 0 errors
22
+ npm test # 388 node + 75 SDK + 295 bun + 7 smoke = 765 pass
23
+ npm run build # 0 errors
24
+ ```
25
+
26
+ Counts above are post-v4.7.0 (commit `3005611`, tag `v4.7.0`).
27
+
28
+ ## Doc updates (in order)
29
+
30
+ 1. **`CHANGELOG.md`** — add `## vX.Y.Z — short title` at top, sections: Highlights / What's New / Tests / Upgrade.
31
+ 2. **`package.json`** — bump `"version"` field.
32
+ 3. **`.bizar/PROJECT.md`** — bump `Current Version` line.
33
+ 4. **`.bizar/AGENTS_SELF_IMPROVEMENT.md`** — append `### YYYY-MM-DD — vX.Y.Z` entry under `## Log`.
34
+
35
+ ## Release sequence
36
+
37
+ ```bash
38
+ # Pre-flight + tests + build (see above)
39
+
40
+ # Commit (hand off to Hermod for write-level git)
41
+ git add -A
42
+ git commit -m "vX.Y.Z: short title
43
+
44
+ Highlights:
45
+ - bullet 1
46
+ - bullet 2
47
+ - bullet 3
48
+
49
+ Co-authored-by: Odin <noreply@polderlabs.dev>"
50
+
51
+ # Tag
52
+ git tag -a vX.Y.Z -m "vX.Y.Z — short title"
53
+
54
+ # Push
55
+ git push origin master --follow-tags
56
+
57
+ # Publish (prepublishOnly runs build automatically)
58
+ npm publish
59
+
60
+ # Verify
61
+ npm view @polderlabs/bizar@X.Y.Z version
62
+ git ls-remote --tags origin | grep vX.Y.Z
63
+ ```
64
+
65
+ ## Versioning
66
+
67
+ | Bump | When |
68
+ |---|---|
69
+ | Patch | Bug fixes only |
70
+ | Minor | New features, behavior-preserving changes |
71
+ | Major | Breaking changes requiring user action |
72
+
73
+ When in doubt, ask the user.
74
+
75
+ ## Hotfix
76
+
77
+ ```bash
78
+ git checkout -b hotfix/vX.Y.Z+1 vX.Y.Z
79
+ # make minimal fix
80
+ npx tsc --noEmit && npm test && npm run build
81
+ # bump version, update CHANGELOG with "Hotfix" entry
82
+ git add -A && git commit -m "vX.Y.Z+1: hotfix — ..."
83
+ git tag -a vX.Y.Z+1 -m "vX.Y.Z+1 — Hotfix: ..."
84
+ git push origin hotfix/vX.Y.Z+1 --follow-tags
85
+ git checkout master && git merge --no-ff hotfix/vX.Y.Z+1
86
+ git push origin master
87
+ npm publish
88
+ ```
89
+
90
+ ## Rollback
91
+
92
+ `npm unpublish` is almost never right (breaks existing installs, 72h limit). Prefer:
93
+
94
+ ```bash
95
+ npm deprecate @polderlabs/bizar@X.Y.Z "Critical bug; use X.Y.Z-1 instead"
96
+ # then cut a new patch with the fix
97
+ ```
98
+
99
+ ## 10 pitfalls (avoid these)
100
+
101
+ 1. **Auth is NOT needed in v1 routes.** Tailscale handles it. Don't add auth during a release refactor.
102
+ 2. **`--help` global vs per-subcommand.** `bizar --help` ≠ `bizar <cmd> --help`. Test both.
103
+ 3. **Pre-existing merge conflict markers.** `grep -c '<<<<<<<\|>>>>>>>' <file>` before declaring a file clean. TS1185 will fail otherwise.
104
+ 4. **Source maps.** `vite.config.ts` must have `sourcemap: 'hidden'`. Don't ship 3 MB of maps.
105
+ 5. **Empty catch blocks.** Replace `catch { /* ignore */ }` with `catch (err) { logger.warn('swallowed in <ctx>:', err.message); }`.
106
+ 6. **Sibling collisions.** Define `Owns (read+write)` and `Siblings READ-ONLY` before dispatching parallel streams.
107
+ 7. **Test imports after refactor.** `grep -rn 'from.*<old-path>' <test-dirs>` to find stale imports.
108
+ 8. **`npm publish` requires version bump.** Re-publishing the same version is rejected.
109
+ 9. **`prepublishOnly` runs build.** Don't run build separately before publish — it runs anyway.
110
+ 10. **`npm view` propagation delay.** New version may 404 for ~5s after publish. Retry.
111
+
112
+ ## Agent routing
113
+
114
+ | Agent | Release role |
115
+ |---|---|
116
+ | Odin | Decompose release into parallel prep streams |
117
+ | Heimdall | Mechanical edits (bump `package.json`, append to AGENTS_SELF_IMPROVEMENT.md) |
118
+ | Mimir | Research prior releases, summarize changes |
119
+ | Thor | CHANGELOG drafting, test additions |
120
+ | Tyr | Full release orchestration, breaking-change analysis |
121
+ | **Hermod** | **The only agent that runs `git commit`, `git tag`, `git push`, `npm publish`** |
122
+ | Forseti | Review the release plan (when called by Odin) |
123
+
124
+ If a non-Hermod agent tries to push or publish, stop — route to Hermod via handoff.
125
+
126
+ ## Post-release verification
127
+
128
+ ```bash
129
+ npm view @polderlabs/bizar version # X.Y.Z
130
+ npm view @polderlabs/bizar@X.Y.Z dist.tarball # registry URL
131
+ git ls-remote --tags origin | grep vX.Y.Z # tag visible
132
+
133
+ # Smoke test in a clean dir
134
+ mkdir /tmp/bizar-smoke && cd /tmp/bizar-smoke
135
+ npm install -g @polderlabs/bizar@X.Y.Z
136
+ bizar --version # X.Y.Z
137
+ bizar doctor # exit 0
138
+ ```
139
+
140
+ ## Reference
141
+
142
+ - Comprehensive guide: `docs/RELEASING.md` (~600 lines, all details)
143
+ - Most recent release: **v4.7.0** (commit `3005611`, tag `v4.7.0`, npm `@polderlabs/bizar@4.7.0`)
144
+ - Diff stats: 62 files, +7,361 / −4,083 lines
145
+ - Test counts: 388 node + 75 vitest + 295 bun + 7 smoke = **765 pass, 0 fail**
146
+ - Build: 372 KB main + 476 KB mobile JS bundles
@@ -138,6 +138,14 @@ export async function createApiRouter({
138
138
  // Each route handler inside the router is at its bare path (e.g. '/status'),
139
139
  // which becomes '/api/headroom/status' at the top level.
140
140
  router.use('/headroom', createHeadroomRouter());
141
+ // v4.8.0 — Weekly digest endpoints. Lazy-imported so digest-store
142
+ // module-level imports (tasks, schedules, etc.) don't block boot.
143
+ const { createDigestsRouter } = await import('./routes/digests.mjs');
144
+ router.use(createDigestsRouter({ projectRoot }));
145
+ // v4.8.0 — Backup/restore endpoints. Lazy-imported so backup-store
146
+ // module-level fs operations don't block boot.
147
+ const { createBackupRouter } = await import('./routes/backup.mjs');
148
+ router.use(createBackupRouter({ projectRoot }));
141
149
  router.use(createMiscRouter({ state, broadcast }));
142
150
 
143
151
  // /api/auth/* must be reachable WITHOUT the bearer token so a fresh