macOS SQLite Runtime Discovery
Problem
On macOS, Bun may use Apple’s system SQLite, which can disable dynamic
extension loading. When that happens, sqlite-vec never loads and
hybrid search falls back to keyword-only. The daemon already checks
Homebrew SQLite paths, but users without that exact layout still fail.
Goals
- Keep Bun as the daemon runtime.
- Broaden macOS SQLite runtime discovery beyond hardcoded Homebrew paths.
- Surface explicit operator guidance when vector search cannot load.
- Add regression tests so future refactors do not silently remove the fallback chain.
Non-goals
- Rewriting the daemon to Node.
- Replacing
sqlite-vec. - Bundling a first-party SQLite dylib in this change.
Proposed approach
Resolve a custom SQLite dylib on macOS in this order:
SIGNET_SQLITE_PATHas an authoritative explicit override, fail closed if it is set but missing$SIGNET_WORKSPACE/libsqlite3.dylibusing the active workspace resolution chain (SIGNET_PATH→ stored workspace config → default~/.agents)/opt/homebrew/opt/sqlite/lib/libsqlite3.dylib/usr/local/opt/sqlite/lib/libsqlite3.dylib
If a candidate exists, call Database.setCustomSQLite() before the
first Database instance is created. If no candidate exists, emit a
warning that clearly explains why vector search may degrade and how to
fix it.
Guardrails
- Unit test the discovery order and non-darwin no-op behavior.
- Add embedding-health messaging that points macOS users to the
supported fixes when
vec_embeddingsis unavailable.
Open decisions
- Whether Signet should eventually bundle a known-good SQLite dylib for macOS installs.
- Whether the future doctor command should check for this condition proactively.