@aexol/spectral 0.9.185 → 0.9.186

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.
@@ -4,10 +4,12 @@
4
4
  * Two-tier model:
5
5
  * projects ─< sessions ─< messages
6
6
  *
7
- * Single-process, single-file. Using `better-sqlite3` because:
8
- * - Synchronous API is a perfect fit for the per-WS-event write pattern.
9
- * - No connection pool, no callback churn, transactions are trivial.
10
- * - Native module ships prebuilt binaries for every Node version we support.
7
+ * Single-process, single-file. The storage layer goes through the `SqliteAdapter`
8
+ * abstraction (see `sqlite-adapter.ts`) which prefers Node's built-in
9
+ * `node:sqlite` on modern Node, `bun:sqlite` under Bun, and only falls back
10
+ * to `better-sqlite3` on older Node runtimes. The synchronous adapter API is a
11
+ * perfect fit for the per-WS-event write pattern: no connection pool, no
12
+ * callback churn, transactions are trivial.
11
13
  *
12
14
  * Schema migrations:
13
15
  * We track schema with the `user_version` PRAGMA. When opening a DB whose
@@ -1478,8 +1480,9 @@ export function preflightSqlite(dbPath) {
1478
1480
  const msg = err instanceof Error ? err.message : String(err);
1479
1481
  return {
1480
1482
  ok: false,
1481
- error: `Failed to load native sqlite module (${msg}).\n` +
1482
- ` This usually means the native binary couldn't be built for your Node.js version.\n` +
1483
+ error: `Failed to load the SQLite storage module (${msg}).\n` +
1484
+ ` On Node >= 22.5 spectral uses the built-in node:sqlite module; on older\n` +
1485
+ ` Node it falls back to better-sqlite3, which needs its native binary built.\n` +
1483
1486
  ` Try: cd ${getConfigDir()} && npm rebuild better-sqlite3\n` +
1484
1487
  ` Or reinstall: npm install -g @aexol/spectral`,
1485
1488
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aexol/spectral",
3
- "version": "0.9.185",
3
+ "version": "0.9.186",
4
4
  "description": "AI coding agent for Aexol with relay-based browser access.",
5
5
  "type": "module",
6
6
  "private": false,