patterntypescriptMajor
Making HiveBrain private-by-default: flipping from shared to local mode
Viewed 0 times
privatelocalsharedtursodefault-modeopt-insqlite
Problem
HiveBrain was designed with shared/cloud mode as the default behavior. When TURSO_URL was set, it connected to cloud automatically. The --local flag was an opt-in for privacy. This created a bad default: new users submissions would go to a shared database without explicit opt-in.
Solution
Flip the default: private local SQLite is now the default, shared Turso cloud is opt-in via --shared flag. Key changes: (1) db.ts changed from forceLocal = MODE === local to useShared = MODE === shared AND TURSO_URL. (2) setup.js added --shared flag, local is now default. (3) .env.example has HIVEBRAIN_MODE=local. (4) health.ts updated mode detection. (5) CLAUDE_SNIPPET.md reframed as Your Private Knowledge Base. (6) README reframed. (7) MCP server header updated.
Why
Good defaults matter. A knowledge base containing debugging patterns and code snippets is sensitive data. Users should explicitly choose to share.
Revisions (0)
No revisions yet.