@polderlabs/bizar 3.23.1 → 4.2.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/README.md +83 -16
- package/bizar-dash/.bizar/activity.log +3 -0
- package/bizar-dash/.bizar/graph/.graphify_analysis.json +1540 -0
- package/bizar-dash/.bizar/graph/.graphify_labels.json +1 -0
- package/bizar-dash/.bizar/graph/GRAPH_REPORT.md +404 -0
- package/bizar-dash/.bizar/graph/cache/ast/v0.8.46/0661b816358db84dfdb7f10443db8a61152fd20b3fee950caf8fbf32920a1790.json +1 -0
- package/bizar-dash/.bizar/graph/cache/ast/v0.8.46/16da06d774142a6e5d74829ad982531286a6193ef798de8f593db029e123ec32.json +1 -0
- package/bizar-dash/.bizar/graph/cache/ast/v0.8.46/27e5697c01254c69c64c5a33896669073b40afb5ba88375102ae77fa5404136d.json +1 -0
- package/bizar-dash/.bizar/graph/cache/ast/v0.8.46/532997898027254aa4c0932243dc71d2f55888181232b65974961934997dc85b.json +1 -0
- package/bizar-dash/.bizar/graph/cache/ast/v0.8.46/84e3451a64c7f99f0cd6a88b0748d7426780486f53ab4935b7476b28c08f8293.json +1 -0
- package/bizar-dash/.bizar/graph/cache/ast/v0.8.46/88e5ea5f3e78fa69353fe9e6a8d1a05391d54605e25600cb125531eb5a6432ff.json +1 -0
- package/bizar-dash/.bizar/graph/cache/stat-index.json +1 -0
- package/bizar-dash/.bizar/graph/graph.html +307 -0
- package/bizar-dash/.bizar/graph/graph.json +40267 -0
- package/bizar-dash/.bizar/graph/manifest.json +762 -0
- package/bizar-dash/.graphifyignore +40 -0
- package/bizar-dash/.obsidian/README.md +14 -0
- package/bizar-dash/.obsidian/daily/2026-06-25.md +9 -0
- package/bizar-dash/.obsidian/vault.json +7 -0
- package/bizar-dash/.od-skills/web-prototype-e1429c1737/SKILL.md +103 -0
- package/bizar-dash/.od-skills/web-prototype-e1429c1737/assets/template.html +338 -0
- package/bizar-dash/.od-skills/web-prototype-e1429c1737/example.html +81 -0
- package/bizar-dash/.od-skills/web-prototype-e1429c1737/open-design.json +172 -0
- package/bizar-dash/.od-skills/web-prototype-e1429c1737/references/checklist.md +44 -0
- package/bizar-dash/.od-skills/web-prototype-e1429c1737/references/layouts.md +247 -0
- package/bizar-dash/CHANGELOG.md +474 -0
- package/bizar-dash/DESIGN.md +136 -0
- package/bizar-dash/dist/assets/main-B3RgW6FS.js +331 -0
- package/bizar-dash/dist/assets/main-B3RgW6FS.js.map +1 -0
- package/bizar-dash/dist/assets/main-DlJ8wgLR.css +1 -0
- package/bizar-dash/dist/assets/mobile-CsZQAswA.css +1 -0
- package/bizar-dash/dist/assets/mobile-DbxIw8BG.js +2 -0
- package/bizar-dash/dist/assets/mobile-DbxIw8BG.js.map +1 -0
- package/bizar-dash/dist/assets/mobile-Dvq2d53Y.js +354 -0
- package/bizar-dash/dist/assets/mobile-Dvq2d53Y.js.map +1 -0
- package/bizar-dash/dist/index.html +40 -0
- package/bizar-dash/dist/mobile.html +22 -0
- package/bizar-dash/plans/debug-plan/comments.json +1 -0
- package/bizar-dash/plans/debug-plan/meta.json +10 -0
- package/bizar-dash/plans/debug-plan/plan.json +174 -0
- package/bizar-dash/scripts/smoke-bg-retry.mjs +246 -0
- package/bizar-dash/src/cli/dashboard-ports.mjs +488 -0
- package/bizar-dash/src/cli.mjs +522 -0
- package/bizar-dash/src/server/activity-log.mjs +174 -0
- package/bizar-dash/src/server/agents-store.mjs +465 -0
- package/bizar-dash/src/server/api.mjs +138 -0
- package/bizar-dash/src/server/artifact-template.html +810 -0
- package/bizar-dash/src/server/artifacts-store.mjs +733 -0
- package/bizar-dash/src/server/auth.mjs +381 -0
- package/bizar-dash/src/server/background-store.mjs +447 -0
- package/bizar-dash/src/server/bg-poller.mjs +305 -0
- package/bizar-dash/src/server/bg-retry.mjs +574 -0
- package/bizar-dash/src/server/browser.mjs +40 -0
- package/bizar-dash/src/server/diagnostics-store.mjs +148 -0
- package/bizar-dash/src/server/dialog-poller.mjs +105 -0
- package/bizar-dash/src/server/dialog-store.mjs +177 -0
- package/bizar-dash/src/server/glyphs/mdx-compiler.mjs +583 -0
- package/bizar-dash/src/server/lib/path-safe.mjs +283 -0
- package/bizar-dash/src/server/memory-git.mjs +329 -0
- package/bizar-dash/src/server/memory-lightrag.mjs +767 -0
- package/bizar-dash/src/server/memory-schema.mjs +145 -0
- package/bizar-dash/src/server/memory-secrets.mjs +84 -0
- package/bizar-dash/src/server/memory-store.mjs +471 -0
- package/bizar-dash/src/server/mod-security.mjs +398 -0
- package/bizar-dash/src/server/mods-loader.mjs +1067 -0
- package/bizar-dash/src/server/notifications-store.mjs +243 -0
- package/bizar-dash/src/server/obsidian-store.mjs +318 -0
- package/bizar-dash/src/server/opencode-runner.mjs +279 -0
- package/bizar-dash/src/server/pair-store.mjs +138 -0
- package/bizar-dash/src/server/projects-store.mjs +364 -0
- package/bizar-dash/src/server/providers-store.mjs +789 -0
- package/bizar-dash/src/server/routes/_shared.mjs +415 -0
- package/bizar-dash/src/server/routes/activity.mjs +110 -0
- package/bizar-dash/src/server/routes/agents.mjs +134 -0
- package/bizar-dash/src/server/routes/artifacts.mjs +279 -0
- package/bizar-dash/src/server/routes/auth.mjs +69 -0
- package/bizar-dash/src/server/routes/background.mjs +165 -0
- package/bizar-dash/src/server/routes/chat.mjs +485 -0
- package/bizar-dash/src/server/routes/config.mjs +129 -0
- package/bizar-dash/src/server/routes/diagnostics.mjs +50 -0
- package/bizar-dash/src/server/routes/dialogs.mjs +86 -0
- package/bizar-dash/src/server/routes/fs.mjs +429 -0
- package/bizar-dash/src/server/routes/history.mjs +78 -0
- package/bizar-dash/src/server/routes/memory.mjs +658 -0
- package/bizar-dash/src/server/routes/misc.mjs +89 -0
- package/bizar-dash/src/server/routes/mods.mjs +359 -0
- package/bizar-dash/src/server/routes/notifications.mjs +54 -0
- package/bizar-dash/src/server/routes/obsidian.mjs +239 -0
- package/bizar-dash/src/server/routes/opencode-sessions.mjs +55 -0
- package/bizar-dash/src/server/routes/overview.mjs +91 -0
- package/bizar-dash/src/server/routes/pair.mjs +67 -0
- package/bizar-dash/src/server/routes/projects.mjs +175 -0
- package/bizar-dash/src/server/routes/providers.mjs +47 -0
- package/bizar-dash/src/server/routes/schedules.mjs +104 -0
- package/bizar-dash/src/server/routes/settings.mjs +51 -0
- package/bizar-dash/src/server/routes/skills.mjs +76 -0
- package/bizar-dash/src/server/routes/tasks.mjs +468 -0
- package/bizar-dash/src/server/routes/themes.mjs +51 -0
- package/bizar-dash/src/server/routes-v2/auth.mjs +59 -0
- package/bizar-dash/src/server/routes-v2/events.mjs +107 -0
- package/bizar-dash/src/server/routes-v2/health.mjs +21 -0
- package/bizar-dash/src/server/routes-v2/index.mjs +90 -0
- package/bizar-dash/src/server/routes-v2/sessions.mjs +111 -0
- package/bizar-dash/src/server/schedules-runner.mjs +369 -0
- package/bizar-dash/src/server/schedules-store.mjs +268 -0
- package/bizar-dash/src/server/search-store.mjs +220 -0
- package/bizar-dash/src/server/serve-info.mjs +684 -0
- package/bizar-dash/src/server/server.mjs +796 -0
- package/bizar-dash/src/server/settings-store.mjs +45 -0
- package/bizar-dash/src/server/skills-store.mjs +300 -0
- package/bizar-dash/src/server/state.mjs +437 -0
- package/bizar-dash/src/server/tailscale-store.mjs +113 -0
- package/bizar-dash/src/server/task-delegator.mjs +824 -0
- package/bizar-dash/src/server/tasks-store.mjs +508 -0
- package/bizar-dash/src/server/tui.mjs +923 -0
- package/bizar-dash/src/server/update-store.mjs +168 -0
- package/bizar-dash/src/server/v2-auth-file.mjs +99 -0
- package/bizar-dash/src/server/v2-event-bus.mjs +128 -0
- package/bizar-dash/src/server/watcher.mjs +81 -0
- package/bizar-dash/src/server/yaml.mjs +238 -0
- package/bizar-dash/src/web/App.tsx +718 -0
- package/bizar-dash/src/web/MobileApp.tsx +408 -0
- package/bizar-dash/src/web/components/ArtifactCreateDialog.tsx +95 -0
- package/bizar-dash/src/web/components/ArtifactListDialog.tsx +55 -0
- package/bizar-dash/src/web/components/ArtifactViewer.tsx +143 -0
- package/bizar-dash/src/web/components/AuditDialog.tsx +79 -0
- package/bizar-dash/src/web/components/BgStatusBadge.tsx +32 -0
- package/bizar-dash/src/web/components/Button.tsx +56 -0
- package/bizar-dash/src/web/components/CanvasContextMenu.tsx +68 -0
- package/bizar-dash/src/web/components/Card.tsx +40 -0
- package/bizar-dash/src/web/components/CollapsibleSection.tsx +72 -0
- package/bizar-dash/src/web/components/CommandDialog.tsx +66 -0
- package/bizar-dash/src/web/components/EmptyState.tsx +30 -0
- package/bizar-dash/src/web/components/FileBrowser.tsx +633 -0
- package/bizar-dash/src/web/components/HelpDialog.tsx +55 -0
- package/bizar-dash/src/web/components/KillConfirmDialog.tsx +88 -0
- package/bizar-dash/src/web/components/Modal.tsx +215 -0
- package/bizar-dash/src/web/components/Notifications.tsx +241 -0
- package/bizar-dash/src/web/components/SearchModal.tsx +224 -0
- package/bizar-dash/src/web/components/Sidebar.tsx +66 -0
- package/bizar-dash/src/web/components/Spinner.tsx +19 -0
- package/bizar-dash/src/web/components/StatusBadge.tsx +25 -0
- package/bizar-dash/src/web/components/Tag.tsx +28 -0
- package/bizar-dash/src/web/components/Toast.tsx +150 -0
- package/bizar-dash/src/web/components/Topbar.tsx +368 -0
- package/bizar-dash/src/web/components/VisualPlanDialog.tsx +58 -0
- package/bizar-dash/src/web/components/chat/AgentChip.tsx +68 -0
- package/bizar-dash/src/web/components/chat/ChatBubble.tsx +60 -0
- package/bizar-dash/src/web/components/chat/ChatThread.tsx +88 -0
- package/bizar-dash/src/web/components/chat/ChatTopBar.tsx +50 -0
- package/bizar-dash/src/web/components/chat/Composer.tsx +164 -0
- package/bizar-dash/src/web/components/chat/ConfirmModal.tsx +54 -0
- package/bizar-dash/src/web/components/chat/EmptyState.tsx +21 -0
- package/bizar-dash/src/web/components/chat/FirstRunGreeting.tsx +18 -0
- package/bizar-dash/src/web/components/chat/FloatingComposer.tsx +32 -0
- package/bizar-dash/src/web/components/chat/InfoPanel.tsx +119 -0
- package/bizar-dash/src/web/components/chat/LoadingSkeleton.tsx +19 -0
- package/bizar-dash/src/web/components/chat/MessageBubble.tsx +60 -0
- package/bizar-dash/src/web/components/chat/SessionList.tsx +153 -0
- package/bizar-dash/src/web/components/chat/StreamingIndicator.tsx +9 -0
- package/bizar-dash/src/web/components/chat/SuggestionCards.tsx +55 -0
- package/bizar-dash/src/web/components/chat/WelcomeScreen.tsx +36 -0
- package/bizar-dash/src/web/components/chat/index.ts +20 -0
- package/bizar-dash/src/web/components/chat/useAutoGrowTextarea.ts +18 -0
- package/bizar-dash/src/web/components/chat/useChat.ts +219 -0
- package/bizar-dash/src/web/components/chat/useSlashCommands.ts +47 -0
- package/bizar-dash/src/web/index.html +37 -0
- package/bizar-dash/src/web/lib/api.ts +193 -0
- package/bizar-dash/src/web/lib/markdown.tsx +59 -0
- package/bizar-dash/src/web/lib/types.ts +668 -0
- package/bizar-dash/src/web/lib/utils.ts +114 -0
- package/bizar-dash/src/web/lib/ws.ts +176 -0
- package/bizar-dash/src/web/main.tsx +34 -0
- package/bizar-dash/src/web/mobile/MobileApp.tsx +278 -0
- package/bizar-dash/src/web/mobile/MobileBottomNav.tsx +38 -0
- package/bizar-dash/src/web/mobile/MobileTopbar.tsx +115 -0
- package/bizar-dash/src/web/mobile/components/MobileBottomSheet.tsx +182 -0
- package/bizar-dash/src/web/mobile/components/MobileListItem.tsx +64 -0
- package/bizar-dash/src/web/mobile/components/MobileModal.tsx +123 -0
- package/bizar-dash/src/web/mobile/views/MobileActivity.tsx +273 -0
- package/bizar-dash/src/web/mobile/views/MobileAgents.tsx +374 -0
- package/bizar-dash/src/web/mobile/views/MobileArtifactCanvas.tsx +439 -0
- package/bizar-dash/src/web/mobile/views/MobileArtifacts.tsx +143 -0
- package/bizar-dash/src/web/mobile/views/MobileChat.tsx +180 -0
- package/bizar-dash/src/web/mobile/views/MobileConfig.tsx +175 -0
- package/bizar-dash/src/web/mobile/views/MobileHistory.tsx +191 -0
- package/bizar-dash/src/web/mobile/views/MobileMods.tsx +149 -0
- package/bizar-dash/src/web/mobile/views/MobileMore.tsx +121 -0
- package/bizar-dash/src/web/mobile/views/MobileNotifications.tsx +137 -0
- package/bizar-dash/src/web/mobile/views/MobilePlans.tsx +26 -0
- package/bizar-dash/src/web/mobile/views/MobileSchedules.tsx +685 -0
- package/bizar-dash/src/web/mobile/views/MobileSearchModal.tsx +172 -0
- package/bizar-dash/src/web/mobile/views/MobileSettings.tsx +388 -0
- package/bizar-dash/src/web/mobile/views/MobileSkills.tsx +153 -0
- package/bizar-dash/src/web/mobile/views/MobileTasks.tsx +564 -0
- package/bizar-dash/src/web/mobile.html +20 -0
- package/bizar-dash/src/web/mobile.tsx +13 -0
- package/bizar-dash/src/web/styles/chat.css +198 -0
- package/bizar-dash/src/web/styles/glyphs.css +960 -0
- package/bizar-dash/src/web/styles/main.css +8855 -0
- package/bizar-dash/src/web/styles/mobile-chat.css +5 -0
- package/bizar-dash/src/web/styles/mobile.css +1960 -0
- package/bizar-dash/src/web/views/Activity.tsx +1203 -0
- package/bizar-dash/src/web/views/Agents.tsx +701 -0
- package/bizar-dash/src/web/views/Artifacts.tsx +1480 -0
- package/bizar-dash/src/web/views/BackgroundAgents.tsx +450 -0
- package/bizar-dash/src/web/views/Chat.tsx +190 -0
- package/bizar-dash/src/web/views/Config.tsx +2063 -0
- package/bizar-dash/src/web/views/History.tsx +335 -0
- package/bizar-dash/src/web/views/ModView.tsx +207 -0
- package/bizar-dash/src/web/views/Mods.tsx +693 -0
- package/bizar-dash/src/web/views/Overview.tsx +812 -0
- package/bizar-dash/src/web/views/Providers.tsx +302 -0
- package/bizar-dash/src/web/views/Schedules.tsx +802 -0
- package/bizar-dash/src/web/views/Settings.tsx +1787 -0
- package/bizar-dash/src/web/views/Skills.tsx +431 -0
- package/bizar-dash/src/web/views/Tasks.tsx +1523 -0
- package/bizar-dash/src/web/views/glyphs/GlyphRenderer.tsx +613 -0
- package/bizar-dash/src/web/views/glyphs/components.tsx +1098 -0
- package/bizar-dash/templates/mod/FORMAT.md +76 -0
- package/bizar-dash/templates/mod/hello-mod/README.md +19 -0
- package/bizar-dash/templates/mod/hello-mod/agents/greeter.md +8 -0
- package/bizar-dash/templates/mod/hello-mod/commands/hello.md +6 -0
- package/bizar-dash/templates/mod/hello-mod/mod.json +20 -0
- package/bizar-dash/templates/mod/hello-mod/routes/ping.mjs +9 -0
- package/bizar-dash/templates/mod/hello-mod/views/HelloView.tsx +10 -0
- package/bizar-dash/tests/dashboard-ports.test.mjs +138 -0
- package/bizar-dash/tests/graphify-mod-spawn.node.test.mjs +90 -0
- package/bizar-dash/tests/memory-cli.test.mjs +542 -0
- package/bizar-dash/tests/memory-config.test.mjs +422 -0
- package/bizar-dash/tests/memory-git.test.mjs +246 -0
- package/bizar-dash/tests/memory-lightrag.test.mjs +153 -0
- package/bizar-dash/tests/memory-protocol-drift.test.mjs +45 -0
- package/bizar-dash/tests/memory-schema.test.mjs +198 -0
- package/bizar-dash/tests/memory-secrets.test.mjs +121 -0
- package/bizar-dash/tests/memory-store.test.mjs +390 -0
- package/bizar-dash/tests/memory-sync.test.mjs +141 -0
- package/bizar-dash/tests/mod-instructions.node.test.mjs +188 -0
- package/bizar-dash/tests/mod-security.test.mjs +273 -0
- package/bizar-dash/tests/mod-upgrade.node.test.mjs +357 -0
- package/bizar-dash/tests/no-agent-browser.node.test.mjs +98 -0
- package/bizar-dash/tests/obsidian-back-compat.test.mjs +199 -0
- package/bizar-dash/tests/opencode-runner.test.mjs +172 -0
- package/bizar-dash/tests/path-safe.test.mjs +108 -0
- package/bizar-dash/tests/providers-store-backup-keys.node.test.mjs +333 -0
- package/bizar-dash/tests/smoke-v2.mjs +212 -0
- package/bizar-dash/tests/strip-thinking.test.mjs +175 -0
- package/bizar-dash/tests/submit-feedback.test.mjs +353 -0
- package/bizar-dash/tests/tmux-wrap.test.mjs +145 -0
- package/bizar-dash/tests/yaml.test.mjs +128 -0
- package/bizar-dash/tsconfig.json +23 -0
- package/bizar-dash/vite.config.ts +27 -0
- package/cli/atomic.mjs +73 -0
- package/cli/banner.mjs +1 -1
- package/cli/bin.mjs +44 -47
- package/cli/bootstrap.mjs +1 -1
- package/cli/copy.mjs +25 -16
- package/cli/dev-link.mjs +17 -1
- package/cli/doctor.mjs +4 -4
- package/cli/doctor.test.mjs +2 -2
- package/cli/init.mjs +135 -1
- package/cli/install.mjs +31 -39
- package/cli/memory-constants.mjs +59 -0
- package/cli/memory.mjs +1436 -0
- package/cli/service.mjs +5 -6
- package/cli/utils.mjs +6 -3
- package/config/AGENTS.md +7 -7
- package/config/agents/_shared/AGENT_BASELINE.md +59 -61
- package/config/opencode.json +13 -38
- package/config/skills/memory-protocol/SKILL.md +105 -0
- package/config/skills/obsidian/SKILL.md +270 -65
- package/install.sh +59 -19
- package/package.json +49 -14
- package/packages/sdk/LICENSE +21 -0
- package/packages/sdk/README.md +80 -0
- package/packages/sdk/src/client.ts +183 -0
- package/packages/sdk/src/errors.ts +120 -0
- package/packages/sdk/src/events.ts +153 -0
- package/packages/sdk/src/index.ts +63 -0
- package/packages/sdk/src/types.ts +176 -0
- package/packages/sdk/src/version.ts +4 -0
- package/packages/sdk/tests/client.test.ts +217 -0
- package/packages/sdk/tests/errors.test.ts +108 -0
- package/packages/sdk/tests/events.test.ts +139 -0
- package/packages/sdk/tests/fixtures/fetch-mock.ts +152 -0
- package/packages/sdk/tests/fixtures/sse-mock.ts +30 -0
- package/packages/sdk/tsconfig.json +25 -0
- package/packages/sdk/vitest.config.ts +9 -0
- package/plugins/bizar/LICENSE +21 -0
- package/plugins/bizar/README.md +448 -0
- package/plugins/bizar/dist/index.js +29901 -0
- package/plugins/bizar/index.ts +1491 -0
- package/plugins/bizar/scripts/check-forbidden-imports.sh +33 -0
- package/plugins/bizar/src/background-state.ts +551 -0
- package/plugins/bizar/src/background.ts +1250 -0
- package/plugins/bizar/src/commands-impl.ts +464 -0
- package/plugins/bizar/src/commands.ts +1168 -0
- package/plugins/bizar/src/dashboard-client.ts +233 -0
- package/plugins/bizar/src/event-stream.ts +606 -0
- package/plugins/bizar/src/fingerprint.ts +120 -0
- package/plugins/bizar/src/handoff.ts +79 -0
- package/plugins/bizar/src/http-client.ts +467 -0
- package/plugins/bizar/src/key-rotation.ts +218 -0
- package/plugins/bizar/src/logger.ts +144 -0
- package/plugins/bizar/src/loop.ts +176 -0
- package/plugins/bizar/src/opencode-runner.ts +390 -0
- package/plugins/bizar/src/options.ts +421 -0
- package/plugins/bizar/src/plan-fs.ts +323 -0
- package/plugins/bizar/src/reasoning-clean.ts +454 -0
- package/plugins/bizar/src/report.ts +178 -0
- package/plugins/bizar/src/research-prompt.ts +35 -0
- package/plugins/bizar/src/serve-info.ts +228 -0
- package/plugins/bizar/src/serve.ts +496 -0
- package/plugins/bizar/src/settings.ts +349 -0
- package/plugins/bizar/src/state.ts +298 -0
- package/plugins/bizar/src/tools/bg-collect.ts +104 -0
- package/plugins/bizar/src/tools/bg-get-comments.ts +239 -0
- package/plugins/bizar/src/tools/bg-kill.ts +87 -0
- package/plugins/bizar/src/tools/bg-spawn.ts +401 -0
- package/plugins/bizar/src/tools/bg-status.ts +99 -0
- package/plugins/bizar/src/tools/open-kb.ts +191 -0
- package/plugins/bizar/src/tools/plan-action.ts +767 -0
- package/plugins/bizar/src/tools/read-glyph-feedback.ts +170 -0
- package/plugins/bizar/src/tools/wait-for-feedback.ts +402 -0
- package/plugins/bizar/tests/attach-handler-bug.test.ts +169 -0
- package/plugins/bizar/tests/background-state.test.ts +277 -0
- package/plugins/bizar/tests/background.test.ts +402 -0
- package/plugins/bizar/tests/block.test.ts +195 -0
- package/plugins/bizar/tests/canonical-key-order.test.ts +75 -0
- package/plugins/bizar/tests/commands-impl.test.ts +442 -0
- package/plugins/bizar/tests/commands.test.ts +584 -0
- package/plugins/bizar/tests/config.test.ts +122 -0
- package/plugins/bizar/tests/dashboard-client.test.ts +159 -0
- package/plugins/bizar/tests/dispose.test.ts +336 -0
- package/plugins/bizar/tests/event-stream.test.ts +409 -0
- package/plugins/bizar/tests/event.test.ts +262 -0
- package/plugins/bizar/tests/fingerprint.test.ts +162 -0
- package/plugins/bizar/tests/http-client.test.ts +404 -0
- package/plugins/bizar/tests/init-helpers.test.ts +203 -0
- package/plugins/bizar/tests/integration/slash-command.test.ts +348 -0
- package/plugins/bizar/tests/integration/tool-routing.test.ts +314 -0
- package/plugins/bizar/tests/key-rotation.test.ts +396 -0
- package/plugins/bizar/tests/loop.test.ts +397 -0
- package/plugins/bizar/tests/options.test.ts +276 -0
- package/plugins/bizar/tests/reasoning-clean.test.ts +422 -0
- package/plugins/bizar/tests/serve.test.ts +339 -0
- package/plugins/bizar/tests/settings.test.ts +351 -0
- package/plugins/bizar/tests/stall-think.test.ts +750 -0
- package/plugins/bizar/tests/state.test.ts +276 -0
- package/plugins/bizar/tests/tools/bg-collect.test.ts +337 -0
- package/plugins/bizar/tests/tools/bg-get-comments.test.ts +485 -0
- package/plugins/bizar/tests/tools/bg-kill.test.ts +235 -0
- package/plugins/bizar/tests/tools/bg-spawn-delegation.test.ts +147 -0
- package/plugins/bizar/tests/tools/bg-spawn.test.ts +311 -0
- package/plugins/bizar/tests/tools/bg-status.test.ts +217 -0
- package/plugins/bizar/tests/tools/opencode-runner.test.ts +115 -0
- package/plugins/bizar/tests/tools/plan-action.test.ts +599 -0
- package/plugins/bizar/tests/tools/read-glyph-feedback.test.ts +253 -0
- package/plugins/bizar/tests/tools/wait-for-feedback.test.ts +390 -0
- package/plugins/bizar/tests/update-deadlock.test.ts +145 -0
- package/plugins/bizar/tsconfig.json +29 -0
|
@@ -1,101 +1,306 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: obsidian
|
|
3
|
-
description: Use the
|
|
4
|
-
version:
|
|
3
|
+
description: Use the Bizar Memory Service for persistent project knowledge — local Obsidian-compatible Markdown + Git-shared sync. Read vault entries before non-trivial decisions; write after meaningful work. Three layers: Markdown (truth) → Git (collaboration) → LightRAG (derived index, Phase 2).
|
|
4
|
+
version: 2
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
#
|
|
7
|
+
# Bizar Memory Service — Project Knowledge
|
|
8
8
|
|
|
9
|
-
**
|
|
9
|
+
**The Bizar Memory Service is the project's persistent knowledge layer.** It replaces the disabled Hindsight MCP service. Every Bizar project uses the same three-layer architecture; only the backend mode (`local-only` vs `managed`) and the vault location differ.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
The user has been working on this project — their notes contain the real context, the gotchas, the failed approaches, the preferred patterns. **Read the relevant vault entries before making any non-trivial decision.**
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## Quick Start for Agents
|
|
14
14
|
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
**First-time setup** (if `.bizar/memory.json` is missing):
|
|
16
|
+
```bash
|
|
17
|
+
bizar memory setup --remote git@github.com:you/bizar-memory.git
|
|
18
|
+
bizar memory status # confirm vault reachable
|
|
19
|
+
bizar memory doctor # schema + secrets + git state
|
|
20
|
+
```
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
Memory is accessed via the `bizar memory` CLI — agents have `bash: allow` and can invoke it directly.
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
- When you make a design decision that should be remembered
|
|
24
|
+
**Find the vault root:**
|
|
25
|
+
```bash
|
|
26
|
+
bizar memory status
|
|
27
|
+
```
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
**Search memory:**
|
|
30
|
+
```bash
|
|
31
|
+
bizar memory search "<query>"
|
|
32
|
+
```
|
|
30
33
|
|
|
31
|
-
|
|
34
|
+
**Read a specific note:**
|
|
35
|
+
```bash
|
|
36
|
+
# 1. List notes to find the path
|
|
37
|
+
bizar memory list 2>/dev/null || ls ~/.local/share/bizar/memory/bizar-memory/projects/<projectId>/
|
|
38
|
+
# 2. Read the note
|
|
39
|
+
cat ~/.local/share/bizar/memory/bizar-memory/projects/<projectId>/<relpath>
|
|
40
|
+
```
|
|
32
41
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
42
|
+
**Write a new note:**
|
|
43
|
+
```bash
|
|
44
|
+
bizar memory write <relpath> \
|
|
45
|
+
--type <type> \
|
|
46
|
+
--status active \
|
|
47
|
+
--confidence verified \
|
|
48
|
+
--tag <tag1> --tag <tag2> \
|
|
49
|
+
--body "<body text>"
|
|
50
|
+
```
|
|
39
51
|
|
|
40
|
-
|
|
52
|
+
`<relpath>` is relative to the project namespace root (e.g. `decisions/0001-foo.md`). Do NOT include the `projects/<projectId>/` prefix — that double-nests.
|
|
41
53
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
54
|
+
**Commit and push (if shared vault):**
|
|
55
|
+
```bash
|
|
56
|
+
bizar memory sync
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Health check:**
|
|
60
|
+
```bash
|
|
61
|
+
bizar memory doctor
|
|
62
|
+
```
|
|
48
63
|
|
|
49
|
-
|
|
64
|
+
## The three layers
|
|
50
65
|
|
|
51
|
-
|
|
52
|
-
|
|
66
|
+
| Layer | Role | Backed by | Write path |
|
|
67
|
+
|---|---|---|---|
|
|
68
|
+
| **Markdown** | Canonical truth | Obsidian-flavoured `.md` files on disk | Author writes here; this is the only layer that is authoritative |
|
|
69
|
+
| **Git** | Collaboration / history | The vault directory is a Git repo (local-only mode keeps it as a local repo with no remote) | The `bizar memory sync` orchestrator runs `git add/commit/push` after a write |
|
|
70
|
+
| **LightRAG** (Phase 2) | Derived search index | A LightRAG server (disabled by default in `memory.json`) | NEVER write here directly — always rebuild from Markdown via `bizar memory reindex` |
|
|
53
71
|
|
|
54
|
-
|
|
55
|
-
What you learned. Why it matters.
|
|
72
|
+
**Rule of thumb:** if you wanted to "update the project's memory," write Markdown. Git and LightRAG follow.
|
|
56
73
|
|
|
57
|
-
##
|
|
58
|
-
What to do next time. Code examples welcome.
|
|
74
|
+
## Vault location
|
|
59
75
|
|
|
60
|
-
|
|
61
|
-
|
|
76
|
+
The root of the vault is determined by `.bizar/memory.json` in the active project. Two modes:
|
|
77
|
+
|
|
78
|
+
- **`local-only` (default)** — vault is `.obsidian/` inside this project. Single-machine. Stays out of any cross-project repo. Use this when the project is solo or when the project itself is private.
|
|
79
|
+
- **`managed`** — vault is `~/.local/share/bizar/memory/<repoName>/` (a user-level shared repo). Multiple projects contribute to the same Git repo under per-project namespaces. Use this when you want cross-project search and a single source of truth across all your Bizar projects.
|
|
80
|
+
|
|
81
|
+
`bizar memory status` prints the active mode and resolved paths; `bizar memory doctor` validates the vault is reachable and the Git state is consistent.
|
|
82
|
+
|
|
83
|
+
## The three namespaces
|
|
84
|
+
|
|
85
|
+
Namespaces live at the vault root. Pick a namespace by deciding the SCOPE of the note, not the project.
|
|
86
|
+
|
|
87
|
+
| Namespace | Path (under vault root) | When to write here |
|
|
88
|
+
|---|---|---|
|
|
89
|
+
| **project** | `projects/<projectId>/` | Anything specific to THIS project — design decisions, postmortems, agent-tuning notes, project-local gotchas, daily logs of what happened in this repo |
|
|
90
|
+
| **global** | `global/bizar/` | Anything that applies to Bizar AS A SYSTEM, regardless of project — agent patterns, model-routing rules, CLI conventions, cross-project gotchas that should reach every project you work on |
|
|
91
|
+
| **user** | `users/<userId>/` | Anything that is purely personal — your preferences, your scratch notes, your "things I keep forgetting" |
|
|
92
|
+
|
|
93
|
+
Resolution rule: **memory root = `~/.local/share/bizar/memory/<repoName>/` (or `.obsidian/`) + the namespace you picked**. The `projectId` is the basename of the project root (e.g. `bizar` for `/path/to/bizar`); the `userId` is the OS username.
|
|
94
|
+
|
|
95
|
+
When in doubt, write to **project**. Promote to **global** only when the pattern repeats across another project; demote to **user** only when it's purely personal preference.
|
|
96
|
+
|
|
97
|
+
## How to read vault entries
|
|
98
|
+
|
|
99
|
+
### Via the dashboard REST API (canonical)
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
# List notes under a namespace
|
|
103
|
+
curl -s http://127.0.0.1:4321/api/memory/notes?namespace=projects/bizar | jq
|
|
104
|
+
|
|
105
|
+
# Read a specific note (returns parsed frontmatter + body)
|
|
106
|
+
curl -s http://127.0.0.1:4321/api/memory/notes/projects/bizar/Architecture.md | jq
|
|
107
|
+
|
|
108
|
+
# Full-text search (Markdown content + frontmatter)
|
|
109
|
+
curl -s -X POST http://127.0.0.1:4321/api/memory/search \
|
|
110
|
+
-H 'Content-Type: application/json' \
|
|
111
|
+
-d '{"query":"router ordering","namespace":"projects/bizar"}' | jq
|
|
62
112
|
```
|
|
63
113
|
|
|
64
|
-
|
|
114
|
+
### Via the CLI
|
|
65
115
|
|
|
66
|
-
|
|
116
|
+
```bash
|
|
117
|
+
bizar memory search "router ordering" # full-text search
|
|
118
|
+
bizar memory status # show mode + paths + git status
|
|
119
|
+
bizar memory doctor # health check
|
|
120
|
+
bizar memory log --tail 20 # recent operations log
|
|
121
|
+
bizar memory conflicts # list notes with status=conflict
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Operations
|
|
125
|
+
|
|
126
|
+
- **Open in Obsidian**: `/kb` — opens the project vault in Obsidian (resolves
|
|
127
|
+
from .bizar/memory.json; falls back to printing the path if Obsidian isn't
|
|
128
|
+
installed)
|
|
129
|
+
|
|
130
|
+
### Via direct file read (acceptable for one-off reads)
|
|
67
131
|
|
|
68
|
-
|
|
69
|
-
-
|
|
70
|
-
|
|
71
|
-
|
|
132
|
+
```bash
|
|
133
|
+
# local-only
|
|
134
|
+
cat .obsidian/projects/<projectId>/Architecture.md
|
|
135
|
+
|
|
136
|
+
# managed
|
|
137
|
+
cat ~/.local/share/bizar/memory/bizar-memory/projects/<projectId>/Architecture.md
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Direct reads bypass the dashboard, which is fine for diagnostics. Bypass the dashboard for writes too ONLY in an emergency (CI recovery, hook-driven bots) — always prefer the API for agent-driven writes so the schema, secret scan, and Git sync run.
|
|
141
|
+
|
|
142
|
+
## How to write vault entries
|
|
143
|
+
|
|
144
|
+
### Via the dashboard REST API (canonical)
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
# Write or update a note — the API validates schema, scans for secrets, and
|
|
148
|
+
# runs the sync orchestrator (git commit) if memory.json.git.autoCommit is on.
|
|
149
|
+
curl -s -X POST http://127.0.0.1:4321/api/memory/notes \
|
|
150
|
+
-H 'Content-Type: application/json' \
|
|
151
|
+
-d '{
|
|
152
|
+
"path": "projects/bizar/adr/0001-router-ordering.md",
|
|
153
|
+
"namespace": "projects/bizar",
|
|
154
|
+
"frontmatter": {
|
|
155
|
+
"title": "Router ordering: Forseti before Tier 4/5",
|
|
156
|
+
"type": "architecture_decision",
|
|
157
|
+
"status": "active",
|
|
158
|
+
"confidence": "verified",
|
|
159
|
+
"date": "2026-06-29",
|
|
160
|
+
"tags": ["router", "agents"]
|
|
161
|
+
},
|
|
162
|
+
"body": "## Context\n...\n## Decision\n...\n## Consequences\n..."
|
|
163
|
+
}'
|
|
164
|
+
|
|
165
|
+
# LightRAG reindex — NEVER run during a write. Schedule from the
|
|
166
|
+
# orchestrator or run manually after a batch of writes.
|
|
167
|
+
curl -s -X POST http://127.0.0.1:4321/api/memory/reindex \
|
|
168
|
+
-H 'Content-Type: application/json' \
|
|
169
|
+
-d '{"namespace":"projects/bizar"}'
|
|
170
|
+
```
|
|
72
171
|
|
|
73
|
-
|
|
172
|
+
The rich shape (path, namespace, frontmatter, body) is the canonical write. The legacy `/api/obsidian/notes` endpoint accepts the same body wrapped as `{ content: "<frontmatter + body>", path, namespace }` for back-compat.
|
|
74
173
|
|
|
75
|
-
### Via
|
|
174
|
+
### Via the CLI
|
|
76
175
|
|
|
77
176
|
```bash
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
177
|
+
bizar memory write "<path>" # opens $EDITOR for the body
|
|
178
|
+
bizar memory sync # git add/commit/push the staged notes
|
|
179
|
+
bizar memory commit -m "adr: 0001 router ordering"
|
|
180
|
+
bizar memory pull # fetch + rebase from configured remote
|
|
181
|
+
bizar memory push # push committed notes to remote
|
|
182
|
+
bizar memory reindex # rebuild LightRAG from Markdown (Phase 2)
|
|
183
|
+
bizar memory conflicts # human review surface for status=conflict
|
|
85
184
|
```
|
|
86
185
|
|
|
87
|
-
|
|
186
|
+
## When to read
|
|
187
|
+
|
|
188
|
+
- **At the start of every session** — skim the project namespace's index entries (`index/`, `_index.md`, anything tagged `type: project_index`).
|
|
189
|
+
- **Before any non-trivial implementation decision** — search the relevant namespace for prior art.
|
|
190
|
+
- **When you're about to suggest something the user has already tried** — search before recommending.
|
|
191
|
+
- **When the codebase feels like it's working around something you don't understand** — there's probably a vault entry explaining the why.
|
|
192
|
+
- **When you encounter a `// FIXME` or `// HACK` comment** — there's probably a vault entry explaining it.
|
|
193
|
+
- **Before claiming a pattern is "the Bizar way"** — global namespace might say otherwise.
|
|
194
|
+
|
|
195
|
+
## When to write
|
|
196
|
+
|
|
197
|
+
- **After completing a meaningful piece of work** — what was decided, what was learned, what the consequences were.
|
|
198
|
+
- **On discovering a bug or postmortem** — `type: bug_postmortem` with the root cause, evidence links, and the fix.
|
|
199
|
+
- **When you find a pattern that should be reused** — `type: pattern`, with the rationale and a code snippet.
|
|
200
|
+
- **When the user corrects you** — `type: lesson_learned` with what was wrong, why, and the new rule.
|
|
201
|
+
- **When you make a design decision that should be remembered** — `type: architecture_decision` (the classic ADR format).
|
|
202
|
+
- **When you encode an active rule** that future sessions should follow — `type: active_rule`, and (importantly) also add it to `.bizar/AGENTS_SELF_IMPROVEMENT.md` under "Active Rules" so the orchestrator picks it up before vault lookups.
|
|
203
|
+
|
|
204
|
+
## Write categories (matches the 11 schema `type` values)
|
|
205
|
+
|
|
206
|
+
| type | Use when |
|
|
207
|
+
|---|---|
|
|
208
|
+
| `architecture_decision` | ADR — context, decision, consequences |
|
|
209
|
+
| `pattern` | Reusable approach with code example |
|
|
210
|
+
| `lesson_learned` | A mistake or surprise the next agent should not repeat |
|
|
211
|
+
| `bug_postmortem` | Root-cause analysis of an actual bug, with evidence |
|
|
212
|
+
| `active_rule` | A standing rule for this project (mirror in `.bizar/AGENTS_SELF_IMPROVEMENT.md`) |
|
|
213
|
+
| `agent_memory` | Per-agent history — what THIS agent learned across sessions |
|
|
214
|
+
| `project_index` | Top-level entry points (`Architecture`, `Conventions`, `Entry-Points`) |
|
|
215
|
+
| `reference` | External API docs, tool notes, library gotchas |
|
|
216
|
+
| `workflow` | Multi-step procedure with prerequisites + steps + verification |
|
|
217
|
+
| `note` | Free-form scratch that doesn't fit another category |
|
|
218
|
+
| `adr` | Alias for `architecture_decision` (kept for legacy writers) |
|
|
219
|
+
|
|
220
|
+
## Status values (frontmatter `status`)
|
|
221
|
+
|
|
222
|
+
| status | Meaning | When to use |
|
|
223
|
+
|---|---|---|
|
|
224
|
+
| `active` | Current truth | The note still reflects reality |
|
|
225
|
+
| `draft` | Work in progress | Agent is still thinking; do not auto-commit |
|
|
226
|
+
| `superseded` | Replaced by a newer note | **Always link `superseded_by` to the replacement** |
|
|
227
|
+
| `stale` | Probably outdated | Needs human review — the orchestrator tags these after a `--reindex` heuristic |
|
|
228
|
+
| `conflict` | Two versions disagree | **Requires human resolution** — never auto-resolve |
|
|
229
|
+
| `archived` | Kept for history, not searched | Visible only with explicit namespace filter |
|
|
88
230
|
|
|
89
|
-
|
|
231
|
+
## Confidence values (frontmatter `confidence`)
|
|
90
232
|
|
|
91
|
-
|
|
233
|
+
| confidence | Meaning | Rule |
|
|
234
|
+
|---|---|---|
|
|
235
|
+
| `verified` | Proven with evidence | Always link the evidence file in the note body (`path:line` citation) |
|
|
236
|
+
| `inferred` | Likely true but unproven | Phrase the body as "appears to be" / "based on X, looks like" |
|
|
237
|
+
| `speculative` | Hypothesis to test | Mark with `type: pattern` and a clear "to verify" section |
|
|
238
|
+
|
|
239
|
+
**Prefer `verified`.** A note with no evidence is a hypothesis at best. The schema rejects writes missing required fields for `architecture_decision` and `lesson_learned`.
|
|
240
|
+
|
|
241
|
+
## Conflict handling
|
|
242
|
+
|
|
243
|
+
The service NEVER auto-resolves a conflict. When the same path is written from two sources (e.g. local edit + remote pull that doesn't fast-forward), the orchestrator:
|
|
244
|
+
|
|
245
|
+
1. Renames the incoming version to `<path>.conflict-<timestamp>.md`.
|
|
246
|
+
2. Sets BOTH versions' `status: conflict`.
|
|
247
|
+
3. Exits non-zero so the user can review.
|
|
248
|
+
4. Lists both in `bizar memory conflicts`.
|
|
249
|
+
|
|
250
|
+
Human resolution:
|
|
251
|
+
|
|
252
|
+
1. Read both versions.
|
|
253
|
+
2. Decide which is canonical (usually the more recent or more evidence-backed).
|
|
254
|
+
3. Edit the losing version: `status: superseded`, set `superseded_by: <winning-path>`, add a `## Why this was superseded` section.
|
|
255
|
+
4. `bizar memory sync` to commit the resolution.
|
|
256
|
+
|
|
257
|
+
Never delete a superseded note — history matters.
|
|
258
|
+
|
|
259
|
+
## Secret scanning (commit gate)
|
|
260
|
+
|
|
261
|
+
`bizar memory commit` (and the auto-commit path during a write) runs the secret scanner over the staged Markdown. Severities:
|
|
262
|
+
|
|
263
|
+
- **HIGH** — real API keys, bearer tokens, PEM blocks, password= assignments → **BLOCKS the commit**. Fix the leak first, then commit. Use `.template` files and `.gitignore` for live secrets (see `.bizar/AGENTS_SELF_IMPROVEMENT.md` rule #4 for the token-leak history).
|
|
264
|
+
- **MEDIUM** — credential-like patterns (e.g. `ghp_*` with weak validation), obvious test fixtures that could be mistaken for real keys → warns. Commit proceeds unless `--strict`.
|
|
265
|
+
- **LOW** — possible PII, dev URLs on non-public hosts → informational.
|
|
266
|
+
|
|
267
|
+
Override flags: `--allow-secrets` (HIGH-bypass), `--strict` (LOW-becomes-warning). Never use `--allow-secrets` to ship a real credential — fix the secret in the source, not the gate.
|
|
268
|
+
|
|
269
|
+
## Markdown conventions (Obsidian-flavoured)
|
|
270
|
+
|
|
271
|
+
- **Frontmatter is YAML** between the leading and trailing `---` lines. Required keys depend on `type`; the validator in `memory-schema.mjs` enforces this.
|
|
272
|
+
- **`[[wikilinks]]`** point at note paths relative to the vault root (e.g. `[[projects/bizar/Architecture]]`, not `[[Architecture]]`).
|
|
273
|
+
- **Tag lists** (`tags: [a, b]`) drive search; keep them short and concrete.
|
|
274
|
+
- **Code blocks** with language tags survive parsing — use them for snippets longer than 2 lines.
|
|
275
|
+
- **Callouts** (`> [!note]`, `> [!warning]`) are preserved; use `> [!danger]` for HIGH-severity warnings.
|
|
276
|
+
- **Status emojis** are noise — keep notes emoji-free unless the user has put one in the frontmatter.
|
|
277
|
+
|
|
278
|
+
## Sync model
|
|
279
|
+
|
|
280
|
+
The vault directory is a Git repo. `bizar memory sync` does, in order:
|
|
281
|
+
|
|
282
|
+
1. **Pull** — `git fetch` and `git rebase` from the configured remote (no-op for local-only).
|
|
283
|
+
2. **Schema check** — every staged file is validated by the schema in `memory-schema.mjs`. Bad files become `untracked` until fixed.
|
|
284
|
+
3. **Secret scan** — staged content is scanned; HIGH blocks, MEDIUM warns.
|
|
285
|
+
4. **Stage** — `git add` of all Markdown under the vault root.
|
|
286
|
+
5. **Commit** — `git commit` with `commitMessageTemplate` (default `memory({projectId}): {summary}`).
|
|
287
|
+
6. **Push** — only if `memory.json.git.autoPushOnSessionEnd` is true.
|
|
288
|
+
|
|
289
|
+
`autoCommitOnMemoryWrite` defaults to `false` — writes return success without committing. The user reviews and runs `bizar memory sync` themselves. This is the default for production deployments.
|
|
290
|
+
|
|
291
|
+
## What NOT to write
|
|
92
292
|
|
|
93
|
-
|
|
293
|
+
- **Secrets, API keys, tokens** — the secret scanner blocks them, but defense in depth: never produce them in the first place.
|
|
294
|
+
- **Temporary scratch that won't be useful in 7 days** — keep that in a TODO comment in code, not the vault.
|
|
295
|
+
- **Long code dumps** — link with `path:line` so the note stays a living doc. Two-line snippets are fine.
|
|
296
|
+
- **Anything already obvious from reading the code** — the vault is for things code CAN'T say.
|
|
297
|
+
- **Notes that are already in another namespace** — search before writing to avoid duplicates; if you must mirror, link with `mirror_of: <other-path>`.
|
|
94
298
|
|
|
95
299
|
## See also
|
|
96
300
|
|
|
97
|
-
-
|
|
98
|
-
-
|
|
99
|
-
-
|
|
100
|
-
-
|
|
101
|
-
-
|
|
301
|
+
- `.bizar/AGENTS_SELF_IMPROVEMENT.md` — project-specific active rules (read before vault lookups).
|
|
302
|
+
- `.bizar/PROJECT.md` — stack, conventions, entry points (Vör reads this first).
|
|
303
|
+
- `wiki/Architecture.md` — system-level architecture, including the Memory section.
|
|
304
|
+
- `wiki/Self-Improvement.md` — self-improvement log conventions.
|
|
305
|
+
- `config/skills/glyph/SKILL.md` — graphify knowledge graph (separate from the memory vault).
|
|
306
|
+
- `config/skills/obsidian-skills/SKILL.md` — Obsidian Markdown / Bases / Canvas / CLI (auto-installed by `install.sh` via `skills add kepano/obsidian-skills`).
|
package/install.sh
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
#
|
|
3
3
|
# install.sh — One-shot BizarHarness installer.
|
|
4
4
|
#
|
|
5
|
+
# v4.0.0 — Single-package layout. Dashboard, plugin, and SDK all ship
|
|
6
|
+
# inside @polderlabs/bizar. No more separate npm packages.
|
|
7
|
+
#
|
|
5
8
|
# v3.20.11 — Comprehensive auto-installer with full dependency
|
|
6
9
|
# resolution. Replaces the older "print 4 manual next steps" flow
|
|
7
10
|
# with: (1) install every system dep we can reasonably fetch
|
|
@@ -98,6 +101,16 @@ section "Pre-flight: checking system tools"
|
|
|
98
101
|
have_cmd() { command -v "$1" >/dev/null 2>&1; }
|
|
99
102
|
have_file() { [ -e "$1" ]; }
|
|
100
103
|
|
|
104
|
+
# Pre-populate PATH with the common install locations for opencode + npm
|
|
105
|
+
# so the rest of this script can find them even if the calling shell
|
|
106
|
+
# didn't source ~/.profile first.
|
|
107
|
+
for p in "$HOME/.opencode/bin" "$HOME/.local/npm/bin" "$HOME/.cargo/bin"; do
|
|
108
|
+
case ":$PATH:" in
|
|
109
|
+
*":$p:"*) ;;
|
|
110
|
+
*) [ -d "$p" ] && export PATH="$p:$PATH" ;;
|
|
111
|
+
esac
|
|
112
|
+
done
|
|
113
|
+
|
|
101
114
|
MISSING=()
|
|
102
115
|
have_cmd node || MISSING+=("node")
|
|
103
116
|
have_cmd uv || MISSING+=("uv")
|
|
@@ -359,7 +372,7 @@ section "Install opencode CLI"
|
|
|
359
372
|
if ! have_cmd opencode; then
|
|
360
373
|
echo -e " ${CYAN}→${NC} Installing opencode CLI..."
|
|
361
374
|
if have_cmd curl; then
|
|
362
|
-
if curl -fsSL https://opencode.ai/install
|
|
375
|
+
if curl -fsSL https://opencode.ai/install | sh >/dev/null 2>&1; then
|
|
363
376
|
if have_cmd opencode; then
|
|
364
377
|
note "opencode CLI installed at $(command -v opencode)"
|
|
365
378
|
else
|
|
@@ -375,11 +388,11 @@ else
|
|
|
375
388
|
note "opencode CLI already installed"
|
|
376
389
|
fi
|
|
377
390
|
|
|
378
|
-
# ── npm packages (BizarHarness
|
|
391
|
+
# ── npm packages (BizarHarness — dashboard + plugin + SDK all in one) ──
|
|
379
392
|
section "Install BizarHarness npm packages"
|
|
380
393
|
|
|
381
394
|
if have_cmd npm; then
|
|
382
|
-
for pkg in @polderlabs/bizar
|
|
395
|
+
for pkg in @polderlabs/bizar; do
|
|
383
396
|
if npm ls -g "$pkg" --depth=0 >/dev/null 2>&1; then
|
|
384
397
|
cur=$(npm ls -g "$pkg" --depth=0 --json 2>/dev/null | grep -oE '"version":\s*"[^"]+"' | head -1 | sed 's/.*"\([^"]*\)".*/\1/')
|
|
385
398
|
note "$pkg already installed (v$cur)"
|
|
@@ -519,7 +532,14 @@ for skill in bizar self-improvement cpp-coding-standards cpp-testing embedded-es
|
|
|
519
532
|
mkdir -p "$SKILLS_DIR/$skill"
|
|
520
533
|
case "$skill" in
|
|
521
534
|
obsidian)
|
|
522
|
-
|
|
535
|
+
# v3.24.0 — Prefer the on-disk SKILL.md so the inline copy can't
|
|
536
|
+
# drift. Fall back to an inline heredoc ONLY when the repo source
|
|
537
|
+
# is missing (e.g. someone running install.sh outside a clone).
|
|
538
|
+
if [ -f "$REPO_DIR/config/skills/obsidian/SKILL.md" ]; then
|
|
539
|
+
cp "$REPO_DIR/config/skills/obsidian/SKILL.md" "$SKILLS_DIR/$skill/SKILL.md"
|
|
540
|
+
note "skill: $skill (from repo)"
|
|
541
|
+
else
|
|
542
|
+
cat > "$SKILLS_DIR/$skill/SKILL.md" << 'OBSIDIAN_SKILL'
|
|
523
543
|
---
|
|
524
544
|
name: obsidian
|
|
525
545
|
description: Interact with the Obsidian vault for persistent per-project memory. Use when searching notes, creating notes, writing wikilinks, using callouts, setting properties, or managing the project's obsidian knowledge bank.
|
|
@@ -544,7 +564,8 @@ Per-project persistent memory for Bizar agents. Every project gets its own vault
|
|
|
544
564
|
- Store ADRs under `adr/` prefix
|
|
545
565
|
- Store implementation notes under `notes/` prefix
|
|
546
566
|
OBSIDIAN_SKILL
|
|
547
|
-
|
|
567
|
+
note "skill: $skill (inline)"
|
|
568
|
+
fi
|
|
548
569
|
;;
|
|
549
570
|
glyph)
|
|
550
571
|
cat > "$SKILLS_DIR/$skill/SKILL.md" << 'GLYPH_SKILL'
|
|
@@ -655,6 +676,13 @@ section "Install Bizar opencode plugin"
|
|
|
655
676
|
|
|
656
677
|
PLUGIN_DST="$CONFIG_DIR/plugins/bizar"
|
|
657
678
|
|
|
679
|
+
# v4.0.0: The plugin, dashboard, and SDK are all part of the same
|
|
680
|
+
# @polderlabs/bizar npm package, so there is no separate
|
|
681
|
+
# @polderlabs/bizar-plugin to resolve from the global node_modules.
|
|
682
|
+
# The local-repo copy path is the only one we exercise now; the global
|
|
683
|
+
# fallback is kept for users who still have a legacy install with the
|
|
684
|
+
# old plugin on disk.
|
|
685
|
+
#
|
|
658
686
|
# v3.20.12: two sources, in priority order:
|
|
659
687
|
# 1. Local repo's plugins/bizar/ (for `git clone` users)
|
|
660
688
|
# 2. Globally installed @polderlabs/bizar-plugin (for `npm i -g` users)
|
|
@@ -687,19 +715,11 @@ if [ -n "$PLUGIN_SRC" ]; then
|
|
|
687
715
|
cp "$f" "$PLUGIN_DST/$rel"
|
|
688
716
|
done < <(find "$PLUGIN_SRC" -type f -print0)
|
|
689
717
|
note "plugins/bizar/ copied from $PLUGIN_SRC_KIND"
|
|
690
|
-
|
|
691
|
-
#
|
|
692
|
-
#
|
|
693
|
-
if [ "$PLUGIN_SRC_KIND" != "local repo" ] && [ -d "$PLUGIN_SRC/node_modules" ]; then
|
|
694
|
-
if cp -R "$PLUGIN_SRC/node_modules/." "$PLUGIN_DST/node_modules/" 2>/dev/null; then
|
|
695
|
-
N_PKG=$(find "$PLUGIN_SRC/node_modules" -maxdepth 1 -mindepth 1 -type d 2>/dev/null | wc -l)
|
|
696
|
-
note "node_modules (~$N_PKG packages) bundled with deployed plugin"
|
|
697
|
-
else
|
|
698
|
-
warn "could not copy plugin node_modules (manual: cp -r $PLUGIN_SRC/node_modules $PLUGIN_DST/)"
|
|
699
|
-
fi
|
|
700
|
-
fi
|
|
718
|
+
# v4.0.0: No bundled node_modules copy. The SDK ships inside the same
|
|
719
|
+
# @polderlabs/bizar package, so plugin imports resolve from opencode's
|
|
720
|
+
# own node_modules at runtime.
|
|
701
721
|
else
|
|
702
|
-
warn "Bizar plugin source not found (install @polderlabs/bizar
|
|
722
|
+
warn "Bizar plugin source not found (install @polderlabs/bizar: npm i -g @polderlabs/bizar)"
|
|
703
723
|
fi
|
|
704
724
|
|
|
705
725
|
# ── Merge opencode.json (template + user's existing config) ────────────
|
|
@@ -751,13 +771,34 @@ if [ -n "$TEMPLATE" ]; then
|
|
|
751
771
|
fi
|
|
752
772
|
fi
|
|
753
773
|
|
|
774
|
+
# ── Bootstrap Bizar Memory Service ───────────────────────────────────
|
|
775
|
+
section "Bootstrap Bizar Memory Service"
|
|
776
|
+
|
|
777
|
+
if have_cmd node; then
|
|
778
|
+
MEMORY_REPO_NAME="${BIZAR_MEMORY_REPO_NAME:-bizar-memory}"
|
|
779
|
+
note "initializing local memory vault"
|
|
780
|
+
if node "$REPO_DIR/cli/bin.mjs" memory init \
|
|
781
|
+
--memory-mode managed \
|
|
782
|
+
--memory-repo-name "$MEMORY_REPO_NAME" \
|
|
783
|
+
--yes 2>/dev/null; then
|
|
784
|
+
note "memory service ready (mode: managed, repo: ~/.local/share/bizar/memory/$MEMORY_REPO_NAME)"
|
|
785
|
+
note "next steps:"
|
|
786
|
+
note " bizar memory status # check vault + git state"
|
|
787
|
+
note " bizar memory sync # pull, validate, scan, commit, push"
|
|
788
|
+
note " bizar memory doctor # health check"
|
|
789
|
+
else
|
|
790
|
+
warn "memory init skipped (run 'bizar memory init' manually later)"
|
|
791
|
+
fi
|
|
792
|
+
else
|
|
793
|
+
warn "node not on PATH — skipping memory service bootstrap"
|
|
794
|
+
fi
|
|
795
|
+
|
|
754
796
|
# ── Write install-state.json (used by `bizar update` for migrations) ───
|
|
755
797
|
section "Write install-state"
|
|
756
798
|
|
|
757
799
|
mkdir -p "$BIZAR_STATE_DIR"
|
|
758
800
|
BH_VERSION=$(browser-harness --version 2>/dev/null | head -1 | sed 's/[^0-9.]//g' || echo "")
|
|
759
801
|
BIZAR_VERSION=$(npm ls -g @polderlabs/bizar --depth=0 --json 2>/dev/null | grep -oE '"@polderlabs/bizar":\s*\{[^}]*"version":\s*"[^"]+"' | grep -oE '"version":\s*"[^"]+"' | grep -oE '"[^"]+"' | tail -1 | tr -d '"' || echo "")
|
|
760
|
-
DASH_VERSION=$(npm ls -g @polderlabs/bizar-dash --depth=0 --json 2>/dev/null | grep -oE '"@polderlabs/bizar-dash":\s*\{[^}]*"version":\s*"[^"]+"' | grep -oE '"version":\s*"[^"]+"' | grep -oE '"[^"]+"' | tail -1 | tr -d '"' || echo "")
|
|
761
802
|
PY_VERSION=$("$PYTHON_BIN" --version 2>/dev/null | head -1 | sed 's/[^0-9.]//g' || echo "")
|
|
762
803
|
UV_VERSION=$(uv --version 2>/dev/null | head -1 | sed 's/[^0-9.]//g' || echo "")
|
|
763
804
|
JQ_VERSION=$(jq --version 2>/dev/null | sed 's/[^0-9.]//g' || echo "")
|
|
@@ -767,7 +808,6 @@ STATE_JSON=$(cat <<JSON
|
|
|
767
808
|
"installedAt": "$(date -u +%Y-%m-%dT%H:%M:%SZ 2>/dev/null || date -u +%Y-%m-%dT%H:%M:%S.%NZ | sed 's/\.[0-9]*//')",
|
|
768
809
|
"components": {
|
|
769
810
|
"bizar": "${BIZAR_VERSION:-unknown}",
|
|
770
|
-
"bizar-dash": "${DASH_VERSION:-unknown}",
|
|
771
811
|
"browser-harness": "${BH_VERSION:-unknown}",
|
|
772
812
|
"uv": "${UV_VERSION:-unknown}",
|
|
773
813
|
"python3.12": "${PY_VERSION:-unknown}",
|
package/package.json
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@polderlabs/bizar",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Norse-pantheon multi-agent system for opencode — 13 agents across 4 cost tiers with cost-aware routing, plans, and a configurable agent harness.",
|
|
3
|
+
"version": "4.2.0",
|
|
4
|
+
"description": "Norse-pantheon multi-agent system for opencode — 13 agents across 4 cost tiers with cost-aware routing, plans, and a configurable agent harness. v4 ships as a single npm package bundling the dashboard server, opencode plugin, and typed SDK.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"bizar": "cli/bin.mjs"
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
10
|
"cli/",
|
|
11
|
+
"bizar-dash/",
|
|
12
|
+
"plugins/",
|
|
13
|
+
"packages/sdk/",
|
|
11
14
|
"config/",
|
|
12
15
|
"templates/",
|
|
13
16
|
"install.sh",
|
|
14
17
|
"cli/browser-harness-up.sh"
|
|
15
18
|
],
|
|
16
|
-
"workspaces": [
|
|
17
|
-
"packages/*"
|
|
18
|
-
],
|
|
19
19
|
"scripts": {
|
|
20
20
|
"typecheck": "tsc --noEmit",
|
|
21
|
-
"build:sdk": "
|
|
22
|
-
"test:sdk": "npm
|
|
23
|
-
"test:sdk:watch": "npm run test:watch
|
|
24
|
-
"test": "npm run typecheck && npm run test:sdk &&
|
|
21
|
+
"build:sdk": "tsc -p packages/sdk/tsconfig.json",
|
|
22
|
+
"test:sdk": "npm test --prefix packages/sdk",
|
|
23
|
+
"test:sdk:watch": "npm run test:watch --prefix packages/sdk",
|
|
24
|
+
"test": "npm run typecheck && npm run test:sdk && bun test plugins/bizar/tests/loop.test.ts plugins/bizar/tests/block.test.ts plugins/bizar/tests/stall-think.test.ts plugins/bizar/tests/tools/bg-get-comments.test.ts plugins/bizar/tests/tools/bg-spawn-delegation.test.ts plugins/bizar/tests/tools/opencode-runner.test.ts plugins/bizar/tests/settings.test.ts plugins/bizar/tests/commands.test.ts plugins/bizar/tests/commands-impl.test.ts plugins/bizar/tests/tools/plan-action.test.ts plugins/bizar/tests/tools/wait-for-feedback.test.ts plugins/bizar/tests/tools/read-glyph-feedback.test.ts plugins/bizar/tests/reasoning-clean.test.ts plugins/bizar/tests/key-rotation.test.ts && node bizar-dash/tests/smoke-v2.mjs && node --test bizar-dash/tests/path-safe.test.mjs bizar-dash/tests/tmux-wrap.test.mjs bizar-dash/tests/opencode-runner.test.mjs bizar-dash/tests/mod-instructions.node.test.mjs bizar-dash/tests/mod-upgrade.node.test.mjs bizar-dash/tests/graphify-mod-spawn.node.test.mjs bizar-dash/tests/no-agent-browser.node.test.mjs bizar-dash/tests/providers-store-backup-keys.node.test.mjs bizar-dash/tests/dashboard-ports.test.mjs bizar-dash/tests/submit-feedback.test.mjs bizar-dash/tests/yaml.test.mjs bizar-dash/tests/memory-store.test.mjs bizar-dash/tests/memory-schema.test.mjs bizar-dash/tests/memory-secrets.test.mjs bizar-dash/tests/memory-git.test.mjs bizar-dash/tests/memory-sync.test.mjs bizar-dash/tests/obsidian-back-compat.test.mjs bizar-dash/tests/memory-lightrag.test.mjs bizar-dash/tests/memory-config.test.mjs bizar-dash/tests/memory-cli.test.mjs",
|
|
25
25
|
"build": "npm run build:sdk"
|
|
26
26
|
},
|
|
27
27
|
"keywords": [
|
|
@@ -36,22 +36,57 @@
|
|
|
36
36
|
"schedules"
|
|
37
37
|
],
|
|
38
38
|
"license": "MIT",
|
|
39
|
+
"engines": {
|
|
40
|
+
"node": ">=18",
|
|
41
|
+
"bun": ">=1.1.0"
|
|
42
|
+
},
|
|
39
43
|
"dependencies": {
|
|
44
|
+
"@mdx-js/mdx": "^3.1.1",
|
|
45
|
+
"@mdx-js/react": "^3.1.1",
|
|
46
|
+
"@xyflow/react": "^12.11.1",
|
|
47
|
+
"better-sqlite3": "^12.11.1",
|
|
48
|
+
"blessed": "^0.1.81",
|
|
40
49
|
"boxen": "^8.0.0",
|
|
41
50
|
"chalk": "^5.4.0",
|
|
51
|
+
"chokidar": "^3.6.0",
|
|
52
|
+
"cors": "^2.8.6",
|
|
53
|
+
"croner": "^10.0.1",
|
|
54
|
+
"express": "^4.22.0",
|
|
55
|
+
"fuse.js": "^7.0.0",
|
|
42
56
|
"inquirer": "^12.0.0",
|
|
43
|
-
"
|
|
57
|
+
"lucide-react": "^0.460.0",
|
|
58
|
+
"ora": "^8.1.0",
|
|
59
|
+
"qrcode-terminal": "^0.12.0",
|
|
60
|
+
"qrcode.react": "^4.2.0",
|
|
61
|
+
"react": "^18.3.0",
|
|
62
|
+
"react-dom": "^18.3.0",
|
|
63
|
+
"react-markdown": "^9.0.0",
|
|
64
|
+
"remark-gfm": "^4.0.0",
|
|
65
|
+
"ws": "^8.18.0",
|
|
66
|
+
"zod": "4.1.8"
|
|
44
67
|
},
|
|
45
68
|
"peerDependencies": {
|
|
46
|
-
"@
|
|
69
|
+
"@opencode-ai/plugin": ">=1.17.0"
|
|
47
70
|
},
|
|
48
71
|
"peerDependenciesMeta": {
|
|
49
|
-
"@
|
|
72
|
+
"@opencode-ai/plugin": {
|
|
50
73
|
"optional": true
|
|
51
74
|
}
|
|
52
75
|
},
|
|
53
76
|
"devDependencies": {
|
|
54
|
-
"
|
|
77
|
+
"@opencode-ai/plugin": "^1.17.7",
|
|
78
|
+
"@types/better-sqlite3": "^7.6.13",
|
|
79
|
+
"@types/bun": "latest",
|
|
80
|
+
"@types/node": "^22.0.0",
|
|
81
|
+
"@types/react": "^18.3.0",
|
|
82
|
+
"@types/react-dom": "^18.3.0",
|
|
83
|
+
"@vitejs/plugin-react": "^4.3.0",
|
|
84
|
+
"typescript": "^5.6.0",
|
|
85
|
+
"vite": "^5.0.0",
|
|
86
|
+
"vitest": "^2.1.0"
|
|
87
|
+
},
|
|
88
|
+
"allowScripts": {
|
|
89
|
+
"better-sqlite3@12.11.1": true
|
|
55
90
|
},
|
|
56
91
|
"repository": {
|
|
57
92
|
"type": "git",
|
|
@@ -61,4 +96,4 @@
|
|
|
61
96
|
"url": "https://github.com/DrB0rk/BizarHarness/issues"
|
|
62
97
|
},
|
|
63
98
|
"homepage": "https://github.com/DrB0rk/BizarHarness#readme"
|
|
64
|
-
}
|
|
99
|
+
}
|