@mem-weave/server 0.2.0 → 0.2.1

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.
@@ -1,8 +1,10 @@
1
1
  import { mkdirSync } from 'node:fs';
2
2
  import { dirname } from 'node:path';
3
+ import { createRequire } from 'node:module';
3
4
  import Database from 'better-sqlite3';
4
5
  import { SCHEMA_SQL } from './schema.js';
5
6
  import { logger } from '../server/logger.js';
7
+ const _require = createRequire(import.meta.url);
6
8
  /**
7
9
  * Default dimensions for the memory_vectors vec0 table. The actual configured
8
10
  * dimensions come from the EmbeddingConfig; the table is created lazily by
@@ -36,7 +38,7 @@ export function openDatabase(path, options = {}) {
36
38
  // Use a dynamic import to avoid hard-failing test environments that
37
39
  // exercise only non-vector code paths.
38
40
  // eslint-disable-next-line @typescript-eslint/no-var-requires
39
- const sqliteVec = require('sqlite-vec');
41
+ const sqliteVec = _require('sqlite-vec');
40
42
  sqliteVec.load(db);
41
43
  const dims = options.vectorDimensions ?? VECTOR_DEFAULT_DIMENSIONS;
42
44
  ensureVecTable(db, dims);
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@mem-weave/server",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "MemWeave local-first memory infrastructure for AI agents: structured memory, 4-layer retrieval (BM25 + vector + graph + causal), token-budgeted injection, server-side write deduplication, and background consolidation. Server process: Fastify REST API + CLI.",
5
5
  "type": "module",
6
6
  "main": "./dist/cli-entry.js",
7
7
  "types": "./dist/cli-entry.d.ts",
8
8
  "bin": {
9
- "memweave": "dist/cli-entry.js"
9
+ "memweave": "./dist/cli-entry.js"
10
10
  },
11
11
  "files": [
12
12
  "dist",