@monlite/core 0.9.0 → 0.10.0

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.
package/README.md CHANGED
@@ -544,6 +544,7 @@ await db.collection("posts").search("hello world"); // full-text search
544
544
  | Plugin | Adds |
545
545
  |---|---|
546
546
  | [`@monlite/fts`](https://www.npmjs.com/package/@monlite/fts) | Full-text search (SQLite FTS5) via `collection.search()` |
547
+ | [`@monlite/vector`](https://www.npmjs.com/package/@monlite/vector) | Vector / semantic search (sqlite-vec) via `collection.findSimilar()` — RAG, agent memory |
547
548
 
548
549
  Write your own against the `MonlitePlugin` interface (`init` / `afterWrite` /
549
550
  `collectionMethods` hooks).
package/dist/index.cjs CHANGED
@@ -1373,8 +1373,10 @@ var NodeSqliteDriver = class {
1373
1373
  this.verbose = options.verbose;
1374
1374
  const { DatabaseSync } = nodeSqlite;
1375
1375
  this.raw = new DatabaseSync(filename, {
1376
- readOnly: options.readonly ?? false
1376
+ readOnly: options.readonly ?? false,
1377
+ ...options.allowExtensions ? { allowExtension: true } : {}
1377
1378
  });
1379
+ if (options.allowExtensions) this.raw.enableLoadExtension(true);
1378
1380
  this.raw.exec(`PRAGMA busy_timeout = ${options.busyTimeout ?? 5e3}`);
1379
1381
  if (!options.readonly && (options.wal ?? true)) {
1380
1382
  this.raw.exec("PRAGMA journal_mode = WAL");
@@ -1898,6 +1900,7 @@ var Monlite = class {
1898
1900
  readonly: options.readonly,
1899
1901
  wal: options.wal,
1900
1902
  busyTimeout: options.busyTimeout,
1903
+ allowExtensions: options.allowExtensions,
1901
1904
  verbose: options.verbose
1902
1905
  });
1903
1906
  this.autoIndexer = new AutoIndexer(