@polderlabs/bizar 10.7.2 → 10.10.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.
- package/.claude/agents/_shared/AGENT_BASELINE.md +48 -243
- package/.claude/agents/_shared/CLAUDE_TOOLS.md +4 -2
- package/.claude/agents/_shared/SKILLS.md +18 -95
- package/.claude/agents/brand-designer.md +7 -5
- package/.claude/agents/debug-specialist.md +68 -0
- package/.claude/agents/exec-assistant.md +2 -1
- package/.claude/agents/help-desk.md +3 -3
- package/.claude/agents/it-lead.md +5 -5
- package/.claude/agents/knowledge-manager.md +2 -2
- package/.claude/agents/office-coordinator.md +3 -4
- package/.claude/agents/office-greeter.md +5 -5
- package/.claude/agents/office-manager.md +127 -42
- package/.claude/agents/planner.md +120 -0
- package/.claude/agents/principal-engineer.md +6 -5
- package/.claude/agents/qa-reviewer.md +4 -4
- package/.claude/agents/research-analyst.md +13 -43
- package/.claude/agents/senior-engineer.md +5 -4
- package/.claude/agents/support-tech.md +21 -73
- package/.claude/agents/ui-designer.md +89 -0
- package/.claude/commands/bizar.md +9 -16
- package/.claude/commands/cron.md +7 -3
- package/.claude/commands/learn.md +4 -2
- package/.claude/commands/plan.md +14 -28
- package/.claude/commands/plow-through.md +19 -38
- package/.claude/commands/pr-review.md +2 -3
- package/.claude/commands/setup-provider.md +15 -88
- package/.claude/commands/sprint.md +3 -3
- package/.claude/commands/tailscale-serve.md +9 -95
- package/.claude/commands/team.md +26 -122
- package/.claude/commands/test.md +3 -3
- package/.claude/commands/use-default.md +53 -0
- package/.claude/commands/use-premium.md +74 -0
- package/.claude/commands/validate.md +13 -61
- package/.claude/hooks/README.md +24 -108
- package/.claude/hooks/advisor-context.mjs +42 -0
- package/.claude/hooks/agent-grounding.mjs +41 -0
- package/.claude/hooks/content-style-guard.mjs +73 -0
- package/.claude/hooks/control-inbox.mjs +48 -0
- package/.claude/hooks/git-workflow-guard.mjs +104 -0
- package/.claude/hooks/learning-extract.mjs +0 -0
- package/.claude/hooks/path-ownership-guard.mjs +89 -0
- package/.claude/hooks/precompact-priorities.sh +11 -0
- package/.claude/hooks/pretooluse-bash.mjs +4 -11
- package/.claude/hooks/sessionend-recall.mjs +0 -0
- package/.claude/hooks/sessionstart-prime.mjs +10 -4
- package/.claude/hooks/simplify-guard.mjs +51 -0
- package/.claude/hooks/telemetry.mjs +69 -0
- package/.claude/hooks/thinking-route.mjs +7 -9
- package/.claude/hooks/worker-suggest.mjs +21 -13
- package/.claude/hooks/worktree-bootstrap.mjs +64 -0
- package/.claude/model-router.json +57 -0
- package/.claude/settings.json +92 -140
- package/AGENTS.md +95 -0
- package/README.md +76 -472
- package/cli/agent-browser-update.mjs +87 -274
- package/cli/atomic.mjs +1 -1
- package/cli/audit.mjs +31 -121
- package/cli/banner.mjs +3 -14
- package/cli/bin.mjs +83 -331
- package/cli/bootstrap.mjs +9 -12
- package/cli/commands/claude-cmd.mjs +45 -309
- package/cli/commands/control.mjs +102 -0
- package/cli/commands/install.mjs +9 -56
- package/cli/commands/rca.mjs +63 -165
- package/cli/commands/sandbox.mjs +89 -183
- package/cli/commands/setup-provider.mjs +65 -423
- package/cli/commands/task.mjs +249 -0
- package/cli/commands/util.mjs +37 -197
- package/cli/commands/validate.mjs +45 -75
- package/cli/control-store.mjs +312 -0
- package/{bizar-dash/src/server → cli/core}/backup-store.mjs +7 -17
- package/cli/doctor.mjs +8 -13
- package/cli/export.mjs +3 -7
- package/cli/init.mjs +1 -135
- package/cli/install/banner.mjs +4 -14
- package/cli/install/paths.mjs +3 -8
- package/cli/install.mjs +2 -7
- package/cli/migrate.mjs +24 -24
- package/{bizar-dash/src/server → cli}/progress-parser.mjs +7 -5
- package/cli/provision.mjs +140 -165
- package/cli/task-ledger.mjs +842 -0
- package/cli/update.mjs +2 -2
- package/cli/utils.mjs +1 -38
- package/config/AGENTS.md +14 -591
- package/config/rules/general.md +1 -1
- package/config/rules/uncertainty.md +2 -2
- package/config/skills/9router/SKILL.md +3 -3
- package/config/skills/9router-tts/SKILL.md +1 -1
- package/config/skills/agent-browser/SKILL.md +53 -0
- package/config/skills/bizar/README.md +3 -3
- package/config/skills/bizar/SKILL.md +31 -431
- package/config/skills/clean-gone-branches/SKILL.md +8 -0
- package/config/skills/commit-staged/SKILL.md +15 -0
- package/config/skills/cpp-coding-standards/README.md +3 -3
- package/config/skills/cpp-testing/README.md +2 -2
- package/config/skills/create-pr/SKILL.md +16 -0
- package/config/skills/cubesandbox/SKILL.md +33 -128
- package/config/skills/embedded-esp-idf/README.md +3 -3
- package/config/skills/harness-engineering/SKILL.md +37 -126
- package/config/skills/read-the-damn-docs/SKILL.md +2 -2
- package/config/skills/resolve-pr-comments/SKILL.md +14 -0
- package/config/skills/review-pr/SKILL.md +10 -0
- package/config/skills/self-improvement/SKILL.md +19 -54
- package/config/skills/simplify/SKILL.md +15 -0
- package/config/skills/update-pr-summary/SKILL.md +8 -0
- package/config/trigger-patterns.json +11 -25
- package/package.json +28 -102
- package/packages/sdk/dist/agent-registry.d.ts +2 -2
- package/packages/sdk/dist/agent-registry.js +2 -2
- package/packages/sdk/dist/consensus/index.d.ts +4 -4
- package/packages/sdk/dist/consensus/index.js +5 -5
- package/packages/sdk/dist/federation/envelope.d.ts +1 -1
- package/packages/sdk/dist/federation/envelope.js +2 -2
- package/packages/sdk/dist/index.d.ts +1 -4
- package/packages/sdk/dist/index.js +1 -4
- package/packages/sdk/dist/mcp/server.d.ts +8 -13
- package/packages/sdk/dist/mcp/server.js +15 -77
- package/packages/sdk/dist/router/index.d.ts +2 -2
- package/packages/sdk/dist/router/index.js +2 -2
- package/packages/sdk/dist/version.d.ts +2 -2
- package/packages/sdk/dist/version.js +2 -2
- package/packages/sdk/package.json +1 -2
- package/scripts/git-hooks/pre-commit +2 -2
- package/scripts/git-hooks/pre-push +3 -3
- package/scripts/install-hooks.sh +2 -2
- package/.claude/agents/vp-engineering.md +0 -54
- package/.claude/commands/goal.md +0 -99
- package/.claude/commands/visual-plan.md +0 -24
- package/.claude/hooks/__tests__/pretooluse-editwrite.test.mjs +0 -146
- package/.claude/hooks/__tests__/sessionend-recall.test.mjs +0 -256
- package/.claude/hooks/__tests__/sessionstart-prime.test.mjs +0 -325
- package/.claude/hooks/__tests__/thinking-route.test.mjs +0 -319
- package/.claude/hooks/post-merge-audit.sh +0 -93
- package/.claude/skills/9router/SKILL.md +0 -80
- package/.claude/skills/9router-chat/SKILL.md +0 -73
- package/.claude/skills/9router-embeddings/SKILL.md +0 -69
- package/.claude/skills/9router-image/SKILL.md +0 -86
- package/.claude/skills/9router-stt/SKILL.md +0 -79
- package/.claude/skills/9router-tts/SKILL.md +0 -80
- package/.claude/skills/9router-web-fetch/SKILL.md +0 -99
- package/.claude/skills/9router-web-search/SKILL.md +0 -91
- package/.claude/skills/agent-browser/SKILL.md +0 -64
- package/.claude/skills/bizar/README.md +0 -9
- package/.claude/skills/bizar/SKILL.md +0 -447
- package/.claude/skills/cpp-coding-standards/README.md +0 -28
- package/.claude/skills/cpp-coding-standards/SKILL.md +0 -634
- package/.claude/skills/cpp-coding-standards/references/concurrency.md +0 -320
- package/.claude/skills/cpp-coding-standards/references/error-handling.md +0 -229
- package/.claude/skills/cpp-coding-standards/references/memory-safety.md +0 -216
- package/.claude/skills/cpp-coding-standards/references/modern-idioms.md +0 -282
- package/.claude/skills/cpp-coding-standards/references/review-checklist.md +0 -96
- package/.claude/skills/cpp-testing/README.md +0 -28
- package/.claude/skills/cpp-testing/SKILL.md +0 -304
- package/.claude/skills/cpp-testing/references/coverage.md +0 -370
- package/.claude/skills/cpp-testing/references/framework-compare.md +0 -175
- package/.claude/skills/cpp-testing/references/host-test-for-embedded.md +0 -499
- package/.claude/skills/cpp-testing/references/mocking.md +0 -364
- package/.claude/skills/cpp-testing/references/tdd-workflow.md +0 -308
- package/.claude/skills/cubesandbox/SKILL.md +0 -148
- package/.claude/skills/de-sloppify/cleanup.mjs +0 -253
- package/.claude/skills/de-sloppify/cleanup.test.mjs +0 -189
- package/.claude/skills/embedded-esp-idf/README.md +0 -41
- package/.claude/skills/embedded-esp-idf/SKILL.md +0 -439
- package/.claude/skills/embedded-esp-idf/references/freertos-patterns.md +0 -214
- package/.claude/skills/embedded-esp-idf/references/host-tests.md +0 -164
- package/.claude/skills/embedded-esp-idf/references/idf-py-commands.md +0 -157
- package/.claude/skills/embedded-esp-idf/references/kconfig.md +0 -159
- package/.claude/skills/embedded-esp-idf/references/logging-discipline.md +0 -118
- package/.claude/skills/embedded-esp-idf/references/memory-and-iram.md +0 -137
- package/.claude/skills/embedded-esp-idf/references/nvs.md +0 -121
- package/.claude/skills/embedded-esp-idf/references/packed-structs.md +0 -192
- package/.claude/skills/embedded-esp-idf/scripts/idf_env.sh +0 -47
- package/.claude/skills/embedded-esp-idf/scripts/size_check.sh +0 -77
- package/.claude/skills/glyph/SKILL.md +0 -163
- package/.claude/skills/harness-engineering/SKILL.md +0 -142
- package/.claude/skills/lightrag/SKILL.md +0 -81
- package/.claude/skills/memory-protocol/SKILL.md +0 -105
- package/.claude/skills/obsidian/SKILL.md +0 -306
- package/.claude/skills/read-the-damn-docs/SKILL.md +0 -113
- package/.claude/skills/self-improvement/SKILL.md +0 -64
- package/.claude/skills/skillopt/SKILL.md +0 -129
- package/.claude/skills/thinking-archetypes/SKILL.md +0 -90
- package/.claude/skills/thinking-bayesian/SKILL.md +0 -267
- package/.claude/skills/thinking-bounded-rationality/SKILL.md +0 -406
- package/.claude/skills/thinking-circle-of-competence/SKILL.md +0 -216
- package/.claude/skills/thinking-cynefin/SKILL.md +0 -70
- package/.claude/skills/thinking-debiasing/SKILL.md +0 -192
- package/.claude/skills/thinking-dual-process/SKILL.md +0 -282
- package/.claude/skills/thinking-effectuation/SKILL.md +0 -366
- package/.claude/skills/thinking-feedback-loops/SKILL.md +0 -464
- package/.claude/skills/thinking-fermi-estimation/SKILL.md +0 -263
- package/.claude/skills/thinking-first-principles/SKILL.md +0 -167
- package/.claude/skills/thinking-five-whys-plus/SKILL.md +0 -139
- package/.claude/skills/thinking-inversion/SKILL.md +0 -195
- package/.claude/skills/thinking-jobs-to-be-done/SKILL.md +0 -363
- package/.claude/skills/thinking-kepner-tregoe/SKILL.md +0 -154
- package/.claude/skills/thinking-leverage-points/SKILL.md +0 -390
- package/.claude/skills/thinking-lindy-effect/SKILL.md +0 -331
- package/.claude/skills/thinking-map-territory/SKILL.md +0 -111
- package/.claude/skills/thinking-margin-of-safety/SKILL.md +0 -330
- package/.claude/skills/thinking-model-combination/SKILL.md +0 -406
- package/.claude/skills/thinking-model-router/SKILL.md +0 -360
- package/.claude/skills/thinking-model-selection/SKILL.md +0 -341
- package/.claude/skills/thinking-occams-razor/SKILL.md +0 -129
- package/.claude/skills/thinking-ooda/SKILL.md +0 -127
- package/.claude/skills/thinking-opportunity-cost/SKILL.md +0 -360
- package/.claude/skills/thinking-pre-mortem/SKILL.md +0 -170
- package/.claude/skills/thinking-probabilistic/SKILL.md +0 -324
- package/.claude/skills/thinking-red-team/SKILL.md +0 -142
- package/.claude/skills/thinking-regret-minimization/SKILL.md +0 -335
- package/.claude/skills/thinking-reversibility/SKILL.md +0 -326
- package/.claude/skills/thinking-scientific-method/SKILL.md +0 -162
- package/.claude/skills/thinking-second-order/SKILL.md +0 -184
- package/.claude/skills/thinking-socratic/SKILL.md +0 -198
- package/.claude/skills/thinking-steel-manning/SKILL.md +0 -332
- package/.claude/skills/thinking-systems/SKILL.md +0 -238
- package/.claude/skills/thinking-theory-of-constraints/SKILL.md +0 -338
- package/.claude/skills/thinking-thought-experiment/SKILL.md +0 -354
- package/.claude/skills/thinking-triz/SKILL.md +0 -171
- package/.claude/skills/thinking-via-negativa/SKILL.md +0 -358
- package/bizar-dash/.bizar/graph/.graphify_analysis.json +0 -1540
- package/bizar-dash/.bizar/graph/.graphify_labels.json +0 -1
- package/bizar-dash/.bizar/graph/GRAPH_REPORT.md +0 -404
- package/bizar-dash/.bizar/graph/cache/ast/v0.8.46/0661b816358db84dfdb7f10443db8a61152fd20b3fee950caf8fbf32920a1790.json +0 -1
- package/bizar-dash/.bizar/graph/cache/ast/v0.8.46/16da06d774142a6e5d74829ad982531286a6193ef798de8f593db029e123ec32.json +0 -1
- package/bizar-dash/.bizar/graph/cache/ast/v0.8.46/27e5697c01254c69c64c5a33896669073b40afb5ba88375102ae77fa5404136d.json +0 -1
- package/bizar-dash/.bizar/graph/cache/ast/v0.8.46/532997898027254aa4c0932243dc71d2f55888181232b65974961934997dc85b.json +0 -1
- package/bizar-dash/.bizar/graph/cache/ast/v0.8.46/84e3451a64c7f99f0cd6a88b0748d7426780486f53ab4935b7476b28c08f8293.json +0 -1
- package/bizar-dash/.bizar/graph/cache/ast/v0.8.46/88e5ea5f3e78fa69353fe9e6a8d1a05391d54605e25600cb125531eb5a6432ff.json +0 -1
- package/bizar-dash/.bizar/graph/cache/stat-index.json +0 -1
- package/bizar-dash/.bizar/graph/graph.html +0 -307
- package/bizar-dash/.bizar/graph/graph.json +0 -40267
- package/bizar-dash/.bizar/graph/manifest.json +0 -762
- package/bizar-dash/.graphifyignore +0 -40
- package/bizar-dash/.obsidian/README.md +0 -14
- package/bizar-dash/.obsidian/daily/2026-06-25.md +0 -9
- package/bizar-dash/.obsidian/vault.json +0 -7
- package/bizar-dash/.od-skills/web-prototype-e1429c1737/SKILL.md +0 -103
- package/bizar-dash/.od-skills/web-prototype-e1429c1737/assets/template.html +0 -338
- package/bizar-dash/.od-skills/web-prototype-e1429c1737/example.html +0 -81
- package/bizar-dash/.od-skills/web-prototype-e1429c1737/open-design.json +0 -172
- package/bizar-dash/.od-skills/web-prototype-e1429c1737/references/checklist.md +0 -44
- package/bizar-dash/.od-skills/web-prototype-e1429c1737/references/layouts.md +0 -247
- package/bizar-dash/ARCHITECTURE.md +0 -197
- package/bizar-dash/BROWSER_VERIFICATION.md +0 -190
- package/bizar-dash/CHANGELOG.md +0 -807
- package/bizar-dash/CONTROL_SURFACES.md +0 -156
- package/bizar-dash/DESIGN.md +0 -912
- package/bizar-dash/GLYPH.md +0 -418
- package/bizar-dash/PLAN.md +0 -1135
- package/bizar-dash/SETTINGS_AUDIT.md +0 -225
- package/bizar-dash/critique.json +0 -26
- package/bizar-dash/dist/assets/ActivityFeed-Bw4Cai7r.js +0 -11
- package/bizar-dash/dist/assets/ActivityFeed-Bw4Cai7r.js.map +0 -1
- package/bizar-dash/dist/assets/ActivityView-BC0QQ_j9.js +0 -2
- package/bizar-dash/dist/assets/ActivityView-BC0QQ_j9.js.map +0 -1
- package/bizar-dash/dist/assets/AdminView-CLTNKFL4.js +0 -11
- package/bizar-dash/dist/assets/AdminView-CLTNKFL4.js.map +0 -1
- package/bizar-dash/dist/assets/AgentActivity-DBWDByjk.js +0 -67
- package/bizar-dash/dist/assets/AgentActivity-DBWDByjk.js.map +0 -1
- package/bizar-dash/dist/assets/AgentsView-DD6bCIbA.js +0 -15
- package/bizar-dash/dist/assets/AgentsView-DD6bCIbA.js.map +0 -1
- package/bizar-dash/dist/assets/Alert-pzFISNtS.js +0 -6
- package/bizar-dash/dist/assets/Alert-pzFISNtS.js.map +0 -1
- package/bizar-dash/dist/assets/ArtifactsView-BVU5lfo7.js +0 -21
- package/bizar-dash/dist/assets/ArtifactsView-BVU5lfo7.js.map +0 -1
- package/bizar-dash/dist/assets/AuthView-BZ-bPIOM.js +0 -16
- package/bizar-dash/dist/assets/AuthView-BZ-bPIOM.js.map +0 -1
- package/bizar-dash/dist/assets/Avatar-CRW81ewE.js +0 -6
- package/bizar-dash/dist/assets/Avatar-CRW81ewE.js.map +0 -1
- package/bizar-dash/dist/assets/BackgroundJobsView-w8OZtXyI.js +0 -1
- package/bizar-dash/dist/assets/BackgroundJobsView-w8OZtXyI.js.map +0 -1
- package/bizar-dash/dist/assets/BackupView-u_O3j0TG.js +0 -1
- package/bizar-dash/dist/assets/BackupView-u_O3j0TG.js.map +0 -1
- package/bizar-dash/dist/assets/Banner-Du-3l05O.js +0 -1
- package/bizar-dash/dist/assets/Banner-Du-3l05O.js.map +0 -1
- package/bizar-dash/dist/assets/Card-Clkvh43Q.js +0 -1
- package/bizar-dash/dist/assets/Card-Clkvh43Q.js.map +0 -1
- package/bizar-dash/dist/assets/ChatView-BTjb3mIh.js +0 -9
- package/bizar-dash/dist/assets/ChatView-BTjb3mIh.js.map +0 -1
- package/bizar-dash/dist/assets/Chip-B7ovcm01.js +0 -1
- package/bizar-dash/dist/assets/Chip-B7ovcm01.js.map +0 -1
- package/bizar-dash/dist/assets/ClaudeSessionsView-BoZS5ldi.js +0 -1
- package/bizar-dash/dist/assets/ClaudeSessionsView-BoZS5ldi.js.map +0 -1
- package/bizar-dash/dist/assets/ClipboardView-Cb6XgYZI.js +0 -1
- package/bizar-dash/dist/assets/ClipboardView-Cb6XgYZI.js.map +0 -1
- package/bizar-dash/dist/assets/ConfigView-DfTJk1uL.js +0 -1
- package/bizar-dash/dist/assets/ConfigView-DfTJk1uL.js.map +0 -1
- package/bizar-dash/dist/assets/DiagnosticsView-D5Wy9xlJ.js +0 -2
- package/bizar-dash/dist/assets/DiagnosticsView-D5Wy9xlJ.js.map +0 -1
- package/bizar-dash/dist/assets/DialogsView-HVyfrXpq.js +0 -6
- package/bizar-dash/dist/assets/DialogsView-HVyfrXpq.js.map +0 -1
- package/bizar-dash/dist/assets/DoctorView-Dm94WI2z.js +0 -6
- package/bizar-dash/dist/assets/DoctorView-Dm94WI2z.js.map +0 -1
- package/bizar-dash/dist/assets/EmptyState-ccT__JZG.js +0 -1
- package/bizar-dash/dist/assets/EmptyState-ccT__JZG.js.map +0 -1
- package/bizar-dash/dist/assets/EnvVarsView-BhcIuJ6V.js +0 -8
- package/bizar-dash/dist/assets/EnvVarsView-BhcIuJ6V.js.map +0 -1
- package/bizar-dash/dist/assets/ErrorState-BSqf65ka.js +0 -1
- package/bizar-dash/dist/assets/ErrorState-BSqf65ka.js.map +0 -1
- package/bizar-dash/dist/assets/EvalView-2cbWVBUA.js +0 -1
- package/bizar-dash/dist/assets/EvalView-2cbWVBUA.js.map +0 -1
- package/bizar-dash/dist/assets/GoalsView-C3QG5p7T.js +0 -6
- package/bizar-dash/dist/assets/GoalsView-C3QG5p7T.js.map +0 -1
- package/bizar-dash/dist/assets/Grid-Bojq8Sg7.js +0 -1
- package/bizar-dash/dist/assets/Grid-Bojq8Sg7.js.map +0 -1
- package/bizar-dash/dist/assets/HistoryView-Bum2TMMw.js +0 -1
- package/bizar-dash/dist/assets/HistoryView-Bum2TMMw.js.map +0 -1
- package/bizar-dash/dist/assets/Input-DV-vdaV8.js +0 -1
- package/bizar-dash/dist/assets/Input-DV-vdaV8.js.map +0 -1
- package/bizar-dash/dist/assets/LibrariesView-DH2E2uNb.js +0 -6
- package/bizar-dash/dist/assets/LibrariesView-DH2E2uNb.js.map +0 -1
- package/bizar-dash/dist/assets/LightRAGView-BFCcj7Tl.js +0 -6
- package/bizar-dash/dist/assets/LightRAGView-BFCcj7Tl.js.map +0 -1
- package/bizar-dash/dist/assets/ListHeader-CCD_nIHb.js +0 -1
- package/bizar-dash/dist/assets/ListHeader-CCD_nIHb.js.map +0 -1
- package/bizar-dash/dist/assets/MemoryView-Cr-obIQY.js +0 -8
- package/bizar-dash/dist/assets/MemoryView-Cr-obIQY.js.map +0 -1
- package/bizar-dash/dist/assets/MessageBubble-CrCJ0SYG.js +0 -29
- package/bizar-dash/dist/assets/MessageBubble-CrCJ0SYG.js.map +0 -1
- package/bizar-dash/dist/assets/MiscView-CDUQpYuV.js +0 -1
- package/bizar-dash/dist/assets/MiscView-CDUQpYuV.js.map +0 -1
- package/bizar-dash/dist/assets/ModsView-B6OR-a4B.js +0 -6
- package/bizar-dash/dist/assets/ModsView-B6OR-a4B.js.map +0 -1
- package/bizar-dash/dist/assets/NotificationsView-CIqtY6D0.js +0 -6
- package/bizar-dash/dist/assets/NotificationsView-CIqtY6D0.js.map +0 -1
- package/bizar-dash/dist/assets/ObsidianView-Nahah8QC.js +0 -1
- package/bizar-dash/dist/assets/ObsidianView-Nahah8QC.js.map +0 -1
- package/bizar-dash/dist/assets/OverviewView-B6L_wa4M.js +0 -1
- package/bizar-dash/dist/assets/OverviewView-B6L_wa4M.js.map +0 -1
- package/bizar-dash/dist/assets/ProgressBar-KC4VXsl_.js +0 -1
- package/bizar-dash/dist/assets/ProgressBar-KC4VXsl_.js.map +0 -1
- package/bizar-dash/dist/assets/ProjectsView-DgxWiqHb.js +0 -11
- package/bizar-dash/dist/assets/ProjectsView-DgxWiqHb.js.map +0 -1
- package/bizar-dash/dist/assets/ProvidersView-BOqN9omv.js +0 -11
- package/bizar-dash/dist/assets/ProvidersView-BOqN9omv.js.map +0 -1
- package/bizar-dash/dist/assets/SchedulesView-yMaG3Dtd.js +0 -1
- package/bizar-dash/dist/assets/SchedulesView-yMaG3Dtd.js.map +0 -1
- package/bizar-dash/dist/assets/Select-Bf_P0S6H.js +0 -6
- package/bizar-dash/dist/assets/Select-Bf_P0S6H.js.map +0 -1
- package/bizar-dash/dist/assets/SettingsRow-CJb-F94Y.js +0 -1
- package/bizar-dash/dist/assets/SettingsRow-CJb-F94Y.js.map +0 -1
- package/bizar-dash/dist/assets/SettingsView-BvOGcgMS.js +0 -18
- package/bizar-dash/dist/assets/SettingsView-BvOGcgMS.js.map +0 -1
- package/bizar-dash/dist/assets/Sheet-BwMVGN-8.js +0 -1
- package/bizar-dash/dist/assets/Sheet-BwMVGN-8.js.map +0 -1
- package/bizar-dash/dist/assets/Slider-AjjzqI-5.js +0 -1
- package/bizar-dash/dist/assets/Slider-AjjzqI-5.js.map +0 -1
- package/bizar-dash/dist/assets/Sparkline-Z4y0YUZS.js +0 -1
- package/bizar-dash/dist/assets/Sparkline-Z4y0YUZS.js.map +0 -1
- package/bizar-dash/dist/assets/Switch-B79a2t-G.js +0 -10
- package/bizar-dash/dist/assets/Switch-B79a2t-G.js.map +0 -1
- package/bizar-dash/dist/assets/TasksView-G-s_pwwr.js +0 -6
- package/bizar-dash/dist/assets/TasksView-G-s_pwwr.js.map +0 -1
- package/bizar-dash/dist/assets/Textarea-BfXGMXQ7.js +0 -1
- package/bizar-dash/dist/assets/Textarea-BfXGMXQ7.js.map +0 -1
- package/bizar-dash/dist/assets/UpdateView-BKx3u9X8.js +0 -1
- package/bizar-dash/dist/assets/UpdateView-BKx3u9X8.js.map +0 -1
- package/bizar-dash/dist/assets/UsageView-M01G6bZQ.js +0 -1
- package/bizar-dash/dist/assets/UsageView-M01G6bZQ.js.map +0 -1
- package/bizar-dash/dist/assets/ViewHeader-BsnaspKw.js +0 -6
- package/bizar-dash/dist/assets/ViewHeader-BsnaspKw.js.map +0 -1
- package/bizar-dash/dist/assets/VoiceView-rWE8vziD.js +0 -1
- package/bizar-dash/dist/assets/VoiceView-rWE8vziD.js.map +0 -1
- package/bizar-dash/dist/assets/brain-D7k5s8vH.js +0 -6
- package/bizar-dash/dist/assets/brain-D7k5s8vH.js.map +0 -1
- package/bizar-dash/dist/assets/calendar-CAZoDd-l.js +0 -6
- package/bizar-dash/dist/assets/calendar-CAZoDd-l.js.map +0 -1
- package/bizar-dash/dist/assets/circle-D99cZJBr.js +0 -6
- package/bizar-dash/dist/assets/circle-D99cZJBr.js.map +0 -1
- package/bizar-dash/dist/assets/circle-alert-QQTU4Quz.js +0 -6
- package/bizar-dash/dist/assets/circle-alert-QQTU4Quz.js.map +0 -1
- package/bizar-dash/dist/assets/circle-check-BMbe7Kkr.js +0 -6
- package/bizar-dash/dist/assets/circle-check-BMbe7Kkr.js.map +0 -1
- package/bizar-dash/dist/assets/clock-OtT5mvF3.js +0 -6
- package/bizar-dash/dist/assets/clock-OtT5mvF3.js.map +0 -1
- package/bizar-dash/dist/assets/cmdk-C3F6LD6N.js +0 -80
- package/bizar-dash/dist/assets/cmdk-C3F6LD6N.js.map +0 -1
- package/bizar-dash/dist/assets/dnd-kit-BAOLODOI.js +0 -5
- package/bizar-dash/dist/assets/dnd-kit-BAOLODOI.js.map +0 -1
- package/bizar-dash/dist/assets/download-B-mPX5P_.js +0 -6
- package/bizar-dash/dist/assets/download-B-mPX5P_.js.map +0 -1
- package/bizar-dash/dist/assets/external-link-DPDQM1YO.js +0 -6
- package/bizar-dash/dist/assets/external-link-DPDQM1YO.js.map +0 -1
- package/bizar-dash/dist/assets/file-text-BsCrv5aP.js +0 -6
- package/bizar-dash/dist/assets/file-text-BsCrv5aP.js.map +0 -1
- package/bizar-dash/dist/assets/filter-Do63x17E.js +0 -6
- package/bizar-dash/dist/assets/filter-Do63x17E.js.map +0 -1
- package/bizar-dash/dist/assets/git-pull-request-CpRAmERC.js +0 -11
- package/bizar-dash/dist/assets/git-pull-request-CpRAmERC.js.map +0 -1
- package/bizar-dash/dist/assets/index-B1OIS316.js +0 -1
- package/bizar-dash/dist/assets/index-B1OIS316.js.map +0 -1
- package/bizar-dash/dist/assets/index-CR0TeJmc.js +0 -1
- package/bizar-dash/dist/assets/index-CR0TeJmc.js.map +0 -1
- package/bizar-dash/dist/assets/main-BRmJZcHt.js +0 -277
- package/bizar-dash/dist/assets/main-BRmJZcHt.js.map +0 -1
- package/bizar-dash/dist/assets/main-D0TY0myE.css +0 -1
- package/bizar-dash/dist/assets/network-DJnHwHX3.js +0 -6
- package/bizar-dash/dist/assets/network-DJnHwHX3.js.map +0 -1
- package/bizar-dash/dist/assets/pause-HitDUnk_.js +0 -6
- package/bizar-dash/dist/assets/pause-HitDUnk_.js.map +0 -1
- package/bizar-dash/dist/assets/pencil-Dkks7eIC.js +0 -6
- package/bizar-dash/dist/assets/pencil-Dkks7eIC.js.map +0 -1
- package/bizar-dash/dist/assets/play-blqh0msT.js +0 -6
- package/bizar-dash/dist/assets/play-blqh0msT.js.map +0 -1
- package/bizar-dash/dist/assets/plug-DVvSSe40.js +0 -6
- package/bizar-dash/dist/assets/plug-DVvSSe40.js.map +0 -1
- package/bizar-dash/dist/assets/plus-Cps-8lcG.js +0 -6
- package/bizar-dash/dist/assets/plus-Cps-8lcG.js.map +0 -1
- package/bizar-dash/dist/assets/power-DEX4_Xoa.js +0 -6
- package/bizar-dash/dist/assets/power-DEX4_Xoa.js.map +0 -1
- package/bizar-dash/dist/assets/power-off-upZ4xjaG.js +0 -6
- package/bizar-dash/dist/assets/power-off-upZ4xjaG.js.map +0 -1
- package/bizar-dash/dist/assets/refresh-ccw-DN_zCB1h.js +0 -6
- package/bizar-dash/dist/assets/refresh-ccw-DN_zCB1h.js.map +0 -1
- package/bizar-dash/dist/assets/refresh-cw-KGm5eQgv.js +0 -6
- package/bizar-dash/dist/assets/refresh-cw-KGm5eQgv.js.map +0 -1
- package/bizar-dash/dist/assets/rotate-ccw-D5fkDRgk.js +0 -6
- package/bizar-dash/dist/assets/rotate-ccw-D5fkDRgk.js.map +0 -1
- package/bizar-dash/dist/assets/rotate-cw-CClSVUaX.js +0 -6
- package/bizar-dash/dist/assets/rotate-cw-CClSVUaX.js.map +0 -1
- package/bizar-dash/dist/assets/save-BY4ViPku.js +0 -6
- package/bizar-dash/dist/assets/save-BY4ViPku.js.map +0 -1
- package/bizar-dash/dist/assets/send-CaOL1yQD.js +0 -6
- package/bizar-dash/dist/assets/send-CaOL1yQD.js.map +0 -1
- package/bizar-dash/dist/assets/shield-alert-DA9K6uZO.js +0 -6
- package/bizar-dash/dist/assets/shield-alert-DA9K6uZO.js.map +0 -1
- package/bizar-dash/dist/assets/trash-2-B_Y6HrfN.js +0 -6
- package/bizar-dash/dist/assets/trash-2-B_Y6HrfN.js.map +0 -1
- package/bizar-dash/dist/assets/trending-up-qKTUQKIT.js +0 -6
- package/bizar-dash/dist/assets/trending-up-qKTUQKIT.js.map +0 -1
- package/bizar-dash/dist/assets/triangle-alert-BeY8LAv6.js +0 -6
- package/bizar-dash/dist/assets/triangle-alert-BeY8LAv6.js.map +0 -1
- package/bizar-dash/dist/assets/upload-BZCtmqIh.js +0 -6
- package/bizar-dash/dist/assets/upload-BZCtmqIh.js.map +0 -1
- package/bizar-dash/dist/assets/zap-Bz1Z8y1Q.js +0 -6
- package/bizar-dash/dist/assets/zap-Bz1Z8y1Q.js.map +0 -1
- package/bizar-dash/dist/index.html +0 -19
- package/bizar-dash/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +0 -1
- package/bizar-dash/plans/debug-plan/comments.json +0 -1
- package/bizar-dash/plans/debug-plan/meta.json +0 -10
- package/bizar-dash/plans/debug-plan/plan.json +0 -174
- package/bizar-dash/scripts/smoke-bg-retry.mjs +0 -246
- package/bizar-dash/skills/agent-baseline/SKILL.md +0 -80
- package/bizar-dash/skills/agent-browser/SKILL.md +0 -181
- package/bizar-dash/skills/bizar/SKILL.md +0 -116
- package/bizar-dash/skills/chat/SKILL.md +0 -74
- package/bizar-dash/skills/eval/SKILL.md +0 -237
- package/bizar-dash/skills/lightrag/SKILL.md +0 -86
- package/bizar-dash/skills/minimax/SKILL.md +0 -80
- package/bizar-dash/skills/obsidian/SKILL.md +0 -68
- package/bizar-dash/skills/providers/SKILL.md +0 -75
- package/bizar-dash/skills/publishing/SKILL.md +0 -147
- package/bizar-dash/skills/sdk/SKILL.md +0 -138
- package/bizar-dash/skills/self-improvement/SKILL.md +0 -53
- package/bizar-dash/skills/skills-cli/SKILL.md +0 -94
- package/bizar-dash/skills/usage/SKILL.md +0 -62
- package/bizar-dash/src/cli/dashboard-ports.mjs +0 -488
- package/bizar-dash/src/cli.mjs +0 -537
- package/bizar-dash/src/server/activity-log.mjs +0 -174
- package/bizar-dash/src/server/agent-bus.mjs +0 -485
- package/bizar-dash/src/server/agents-store.mjs +0 -466
- package/bizar-dash/src/server/api.mjs +0 -246
- package/bizar-dash/src/server/artifact-mint.mjs +0 -69
- package/bizar-dash/src/server/artifact-template.html +0 -810
- package/bizar-dash/src/server/artifacts-store.mjs +0 -839
- package/bizar-dash/src/server/auth.mjs +0 -548
- package/bizar-dash/src/server/background-store.mjs +0 -446
- package/bizar-dash/src/server/bg-poller.mjs +0 -375
- package/bizar-dash/src/server/bg-poller.test.mjs +0 -28
- package/bizar-dash/src/server/bg-retry.mjs +0 -446
- package/bizar-dash/src/server/bg-spawner.mjs +0 -390
- package/bizar-dash/src/server/browser.mjs +0 -40
- package/bizar-dash/src/server/claude-artifacts.mjs +0 -281
- package/bizar-dash/src/server/claude-bg-spawner.mjs +0 -390
- package/bizar-dash/src/server/claude-info.mjs +0 -412
- package/bizar-dash/src/server/claude-runner.mjs +0 -289
- package/bizar-dash/src/server/claude-sdk.mjs +0 -191
- package/bizar-dash/src/server/diagnostics-store.mjs +0 -568
- package/bizar-dash/src/server/dialog-poller.mjs +0 -105
- package/bizar-dash/src/server/dialog-store.mjs +0 -259
- package/bizar-dash/src/server/digest-store.mjs +0 -558
- package/bizar-dash/src/server/eval-store.mjs +0 -281
- package/bizar-dash/src/server/eval.mjs +0 -500
- package/bizar-dash/src/server/glyphs/mdx-compiler.mjs +0 -596
- package/bizar-dash/src/server/lib/path-safe.mjs +0 -283
- package/bizar-dash/src/server/lib/rate-limit.mjs +0 -122
- package/bizar-dash/src/server/logger.mjs +0 -71
- package/bizar-dash/src/server/loop-runtime.mjs +0 -429
- package/bizar-dash/src/server/memory-consolidator.mjs +0 -225
- package/bizar-dash/src/server/memory-distillation.mjs +0 -296
- package/bizar-dash/src/server/memory-git.mjs +0 -473
- package/bizar-dash/src/server/memory-lightrag.mjs +0 -1483
- package/bizar-dash/src/server/memory-obsidian.mjs +0 -230
- package/bizar-dash/src/server/memory-schema.mjs +0 -145
- package/bizar-dash/src/server/memory-secrets.mjs +0 -84
- package/bizar-dash/src/server/memory-store.mjs +0 -1093
- package/bizar-dash/src/server/metrics.mjs +0 -268
- package/bizar-dash/src/server/minimax-usage-store.mjs +0 -372
- package/bizar-dash/src/server/minimax.mjs +0 -683
- package/bizar-dash/src/server/mod-security.mjs +0 -397
- package/bizar-dash/src/server/mods-loader.mjs +0 -1243
- package/bizar-dash/src/server/notifications-store.mjs +0 -243
- package/bizar-dash/src/server/obsidian-store.mjs +0 -318
- package/bizar-dash/src/server/ocr.mjs +0 -55
- package/bizar-dash/src/server/otel.mjs +0 -260
- package/bizar-dash/src/server/pair-store.mjs +0 -138
- package/bizar-dash/src/server/progress-parser.test.mjs +0 -129
- package/bizar-dash/src/server/projects-store.mjs +0 -364
- package/bizar-dash/src/server/providers-store.mjs +0 -1801
- package/bizar-dash/src/server/routes/_shared.mjs +0 -430
- package/bizar-dash/src/server/routes/activity.mjs +0 -215
- package/bizar-dash/src/server/routes/admin.mjs +0 -163
- package/bizar-dash/src/server/routes/agent-bus.mjs +0 -185
- package/bizar-dash/src/server/routes/agents-cc.mjs +0 -551
- package/bizar-dash/src/server/routes/agents-cc.test.mjs +0 -35
- package/bizar-dash/src/server/routes/agents.mjs +0 -149
- package/bizar-dash/src/server/routes/artifacts.mjs +0 -315
- package/bizar-dash/src/server/routes/audit.mjs +0 -79
- package/bizar-dash/src/server/routes/auth.mjs +0 -69
- package/bizar-dash/src/server/routes/background.mjs +0 -422
- package/bizar-dash/src/server/routes/backup.mjs +0 -112
- package/bizar-dash/src/server/routes/chat.mjs +0 -727
- package/bizar-dash/src/server/routes/claude-session-detail.mjs +0 -367
- package/bizar-dash/src/server/routes/claude-sessions.mjs +0 -259
- package/bizar-dash/src/server/routes/clipboard.mjs +0 -173
- package/bizar-dash/src/server/routes/config.mjs +0 -180
- package/bizar-dash/src/server/routes/decisions.mjs +0 -78
- package/bizar-dash/src/server/routes/diagnostics.mjs +0 -50
- package/bizar-dash/src/server/routes/dialogs.mjs +0 -134
- package/bizar-dash/src/server/routes/digests.mjs +0 -82
- package/bizar-dash/src/server/routes/distill.mjs +0 -129
- package/bizar-dash/src/server/routes/doctor.mjs +0 -71
- package/bizar-dash/src/server/routes/env-vars.mjs +0 -231
- package/bizar-dash/src/server/routes/eval.mjs +0 -187
- package/bizar-dash/src/server/routes/fs.mjs +0 -429
- package/bizar-dash/src/server/routes/goal-planner.mjs +0 -236
- package/bizar-dash/src/server/routes/goals.mjs +0 -428
- package/bizar-dash/src/server/routes/history.mjs +0 -78
- package/bizar-dash/src/server/routes/lightrag.mjs +0 -169
- package/bizar-dash/src/server/routes/loops.mjs +0 -138
- package/bizar-dash/src/server/routes/memory.mjs +0 -1524
- package/bizar-dash/src/server/routes/minimax.mjs +0 -133
- package/bizar-dash/src/server/routes/misc.mjs +0 -90
- package/bizar-dash/src/server/routes/model-router.mjs +0 -158
- package/bizar-dash/src/server/routes/model-router.test.mjs +0 -104
- package/bizar-dash/src/server/routes/mods.mjs +0 -359
- package/bizar-dash/src/server/routes/notifications.mjs +0 -54
- package/bizar-dash/src/server/routes/obsidian.mjs +0 -239
- package/bizar-dash/src/server/routes/ocr.mjs +0 -182
- package/bizar-dash/src/server/routes/overview.mjs +0 -219
- package/bizar-dash/src/server/routes/overview.test.mjs +0 -65
- package/bizar-dash/src/server/routes/pair.mjs +0 -67
- package/bizar-dash/src/server/routes/projects.mjs +0 -175
- package/bizar-dash/src/server/routes/providers.mjs +0 -361
- package/bizar-dash/src/server/routes/schedules.mjs +0 -159
- package/bizar-dash/src/server/routes/sessions.mjs +0 -80
- package/bizar-dash/src/server/routes/settings.mjs +0 -51
- package/bizar-dash/src/server/routes/skills.mjs +0 -70
- package/bizar-dash/src/server/routes/spawn.mjs +0 -59
- package/bizar-dash/src/server/routes/tailscale.mjs +0 -46
- package/bizar-dash/src/server/routes/tasks.mjs +0 -579
- package/bizar-dash/src/server/routes/themes.mjs +0 -51
- package/bizar-dash/src/server/routes/update.mjs +0 -367
- package/bizar-dash/src/server/routes/usage.mjs +0 -136
- package/bizar-dash/src/server/routes/users.mjs +0 -102
- package/bizar-dash/src/server/routes/voice.mjs +0 -167
- package/bizar-dash/src/server/routes/workspaces.mjs +0 -299
- package/bizar-dash/src/server/routes-v2/auth.mjs +0 -59
- package/bizar-dash/src/server/routes-v2/events.mjs +0 -121
- package/bizar-dash/src/server/routes-v2/health.mjs +0 -21
- package/bizar-dash/src/server/routes-v2/index.mjs +0 -90
- package/bizar-dash/src/server/routes-v2/sessions.mjs +0 -111
- package/bizar-dash/src/server/schedules-runner.mjs +0 -556
- package/bizar-dash/src/server/schedules-store.mjs +0 -268
- package/bizar-dash/src/server/search-store.mjs +0 -220
- package/bizar-dash/src/server/serve-info.mjs +0 -1110
- package/bizar-dash/src/server/server.mjs +0 -951
- package/bizar-dash/src/server/settings-store.mjs +0 -45
- package/bizar-dash/src/server/skills-store.mjs +0 -192
- package/bizar-dash/src/server/sprint.test.mjs +0 -163
- package/bizar-dash/src/server/state.mjs +0 -437
- package/bizar-dash/src/server/tailscale-store.mjs +0 -113
- package/bizar-dash/src/server/task-delegator.mjs +0 -969
- package/bizar-dash/src/server/task-splitter.mjs +0 -241
- package/bizar-dash/src/server/tasks-store.mjs +0 -556
- package/bizar-dash/src/server/tui.mjs +0 -923
- package/bizar-dash/src/server/update-store.mjs +0 -168
- package/bizar-dash/src/server/v2-auth-file.mjs +0 -99
- package/bizar-dash/src/server/v2-event-bus.mjs +0 -128
- package/bizar-dash/src/server/voice-store.mjs +0 -229
- package/bizar-dash/src/server/voice-transcribe.mjs +0 -72
- package/bizar-dash/src/server/watcher.mjs +0 -81
- package/bizar-dash/src/server/workers/transcription-worker.mjs +0 -213
- package/bizar-dash/src/server/workspaces.mjs +0 -626
- package/bizar-dash/src/server/yaml.mjs +0 -238
- package/bizar-dash/src/web/index.html +0 -17
- package/bizar-dash/src/web/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +0 -1
- package/bizar-dash/src/web/v8/App.tsx +0 -426
- package/bizar-dash/src/web/v8/__tests__/App.test.tsx +0 -102
- package/bizar-dash/src/web/v8/__tests__/AppShell.test.tsx +0 -79
- package/bizar-dash/src/web/v8/__tests__/BackgroundJobsView.test.tsx +0 -172
- package/bizar-dash/src/web/v8/__tests__/MemoryView.test.tsx +0 -91
- package/bizar-dash/src/web/v8/__tests__/NotificationsPopover.test.tsx +0 -91
- package/bizar-dash/src/web/v8/__tests__/PageSkeleton.test.tsx +0 -12
- package/bizar-dash/src/web/v8/__tests__/SchedulesView.test.tsx +0 -157
- package/bizar-dash/src/web/v8/__tests__/SettingsView.test.tsx +0 -84
- package/bizar-dash/src/web/v8/__tests__/Sidebar.test.tsx +0 -95
- package/bizar-dash/src/web/v8/__tests__/Topbar.test.tsx +0 -86
- package/bizar-dash/src/web/v8/__tests__/activity.test.tsx +0 -63
- package/bizar-dash/src/web/v8/__tests__/admin-view.test.tsx +0 -105
- package/bizar-dash/src/web/v8/__tests__/agent-card-metrics.test.tsx +0 -54
- package/bizar-dash/src/web/v8/__tests__/agent-detail-tasks.test.tsx +0 -68
- package/bizar-dash/src/web/v8/__tests__/agent-hierarchy.test.tsx +0 -79
- package/bizar-dash/src/web/v8/__tests__/agents-stuck-banner.test.tsx +0 -142
- package/bizar-dash/src/web/v8/__tests__/agents.test.tsx +0 -90
- package/bizar-dash/src/web/v8/__tests__/artifacts-view.test.tsx +0 -102
- package/bizar-dash/src/web/v8/__tests__/audit-fixes.test.tsx +0 -139
- package/bizar-dash/src/web/v8/__tests__/auth-view.test.tsx +0 -94
- package/bizar-dash/src/web/v8/__tests__/changelog.test.tsx +0 -79
- package/bizar-dash/src/web/v8/__tests__/chat-types.test.ts +0 -55
- package/bizar-dash/src/web/v8/__tests__/chat-view.test.tsx +0 -142
- package/bizar-dash/src/web/v8/__tests__/claude-sessions-view.test.tsx +0 -159
- package/bizar-dash/src/web/v8/__tests__/clipboard-view.test.tsx +0 -90
- package/bizar-dash/src/web/v8/__tests__/config-view.test.tsx +0 -111
- package/bizar-dash/src/web/v8/__tests__/control-plane.test.tsx +0 -104
- package/bizar-dash/src/web/v8/__tests__/controls.test.tsx +0 -135
- package/bizar-dash/src/web/v8/__tests__/cx.test.ts +0 -25
- package/bizar-dash/src/web/v8/__tests__/data.test.tsx +0 -293
- package/bizar-dash/src/web/v8/__tests__/dialogs-view.test.tsx +0 -81
- package/bizar-dash/src/web/v8/__tests__/env-vars-view.test.tsx +0 -123
- package/bizar-dash/src/web/v8/__tests__/feedback.test.tsx +0 -213
- package/bizar-dash/src/web/v8/__tests__/goals-cc-roundtrip.test.tsx +0 -94
- package/bizar-dash/src/web/v8/__tests__/goals.test.tsx +0 -105
- package/bizar-dash/src/web/v8/__tests__/history-view.test.tsx +0 -96
- package/bizar-dash/src/web/v8/__tests__/kanban.test.tsx +0 -176
- package/bizar-dash/src/web/v8/__tests__/libraries.test.tsx +0 -70
- package/bizar-dash/src/web/v8/__tests__/lightrag-view.test.tsx +0 -90
- package/bizar-dash/src/web/v8/__tests__/memory.test.tsx +0 -60
- package/bizar-dash/src/web/v8/__tests__/misc-view.test.tsx +0 -79
- package/bizar-dash/src/web/v8/__tests__/mods-view.test.tsx +0 -123
- package/bizar-dash/src/web/v8/__tests__/navigation.test.tsx +0 -137
- package/bizar-dash/src/web/v8/__tests__/new-views.test.tsx +0 -160
- package/bizar-dash/src/web/v8/__tests__/obsidian-view.test.tsx +0 -82
- package/bizar-dash/src/web/v8/__tests__/overview-trends.test.tsx +0 -87
- package/bizar-dash/src/web/v8/__tests__/projects-view.test.tsx +0 -134
- package/bizar-dash/src/web/v8/__tests__/providers-view.test.tsx +0 -100
- package/bizar-dash/src/web/v8/__tests__/settings.test.tsx +0 -104
- package/bizar-dash/src/web/v8/__tests__/theme.test.tsx +0 -104
- package/bizar-dash/src/web/v8/__tests__/update-view.test.tsx +0 -89
- package/bizar-dash/src/web/v8/__tests__/useFetch.test.ts +0 -92
- package/bizar-dash/src/web/v8/__tests__/useWebSocket.test.ts +0 -87
- package/bizar-dash/src/web/v8/__tests__/views.test.tsx +0 -188
- package/bizar-dash/src/web/v8/__tests__/voice-view.test.tsx +0 -80
- package/bizar-dash/src/web/v8/data/fetcher.ts +0 -59
- package/bizar-dash/src/web/v8/data/types.ts +0 -239
- package/bizar-dash/src/web/v8/data/useFetch.ts +0 -62
- package/bizar-dash/src/web/v8/data/useViewNavigate.ts +0 -54
- package/bizar-dash/src/web/v8/data/useWebSocket.ts +0 -206
- package/bizar-dash/src/web/v8/main.tsx +0 -28
- package/bizar-dash/src/web/v8/shell/AppShell.tsx +0 -126
- package/bizar-dash/src/web/v8/shell/PageSkeleton.tsx +0 -29
- package/bizar-dash/src/web/v8/shell/Sidebar.tsx +0 -515
- package/bizar-dash/src/web/v8/shell/StatusBar.tsx +0 -63
- package/bizar-dash/src/web/v8/shell/Topbar.tsx +0 -330
- package/bizar-dash/src/web/v8/shell/index.ts +0 -15
- package/bizar-dash/src/web/v8/ui/activity/ActivityFeed.tsx +0 -137
- package/bizar-dash/src/web/v8/ui/activity/ActivityLane.tsx +0 -315
- package/bizar-dash/src/web/v8/ui/activity/ActivityLanes.tsx +0 -51
- package/bizar-dash/src/web/v8/ui/agents/AgentActivity.tsx +0 -101
- package/bizar-dash/src/web/v8/ui/agents/AgentCard.tsx +0 -239
- package/bizar-dash/src/web/v8/ui/agents/AgentDetail.tsx +0 -439
- package/bizar-dash/src/web/v8/ui/agents/AgentLiveOutput.tsx +0 -252
- package/bizar-dash/src/web/v8/ui/agents/AgentStreamPanel.tsx +0 -371
- package/bizar-dash/src/web/v8/ui/chat/ChatDrawer.tsx +0 -208
- package/bizar-dash/src/web/v8/ui/chat/EventStream.tsx +0 -83
- package/bizar-dash/src/web/v8/ui/chat/MessageBubble.tsx +0 -174
- package/bizar-dash/src/web/v8/ui/controls/Button.tsx +0 -141
- package/bizar-dash/src/web/v8/ui/controls/ButtonGroup.tsx +0 -32
- package/bizar-dash/src/web/v8/ui/controls/Checkbox.tsx +0 -49
- package/bizar-dash/src/web/v8/ui/controls/Field.tsx +0 -78
- package/bizar-dash/src/web/v8/ui/controls/Form.tsx +0 -23
- package/bizar-dash/src/web/v8/ui/controls/IconButton.tsx +0 -112
- package/bizar-dash/src/web/v8/ui/controls/Input.tsx +0 -94
- package/bizar-dash/src/web/v8/ui/controls/RadioGroup.tsx +0 -74
- package/bizar-dash/src/web/v8/ui/controls/Select.tsx +0 -171
- package/bizar-dash/src/web/v8/ui/controls/Slider.tsx +0 -68
- package/bizar-dash/src/web/v8/ui/controls/Switch.tsx +0 -56
- package/bizar-dash/src/web/v8/ui/controls/Textarea.tsx +0 -64
- package/bizar-dash/src/web/v8/ui/controls/Toggle.tsx +0 -36
- package/bizar-dash/src/web/v8/ui/controls/ToggleGroup.tsx +0 -85
- package/bizar-dash/src/web/v8/ui/data/Accordion.tsx +0 -134
- package/bizar-dash/src/web/v8/ui/data/Avatar.tsx +0 -175
- package/bizar-dash/src/web/v8/ui/data/Badge.tsx +0 -93
- package/bizar-dash/src/web/v8/ui/data/BarList.tsx +0 -101
- package/bizar-dash/src/web/v8/ui/data/Card.tsx +0 -140
- package/bizar-dash/src/web/v8/ui/data/Chip.tsx +0 -96
- package/bizar-dash/src/web/v8/ui/data/Kbd.tsx +0 -42
- package/bizar-dash/src/web/v8/ui/data/ListHeader.tsx +0 -94
- package/bizar-dash/src/web/v8/ui/data/ProgressBar.tsx +0 -93
- package/bizar-dash/src/web/v8/ui/data/Sparkline.tsx +0 -98
- package/bizar-dash/src/web/v8/ui/data/StatTile.tsx +0 -150
- package/bizar-dash/src/web/v8/ui/data/Table.tsx +0 -170
- package/bizar-dash/src/web/v8/ui/data/Timeline.tsx +0 -130
- package/bizar-dash/src/web/v8/ui/data/ViewHeader.tsx +0 -122
- package/bizar-dash/src/web/v8/ui/feedback/Alert.tsx +0 -95
- package/bizar-dash/src/web/v8/ui/feedback/Banner.tsx +0 -39
- package/bizar-dash/src/web/v8/ui/feedback/ContextMenu.tsx +0 -143
- package/bizar-dash/src/web/v8/ui/feedback/Dialog.tsx +0 -149
- package/bizar-dash/src/web/v8/ui/feedback/Drawer.tsx +0 -8
- package/bizar-dash/src/web/v8/ui/feedback/DropdownMenu.tsx +0 -231
- package/bizar-dash/src/web/v8/ui/feedback/EmptyState.tsx +0 -48
- package/bizar-dash/src/web/v8/ui/feedback/ErrorState.tsx +0 -116
- package/bizar-dash/src/web/v8/ui/feedback/NotificationsPopover.tsx +0 -242
- package/bizar-dash/src/web/v8/ui/feedback/Popover.tsx +0 -56
- package/bizar-dash/src/web/v8/ui/feedback/Sheet.tsx +0 -103
- package/bizar-dash/src/web/v8/ui/feedback/Skeleton.tsx +0 -67
- package/bizar-dash/src/web/v8/ui/feedback/Spinner.tsx +0 -30
- package/bizar-dash/src/web/v8/ui/feedback/Toast.tsx +0 -66
- package/bizar-dash/src/web/v8/ui/feedback/Tooltip.tsx +0 -89
- package/bizar-dash/src/web/v8/ui/feedback/useFocusTrap.ts +0 -58
- package/bizar-dash/src/web/v8/ui/goals/GoalCard.tsx +0 -176
- package/bizar-dash/src/web/v8/ui/goals/GoalDetail.tsx +0 -278
- package/bizar-dash/src/web/v8/ui/goals/KeyResult.tsx +0 -115
- package/bizar-dash/src/web/v8/ui/index.ts +0 -369
- package/bizar-dash/src/web/v8/ui/kanban/KanbanBoard.tsx +0 -117
- package/bizar-dash/src/web/v8/ui/kanban/KanbanCard.tsx +0 -391
- package/bizar-dash/src/web/v8/ui/kanban/KanbanCardBadges.tsx +0 -111
- package/bizar-dash/src/web/v8/ui/kanban/KanbanColumn.tsx +0 -181
- package/bizar-dash/src/web/v8/ui/kanban/KanbanContextMenu.tsx +0 -126
- package/bizar-dash/src/web/v8/ui/kanban/KanbanDetailDialog.tsx +0 -638
- package/bizar-dash/src/web/v8/ui/kanban/KanbanEmptyColumn.tsx +0 -43
- package/bizar-dash/src/web/v8/ui/kanban/KanbanProgress.tsx +0 -130
- package/bizar-dash/src/web/v8/ui/kanban/KanbanQuickAdd.tsx +0 -141
- package/bizar-dash/src/web/v8/ui/kanban/KanbanToolbar.tsx +0 -291
- package/bizar-dash/src/web/v8/ui/kanban/useKanbanSelection.ts +0 -90
- package/bizar-dash/src/web/v8/ui/libraries/LibraryGrid.tsx +0 -30
- package/bizar-dash/src/web/v8/ui/libraries/LibraryItem.tsx +0 -161
- package/bizar-dash/src/web/v8/ui/memory/MemoryVault.tsx +0 -144
- package/bizar-dash/src/web/v8/ui/navigation/CommandPalette.tsx +0 -225
- package/bizar-dash/src/web/v8/ui/navigation/NavLink.tsx +0 -81
- package/bizar-dash/src/web/v8/ui/navigation/Pagination.tsx +0 -164
- package/bizar-dash/src/web/v8/ui/navigation/Tabs.tsx +0 -128
- package/bizar-dash/src/web/v8/ui/navigation/useCommandPaletteHotkey.test.ts +0 -79
- package/bizar-dash/src/web/v8/ui/primitives/Box.tsx +0 -144
- package/bizar-dash/src/web/v8/ui/primitives/Center.tsx +0 -40
- package/bizar-dash/src/web/v8/ui/primitives/Cluster.tsx +0 -67
- package/bizar-dash/src/web/v8/ui/primitives/Grid.tsx +0 -104
- package/bizar-dash/src/web/v8/ui/primitives/Inline.tsx +0 -77
- package/bizar-dash/src/web/v8/ui/primitives/Portal.tsx +0 -33
- package/bizar-dash/src/web/v8/ui/primitives/ScrollArea.tsx +0 -62
- package/bizar-dash/src/web/v8/ui/primitives/Separator.tsx +0 -42
- package/bizar-dash/src/web/v8/ui/primitives/Stack.tsx +0 -73
- package/bizar-dash/src/web/v8/ui/primitives/VisuallyHidden.tsx +0 -49
- package/bizar-dash/src/web/v8/ui/settings/SettingsNav.tsx +0 -91
- package/bizar-dash/src/web/v8/ui/settings/SettingsRow.tsx +0 -88
- package/bizar-dash/src/web/v8/ui/settings/SettingsSection.tsx +0 -109
- package/bizar-dash/src/web/v8/ui/styles/globals.css +0 -265
- package/bizar-dash/src/web/v8/ui/styles/reset.css +0 -57
- package/bizar-dash/src/web/v8/ui/styles/tokens.css +0 -238
- package/bizar-dash/src/web/v8/ui/tasks/TaskDetail.tsx +0 -313
- package/bizar-dash/src/web/v8/ui/theme/DensityProvider.test.tsx +0 -74
- package/bizar-dash/src/web/v8/ui/theme/DensityProvider.tsx +0 -66
- package/bizar-dash/src/web/v8/ui/theme/ThemeProvider.test.tsx +0 -86
- package/bizar-dash/src/web/v8/ui/theme/ThemeProvider.tsx +0 -94
- package/bizar-dash/src/web/v8/ui/theme/ThemeToggle.tsx +0 -93
- package/bizar-dash/src/web/v8/ui/theme/useDensity.ts +0 -15
- package/bizar-dash/src/web/v8/ui/theme/useTheme.ts +0 -16
- package/bizar-dash/src/web/v8/ui/utils/cx.ts +0 -19
- package/bizar-dash/src/web/v8/views/Activity/ActivityView.tsx +0 -457
- package/bizar-dash/src/web/v8/views/Admin/AdminView.tsx +0 -237
- package/bizar-dash/src/web/v8/views/Agents/AgentHierarchy.tsx +0 -212
- package/bizar-dash/src/web/v8/views/Agents/AgentsView.tsx +0 -511
- package/bizar-dash/src/web/v8/views/Artifacts/ArtifactsView.tsx +0 -452
- package/bizar-dash/src/web/v8/views/Artifacts/ClaudeArtifactView.tsx +0 -179
- package/bizar-dash/src/web/v8/views/Auth/AuthView.tsx +0 -179
- package/bizar-dash/src/web/v8/views/BackgroundJobs/BackgroundJobsView.tsx +0 -467
- package/bizar-dash/src/web/v8/views/Backup/BackupView.tsx +0 -204
- package/bizar-dash/src/web/v8/views/Chat/ChatView.tsx +0 -368
- package/bizar-dash/src/web/v8/views/ClaudeSessions/ClaudeSessionDetail.tsx +0 -144
- package/bizar-dash/src/web/v8/views/ClaudeSessions/ClaudeSessionsView.tsx +0 -331
- package/bizar-dash/src/web/v8/views/ClaudeSessions/NewSessionModal.tsx +0 -136
- package/bizar-dash/src/web/v8/views/Clipboard/ClipboardView.tsx +0 -210
- package/bizar-dash/src/web/v8/views/CommandPalette/AppCommandPalette.test.tsx +0 -142
- package/bizar-dash/src/web/v8/views/CommandPalette/AppCommandPalette.tsx +0 -272
- package/bizar-dash/src/web/v8/views/Config/ConfigView.tsx +0 -364
- package/bizar-dash/src/web/v8/views/Diagnostics/DiagnosticsView.tsx +0 -203
- package/bizar-dash/src/web/v8/views/Dialogs/DialogsView.tsx +0 -196
- package/bizar-dash/src/web/v8/views/Doctor/DoctorView.tsx +0 -181
- package/bizar-dash/src/web/v8/views/EnvVars/EnvVarsView.tsx +0 -365
- package/bizar-dash/src/web/v8/views/Eval/EvalView.tsx +0 -278
- package/bizar-dash/src/web/v8/views/Goals/GoalsView.tsx +0 -351
- package/bizar-dash/src/web/v8/views/History/HistoryView.tsx +0 -227
- package/bizar-dash/src/web/v8/views/Libraries/LibrariesView.tsx +0 -123
- package/bizar-dash/src/web/v8/views/LightRAG/LightRAGView.tsx +0 -204
- package/bizar-dash/src/web/v8/views/Memory/MemoryView.tsx +0 -258
- package/bizar-dash/src/web/v8/views/Misc/MiscView.tsx +0 -159
- package/bizar-dash/src/web/v8/views/Mods/ModsView.tsx +0 -348
- package/bizar-dash/src/web/v8/views/Notifications/NotificationsView.tsx +0 -247
- package/bizar-dash/src/web/v8/views/Obsidian/ObsidianView.tsx +0 -193
- package/bizar-dash/src/web/v8/views/Overview/OverviewView.tsx +0 -274
- package/bizar-dash/src/web/v8/views/Projects/ProjectsView.tsx +0 -273
- package/bizar-dash/src/web/v8/views/Providers/ProvidersView.tsx +0 -371
- package/bizar-dash/src/web/v8/views/Router.tsx +0 -202
- package/bizar-dash/src/web/v8/views/Schedules/SchedulesView.tsx +0 -462
- package/bizar-dash/src/web/v8/views/Settings/SettingsView.tsx +0 -1039
- package/bizar-dash/src/web/v8/views/Tasks/TasksView.tsx +0 -386
- package/bizar-dash/src/web/v8/views/Update/UpdateView.tsx +0 -270
- package/bizar-dash/src/web/v8/views/Usage/UsageView.tsx +0 -210
- package/bizar-dash/src/web/v8/views/Voice/VoiceView.tsx +0 -192
- package/bizar-dash/src/web/v8/vite-env.d.ts +0 -15
- package/bizar-dash/templates/mod/FORMAT.md +0 -76
- package/bizar-dash/templates/mod/hello-mod/README.md +0 -19
- package/bizar-dash/templates/mod/hello-mod/agents/greeter.md +0 -8
- package/bizar-dash/templates/mod/hello-mod/commands/hello.md +0 -6
- package/bizar-dash/templates/mod/hello-mod/mod.json +0 -20
- package/bizar-dash/templates/mod/hello-mod/routes/ping.mjs +0 -9
- package/bizar-dash/templates/mod/hello-mod/views/HelloView.tsx +0 -10
- package/bizar-dash/tests/_update-test-helpers.mjs +0 -13
- package/bizar-dash/tests/admin-labels.test.mjs +0 -42
- package/bizar-dash/tests/admin-run-grouping.test.mjs +0 -42
- package/bizar-dash/tests/agent-bus.test.mjs +0 -289
- package/bizar-dash/tests/agents-preview-truncate.test.mjs +0 -35
- package/bizar-dash/tests/agents-summary-sanitize.test.ts +0 -51
- package/bizar-dash/tests/auth-inputs-labels.test.mjs +0 -45
- package/bizar-dash/tests/background-jobs-action-labels.test.mjs +0 -41
- package/bizar-dash/tests/background-jobs-states.test.mjs +0 -80
- package/bizar-dash/tests/background-pause-resume.test.mjs +0 -46
- package/bizar-dash/tests/background-sdk-session.test.mjs +0 -94
- package/bizar-dash/tests/background-session-events.test.mjs +0 -74
- package/bizar-dash/tests/background-spawn-from-ui.test.mjs +0 -36
- package/bizar-dash/tests/background-steer-sdk.test.mjs +0 -71
- package/bizar-dash/tests/background-steer.test.mjs +0 -60
- package/bizar-dash/tests/backup-restore.test.mjs +0 -217
- package/bizar-dash/tests/backup-store.test.mjs +0 -300
- package/bizar-dash/tests/banner-tones.test.mjs +0 -50
- package/bizar-dash/tests/bundle-analysis.test.mjs +0 -74
- package/bizar-dash/tests/callout-tokens.test.mjs +0 -30
- package/bizar-dash/tests/chat-new-session.test.mjs +0 -63
- package/bizar-dash/tests/claude-session-detail-states.test.mjs +0 -67
- package/bizar-dash/tests/cli-bugfixes.test.mjs +0 -151
- package/bizar-dash/tests/cli-error-visibility.test.mjs +0 -153
- package/bizar-dash/tests/cli-refactor.test.mjs +0 -183
- package/bizar-dash/tests/cli-tailscale.test.mjs +0 -113
- package/bizar-dash/tests/clipboard.test.mjs +0 -147
- package/bizar-dash/tests/components/BackgroundJobsSkeleton.test.tsx +0 -38
- package/bizar-dash/tests/components/Button.test.tsx +0 -78
- package/bizar-dash/tests/components/Card.test.tsx +0 -59
- package/bizar-dash/tests/components/Dialog.test.tsx +0 -80
- package/bizar-dash/tests/components/Toast.test.tsx +0 -61
- package/bizar-dash/tests/dash-cli-load.test.mjs +0 -44
- package/bizar-dash/tests/dashboard-ports.test.mjs +0 -138
- package/bizar-dash/tests/density-tokens.test.mjs +0 -46
- package/bizar-dash/tests/deploy-templates.test.mjs +0 -100
- package/bizar-dash/tests/diagnostics-store.test.mjs +0 -205
- package/bizar-dash/tests/digest-generation.test.mjs +0 -191
- package/bizar-dash/tests/digest-store.test.mjs +0 -264
- package/bizar-dash/tests/docker-build.test.mjs +0 -96
- package/bizar-dash/tests/doctor-route-shape.test.mjs +0 -67
- package/bizar-dash/tests/empty-state-docs.test.mjs +0 -55
- package/bizar-dash/tests/env-vars-extended.test.mjs +0 -190
- package/bizar-dash/tests/env-vars-store.test.mjs +0 -216
- package/bizar-dash/tests/errorstate-retry.test.mjs +0 -42
- package/bizar-dash/tests/eval/fixtures-extra.test.mjs +0 -285
- package/bizar-dash/tests/eval/fixtures.test.mjs +0 -141
- package/bizar-dash/tests/eval/report.test.mjs +0 -284
- package/bizar-dash/tests/eval/runner.test.mjs +0 -471
- package/bizar-dash/tests/eval-csv.test.mjs +0 -67
- package/bizar-dash/tests/eval-scheduled.test.mjs +0 -84
- package/bizar-dash/tests/focus-visible.test.mjs +0 -30
- package/bizar-dash/tests/frontend-bugfixes.test.mjs +0 -151
- package/bizar-dash/tests/goals-decompose.test.mjs +0 -179
- package/bizar-dash/tests/kanban-empty-column.test.mjs +0 -56
- package/bizar-dash/tests/layout-spacing.test.mjs +0 -101
- package/bizar-dash/tests/library-dedupe.test.mjs +0 -62
- package/bizar-dash/tests/lightrag-defaults.node.test.mjs +0 -118
- package/bizar-dash/tests/lightrag-skeleton.test.mjs +0 -31
- package/bizar-dash/tests/lightrag-startup-hook.test.mjs +0 -238
- package/bizar-dash/tests/lightrag-states.test.mjs +0 -60
- package/bizar-dash/tests/logger.test.mjs +0 -207
- package/bizar-dash/tests/loop-runtime.test.mjs +0 -312
- package/bizar-dash/tests/loops-agent-bus-routes.test.mjs +0 -293
- package/bizar-dash/tests/memory-auto-reindex.test.mjs +0 -196
- package/bizar-dash/tests/memory-cli-readlistdelete.test.mjs +0 -405
- package/bizar-dash/tests/memory-cli-setup.test.mjs +0 -382
- package/bizar-dash/tests/memory-cli.test.mjs +0 -596
- package/bizar-dash/tests/memory-config.test.mjs +0 -422
- package/bizar-dash/tests/memory-conflicts.test.mjs +0 -229
- package/bizar-dash/tests/memory-default-vault.test.mjs +0 -185
- package/bizar-dash/tests/memory-git.test.mjs +0 -264
- package/bizar-dash/tests/memory-graph.test.mjs +0 -95
- package/bizar-dash/tests/memory-install-bootstrap.test.mjs +0 -129
- package/bizar-dash/tests/memory-lightrag-extended.test.mjs +0 -293
- package/bizar-dash/tests/memory-lightrag.test.mjs +0 -153
- package/bizar-dash/tests/memory-link.test.mjs +0 -134
- package/bizar-dash/tests/memory-namespace.test.mjs +0 -404
- package/bizar-dash/tests/memory-obsidian.test.mjs +0 -269
- package/bizar-dash/tests/memory-path-safety.test.mjs +0 -427
- package/bizar-dash/tests/memory-protocol-drift.test.mjs +0 -52
- package/bizar-dash/tests/memory-roundtrip.test.mjs +0 -219
- package/bizar-dash/tests/memory-schema.test.mjs +0 -198
- package/bizar-dash/tests/memory-secrets.test.mjs +0 -121
- package/bizar-dash/tests/memory-status-root.test.mjs +0 -144
- package/bizar-dash/tests/memory-store.test.mjs +0 -493
- package/bizar-dash/tests/memory-sync.test.mjs +0 -141
- package/bizar-dash/tests/memory-tab.test.mjs +0 -322
- package/bizar-dash/tests/memory-vault-config-endpoint.test.mjs +0 -173
- package/bizar-dash/tests/metrics.test.mjs +0 -183
- package/bizar-dash/tests/minimax-bar.test.tsx +0 -113
- package/bizar-dash/tests/minimax-chat-usage.test.mjs +0 -253
- package/bizar-dash/tests/minimax-models.test.mjs +0 -123
- package/bizar-dash/tests/minimax-usage-store.node.test.mjs +0 -293
- package/bizar-dash/tests/mod-instructions.node.test.mjs +0 -188
- package/bizar-dash/tests/mod-security.test.mjs +0 -273
- package/bizar-dash/tests/mod-upgrade.node.test.mjs +0 -357
- package/bizar-dash/tests/modal-focus-trap.test.mjs +0 -114
- package/bizar-dash/tests/no-browser-harness.node.test.mjs +0 -98
- package/bizar-dash/tests/notifications-dismiss-restore.test.mjs +0 -85
- package/bizar-dash/tests/obsidian-back-compat.test.mjs +0 -199
- package/bizar-dash/tests/ocr.test.mjs +0 -87
- package/bizar-dash/tests/orphan-tests-audit.test.mjs +0 -80
- package/bizar-dash/tests/otel-spans.test.mjs +0 -253
- package/bizar-dash/tests/otel.test.mjs +0 -188
- package/bizar-dash/tests/palette-keyboard-nav.test.mjs +0 -123
- package/bizar-dash/tests/palette-shortcut-hint.test.mjs +0 -58
- package/bizar-dash/tests/path-safe.test.mjs +0 -108
- package/bizar-dash/tests/projects-filter.test.mjs +0 -48
- package/bizar-dash/tests/providers-store-backup-keys.node.test.mjs +0 -809
- package/bizar-dash/tests/providers-store-search.node.test.mjs +0 -166
- package/bizar-dash/tests/rate-limit.test.mjs +0 -298
- package/bizar-dash/tests/routes-doctor.test.mjs +0 -159
- package/bizar-dash/tests/schedules-skeleton.test.mjs +0 -25
- package/bizar-dash/tests/schedules-states.test.mjs +0 -67
- package/bizar-dash/tests/schedules-templates.test.mjs +0 -144
- package/bizar-dash/tests/server-bugfixes.test.mjs +0 -318
- package/bizar-dash/tests/settings-labels.test.mjs +0 -80
- package/bizar-dash/tests/setup.ts +0 -84
- package/bizar-dash/tests/sidebar-collapse-animation.test.mjs +0 -37
- package/bizar-dash/tests/sidebar-distinct-icons.test.mjs +0 -28
- package/bizar-dash/tests/sidebar-responsive.test.tsx +0 -48
- package/bizar-dash/tests/sidebar-section-styles.test.mjs +0 -55
- package/bizar-dash/tests/sidebar-section-toggle.test.tsx +0 -63
- package/bizar-dash/tests/skeleton-height.test.mjs +0 -47
- package/bizar-dash/tests/skills-list.test.mjs +0 -232
- package/bizar-dash/tests/skills-search.test.mjs +0 -222
- package/bizar-dash/tests/smoke-v2.mjs +0 -212
- package/bizar-dash/tests/space-tokens.test.mjs +0 -36
- package/bizar-dash/tests/stattile-loading.test.mjs +0 -28
- package/bizar-dash/tests/strip-thinking.test.mjs +0 -175
- package/bizar-dash/tests/submit-feedback.test.mjs +0 -353
- package/bizar-dash/tests/task-splitter.test.mjs +0 -268
- package/bizar-dash/tests/tasks-create.test.mjs +0 -187
- package/bizar-dash/tests/tasks-patch-routes.test.mjs +0 -194
- package/bizar-dash/tests/theme-toggle-icon.test.mjs +0 -28
- package/bizar-dash/tests/tmux-wrap.test.mjs +0 -145
- package/bizar-dash/tests/topbar-design-system.test.mjs +0 -56
- package/bizar-dash/tests/topbar-popover-styles.test.mjs +0 -53
- package/bizar-dash/tests/ui/primitives/VisuallyHidden.test.tsx +0 -42
- package/bizar-dash/tests/update-channels.test.mjs +0 -67
- package/bizar-dash/tests/update-check.test.mjs +0 -132
- package/bizar-dash/tests/update-packages.test.mjs +0 -154
- package/bizar-dash/tests/update-run.test.mjs +0 -203
- package/bizar-dash/tests/users.test.mjs +0 -108
- package/bizar-dash/tests/v7-archive/BackgroundAgents.test.tsx +0 -160
- package/bizar-dash/tests/v7-archive/a11y/forms.test.tsx +0 -191
- package/bizar-dash/tests/v7-archive/a11y.test.tsx +0 -206
- package/bizar-dash/tests/v7-archive/autosave.test.tsx +0 -276
- package/bizar-dash/tests/v7-archive/backup-restore.test.tsx +0 -141
- package/bizar-dash/tests/v7-archive/chat-composer.test.tsx +0 -140
- package/bizar-dash/tests/v7-archive/communication-log.test.tsx +0 -67
- package/bizar-dash/tests/v7-archive/components/Modal.test.tsx +0 -104
- package/bizar-dash/tests/v7-archive/components/Spinner.test.tsx +0 -32
- package/bizar-dash/tests/v7-archive/components/StatusBadge.test.tsx +0 -35
- package/bizar-dash/tests/v7-archive/components/doctor-panel.test.tsx +0 -105
- package/bizar-dash/tests/v7-archive/components/screenshot-ocr.test.tsx +0 -75
- package/bizar-dash/tests/v7-archive/components/settings-search.test.tsx +0 -180
- package/bizar-dash/tests/v7-archive/components/workspace-selector.test.tsx +0 -73
- package/bizar-dash/tests/v7-archive/controls/Button.test.tsx +0 -50
- package/bizar-dash/tests/v7-archive/controls/Checkbox.test.tsx +0 -44
- package/bizar-dash/tests/v7-archive/controls/IconButton.test.tsx +0 -37
- package/bizar-dash/tests/v7-archive/controls/Kbd.test.tsx +0 -39
- package/bizar-dash/tests/v7-archive/controls/NumberInput.test.tsx +0 -56
- package/bizar-dash/tests/v7-archive/controls/RadioGroup.test.tsx +0 -58
- package/bizar-dash/tests/v7-archive/controls/SearchInput.test.tsx +0 -52
- package/bizar-dash/tests/v7-archive/controls/Select.test.tsx +0 -66
- package/bizar-dash/tests/v7-archive/controls/Slider.test.tsx +0 -41
- package/bizar-dash/tests/v7-archive/controls/TextInput.test.tsx +0 -44
- package/bizar-dash/tests/v7-archive/controls/Textarea.test.tsx +0 -56
- package/bizar-dash/tests/v7-archive/controls/Toggle.test.tsx +0 -39
- package/bizar-dash/tests/v7-archive/data/BarChart.test.tsx +0 -55
- package/bizar-dash/tests/v7-archive/data/DataTable.test.tsx +0 -112
- package/bizar-dash/tests/v7-archive/data/EmptyState.test.tsx +0 -57
- package/bizar-dash/tests/v7-archive/data/ErrorState.test.tsx +0 -47
- package/bizar-dash/tests/v7-archive/data/KeyValueList.test.tsx +0 -59
- package/bizar-dash/tests/v7-archive/data/LoadingState.test.tsx +0 -37
- package/bizar-dash/tests/v7-archive/data/Sparkline.test.tsx +0 -56
- package/bizar-dash/tests/v7-archive/data/StatTile.test.tsx +0 -69
- package/bizar-dash/tests/v7-archive/dep-graph.test.tsx +0 -40
- package/bizar-dash/tests/v7-archive/eval-web-ui.test.tsx +0 -220
- package/bizar-dash/tests/v7-archive/event-log.test.tsx +0 -61
- package/bizar-dash/tests/v7-archive/feedback/Badge.test.tsx +0 -41
- package/bizar-dash/tests/v7-archive/feedback/Dialog.test.tsx +0 -99
- package/bizar-dash/tests/v7-archive/feedback/ProgressBar.test.tsx +0 -66
- package/bizar-dash/tests/v7-archive/feedback/StatusDot.test.tsx +0 -41
- package/bizar-dash/tests/v7-archive/feedback/Toast.test.tsx +0 -124
- package/bizar-dash/tests/v7-archive/feedback/Tooltip.test.tsx +0 -102
- package/bizar-dash/tests/v7-archive/goal-input.test.tsx +0 -72
- package/bizar-dash/tests/v7-archive/goap-planner.test.ts +0 -68
- package/bizar-dash/tests/v7-archive/hooks/useModal.test.tsx +0 -84
- package/bizar-dash/tests/v7-archive/hooks/useToast.test.tsx +0 -50
- package/bizar-dash/tests/v7-archive/layout/AppShell.test.tsx +0 -50
- package/bizar-dash/tests/v7-archive/layout/Breadcrumbs.test.tsx +0 -85
- package/bizar-dash/tests/v7-archive/layout/Panel.test.tsx +0 -52
- package/bizar-dash/tests/v7-archive/layout/PanelHeader.test.tsx +0 -32
- package/bizar-dash/tests/v7-archive/layout/Sidebar.test.tsx +0 -95
- package/bizar-dash/tests/v7-archive/layout/Tabs.test.tsx +0 -87
- package/bizar-dash/tests/v7-archive/layout/Topbar.test.tsx +0 -41
- package/bizar-dash/tests/v7-archive/layout/ViewHeader.test.tsx +0 -47
- package/bizar-dash/tests/v7-archive/lib/i18n.test.ts +0 -46
- package/bizar-dash/tests/v7-archive/lib/search-fuzzy.test.ts +0 -149
- package/bizar-dash/tests/v7-archive/lib/utils.test.ts +0 -194
- package/bizar-dash/tests/v7-archive/memory-graph-view.test.tsx +0 -69
- package/bizar-dash/tests/v7-archive/mobile-chat.test.tsx +0 -82
- package/bizar-dash/tests/v7-archive/mobile-layout.test.tsx +0 -332
- package/bizar-dash/tests/v7-archive/mobile-tasks.test.tsx +0 -162
- package/bizar-dash/tests/v7-archive/navigation/NavGroup.test.tsx +0 -55
- package/bizar-dash/tests/v7-archive/navigation/NavLink.test.tsx +0 -61
- package/bizar-dash/tests/v7-archive/quality-gates.test.tsx +0 -59
- package/bizar-dash/tests/v7-archive/settings-layout.test.tsx +0 -129
- package/bizar-dash/tests/v7-archive/settings-mode-wiring.test.tsx +0 -151
- package/bizar-dash/tests/v7-archive/ui/primitives/Box.test.tsx +0 -49
- package/bizar-dash/tests/v7-archive/ui/primitives/Grid.test.tsx +0 -37
- package/bizar-dash/tests/v7-archive/ui/primitives/Inline.test.tsx +0 -33
- package/bizar-dash/tests/v7-archive/ui/primitives/Separator.test.tsx +0 -34
- package/bizar-dash/tests/v7-archive/ui/primitives/Stack.test.tsx +0 -45
- package/bizar-dash/tests/v7-archive/views/Agents.test.tsx +0 -359
- package/bizar-dash/tests/v7-archive/views/Memory.test.tsx +0 -274
- package/bizar-dash/tests/v7-archive/views/Tasks.test.tsx +0 -250
- package/bizar-dash/tests/v7-archive/views/sidebar.test.tsx +0 -116
- package/bizar-dash/tests/v7-archive/views/topbar.test.tsx +0 -87
- package/bizar-dash/tests/v7-archive/voice-recorder.test.tsx +0 -95
- package/bizar-dash/tests/voice-store.test.mjs +0 -148
- package/bizar-dash/tests/voice-transcribe-worker.test.mjs +0 -343
- package/bizar-dash/tests/voice-transcribe.test.mjs +0 -87
- package/bizar-dash/tests/workspaces.test.mjs +0 -527
- package/bizar-dash/tests/yaml.test.mjs +0 -128
- package/bizar-dash/tsconfig.json +0 -23
- package/bizar-dash/vite.config.ts +0 -82
- package/bizar-dash/vitest.config.ts +0 -20
- package/cli/__tests__/cost-gate.test.mjs +0 -301
- package/cli/__tests__/esm-no-require.test.mjs +0 -97
- package/cli/__tests__/feature-list-bridge.test.mjs +0 -371
- package/cli/agent-browser-up.sh +0 -152
- package/cli/agent-browser-update.test.mjs +0 -86
- package/cli/artifact-cli.mjs +0 -605
- package/cli/artifact-render.mjs +0 -621
- package/cli/artifact-server.mjs +0 -847
- package/cli/artifact-templates.mjs +0 -523
- package/cli/artifact.mjs +0 -63
- package/cli/artifact.test.mjs +0 -2331
- package/cli/bg.mjs +0 -471
- package/cli/cli-commands-validation.test.mjs +0 -106
- package/cli/commands/artifact.mjs +0 -20
- package/cli/commands/clip.mjs +0 -163
- package/cli/commands/dash.mjs +0 -193
- package/cli/commands/deploy/cloudflare.mjs +0 -250
- package/cli/commands/deploy/docker.mjs +0 -219
- package/cli/commands/deploy/fly.mjs +0 -161
- package/cli/commands/deploy/vercel.mjs +0 -225
- package/cli/commands/deploy.mjs +0 -240
- package/cli/commands/eval.mjs +0 -396
- package/cli/commands/lightrag.mjs +0 -170
- package/cli/commands/marketplace.mjs +0 -64
- package/cli/commands/memory.mjs +0 -25
- package/cli/commands/minimax.mjs +0 -288
- package/cli/commands/mod.mjs +0 -185
- package/cli/commands/ocr.mjs +0 -182
- package/cli/commands/plugin.mjs +0 -358
- package/cli/commands/rca.test.mjs +0 -99
- package/cli/commands/service.mjs +0 -79
- package/cli/commands/setup-provider.test.mjs +0 -311
- package/cli/commands/tailscale.mjs +0 -256
- package/cli/commands/usage.mjs +0 -113
- package/cli/commands/voice.mjs +0 -211
- package/cli/commands/workspace.mjs +0 -247
- package/cli/copy.mjs +0 -540
- package/cli/dev-link.mjs +0 -191
- package/cli/dev-link.test.mjs +0 -310
- package/cli/digest.mjs +0 -149
- package/cli/install/banner.test.mjs +0 -39
- package/cli/install/index.test.mjs +0 -61
- package/cli/install/paths.test.mjs +0 -77
- package/cli/install/plugin.mjs +0 -161
- package/cli/install/postinstall.mjs +0 -137
- package/cli/install/postinstall.test.mjs +0 -98
- package/cli/install.test.mjs +0 -272
- package/cli/memory-constants.mjs +0 -76
- package/cli/memory.mjs +0 -1850
- package/cli/migrate.test.mjs +0 -85
- package/cli/plow-through.test.mjs +0 -56
- package/cli/plugin-runtime-deps.mjs +0 -250
- package/cli/plugin-runtime-deps.test.mjs +0 -378
- package/cli/post-install-smoke.mjs +0 -256
- package/cli/post-install-smoke.test.mjs +0 -72
- package/cli/prompts.mjs +0 -168
- package/cli/providers-detect.mjs +0 -233
- package/cli/provision.test.mjs +0 -324
- package/cli/service-controller.mjs +0 -735
- package/cli/service-controller.test.mjs +0 -191
- package/cli/service-env.mjs +0 -130
- package/cli/service.mjs +0 -492
- package/cli/tests/minimax-cli.test.mjs +0 -79
- package/cli/worker-dispatcher.test.mjs +0 -204
- package/config/skills/glyph/SKILL.md +0 -163
- package/config/skills/lightrag/SKILL.md +0 -81
- package/config/skills/memory-protocol/SKILL.md +0 -105
- package/config/skills/obsidian/SKILL.md +0 -306
- package/packages/sdk/${HOME}/.bizar_home/memory/projects/sdk/sessions/2026-07-16-e16c2f59.md +0 -14
- package/packages/sdk/.bizar/learning/instincts.jsonl +0 -5
- package/packages/sdk/LICENSE +0 -21
- package/packages/sdk/dist/memory/index.d.ts +0 -43
- package/packages/sdk/dist/memory/index.js +0 -159
- package/packages/sdk/dist/router/memory-distillation.d.ts +0 -58
- package/packages/sdk/dist/router/memory-distillation.js +0 -195
- package/packages/sdk/vitest.config.ts +0 -9
- package/plugins/bizar/LICENSE +0 -21
- package/plugins/bizar/dist/index.d.ts +0 -25
- package/plugins/bizar/dist/index.js +0 -32
- package/plugins/bizar/package.json +0 -18
- package/scripts/audit.mjs +0 -388
- package/scripts/audit.test.mjs +0 -149
- package/scripts/bh-full-e2e.mjs +0 -300
- package/scripts/check-agents.mjs +0 -76
- package/scripts/check-arch.sh +0 -80
- package/scripts/check-deps.mjs +0 -468
- package/scripts/clean-state-check.sh +0 -81
- package/scripts/eval-gate.mjs +0 -134
- package/scripts/eval-gate.test.mjs +0 -138
- package/scripts/feature-state-machine.mjs +0 -178
- package/scripts/feature-state-machine.test.mjs +0 -135
- package/scripts/git-hooks/__tests__/commit-msg.test.mjs +0 -61
- package/scripts/install-curl.sh +0 -17
- package/scripts/install-service.mjs +0 -190
- package/scripts/loop-log.txt +0 -29
- package/scripts/loop-tasks.md +0 -79
- package/scripts/mirror-claude-md.sh +0 -78
- package/scripts/overnight-loop.mjs +0 -60
- package/scripts/run-dev.mjs +0 -84
- package/scripts/session-trace.sh +0 -52
- package/scripts/spec-dedup.test.mjs +0 -124
- package/scripts/sprint.mjs +0 -213
- package/scripts/sync-skills-mirror.mjs +0 -113
- package/scripts/test-in-container.sh +0 -157
- package/scripts/verify-feature.sh +0 -102
- package/scripts/verify-thinking-skills.mjs +0 -135
- package/scripts/worktree-setup.sh +0 -79
- package/templates/clean-state-checklist.md +0 -55
- package/templates/deploy/cloudflare/README.md +0 -32
- package/templates/deploy/cloudflare/functions-index.template.js +0 -15
- package/templates/deploy/cloudflare/wrangler.toml.template +0 -9
- package/templates/deploy/docker/.env.template +0 -16
- package/templates/deploy/docker/README.md +0 -58
- package/templates/deploy/docker/docker-compose.template.yml +0 -23
- package/templates/deploy/fly/README.md +0 -35
- package/templates/deploy/fly/fly.toml.template +0 -28
- package/templates/deploy/vercel/README.md +0 -29
- package/templates/deploy/vercel/api-index.template.js +0 -18
- package/templates/deploy/vercel/vercel.json.template +0 -16
- package/templates/eval-fixtures/README.md +0 -58
- package/templates/eval-fixtures/citation.json +0 -16
- package/templates/eval-fixtures/code-review.json +0 -16
- package/templates/eval-fixtures/code-search-basic.json +0 -28
- package/templates/eval-fixtures/concise-output.json +0 -16
- package/templates/eval-fixtures/context-window.json +0 -16
- package/templates/eval-fixtures/error-recovery.json +0 -16
- package/templates/eval-fixtures/json-output.json +0 -20
- package/templates/eval-fixtures/latency-bounds.json +0 -16
- package/templates/eval-fixtures/multi-language.json +0 -16
- package/templates/eval-fixtures/regression-suite.json +0 -79
- package/templates/eval-fixtures/response-format.json +0 -30
- package/templates/eval-fixtures/safe-paths.json +0 -16
- package/templates/eval-fixtures/tool-call-correctness.json +0 -24
- package/templates/eval-fixtures/tool-call-multi-step.json +0 -18
- package/templates/eval-fixtures/unicode-handling.json +0 -16
- package/templates/evaluator-rubric.md +0 -50
- package/templates/plan/htmx.min.js +0 -1
- package/templates/plan/library/bug-investigation.mdx +0 -79
- package/templates/plan/library/decision-record.mdx +0 -71
- package/templates/plan/library/feature-design.mdx +0 -92
- package/templates/plan/meta.json.template +0 -8
- package/templates/plan/plan.mdx.template +0 -46
- package/templates/plugin-template/README.md +0 -121
- package/templates/plugin-template/index.js +0 -66
- package/templates/plugin-template/plugin.json +0 -42
- package/templates/plugin-template/tests/plugin.test.js +0 -83
- package/templates/schedules/daily-backup.json +0 -12
- package/templates/schedules/daily-cleanup.json +0 -12
- package/templates/schedules/hourly-health-check.json +0 -12
- package/templates/schedules/webhook-on-push.json +0 -13
- package/templates/schedules/weekly-digest.json +0 -13
- package/templates/sprint-contract.md +0 -47
- /package/{.claude → config}/skills/de-sloppify/SKILL.md +0 -0
|
@@ -1,367 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* src/server/routes/update.mjs
|
|
3
|
-
*
|
|
4
|
-
* v10.3.0 — Dashboard update endpoints.
|
|
5
|
-
*
|
|
6
|
-
* GET /api/updates/status — installed package versions only
|
|
7
|
-
* GET /api/updates/check — installed + latest + hasUpdates
|
|
8
|
-
* POST /api/updates/apply — trigger install for given packages
|
|
9
|
-
* Streams progress via WS events:
|
|
10
|
-
* update:progress { type, pkg, status, error?, newVersion? }
|
|
11
|
-
* update:log { type, pkg, line }
|
|
12
|
-
* update:complete{ type }
|
|
13
|
-
*
|
|
14
|
-
* Why these paths (vs. /api/update/*):
|
|
15
|
-
* thor-settings wired Settings.tsx to `/updates/status`, `/updates/check`,
|
|
16
|
-
* and `/updates/apply` and listens for the WS event shapes above. Aligning
|
|
17
|
-
* with that contract is cheaper than rewriting Settings.tsx.
|
|
18
|
-
*
|
|
19
|
-
* What this endpoint does NOT do:
|
|
20
|
-
* - It does NOT restart the dashboard. The Settings UI displays a
|
|
21
|
-
* confirmation prompt before calling, and `bizar update` (the CLI)
|
|
22
|
-
* is the restart-aware path. The dashboard stays up; npm replaces
|
|
23
|
-
* files in the global install dir while the dashboard runs from its
|
|
24
|
-
* own already-loaded module graph. The next `bizar dash start`
|
|
25
|
-
* picks up the new code, just like the CLI flow.
|
|
26
|
-
* - It does NOT touch the cline plugin in-place. That lives in the
|
|
27
|
-
* CLI flow because the plugin path is dev-symlinked in this repo.
|
|
28
|
-
*
|
|
29
|
-
* Safety:
|
|
30
|
-
* - Concurrency guard: only one apply run at a time. A second call
|
|
31
|
-
* returns 409 with `error: 'already_running'`.
|
|
32
|
-
* - Network/npm failures emit `update:log` for each stderr/stdout
|
|
33
|
-
* line and a final `update:progress` with `status: 'error'`.
|
|
34
|
-
* - Whitelist of npm package names; anything else is rejected 400.
|
|
35
|
-
*/
|
|
36
|
-
import { Router } from 'express';
|
|
37
|
-
import { existsSync, readFileSync } from 'node:fs';
|
|
38
|
-
import { join, dirname } from 'node:path';
|
|
39
|
-
import { fileURLToPath } from 'node:url';
|
|
40
|
-
import { spawn, execFileSync } from 'node:child_process';
|
|
41
|
-
import { wrap } from './_shared.mjs';
|
|
42
|
-
|
|
43
|
-
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
44
|
-
|
|
45
|
-
// v10.3.0 — packages the dashboard knows how to update. Aligned with
|
|
46
|
-
// the Settings UI's "Installed / Latest" panels and the CLI's update
|
|
47
|
-
// flow. The @polderlabs/bizar package bundles CLI + dashboard + plugin
|
|
48
|
-
// in one; the others are separate installable components.
|
|
49
|
-
const KNOWN_PACKAGES = [
|
|
50
|
-
{ id: 'bizar', npmName: '@polderlabs/bizar', label: 'Bizar CLI + Dashboard + Plugin' },
|
|
51
|
-
{ id: 'bizar-sdk', npmName: '@polderlabs/bizar-sdk', label: 'Bizar SDK (typed wrapper)' },
|
|
52
|
-
{ id: 'claude-agent', npmName: '@anthropic-ai/claude-agent-sdk', label: 'Claude Agent SDK (optional peer)' },
|
|
53
|
-
{ id: 'claude-code', npmName: '@anthropic-ai/claude-code', label: 'Claude Code CLI' },
|
|
54
|
-
];
|
|
55
|
-
|
|
56
|
-
const KNOWN_BY_ID = new Map(KNOWN_PACKAGES.map((p) => [p.id, p]));
|
|
57
|
-
|
|
58
|
-
// Cache the latest-version lookup so /api/updates/check is fast on
|
|
59
|
-
// repeated dashboard renders. 1 hour is short enough that a new release
|
|
60
|
-
// shows up within an hour of publishing.
|
|
61
|
-
const LATEST_CACHE_TTL_MS = 60 * 60 * 1000;
|
|
62
|
-
const _latestCache = new Map(); // npmName -> { version, ts }
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Resolve the on-disk version of the dashboard itself (used as the
|
|
66
|
-
* "current" version for @polderlabs/bizar). Walks up from this file
|
|
67
|
-
* looking for the package.json that declares `@polderlabs/bizar`.
|
|
68
|
-
*
|
|
69
|
-
* Why "walk up" instead of `import.meta.resolve`? When the dashboard
|
|
70
|
-
* runs out of `dist/` (the published layout), the package.json lives
|
|
71
|
-
* at the dist root, not at the file's location. The walk is bounded
|
|
72
|
-
* to 6 levels so a misconfigured install fails fast instead of looping.
|
|
73
|
-
*/
|
|
74
|
-
function resolveInstalledVersion() {
|
|
75
|
-
const markers = ['package.json'];
|
|
76
|
-
let cur = __dirname;
|
|
77
|
-
for (let i = 0; i < 6; i++) {
|
|
78
|
-
for (const m of markers) {
|
|
79
|
-
const p = join(cur, m);
|
|
80
|
-
if (existsSync(p)) {
|
|
81
|
-
try {
|
|
82
|
-
const pkg = JSON.parse(readFileSync(p, 'utf8'));
|
|
83
|
-
if (pkg.name === '@polderlabs/bizar' && pkg.version) return pkg.version;
|
|
84
|
-
} catch { /* malformed — try parent */ }
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
const parent = dirname(cur);
|
|
88
|
-
if (parent === cur) break;
|
|
89
|
-
cur = parent;
|
|
90
|
-
}
|
|
91
|
-
return null;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
const INSTALLED_BIZAR_VERSION = resolveInstalledVersion();
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* `npm view <pkg> version` — returns the latest published version or
|
|
98
|
-
* null on any failure. Cached per package for 1 hour.
|
|
99
|
-
*/
|
|
100
|
-
function fetchLatestVersion(npmName) {
|
|
101
|
-
const cached = _latestCache.get(npmName);
|
|
102
|
-
if (cached && Date.now() - cached.ts < LATEST_CACHE_TTL_MS) {
|
|
103
|
-
return cached.version;
|
|
104
|
-
}
|
|
105
|
-
try {
|
|
106
|
-
const out = execFileSync(
|
|
107
|
-
'npm',
|
|
108
|
-
['view', npmName, 'version'],
|
|
109
|
-
{ stdio: ['ignore', 'pipe', 'ignore'], timeout: 15000 },
|
|
110
|
-
).toString().trim();
|
|
111
|
-
const version = out || null;
|
|
112
|
-
_latestCache.set(npmName, { version, ts: Date.now() });
|
|
113
|
-
return version;
|
|
114
|
-
} catch {
|
|
115
|
-
// Negative-cache for 5 minutes so a transient registry hiccup
|
|
116
|
-
// doesn't make every render call npm.
|
|
117
|
-
_latestCache.set(npmName, { version: null, ts: Date.now() - (LATEST_CACHE_TTL_MS - 5 * 60 * 1000) });
|
|
118
|
-
return null;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Reset the latest-version cache — exposed for tests so each case
|
|
124
|
-
* starts from a known state.
|
|
125
|
-
*/
|
|
126
|
-
export function resetUpdateCache() {
|
|
127
|
-
_latestCache.clear();
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* Reset the concurrency guard — exposed for tests so each case
|
|
132
|
-
* starts with a clean _activeRun state.
|
|
133
|
-
*/
|
|
134
|
-
export function resetConcurrencyGuard() {
|
|
135
|
-
_activeRun = null;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* Compute the per-package installed map. For the dashboard package
|
|
140
|
-
* itself we use INSTALLED_BIZAR_VERSION (the @polderlabs/bizar version
|
|
141
|
-
* that bundles the dashboard). The other packages fall back to null
|
|
142
|
-
* when not resolvable; the UI renders "—" for those rows.
|
|
143
|
-
*/
|
|
144
|
-
function currentVersions() {
|
|
145
|
-
const out = {};
|
|
146
|
-
for (const p of KNOWN_PACKAGES) {
|
|
147
|
-
out[p.id] = INSTALLED_BIZAR_VERSION;
|
|
148
|
-
}
|
|
149
|
-
return out;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* Compute latest map and hasUpdates flag. Iterates KNOWN_PACKAGES so
|
|
154
|
-
* the UI gets a stable order and predictable keys even when one of the
|
|
155
|
-
* `npm view` calls fails (those resolve to null).
|
|
156
|
-
* @param {Record<string, string|null>} current
|
|
157
|
-
* @returns {{ latest: Record<string,string|null>, hasUpdates: boolean, available: Record<string,string|null> }}
|
|
158
|
-
*/
|
|
159
|
-
function latestVersionsAndFlag(current) {
|
|
160
|
-
const latest = {};
|
|
161
|
-
const available = { stable: null, beta: null };
|
|
162
|
-
let hasUpdates = false;
|
|
163
|
-
for (const p of KNOWN_PACKAGES) {
|
|
164
|
-
const lat = fetchLatestVersion(p.npmName);
|
|
165
|
-
latest[p.id] = lat;
|
|
166
|
-
const cur = current[p.id];
|
|
167
|
-
if (cur && lat && cur !== lat) hasUpdates = true;
|
|
168
|
-
}
|
|
169
|
-
// For the primary bizar package, also fetch beta dist-tag
|
|
170
|
-
const bizarPkg = KNOWN_BY_ID.get('bizar');
|
|
171
|
-
if (bizarPkg) {
|
|
172
|
-
available.stable = fetchLatestVersion(bizarPkg.npmName);
|
|
173
|
-
try {
|
|
174
|
-
const betaVer = execFileSync(
|
|
175
|
-
'npm',
|
|
176
|
-
['view', bizarPkg.npmName, 'dist-tags', 'beta'],
|
|
177
|
-
{ stdio: ['ignore', 'pipe', 'ignore'], timeout: 15000 },
|
|
178
|
-
).toString().trim();
|
|
179
|
-
available.beta = betaVer || null;
|
|
180
|
-
} catch {
|
|
181
|
-
available.beta = null;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
return { latest, hasUpdates, available };
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
// ─── Apply concurrency guard ───────────────────────────────────────────────
|
|
188
|
-
// One active run per server process. A second POST /updates/apply while
|
|
189
|
-
// the first is still going returns 409 immediately.
|
|
190
|
-
|
|
191
|
-
let _activeRun = null; // { packages: string[], startedAt: number } | null
|
|
192
|
-
|
|
193
|
-
function isRunning() {
|
|
194
|
-
return _activeRun !== null;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
/**
|
|
198
|
-
* Run `npm install -g <pkg>@latest` for each requested id. Emits WS
|
|
199
|
-
* events on the broadcast channel for every stdout/stderr line and for
|
|
200
|
-
* the per-package status transitions. Returns the result object
|
|
201
|
-
* (sync — the actual install runs in the background and finishes via
|
|
202
|
-
* WS events).
|
|
203
|
-
*/
|
|
204
|
-
function startApplyRun({ packages, channel, broadcast }) {
|
|
205
|
-
if (_activeRun) {
|
|
206
|
-
throw Object.assign(new Error('update already running'), { code: 'already_running' });
|
|
207
|
-
}
|
|
208
|
-
const ids = (Array.isArray(packages) && packages.length > 0) ? packages : KNOWN_PACKAGES.map((p) => p.id);
|
|
209
|
-
const validIds = ids.filter((id) => KNOWN_BY_ID.has(id));
|
|
210
|
-
if (validIds.length === 0) {
|
|
211
|
-
throw Object.assign(new Error('no valid packages requested'), { code: 'bad_request' });
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
_activeRun = { packages: validIds, startedAt: Date.now() };
|
|
215
|
-
|
|
216
|
-
// Kick the run async. Errors are reported via the WS bus.
|
|
217
|
-
(async () => {
|
|
218
|
-
try {
|
|
219
|
-
for (const id of validIds) {
|
|
220
|
-
const pkg = KNOWN_BY_ID.get(id);
|
|
221
|
-
if (!pkg) continue;
|
|
222
|
-
broadcast({ type: 'update:progress', pkg: id, status: 'starting' });
|
|
223
|
-
|
|
224
|
-
const versionTag = channel && channel === 'beta' ? '@beta' : '@latest';
|
|
225
|
-
const code = await runNpmInstall(pkg.npmName, versionTag, (line) => {
|
|
226
|
-
broadcast({ type: 'update:log', pkg: id, line });
|
|
227
|
-
});
|
|
228
|
-
|
|
229
|
-
if (code === 0) {
|
|
230
|
-
const newVer = fetchLatestVersion(pkg.npmName); // warm cache
|
|
231
|
-
broadcast({
|
|
232
|
-
type: 'update:progress',
|
|
233
|
-
pkg: id,
|
|
234
|
-
status: 'done',
|
|
235
|
-
newVersion: newVer || undefined,
|
|
236
|
-
});
|
|
237
|
-
} else {
|
|
238
|
-
broadcast({
|
|
239
|
-
type: 'update:progress',
|
|
240
|
-
pkg: id,
|
|
241
|
-
status: 'error',
|
|
242
|
-
error: `npm install exited with code ${code}`,
|
|
243
|
-
});
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
} finally {
|
|
247
|
-
_activeRun = null;
|
|
248
|
-
broadcast({ type: 'update:complete' });
|
|
249
|
-
}
|
|
250
|
-
})().catch((err) => {
|
|
251
|
-
_activeRun = null;
|
|
252
|
-
broadcast({ type: 'update:progress', pkg: '__global', status: 'error', error: err?.message || String(err) });
|
|
253
|
-
broadcast({ type: 'update:complete' });
|
|
254
|
-
});
|
|
255
|
-
|
|
256
|
-
return { ok: true, started: validIds, channel: channel || 'stable' };
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
/**
|
|
260
|
-
* Spawn `npm install -g <pkg>@<tag>`. Captures stdout/stderr line by
|
|
261
|
-
* line and forwards each via the `onLine` callback. Resolves with the
|
|
262
|
-
* exit code (0 on success, non-zero otherwise).
|
|
263
|
-
*
|
|
264
|
-
* Why spawn instead of execSync: npm install can take 30+ seconds and
|
|
265
|
-
* blocks the event loop. We want concurrent dashboard requests to keep
|
|
266
|
-
* serving while an update is in flight.
|
|
267
|
-
*/
|
|
268
|
-
function runNpmInstall(npmName, versionTag, onLine) {
|
|
269
|
-
return new Promise((resolve) => {
|
|
270
|
-
let proc;
|
|
271
|
-
try {
|
|
272
|
-
proc = spawn('npm', ['install', '-g', `${npmName}${versionTag}`], {
|
|
273
|
-
stdio: ['ignore', 'pipe', 'pipe'],
|
|
274
|
-
env: process.env,
|
|
275
|
-
});
|
|
276
|
-
} catch (err) {
|
|
277
|
-
onLine(`failed to spawn npm: ${err.message}`);
|
|
278
|
-
resolve(127);
|
|
279
|
-
return;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
const pipeLine = (stream) => {
|
|
283
|
-
let buf = '';
|
|
284
|
-
stream.setEncoding('utf8');
|
|
285
|
-
stream.on('data', (chunk) => {
|
|
286
|
-
buf += chunk;
|
|
287
|
-
let nl;
|
|
288
|
-
while ((nl = buf.indexOf('\n')) >= 0) {
|
|
289
|
-
const line = buf.slice(0, nl).replace(/\r$/, '');
|
|
290
|
-
buf = buf.slice(nl + 1);
|
|
291
|
-
if (line) onLine(line);
|
|
292
|
-
}
|
|
293
|
-
});
|
|
294
|
-
stream.on('end', () => {
|
|
295
|
-
if (buf) onLine(buf);
|
|
296
|
-
});
|
|
297
|
-
};
|
|
298
|
-
pipeLine(proc.stdout);
|
|
299
|
-
pipeLine(proc.stderr);
|
|
300
|
-
|
|
301
|
-
proc.on('error', (err) => {
|
|
302
|
-
onLine(`npm process error: ${err.message}`);
|
|
303
|
-
resolve(127);
|
|
304
|
-
});
|
|
305
|
-
proc.on('close', (code) => {
|
|
306
|
-
resolve(code ?? 1);
|
|
307
|
-
});
|
|
308
|
-
});
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
// ─── Router factory ────────────────────────────────────────────────────────
|
|
312
|
-
|
|
313
|
-
export function createUpdateRouter({ broadcast = () => {} } = {}) {
|
|
314
|
-
const router = Router();
|
|
315
|
-
|
|
316
|
-
/**
|
|
317
|
-
* GET /api/updates/status
|
|
318
|
-
* Quick status — installed versions only. Cheap; no npm calls.
|
|
319
|
-
*/
|
|
320
|
-
router.get('/updates/status', wrap(async (_req, res) => {
|
|
321
|
-
const current = currentVersions();
|
|
322
|
-
res.json({ installed: current });
|
|
323
|
-
}));
|
|
324
|
-
|
|
325
|
-
/**
|
|
326
|
-
* GET /api/updates/check
|
|
327
|
-
* GET /api/updates/check?channel=stable|beta
|
|
328
|
-
* Installed + latest + hasUpdates + available per channel. Calls `npm view` (cached).
|
|
329
|
-
*/
|
|
330
|
-
router.get('/updates/check', wrap(async (req, res) => {
|
|
331
|
-
const channel = req.query.channel === 'beta' ? 'beta' : 'stable';
|
|
332
|
-
const current = currentVersions();
|
|
333
|
-
const { latest, hasUpdates, available } = latestVersionsAndFlag(current);
|
|
334
|
-
res.json({ installed: current, available, hasUpdates, channel });
|
|
335
|
-
}));
|
|
336
|
-
|
|
337
|
-
/**
|
|
338
|
-
* POST /api/updates/apply
|
|
339
|
-
* Body: { packages?: string[], channel?: 'stable' | 'beta' }
|
|
340
|
-
* Returns 202 immediately. Progress streams via WS events.
|
|
341
|
-
* Returns 409 if another apply is in flight.
|
|
342
|
-
*/
|
|
343
|
-
router.post('/updates/apply', wrap(async (req, res) => {
|
|
344
|
-
if (isRunning()) {
|
|
345
|
-
res.status(409).json({
|
|
346
|
-
error: 'already_running',
|
|
347
|
-
message: 'an update is already running',
|
|
348
|
-
runningSince: _activeRun ? new Date(_activeRun.startedAt).toISOString() : null,
|
|
349
|
-
});
|
|
350
|
-
return;
|
|
351
|
-
}
|
|
352
|
-
const body = req.body || {};
|
|
353
|
-
const channel = body.channel === 'beta' ? 'beta' : 'stable';
|
|
354
|
-
try {
|
|
355
|
-
const result = startApplyRun({ packages: body.packages, channel, broadcast });
|
|
356
|
-
res.status(202).json(result);
|
|
357
|
-
} catch (err) {
|
|
358
|
-
const status = err?.code === 'bad_request' ? 400 : 500;
|
|
359
|
-
res.status(status).json({
|
|
360
|
-
error: err?.code || 'apply_failed',
|
|
361
|
-
message: err?.message || String(err),
|
|
362
|
-
});
|
|
363
|
-
}
|
|
364
|
-
}));
|
|
365
|
-
|
|
366
|
-
return router;
|
|
367
|
-
}
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* src/server/routes/usage.mjs
|
|
3
|
-
*
|
|
4
|
-
* Endpoints for usage analytics:
|
|
5
|
-
* GET /api/usage — aggregate usage (range, from, to, providerId, modelId)
|
|
6
|
-
* GET /api/usage/limits — live quota limits + usage percent (agents call this)
|
|
7
|
-
* GET /api/usage/recent — last N raw records (live tail)
|
|
8
|
-
*
|
|
9
|
-
* The agent-awareness path (/api/usage/limits) calls fetchRemains() for
|
|
10
|
-
* live quota data, then merges with the JSONL rolling totals.
|
|
11
|
-
*/
|
|
12
|
-
import { Router } from 'express';
|
|
13
|
-
import { wrap } from './_shared.mjs';
|
|
14
|
-
import {
|
|
15
|
-
queryUsage,
|
|
16
|
-
getUsageLimitsForAgent,
|
|
17
|
-
} from '../minimax-usage-store.mjs';
|
|
18
|
-
|
|
19
|
-
export function createUsageRouter() {
|
|
20
|
-
const router = Router();
|
|
21
|
-
|
|
22
|
-
// GET /api/usage?range=24h|7d|30d|custom&from=&to=&providerId=&modelId=
|
|
23
|
-
router.get('/usage', wrap(async (req, res) => {
|
|
24
|
-
const range = String(req.query.range || '24h');
|
|
25
|
-
const from = req.query.from ? Number(req.query.from) : undefined;
|
|
26
|
-
const to = req.query.to ? Number(req.query.to) : undefined;
|
|
27
|
-
const providerId = req.query.providerId ? String(req.query.providerId) : undefined;
|
|
28
|
-
const modelId = req.query.modelId ? String(req.query.modelId) : undefined;
|
|
29
|
-
|
|
30
|
-
if (!['24h', '7d', '30d', 'custom'].includes(range)) {
|
|
31
|
-
return res.status(400).json({ error: 'invalid_range', message: 'range must be 24h, 7d, 30d, or custom' });
|
|
32
|
-
}
|
|
33
|
-
if (range === 'custom' && (!from || !to)) {
|
|
34
|
-
return res.status(400).json({ error: 'missing_dates', message: 'range=custom requires `from` and `to` (unix ms)' });
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
const opts = {
|
|
38
|
-
range,
|
|
39
|
-
from,
|
|
40
|
-
to,
|
|
41
|
-
providerId,
|
|
42
|
-
modelId,
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
let result;
|
|
46
|
-
try {
|
|
47
|
-
result = queryUsage(opts);
|
|
48
|
-
} catch (err) {
|
|
49
|
-
return res.status(400).json({ error: 'query_error', message: String((err).message) });
|
|
50
|
-
}
|
|
51
|
-
return res.json(result);
|
|
52
|
-
}));
|
|
53
|
-
|
|
54
|
-
// GET /api/usage/limits
|
|
55
|
-
// Returns live quota info from fetchRemains() merged with rolling usage totals.
|
|
56
|
-
router.get('/usage/limits', wrap(async (_req, res) => {
|
|
57
|
-
// Dynamic import to avoid pulling in the full minimax client bundle on every
|
|
58
|
-
// dashboard page load. The usage store is lightweight.
|
|
59
|
-
/** @type {Record<string, unknown>} */
|
|
60
|
-
let remainsData = { models: [] };
|
|
61
|
-
try {
|
|
62
|
-
const { fetchRemains } = await import('../minimax.mjs');
|
|
63
|
-
const remains = await fetchRemains({ force: false });
|
|
64
|
-
if (remains.ok) {
|
|
65
|
-
// Cast through unknown to avoid TypeScript pollution in plain .mjs.
|
|
66
|
-
remainsData = /** @type {Record<string, unknown>} */ (remains);
|
|
67
|
-
}
|
|
68
|
-
} catch { /* best-effort — return zeros */ }
|
|
69
|
-
|
|
70
|
-
// Rolling usage from JSONL.
|
|
71
|
-
const agentSummary = await getUsageLimitsForAgent('minimax');
|
|
72
|
-
|
|
73
|
-
// Merge: per-model usage from JSONL + per-model quota from remains.
|
|
74
|
-
/** @type {Array<{model_name?: string, current_interval_remaining_percent?: number, current_weekly_remaining_percent?: number, intervalResetInHuman?: string, weeklyResetInHuman?: string}>} */
|
|
75
|
-
const models = (remainsData.models || []);
|
|
76
|
-
|
|
77
|
-
// Build per-model percentUsed from the JSONL per-model data.
|
|
78
|
-
const usageResult = queryUsage({ range: '24h', providerId: 'minimax' });
|
|
79
|
-
const perModelUsage = new Map(usageResult.perModel.map(m => [`minimax/${m.modelId}`, m]));
|
|
80
|
-
|
|
81
|
-
const perModelLimits = models.map(m => {
|
|
82
|
-
const usage = perModelUsage.get(`minimax/${m.model_name}`);
|
|
83
|
-
const usedTokens = usage?.totalTokens ?? 0;
|
|
84
|
-
const remainingPct = m.current_interval_remaining_percent ?? 100;
|
|
85
|
-
let estimatedDailyBudget = 0;
|
|
86
|
-
let percentUsed = 0;
|
|
87
|
-
if (remainingPct < 100 && usedTokens > 0) {
|
|
88
|
-
estimatedDailyBudget = Math.round(usedTokens / (1 - remainingPct / 100));
|
|
89
|
-
percentUsed = Math.round((usedTokens / estimatedDailyBudget) * 1000) / 10;
|
|
90
|
-
}
|
|
91
|
-
return {
|
|
92
|
-
modelId: m.model_name ?? 'unknown',
|
|
93
|
-
totalTokensUsed: usedTokens,
|
|
94
|
-
requestCount: usage?.requests ?? 0,
|
|
95
|
-
limits: {
|
|
96
|
-
dailyTokens: estimatedDailyBudget || null,
|
|
97
|
-
intervalResetIn: m.intervalResetInHuman ?? null,
|
|
98
|
-
weeklyResetIn: m.weeklyResetInHuman ?? null,
|
|
99
|
-
},
|
|
100
|
-
percentUsed24h: percentUsed,
|
|
101
|
-
};
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
return res.json({
|
|
105
|
-
provider: 'minimax',
|
|
106
|
-
requestsLast5min: agentSummary.requestsLast5min,
|
|
107
|
-
tokensLast5min: agentSummary.tokensLast5min,
|
|
108
|
-
requestsLast24h: agentSummary.requestsLast24h,
|
|
109
|
-
tokensLast24h: agentSummary.tokensLast24h,
|
|
110
|
-
limits: agentSummary.limits,
|
|
111
|
-
percentUsed24h: agentSummary.percentUsed24h,
|
|
112
|
-
estimatedTimeUntilReset: agentSummary.estimatedTimeUntilReset,
|
|
113
|
-
warning: agentSummary.warning,
|
|
114
|
-
perModel: perModelLimits,
|
|
115
|
-
fetchedAt: remainsData.fetchedAt ? new Date(remainsData.fetchedAt).toISOString() : null,
|
|
116
|
-
});
|
|
117
|
-
}));
|
|
118
|
-
|
|
119
|
-
// GET /api/usage/recent?limit=50
|
|
120
|
-
router.get('/usage/recent', wrap(async (req, res) => {
|
|
121
|
-
const limit = Math.min(Math.max(Number(req.query.limit) || 50, 1), 200);
|
|
122
|
-
|
|
123
|
-
// Read last N lines from the JSONL.
|
|
124
|
-
const { readAllRecords } = await import('../minimax-usage-store.mjs');
|
|
125
|
-
const all = readAllRecords();
|
|
126
|
-
const recent = all.slice(-limit).reverse(); // newest first
|
|
127
|
-
|
|
128
|
-
return res.json({
|
|
129
|
-
records: recent,
|
|
130
|
-
total: all.length,
|
|
131
|
-
returned: recent.length,
|
|
132
|
-
});
|
|
133
|
-
}));
|
|
134
|
-
|
|
135
|
-
return router;
|
|
136
|
-
}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* src/server/routes/users.mjs
|
|
3
|
-
*
|
|
4
|
-
* v5.0.0 — User management REST API.
|
|
5
|
-
*
|
|
6
|
-
* Endpoints:
|
|
7
|
-
* GET /api/users/me — current user info
|
|
8
|
-
* PATCH /api/users/me — update profile (name, email)
|
|
9
|
-
* GET /api/users/:id — get user (workspace member only)
|
|
10
|
-
*/
|
|
11
|
-
import { Router } from 'express';
|
|
12
|
-
import { getUser, updateUser, listWorkspacesWithRoles } from '../workspaces.mjs';
|
|
13
|
-
import { getCurrentUserId } from '../auth.mjs';
|
|
14
|
-
import { wrap } from './_shared.mjs';
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* @returns {import('express').Router}
|
|
18
|
-
*/
|
|
19
|
-
export function createUsersRouter() {
|
|
20
|
-
const router = Router();
|
|
21
|
-
|
|
22
|
-
// GET /api/users/me — current user info
|
|
23
|
-
router.get('/users/me', wrap(async (req, res) => {
|
|
24
|
-
const userId = getCurrentUserId(req);
|
|
25
|
-
if (!userId) {
|
|
26
|
-
return res.status(401).json({ error: 'unauthorized', message: 'Not authenticated' });
|
|
27
|
-
}
|
|
28
|
-
const user = await getUser(userId);
|
|
29
|
-
// v5.3.1 — Tailscale-trust: when getCurrentUserId returns a derived
|
|
30
|
-
// userId (usr_ts_*) that doesn't exist in the store, synthesize a
|
|
31
|
-
// minimal user record from the request Host header so the dashboard
|
|
32
|
-
// can render a profile without needing a full signup.
|
|
33
|
-
if (!user) {
|
|
34
|
-
if (userId.startsWith('usr_ts_')) {
|
|
35
|
-
const host = String(req.headers?.host || '').split(':')[0] || 'tailnet';
|
|
36
|
-
const tailnetName = host.split('.')[0] || 'tailnet';
|
|
37
|
-
const workspaces = await listWorkspacesWithRoles(userId);
|
|
38
|
-
return res.json({
|
|
39
|
-
user: {
|
|
40
|
-
id: userId,
|
|
41
|
-
email: `${tailnetName}@tailscale.local`,
|
|
42
|
-
name: `Tailnet user (${tailnetName})`,
|
|
43
|
-
tailnet: true
|
|
44
|
-
},
|
|
45
|
-
workspaces
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
return res.status(404).json({ error: 'not_found', message: 'User not found' });
|
|
49
|
-
}
|
|
50
|
-
const workspaces = await listWorkspacesWithRoles(userId);
|
|
51
|
-
res.json({
|
|
52
|
-
user: {
|
|
53
|
-
id: user.id,
|
|
54
|
-
email: user.email,
|
|
55
|
-
name: user.name,
|
|
56
|
-
},
|
|
57
|
-
workspaces,
|
|
58
|
-
});
|
|
59
|
-
}));
|
|
60
|
-
|
|
61
|
-
// PATCH /api/users/me — update profile
|
|
62
|
-
router.patch('/users/me', wrap(async (req, res) => {
|
|
63
|
-
const userId = getCurrentUserId(req);
|
|
64
|
-
if (!userId) {
|
|
65
|
-
return res.status(401).json({ error: 'unauthorized', message: 'Not authenticated' });
|
|
66
|
-
}
|
|
67
|
-
const { name, email } = req.body || {};
|
|
68
|
-
if (!name && !email) {
|
|
69
|
-
return res.status(400).json({ error: 'bad_request', message: 'name or email required' });
|
|
70
|
-
}
|
|
71
|
-
const updates = {};
|
|
72
|
-
if (name !== undefined) updates.name = name;
|
|
73
|
-
if (email !== undefined) updates.email = email;
|
|
74
|
-
const user = await updateUser(userId, updates);
|
|
75
|
-
res.json({ user });
|
|
76
|
-
}));
|
|
77
|
-
|
|
78
|
-
// GET /api/users/:id — get user (workspace member only)
|
|
79
|
-
router.get('/users/:id', wrap(async (req, res) => {
|
|
80
|
-
const userId = getCurrentUserId(req);
|
|
81
|
-
if (!userId) {
|
|
82
|
-
return res.status(401).json({ error: 'unauthorized', message: 'Not authenticated' });
|
|
83
|
-
}
|
|
84
|
-
const { id } = req.params;
|
|
85
|
-
const user = await getUser(id);
|
|
86
|
-
if (!user) {
|
|
87
|
-
return res.status(404).json({ error: 'not_found', message: 'User not found' });
|
|
88
|
-
}
|
|
89
|
-
// Only return user if both are members of at least one common workspace
|
|
90
|
-
// For simplicity, we check if the requesting user exists (they're authenticated)
|
|
91
|
-
// In a real implementation, we'd check shared workspace membership
|
|
92
|
-
res.json({
|
|
93
|
-
user: {
|
|
94
|
-
id: user.id,
|
|
95
|
-
email: user.email,
|
|
96
|
-
name: user.name,
|
|
97
|
-
},
|
|
98
|
-
});
|
|
99
|
-
}));
|
|
100
|
-
|
|
101
|
-
return router;
|
|
102
|
-
}
|