pub fn resolve_db_path(explicit_path: Option<&Path>) -> Option<PathBuf>Expand description
Resolve the database path.
Always uses the global database to match MCP server architecture. The database is shared across all projects.
Priority:
- If
explicit_pathis provided, use it directly SC_TEST_DBenvironment variable → uses test databaseSAVECONTEXT_DBenvironment variable- Global location:
~/.savecontext/data/savecontext.db
§Test Mode
Set SC_TEST_DB=1 to use ~/.savecontext/test/savecontext.db instead.
This keeps your production data safe during CLI development.
§Returns
Returns the path to the database file, or None if no location found.