@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
package/cli/service.mjs
CHANGED
|
@@ -199,14 +199,13 @@ async function daemonLoop() {
|
|
|
199
199
|
}
|
|
200
200
|
logLine(`service started (pid ${process.pid})`);
|
|
201
201
|
|
|
202
|
-
// Resolve the runner module.
|
|
203
|
-
//
|
|
204
|
-
//
|
|
205
|
-
// locally, or alongside the source tree (development).
|
|
202
|
+
// Resolve the runner module. v4.0.0: the dashboard ships inside this package.
|
|
203
|
+
// We keep legacy fallbacks for users who still have @polderlabs/bizar-dash
|
|
204
|
+
// installed globally.
|
|
206
205
|
const candidates = [
|
|
207
|
-
//
|
|
206
|
+
// v4.0.0 primary: <repo>/bizar-dash/src/server/schedules-runner.mjs
|
|
208
207
|
join(__dirname, '..', 'bizar-dash', 'src', 'server', 'schedules-runner.mjs'),
|
|
209
|
-
//
|
|
208
|
+
// Legacy fallbacks — users with @polderlabs/bizar-dash still installed:
|
|
210
209
|
join(HOME, '.npm-global', 'lib', 'node_modules', '@polderlabs', 'bizar-dash', 'src', 'server', 'schedules-runner.mjs'),
|
|
211
210
|
];
|
|
212
211
|
// Probe $PWD and global node_modules
|
package/cli/utils.mjs
CHANGED
|
@@ -94,10 +94,13 @@ export async function detectOpenCode() {
|
|
|
94
94
|
return { exists, version, configDir, agentsDir };
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
export async function
|
|
98
|
-
return commandExists('
|
|
97
|
+
export async function detectHeadroom() {
|
|
98
|
+
return commandExists('headroom');
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
+
// Alias for backward-compat during migration
|
|
102
|
+
export const detectRtk = detectHeadroom;
|
|
103
|
+
|
|
101
104
|
export async function detectSemble() {
|
|
102
105
|
if (commandExists('semble')) {
|
|
103
106
|
return true;
|
|
@@ -138,7 +141,7 @@ export function buildSummary(components, agents, target, skillPacks = []) {
|
|
|
138
141
|
if (components.includes('rules')) parts.push('rules');
|
|
139
142
|
if (components.includes('hooks')) parts.push('hooks');
|
|
140
143
|
if (components.includes('commands')) parts.push('commands');
|
|
141
|
-
parts.push('
|
|
144
|
+
parts.push('Headroom');
|
|
142
145
|
parts.push('Semble');
|
|
143
146
|
parts.push('Skills CLI');
|
|
144
147
|
if (skillPacks.length > 0) parts.push(`skills: ${skillPacks.join(', ')}`);
|
package/config/AGENTS.md
CHANGED
|
@@ -118,7 +118,7 @@ For agents with `reasoning: true` + `variant: "high"`, follow `rules/thinking.md
|
|
|
118
118
|
|
|
119
119
|
### Research-Loop Rule
|
|
120
120
|
|
|
121
|
-
Follow `rules/uncertainty.md` strictly. When uncertain or stuck, the next move is a research tool call (`websearch` for outside-the-repo facts, `webfetch` for official docs, `semble search` for codebase patterns, `
|
|
121
|
+
Follow `rules/uncertainty.md` strictly. When uncertain or stuck, the next move is a research tool call (`websearch` for outside-the-repo facts, `webfetch` for official docs, `semble search` for codebase patterns, `bizar memory search` for project memory) — not a third variation of the same edit. If you catch yourself about to retry the same failed command with slightly different arguments, stop and search first. The plugin's loop-guard (`loopThresholdWarn: 5`) is the safety net; self-correct at attempt 2.
|
|
122
122
|
|
|
123
123
|
---
|
|
124
124
|
|
|
@@ -209,7 +209,7 @@ Odin (`@odin`) is the All-Father and primary/default agent. He analyzes each req
|
|
|
209
209
|
|
|
210
210
|
Odin dispatches all tasks to subagents via the `task` tool. When work items are **independent**, he launches them as **parallel `task` calls in a single message**.
|
|
211
211
|
|
|
212
|
-
**Before dispatching any task, Odin
|
|
212
|
+
**Before dispatching any task, Odin runs `bizar memory status` to confirm the vault is reachable.** No `bank_id` is needed — `bizar memory status` resolves everything from the project root.
|
|
213
213
|
|
|
214
214
|
| Task Type | Route To |
|
|
215
215
|
|-----------|----------|
|
|
@@ -303,7 +303,7 @@ This section is the single source of truth for every Bizar agent's behavior. It
|
|
|
303
303
|
> | `ask_user_input_v0` | Bizar has a `question` tool — same shape, single high-value question |
|
|
304
304
|
> | `skill` | `skill` — load a SKILL.md from `~/.opencode/skills/<name>/` or installed equivalent |
|
|
305
305
|
> | `task` (subagent dispatch) | `task` — same — used by Odin to dispatch subagents |
|
|
306
|
-
> | MCP servers | `semble` (codebase search)
|
|
306
|
+
> | MCP servers | `semble` (codebase search) and any user-added servers in `config/opencode.json` |
|
|
307
307
|
|
|
308
308
|
### Simplicity Rule — do not overcomplicate
|
|
309
309
|
|
|
@@ -387,7 +387,7 @@ This section is the single source of truth for every Bizar agent's behavior. It
|
|
|
387
387
|
- Bizar does not have a single knowledge cutoff shared by all models. Subagents may run on DeepSeek V4 Flash, MiniMax M2.7 / M3, or GPT-5.5, each with their own training window.
|
|
388
388
|
- For facts that change quickly (current positions, prices, breaking news) or anything that could have changed recently, **search before answering**: use `websearch` and `webfetch` or delegate to `@mimir` for deep research.
|
|
389
389
|
- For stable technical knowledge (language semantics, well-established APIs, mathematical truths), answer directly without search.
|
|
390
|
-
- Default to
|
|
390
|
+
- Default to running `bizar memory search "<topic>"` at session start to retrieve prior project context before answering anything project-specific.
|
|
391
391
|
- When formulating date-sensitive queries, use the actual current date (Bizar's opencode environment provides this). Do not hardcode years.
|
|
392
392
|
- Do not over-rely on memory; if uncertain, search. Confabulating costs the user more than searching.
|
|
393
393
|
|
|
@@ -398,7 +398,7 @@ Bizar can connect to external tools via MCP servers. Always check what's connect
|
|
|
398
398
|
#### Always-on MCP servers
|
|
399
399
|
|
|
400
400
|
- `semble` — local codebase search. Use `semble search "<query>"` for natural-language and keyword queries against the active repo. Faster and more token-efficient than `grep` / `read`.
|
|
401
|
-
- `
|
|
401
|
+
- `bizar memory` CLI — project memory. Run `bizar memory search "<query>"` to find prior context; `bizar memory status` to resolve the vault path. No MCP server needed — agents have `bash: allow`.
|
|
402
402
|
|
|
403
403
|
#### Domain skills
|
|
404
404
|
|
|
@@ -482,7 +482,7 @@ Use `websearch` and `webfetch` for current information you don't have or that ma
|
|
|
482
482
|
**Core search behaviors:**
|
|
483
483
|
1. Search for fast-changing info (stock prices, breaking news, current holders of public positions). Don't search for timeless technical facts.
|
|
484
484
|
2. Scale tool calls to query complexity: 1 for single facts; 3–5 for medium; 5–10 for deeper research; 20+ should be delegated to `@mimir`.
|
|
485
|
-
3. Use internal data tools (
|
|
485
|
+
3. Use internal data tools (`bizar memory` for project memory, Semble for code) **before** `websearch` when working on the user's own projects.
|
|
486
486
|
|
|
487
487
|
**How to search:**
|
|
488
488
|
- Keep queries concise (1–6 words) and start broad.
|
|
@@ -532,7 +532,7 @@ For Bizar-internal claims (citing files, lines, tool results), use file:line ref
|
|
|
532
532
|
|
|
533
533
|
### memory_privacy_and_user_data
|
|
534
534
|
|
|
535
|
-
- Use persistent memory (`
|
|
535
|
+
- Use persistent memory (via `bizar memory write`) only when the information is stable, useful, and not sensitive unless explicitly requested.
|
|
536
536
|
- Do not store trivial, short-lived, or unnecessarily personal information.
|
|
537
537
|
- Handle user data conservatively.
|
|
538
538
|
- Do not expose private emails, files, contacts, credentials, tokens, or internal documents unless requested and permitted.
|
|
@@ -188,7 +188,7 @@ These rules apply whenever the <mod-id> mod is enabled.
|
|
|
188
188
|
### Rules You Must Follow
|
|
189
189
|
|
|
190
190
|
1. **Mod instructions are binding.** When a mod is installed, treat its `INSTRUCTIONS.md` and `agents/*.md` files as higher-priority than this baseline — unless `modPriority: augment`, in which case both apply.
|
|
191
|
-
2. **Check
|
|
191
|
+
2. **Check project memory and `.opencode/skills/` at session start.** Run `bizar memory search "active_rules"` to find standing rules. If a mod-installed skill is listed in `.opencode/skills/`, you have its rules.
|
|
192
192
|
3. **Never copy or modify mod-installed files.** They are owned by the mod. To change a mod's behavior, file an issue or PR upstream; do not patch `~/.config/opencode/agents/<mod-id>__*.md` in place.
|
|
193
193
|
4. **Mod-installed agent files are not subagents.** They are rules loaded into existing agents. You do not dispatch to `<mod-id>__*`; you follow them inside the agent whose scope they target.
|
|
194
194
|
5. **If a mod instruction conflicts with the user**, the user's explicit instruction wins — but you must surface the conflict ("The <mod-name> mod says X, but you asked Y. Proceeding with Y.") before proceeding. Do not silently override.
|
|
@@ -215,37 +215,38 @@ At session start:
|
|
|
215
215
|
|
|
216
216
|
---
|
|
217
217
|
|
|
218
|
-
## 5.
|
|
218
|
+
## 5. Project Memory Vault (Long-Term Knowledge)
|
|
219
219
|
|
|
220
|
-
|
|
220
|
+
**⚠️ MANDATORY.** Run this before starting any other action in a new session.
|
|
221
|
+
|
|
222
|
+
Bizar stores long-term memory in a **project memory vault** — Markdown files managed via the `bizar memory` CLI. Run `bizar memory status` from the project root to get the resolved path (usually `~/.local/share/bizar/memory/<repoName>/` or `projects/<projectId>/` under it). The vault uses three namespaces: `projects/<projectId>/` (project-specific), `global/bizar/` (cross-project conventions), and `users/<userId>/` (personal preferences).
|
|
221
223
|
|
|
222
224
|
### Session Start
|
|
223
225
|
|
|
224
|
-
1.
|
|
225
|
-
2. Read
|
|
226
|
-
3. Read the most recent
|
|
227
|
-
4. If a relevant
|
|
226
|
+
1. Run `bizar memory search "<topic>"` to find relevant prior context.
|
|
227
|
+
2. Read project-level index entries: `bizar memory search "project_index"` or browse notes with `bizar memory list`.
|
|
228
|
+
3. Read the most recent session summaries: `bizar memory search "session_summary"`.
|
|
229
|
+
4. If a relevant decision note exists, read it by path with `cat <vault-path>/projects/<projectId>/decisions/<name>.md`.
|
|
228
230
|
|
|
229
231
|
### During Work
|
|
230
232
|
|
|
231
|
-
-
|
|
232
|
-
- When you make a non-obvious decision, capture it
|
|
233
|
-
- Use `[[wikilinks]]` to cross-link related concepts.
|
|
233
|
+
- Write durable findings with `bizar memory write <relpath> --type <type> --tag <tag> --body "..."`.
|
|
234
|
+
- When you make a non-obvious decision, capture it as `type: architecture_decision`.
|
|
235
|
+
- Use `[[wikilinks]]` to cross-link related concepts (vault-root-relative, e.g. `[[projects/<projectId>/Architecture]]`).
|
|
234
236
|
|
|
235
237
|
### Task Completion
|
|
236
238
|
|
|
237
|
-
-
|
|
238
|
-
-
|
|
239
|
-
- For sustained project context, write or update `.obsidian/projects/<name>.md`.
|
|
239
|
+
- Write a session summary: `bizar memory write sessions/<today>.md --type session_summary --status active --body "..."`.
|
|
240
|
+
- Run `bizar memory sync` to commit and push (if shared vault).
|
|
240
241
|
|
|
241
242
|
### Search the Vault
|
|
242
243
|
|
|
243
|
-
- `
|
|
244
|
-
-
|
|
244
|
+
- `bizar memory search "<query>"` — full-text search across the vault.
|
|
245
|
+
- `semble search "<query>" --content docs --content all` also covers vault Markdown.
|
|
245
246
|
|
|
246
247
|
### Privacy and Scope
|
|
247
248
|
|
|
248
|
-
- Use
|
|
249
|
+
- Use the memory vault only for stable, useful, non-sensitive information.
|
|
249
250
|
- Do not store trivial, short-lived, or unnecessary personal information.
|
|
250
251
|
- Do not expose private emails, credentials, tokens, or internal documents unless requested and permitted.
|
|
251
252
|
|
|
@@ -387,7 +388,7 @@ The following rules apply to every agent at all times. They are the single sourc
|
|
|
387
388
|
- Bizar does not have a single knowledge cutoff shared by all models. Subagents may run on DeepSeek V4 Flash (opencode-zen, free tier) or MiniMax M2.7 / M3, each with their own training window.
|
|
388
389
|
- For facts that change quickly (current positions, prices, breaking news) or anything that could have changed recently, **search before answering**: use `websearch` and `webfetch` or delegate to `@mimir` for deep research.
|
|
389
390
|
- For stable technical knowledge (language semantics, well-established APIs, mathematical truths), answer directly without search.
|
|
390
|
-
- Default to
|
|
391
|
+
- Default to running `bizar memory search "<topic>"` at session start to retrieve prior project context before answering anything project-specific.
|
|
391
392
|
- When formulating date-sensitive queries, use the actual current date (Bizar's opencode environment provides this). Do not hardcode years.
|
|
392
393
|
- Do not over-rely on memory; if uncertain, search. Confabulating costs the user more than searching.
|
|
393
394
|
|
|
@@ -398,7 +399,7 @@ Bizar can connect to external tools via MCP servers. Always check what's connect
|
|
|
398
399
|
**Always-on MCP servers:**
|
|
399
400
|
|
|
400
401
|
- `semble` — local codebase search. Use `semble search "<query>"` for natural-language and keyword queries against the active repo. Faster and more token-efficient than `grep` / `read`.
|
|
401
|
-
-
|
|
402
|
+
- Project memory — long-term knowledge. Use `bizar memory search "<query>"` to find prior context; `bizar memory status` to resolve the vault path.
|
|
402
403
|
|
|
403
404
|
**Domain skills:** see section 3 above.
|
|
404
405
|
|
|
@@ -619,67 +620,64 @@ Rules:
|
|
|
619
620
|
|
|
620
621
|
---
|
|
621
622
|
|
|
622
|
-
## 12.
|
|
623
|
+
## 12. Project Memory — Knowledge Is Your First Stop
|
|
624
|
+
|
|
625
|
+
**⚠️ MANDATORY protocol — agents that start work without reading project memory first are likely to contradict existing decisions.**
|
|
623
626
|
|
|
624
|
-
**Project knowledge lives in
|
|
627
|
+
**Project knowledge lives in the memory vault. Read it before you start, write to it when you learn.**
|
|
625
628
|
|
|
626
|
-
|
|
629
|
+
The memory vault uses three namespaces: `projects/<projectId>/` (project-specific), `global/bizar/` (cross-project), and `users/<userId>/` (personal). Run `bizar memory status` from the project root to see the active mode and resolved path. 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.**
|
|
627
630
|
|
|
628
631
|
**When to read:**
|
|
629
|
-
- At the start of every session
|
|
630
|
-
- Before any non-trivial implementation decision
|
|
631
|
-
- When you're about to suggest something the user has already tried
|
|
632
|
-
- When the codebase feels like it's working around something you don't understand
|
|
632
|
+
- At the start of every session: `bizar memory search "<topic>"` for relevant notes.
|
|
633
|
+
- Before any non-trivial implementation decision: check for ADRs or design notes.
|
|
634
|
+
- When you're about to suggest something the user has already tried.
|
|
635
|
+
- When the codebase feels like it's working around something you don't understand.
|
|
633
636
|
|
|
634
637
|
**When to write:**
|
|
635
|
-
- After completing a meaningful piece of work
|
|
636
|
-
- On discovering a bug or postmortem
|
|
637
|
-
- When you find a pattern that should be reused
|
|
638
|
-
- When the user corrects you
|
|
639
|
-
- When you make a design decision
|
|
640
|
-
|
|
641
|
-
**What to write:**
|
|
642
|
-
- Date-stamped entry under the appropriate category (`index/`, `bugs/`, `agents/<name>/`, etc.)
|
|
643
|
-
- The context: what was happening
|
|
644
|
-
- The lesson: what you learned
|
|
645
|
-
- The pattern: what to do next time
|
|
646
|
-
- Link to related entries with `[[wikilinks]]`
|
|
638
|
+
- After completing a meaningful piece of work — `bizar memory write <relpath> --type session_summary --body "..."`.
|
|
639
|
+
- On discovering a bug or postmortem — `bizar memory write bugs/<bug.md> --type bug_postmortem --body "..."`.
|
|
640
|
+
- When you find a pattern that should be reused — `bizar memory write patterns/<name.md> --type pattern --body "..."`.
|
|
641
|
+
- When the user corrects you — `bizar memory write lessons/<topic.md> --type lesson_learned --body "..."`.
|
|
642
|
+
- When you make a design decision — `bizar memory write decisions/<topic.md> --type architecture_decision --body "..."`.
|
|
647
643
|
|
|
648
644
|
**What NOT to write:**
|
|
649
|
-
- Secrets, API keys, tokens (
|
|
650
|
-
- Temporary scratch
|
|
651
|
-
- Anything already obvious from reading the code
|
|
645
|
+
- Secrets, API keys, tokens (the secret scanner blocks these).
|
|
646
|
+
- Temporary scratch that won't be useful in 7 days.
|
|
647
|
+
- Anything already obvious from reading the code.
|
|
648
|
+
|
|
649
|
+
**CLI reference:**
|
|
650
|
+
- `bizar memory search <query>` — full-text search
|
|
651
|
+
- `bizar memory write <relpath> --type <type> --status active --confidence verified --tag <tag> --body "<body>"` — write a note
|
|
652
|
+
- `bizar memory status` — show mode + paths + git status
|
|
653
|
+
- `bizar memory sync` — commit and push staged notes
|
|
654
|
+
- `bizar memory doctor` — health check
|
|
652
655
|
|
|
653
|
-
|
|
656
|
+
The `<relpath>` is relative to the project namespace (e.g. `decisions/0001-router-ordering.md`, NOT `projects/<projectId>/decisions/...`).
|
|
654
657
|
|
|
655
|
-
## 13. New Sessions Must Bootstrap Context from
|
|
658
|
+
## 13. New Sessions Must Bootstrap Context from Memory + Graphify
|
|
659
|
+
|
|
660
|
+
**⚠️ ENFORCED** — see `config/skills/memory-protocol/SKILL.md` for the full protocol. Drift-prevention test (`bizar-dash/tests/memory-protocol-drift.test.mjs`) fails CI if the ⚠️ framing or the bootstrap commands are removed.
|
|
656
661
|
|
|
657
662
|
**Every new agent session starts blind. Before answering the user or doing any work, gather context from the project's two project-knowledge stores.**
|
|
658
663
|
|
|
659
|
-
Both stores are git-tracked (
|
|
664
|
+
Both stores are git-tracked (the memory vault, `.bizar/graph/`) and require no setup. Find the vault path with `bizar memory status`. The first minute of context-gathering saves an hour of wrong-direction work.
|
|
660
665
|
|
|
661
666
|
**At the start of EVERY new session, do this in order:**
|
|
662
667
|
|
|
663
|
-
1. **
|
|
664
|
-
- `
|
|
665
|
-
- `
|
|
666
|
-
- `
|
|
667
|
-
-
|
|
668
|
-
- `Patterns.md`, `Tools.md`, `Workflows.md` — only if relevant to the current task
|
|
669
|
-
- Any `daily/` entries from the past week — what was being worked on
|
|
668
|
+
1. **Search the memory vault** for the task topic:
|
|
669
|
+
- `bizar memory search "architecture"` — system structure and conventions
|
|
670
|
+
- `bizar memory search "project_index"` — high-level description and entry points
|
|
671
|
+
- `bizar memory search "session_summary"` — recent session summaries
|
|
672
|
+
- Read specific notes by path: `cat <vault-path>/projects/<projectId>/<relpath>`
|
|
670
673
|
|
|
671
674
|
2. **Check the Graphify graph** at `.bizar/graph/` (if the graphify mod is installed):
|
|
672
675
|
- `bizar graph query "<concept>"` — for cross-module code questions
|
|
673
676
|
- `bizar graph path <A> <B>` — for dependency tracing
|
|
674
677
|
- `bizar graph explain <file>` — for understanding an unfamiliar file
|
|
675
678
|
|
|
676
|
-
3. **
|
|
677
|
-
|
|
678
|
-
- Anything the user previously corrected you on
|
|
679
|
-
|
|
680
|
-
4. **Skim recent context** at `.obsidian/daily/`:
|
|
681
|
-
- Last 3-7 days of running log entries
|
|
682
|
-
- What was in flight when the last session ended
|
|
679
|
+
3. **Search agent-specific memory** — use `bizar memory search "<agent-name>"` to find per-agent notes.
|
|
680
|
+
4. **Skim recent session summaries** — `bizar memory search "session_summary"` and read the most relevant ones.
|
|
683
681
|
|
|
684
682
|
**When to re-bootstrap mid-session:**
|
|
685
683
|
|
|
@@ -690,9 +688,9 @@ Both stores are git-tracked (`.obsidian/`, `.bizar/graph/`) and require no setup
|
|
|
690
688
|
|
|
691
689
|
**Anti-patterns:**
|
|
692
690
|
|
|
693
|
-
- Don't ask the user "what is this project about?" —
|
|
691
|
+
- Don't ask the user "what is this project about?" — search the memory vault
|
|
694
692
|
- Don't re-read the source tree top-to-bottom to get context — query the graph
|
|
695
|
-
- Don't repeat work that was done in a previous session —
|
|
696
|
-
- Don't make assumptions about the user's preferences —
|
|
693
|
+
- Don't repeat work that was done in a previous session — session summaries have the outcome
|
|
694
|
+
- Don't make assumptions about the user's preferences — search the vault and agent memory
|
|
697
695
|
|
|
698
|
-
**The bootstrap is mandatory, not optional. A session that starts without checking
|
|
696
|
+
**The bootstrap is mandatory, not optional. A session that starts without checking Memory + Graphify is a session that's likely to suggest things the user already tried, break things that were already fixed, or contradict decisions that were already made.**
|
package/config/opencode.json
CHANGED
|
@@ -47,7 +47,8 @@
|
|
|
47
47
|
"bizar_spawn_background": true,
|
|
48
48
|
"bizar_status": true,
|
|
49
49
|
"bizar_collect": true,
|
|
50
|
-
"bizar_kill": true
|
|
50
|
+
"bizar_kill": true,
|
|
51
|
+
"bizar_open_kb": true
|
|
51
52
|
},
|
|
52
53
|
"agent": {
|
|
53
54
|
"odin": {
|
|
@@ -61,11 +62,7 @@
|
|
|
61
62
|
"list": "allow",
|
|
62
63
|
"todowrite": "allow",
|
|
63
64
|
"webfetch": "allow",
|
|
64
|
-
"websearch": "allow"
|
|
65
|
-
"hindsight_recall": "allow",
|
|
66
|
-
"hindsight_retain": "allow",
|
|
67
|
-
"hindsight_list_banks": "allow",
|
|
68
|
-
"hindsight_create_bank": "allow"
|
|
65
|
+
"websearch": "allow"
|
|
69
66
|
}
|
|
70
67
|
},
|
|
71
68
|
"vor": {
|
|
@@ -76,9 +73,7 @@
|
|
|
76
73
|
"permission": {
|
|
77
74
|
"read": "allow",
|
|
78
75
|
"list": "allow",
|
|
79
|
-
"question": "allow"
|
|
80
|
-
"hindsight_recall": "allow",
|
|
81
|
-
"hindsight_retain": "allow"
|
|
76
|
+
"question": "allow"
|
|
82
77
|
}
|
|
83
78
|
},
|
|
84
79
|
"frigg": {
|
|
@@ -94,8 +89,6 @@
|
|
|
94
89
|
"bash": "allow",
|
|
95
90
|
"webfetch": "allow",
|
|
96
91
|
"websearch": "allow",
|
|
97
|
-
"hindsight_recall": "allow",
|
|
98
|
-
"hindsight_retain": "allow",
|
|
99
92
|
"question": "allow"
|
|
100
93
|
}
|
|
101
94
|
},
|
|
@@ -115,9 +108,7 @@
|
|
|
115
108
|
"todowrite": "allow",
|
|
116
109
|
"webfetch": "allow",
|
|
117
110
|
"websearch": "allow",
|
|
118
|
-
"task": "deny"
|
|
119
|
-
"hindsight_recall": "allow",
|
|
120
|
-
"hindsight_retain": "allow"
|
|
111
|
+
"task": "deny"
|
|
121
112
|
}
|
|
122
113
|
},
|
|
123
114
|
"mimir": {
|
|
@@ -135,9 +126,7 @@
|
|
|
135
126
|
"list": "allow",
|
|
136
127
|
"webfetch": "allow",
|
|
137
128
|
"websearch": "allow",
|
|
138
|
-
"todowrite": "allow"
|
|
139
|
-
"hindsight_recall": "allow",
|
|
140
|
-
"hindsight_retain": "allow"
|
|
129
|
+
"todowrite": "allow"
|
|
141
130
|
}
|
|
142
131
|
},
|
|
143
132
|
"heimdall": {
|
|
@@ -154,9 +143,7 @@
|
|
|
154
143
|
"list": "allow",
|
|
155
144
|
"todowrite": "allow",
|
|
156
145
|
"webfetch": "allow",
|
|
157
|
-
"websearch": "allow"
|
|
158
|
-
"hindsight_recall": "allow",
|
|
159
|
-
"hindsight_retain": "allow"
|
|
146
|
+
"websearch": "allow"
|
|
160
147
|
}
|
|
161
148
|
},
|
|
162
149
|
"hermod": {
|
|
@@ -172,9 +159,7 @@
|
|
|
172
159
|
"grep": "allow",
|
|
173
160
|
"list": "allow",
|
|
174
161
|
"webfetch": "allow",
|
|
175
|
-
"websearch": "allow"
|
|
176
|
-
"hindsight_recall": "allow",
|
|
177
|
-
"hindsight_retain": "allow"
|
|
162
|
+
"websearch": "allow"
|
|
178
163
|
}
|
|
179
164
|
},
|
|
180
165
|
"thor": {
|
|
@@ -191,9 +176,7 @@
|
|
|
191
176
|
"list": "allow",
|
|
192
177
|
"todowrite": "allow",
|
|
193
178
|
"webfetch": "allow",
|
|
194
|
-
"websearch": "allow"
|
|
195
|
-
"hindsight_recall": "allow",
|
|
196
|
-
"hindsight_retain": "allow"
|
|
179
|
+
"websearch": "allow"
|
|
197
180
|
}
|
|
198
181
|
},
|
|
199
182
|
"baldr": {
|
|
@@ -210,9 +193,7 @@
|
|
|
210
193
|
"list": "allow",
|
|
211
194
|
"todowrite": "allow",
|
|
212
195
|
"webfetch": "allow",
|
|
213
|
-
"websearch": "allow"
|
|
214
|
-
"hindsight_recall": "allow",
|
|
215
|
-
"hindsight_retain": "allow"
|
|
196
|
+
"websearch": "allow"
|
|
216
197
|
}
|
|
217
198
|
},
|
|
218
199
|
"tyr": {
|
|
@@ -229,9 +210,7 @@
|
|
|
229
210
|
"list": "allow",
|
|
230
211
|
"todowrite": "allow",
|
|
231
212
|
"webfetch": "allow",
|
|
232
|
-
"websearch": "allow"
|
|
233
|
-
"hindsight_recall": "allow",
|
|
234
|
-
"hindsight_retain": "allow"
|
|
213
|
+
"websearch": "allow"
|
|
235
214
|
}
|
|
236
215
|
},
|
|
237
216
|
"vidarr": {
|
|
@@ -248,9 +227,7 @@
|
|
|
248
227
|
"list": "allow",
|
|
249
228
|
"todowrite": "allow",
|
|
250
229
|
"webfetch": "allow",
|
|
251
|
-
"websearch": "allow"
|
|
252
|
-
"hindsight_recall": "allow",
|
|
253
|
-
"hindsight_retain": "allow"
|
|
230
|
+
"websearch": "allow"
|
|
254
231
|
}
|
|
255
232
|
},
|
|
256
233
|
"forseti": {
|
|
@@ -268,9 +245,7 @@
|
|
|
268
245
|
"todowrite": "allow",
|
|
269
246
|
"question": "allow",
|
|
270
247
|
"webfetch": "allow",
|
|
271
|
-
"websearch": "allow"
|
|
272
|
-
"hindsight_recall": "allow",
|
|
273
|
-
"hindsight_retain": "allow"
|
|
248
|
+
"websearch": "allow"
|
|
274
249
|
}
|
|
275
250
|
},
|
|
276
251
|
"semble-search": {
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: memory-protocol
|
|
3
|
+
description: How Bizar agents use the project memory vault. Read at session start, append on session end. No codebase exploration needed.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Bizar Memory Protocol
|
|
7
|
+
|
|
8
|
+
**⚠️ MANDATORY at every new session.** Run before starting any work. No codebase exploration needed.
|
|
9
|
+
|
|
10
|
+
The Bizar Memory Service is the project's long-term memory. Every project has a vault (Markdown + Git) located by reading `.bizar/memory.json`. **Agents that skip this step are likely to contradict decisions already made, break things already fixed, or suggest things the user already tried.**
|
|
11
|
+
|
|
12
|
+
## First-time setup
|
|
13
|
+
|
|
14
|
+
**If `.bizar/memory.json` does not exist on this checkout**, run:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
bizar memory setup --remote git@github.com:you/bizar-memory.git
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
This creates the vault, writes the config, and configures the remote. Idempotent — re-run with a new `--remote` to update the URL.
|
|
21
|
+
|
|
22
|
+
For HTTPS remotes (e.g. private repos behind a proxy):
|
|
23
|
+
```bash
|
|
24
|
+
bizar memory setup --remote https://github.com/you/bizar-memory.git
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
For local-only mode (no git remote — vault lives only on this machine):
|
|
28
|
+
```bash
|
|
29
|
+
bizar memory setup --mode local-only
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
After setup, verify with `bizar memory status` and `bizar memory doctor`.
|
|
33
|
+
|
|
34
|
+
## Session Start — DO THIS FIRST
|
|
35
|
+
|
|
36
|
+
Run these three commands in order. If any fail, fix the underlying problem before proceeding.
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
bizar memory status # confirm vault reachable
|
|
40
|
+
bizar memory doctor # schema + secret scan + git state
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
If the project has prior context, search for the task topic:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
bizar memory search "<topic keyword>"
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Read notes by path (the vault root is in the status output, usually `~/.local/share/bizar/memory/bizar-memory/projects/<projectId>/`).
|
|
50
|
+
|
|
51
|
+
## During Work
|
|
52
|
+
|
|
53
|
+
When you learn something durable — an architecture decision, a non-obvious convention, a bug pattern, an API contract — write it:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
bizar memory write <relpath> \
|
|
57
|
+
--type <type> \
|
|
58
|
+
--status active \
|
|
59
|
+
--confidence verified|inferred|speculative \
|
|
60
|
+
--tag <tag> \
|
|
61
|
+
--body "<markdown body>"
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
`<relpath>` is relative to the project namespace root, e.g.:
|
|
65
|
+
- `decisions/0001-router-ordering.md`
|
|
66
|
+
- `conventions/secret-scanning.md`
|
|
67
|
+
- `bug-patterns/hindsight-token-leak.md`
|
|
68
|
+
- `api/memory-rest.md`
|
|
69
|
+
|
|
70
|
+
**Do NOT include the namespace prefix** (`projects/<projectId>/`) — the system adds it.
|
|
71
|
+
|
|
72
|
+
### Valid types
|
|
73
|
+
|
|
74
|
+
`project_overview`, `architecture_decision`, `coding_convention`, `bug_pattern`, `command`, `api_contract`, `dependency_note`, `environment_fact`, `task_summary`, `session_summary`, `user_preference`
|
|
75
|
+
|
|
76
|
+
### Valid statuses
|
|
77
|
+
|
|
78
|
+
`active`, `superseded`, `stale`, `conflict`, `draft`, `archived`
|
|
79
|
+
|
|
80
|
+
### Valid confidences
|
|
81
|
+
|
|
82
|
+
`verified`, `inferred`, `speculative`
|
|
83
|
+
|
|
84
|
+
## Session End
|
|
85
|
+
|
|
86
|
+
If you wrote notes, commit them (if shared vault):
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
bizar memory sync
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
If anything is broken:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
bizar memory conflicts # list notes with status:conflict
|
|
96
|
+
bizar memory doctor # health check
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Quick Rules
|
|
100
|
+
|
|
101
|
+
1. **One note per durable fact.** Don't append to existing notes unless updating them.
|
|
102
|
+
2. **Frontmatter is required.** `bizar memory write` builds it; if you write directly to a file, include all required fields.
|
|
103
|
+
3. **No secrets.** The system scans for AWS keys, GitHub tokens, etc. and rejects the write. Use env var references in notes.
|
|
104
|
+
4. **Path is relative.** `decisions/foo.md`, not `projects/BizarHarness/decisions/foo.md`.
|
|
105
|
+
5. **Don't write ephemeral state.** Task status, current WIP, scratch notes — use `.bizar/` instead.
|