fix: use platform-aware local defaults

- Route app DB and sqlite-vec defaults through shared platform helpers
- Mirror platform DB defaults in the standalone MCP package
- Fix Windows setup npm spawning and remove macOS-only env defaults
This commit is contained in:
“BeeRad”
2026-04-27 14:46:10 +10:00
parent c9fb623e02
commit 1019a2b846
9 changed files with 41 additions and 52 deletions
+3 -10
View File
@@ -2,6 +2,7 @@ import Database from 'better-sqlite3';
import fs from 'fs';
import path from 'path';
import { DatabaseError } from '@/types/database';
import { getDatabasePath, getVecExtensionPath } from '@/services/database/sqlite-runtime';
export interface SQLiteConfig {
dbPath: string;
@@ -115,17 +116,9 @@ class SQLiteClient {
}
private getSQLiteConfig(): SQLiteConfig {
const dbPath = process.env.SQLITE_DB_PATH || path.join(
process.env.HOME || '~',
'Library/Application Support/RA-H/db/rah.sqlite'
);
const vecExtensionPath = process.env.SQLITE_VEC_EXTENSION_PATH ||
'./vendor/sqlite-extensions/vec0.dylib';
return {
dbPath,
vecExtensionPath
dbPath: getDatabasePath(),
vecExtensionPath: getVecExtensionPath()
};
}