mnemosyne-core 2.0.0 → 2.0.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.
@@ -4355,7 +4355,7 @@ var require_filesystem = __commonJS({
4355
4355
  var LDD_PATH = "/usr/bin/ldd";
4356
4356
  var SELF_PATH = "/proc/self/exe";
4357
4357
  var MAX_LENGTH = 2048;
4358
- var readFileSync9 = (path) => {
4358
+ var readFileSync7 = (path) => {
4359
4359
  const fd = fs.openSync(path, "r");
4360
4360
  const buffer = Buffer.alloc(MAX_LENGTH);
4361
4361
  const bytesRead = fs.readSync(fd, buffer, 0, MAX_LENGTH, 0);
@@ -4380,7 +4380,7 @@ var require_filesystem = __commonJS({
4380
4380
  module2.exports = {
4381
4381
  LDD_PATH,
4382
4382
  SELF_PATH,
4383
- readFileSync: readFileSync9,
4383
+ readFileSync: readFileSync7,
4384
4384
  readFile
4385
4385
  };
4386
4386
  }
@@ -4429,7 +4429,7 @@ var require_detect_libc = __commonJS({
4429
4429
  "use strict";
4430
4430
  var childProcess = __require("child_process");
4431
4431
  var { isLinux, getReport } = require_process();
4432
- var { LDD_PATH, SELF_PATH, readFile, readFileSync: readFileSync9 } = require_filesystem();
4432
+ var { LDD_PATH, SELF_PATH, readFile, readFileSync: readFileSync7 } = require_filesystem();
4433
4433
  var { interpreterPath } = require_elf();
4434
4434
  var cachedFamilyInterpreter;
4435
4435
  var cachedFamilyFilesystem;
@@ -4521,7 +4521,7 @@ var require_detect_libc = __commonJS({
4521
4521
  }
4522
4522
  cachedFamilyFilesystem = null;
4523
4523
  try {
4524
- const lddContent = readFileSync9(LDD_PATH);
4524
+ const lddContent = readFileSync7(LDD_PATH);
4525
4525
  cachedFamilyFilesystem = getFamilyFromLddContent(lddContent);
4526
4526
  } catch (e) {
4527
4527
  }
@@ -4546,7 +4546,7 @@ var require_detect_libc = __commonJS({
4546
4546
  }
4547
4547
  cachedFamilyInterpreter = null;
4548
4548
  try {
4549
- const selfContent = readFileSync9(SELF_PATH);
4549
+ const selfContent = readFileSync7(SELF_PATH);
4550
4550
  const path = interpreterPath(selfContent);
4551
4551
  cachedFamilyInterpreter = familyFromInterpreterPath(path);
4552
4552
  } catch (e) {
@@ -4610,7 +4610,7 @@ var require_detect_libc = __commonJS({
4610
4610
  }
4611
4611
  cachedVersionFilesystem = null;
4612
4612
  try {
4613
- const lddContent = readFileSync9(LDD_PATH);
4613
+ const lddContent = readFileSync7(LDD_PATH);
4614
4614
  const versionMatch = lddContent.match(RE_GLIBC_VERSION);
4615
4615
  if (versionMatch) {
4616
4616
  cachedVersionFilesystem = versionMatch[1];
@@ -13100,7 +13100,6 @@ import { resolve as resolve9 } from "path";
13100
13100
 
13101
13101
  // src/core/Mnemosyne.ts
13102
13102
  import Database from "better-sqlite3";
13103
- import { readFileSync as readFileSync4 } from "fs";
13104
13103
  import { resolve as resolve5 } from "path";
13105
13104
 
13106
13105
  // src/core/types.ts
@@ -14349,8 +14348,8 @@ function mergeDeep2(target, source) {
14349
14348
  }
14350
14349
  return output;
14351
14350
  }
14352
- function loadConfig2(configPath) {
14353
- const path = configPath ? resolve4(configPath) : resolve4(process.cwd(), "config.yaml");
14351
+ function loadConfig2(configPath, baseDir = process.cwd()) {
14352
+ const path = configPath ? resolve4(configPath) : resolve4(baseDir, "config.yaml");
14354
14353
  if (!existsSync4(path)) {
14355
14354
  if (!configPath) console.warn("[Config] config.yaml not found, using defaults");
14356
14355
  return defaultConfig2();
@@ -14366,23 +14365,237 @@ function loadConfig2(configPath) {
14366
14365
  }
14367
14366
  var MnemosyneConfig = class {
14368
14367
  config;
14368
+ baseDir;
14369
14369
  constructor(options) {
14370
- this.config = loadConfig2(options?.configPath);
14370
+ this.baseDir = options?.baseDir || process.cwd();
14371
+ this.config = loadConfig2(options?.configPath, this.baseDir);
14371
14372
  if (options?.overrides) {
14372
14373
  this.config = mergeDeep2(this.config, options.overrides);
14373
14374
  }
14374
14375
  }
14375
14376
  get dbPath() {
14376
- return resolve4(process.cwd(), this.config.database.path);
14377
+ return resolve4(this.baseDir, this.config.database.path);
14377
14378
  }
14378
14379
  get filesDir() {
14379
- return resolve4(process.cwd(), this.config.storage.files_dir);
14380
+ return resolve4(this.baseDir, this.config.storage.files_dir);
14380
14381
  }
14381
14382
  get backupsDir() {
14382
- return resolve4(process.cwd(), this.config.storage.backups_dir);
14383
+ return resolve4(this.baseDir, this.config.storage.backups_dir);
14384
+ }
14385
+ get baseDirPath() {
14386
+ return this.baseDir;
14383
14387
  }
14384
14388
  };
14385
14389
 
14390
+ // src/db/schema.ts
14391
+ var SCHEMA_SQL = `-- Mnemosyne v1.1 Database Schema
14392
+ -- SQLite with sqlite-vec extension for semantic search
14393
+
14394
+ -- PROJECTS (Spaces)
14395
+ CREATE TABLE IF NOT EXISTS projects (
14396
+ id TEXT PRIMARY KEY,
14397
+ name TEXT NOT NULL UNIQUE,
14398
+ description TEXT,
14399
+ icon TEXT DEFAULT '\u25C9',
14400
+ color TEXT DEFAULT '#6366f1',
14401
+ created_at INTEGER DEFAULT (unixepoch()),
14402
+ updated_at INTEGER DEFAULT (unixepoch()),
14403
+ owner TEXT DEFAULT 'human',
14404
+ metadata TEXT DEFAULT '{}'
14405
+ );
14406
+
14407
+ -- ATOMS (Ideas/Nodes)
14408
+ CREATE TABLE IF NOT EXISTS atoms (
14409
+ id TEXT PRIMARY KEY,
14410
+ project_id TEXT NOT NULL REFERENCES projects(id) ON DELETE CASCADE,
14411
+ parent_id TEXT REFERENCES atoms(id) ON DELETE CASCADE,
14412
+ title TEXT NOT NULL,
14413
+ summary TEXT,
14414
+ icon TEXT DEFAULT '\u25CF',
14415
+ color TEXT,
14416
+ x REAL,
14417
+ y REAL,
14418
+ auto_path TEXT,
14419
+ path_overridden INTEGER DEFAULT 0,
14420
+ status TEXT DEFAULT 'draft',
14421
+ status_updated_at INTEGER DEFAULT (unixepoch()),
14422
+ embedding_status TEXT DEFAULT 'pending',
14423
+ embedding_error TEXT,
14424
+ block_count INTEGER DEFAULT 0,
14425
+ bond_count INTEGER DEFAULT 0,
14426
+ template_id TEXT,
14427
+ created_at INTEGER DEFAULT (unixepoch()),
14428
+ updated_at INTEGER DEFAULT (unixepoch()),
14429
+ version INTEGER DEFAULT 1,
14430
+ locked_by TEXT,
14431
+ locked_at INTEGER,
14432
+ locked_reason TEXT,
14433
+ owner TEXT DEFAULT 'human',
14434
+ metadata TEXT DEFAULT '{}'
14435
+ );
14436
+
14437
+ -- BLOCKS (Content pieces inside atoms)
14438
+ CREATE TABLE IF NOT EXISTS blocks (
14439
+ id TEXT PRIMARY KEY,
14440
+ atom_id TEXT NOT NULL REFERENCES atoms(id) ON DELETE CASCADE,
14441
+ type TEXT NOT NULL DEFAULT 'text',
14442
+ content TEXT,
14443
+ order_index INTEGER DEFAULT 0,
14444
+ created_at INTEGER DEFAULT (unixepoch()),
14445
+ updated_at INTEGER DEFAULT (unixepoch()),
14446
+ metadata TEXT DEFAULT '{}'
14447
+ );
14448
+
14449
+ -- BONDS (Graph connections between atoms)
14450
+ CREATE TABLE IF NOT EXISTS bonds (
14451
+ id TEXT PRIMARY KEY,
14452
+ source_id TEXT NOT NULL REFERENCES atoms(id) ON DELETE CASCADE,
14453
+ target_id TEXT NOT NULL REFERENCES atoms(id) ON DELETE CASCADE,
14454
+ label TEXT DEFAULT 'connects',
14455
+ color TEXT,
14456
+ created_at INTEGER DEFAULT (unixepoch()),
14457
+ UNIQUE(source_id, target_id)
14458
+ );
14459
+
14460
+ -- ATTACHMENTS (Files in CAS)
14461
+ CREATE TABLE IF NOT EXISTS attachments (
14462
+ id TEXT PRIMARY KEY,
14463
+ block_id TEXT REFERENCES blocks(id) ON DELETE CASCADE,
14464
+ file_name TEXT NOT NULL,
14465
+ file_hash TEXT NOT NULL,
14466
+ file_size INTEGER,
14467
+ mime_type TEXT,
14468
+ created_at INTEGER DEFAULT (unixepoch()),
14469
+ UNIQUE(file_hash)
14470
+ );
14471
+
14472
+ -- EVENT LOG (Immutable audit trail)
14473
+ CREATE TABLE IF NOT EXISTS event_log (
14474
+ id TEXT PRIMARY KEY,
14475
+ timestamp INTEGER DEFAULT (unixepoch()),
14476
+ event_type TEXT NOT NULL,
14477
+ project_id TEXT,
14478
+ atom_id TEXT,
14479
+ block_id TEXT,
14480
+ bond_id TEXT,
14481
+ actor TEXT NOT NULL DEFAULT 'system',
14482
+ actor_type TEXT DEFAULT 'system',
14483
+ diff TEXT,
14484
+ trigger TEXT,
14485
+ metadata TEXT DEFAULT '{}'
14486
+ );
14487
+
14488
+ -- ASSISTANTS (AI Agents)
14489
+ CREATE TABLE IF NOT EXISTS assistants (
14490
+ id TEXT PRIMARY KEY,
14491
+ name TEXT NOT NULL,
14492
+ role TEXT DEFAULT 'worker',
14493
+ permissions TEXT DEFAULT '{"read":["*"],"write":[],"delete":false}',
14494
+ status TEXT DEFAULT 'active',
14495
+ provider TEXT,
14496
+ connected_at INTEGER DEFAULT (unixepoch()),
14497
+ last_seen INTEGER DEFAULT (unixepoch()),
14498
+ metadata TEXT DEFAULT '{}'
14499
+ );
14500
+
14501
+ -- QUEUE (Agent waitlist for locked atoms)
14502
+ CREATE TABLE IF NOT EXISTS queue (
14503
+ id TEXT PRIMARY KEY,
14504
+ atom_id TEXT NOT NULL REFERENCES atoms(id) ON DELETE CASCADE,
14505
+ assistant_id TEXT NOT NULL REFERENCES assistants(id) ON DELETE CASCADE,
14506
+ requested_at INTEGER DEFAULT (unixepoch()),
14507
+ priority INTEGER DEFAULT 5,
14508
+ status TEXT DEFAULT 'waiting',
14509
+ reason TEXT
14510
+ );
14511
+
14512
+ -- INDICES
14513
+ CREATE INDEX IF NOT EXISTS idx_atoms_project ON atoms(project_id);
14514
+ CREATE INDEX IF NOT EXISTS idx_atoms_parent ON atoms(parent_id);
14515
+ CREATE INDEX IF NOT EXISTS idx_atoms_locked ON atoms(locked_by) WHERE locked_by IS NOT NULL;
14516
+ -- idx_atoms_path_project is created by migration after auto_path column is added
14517
+ CREATE INDEX IF NOT EXISTS idx_blocks_atom ON blocks(atom_id);
14518
+ CREATE INDEX IF NOT EXISTS idx_bonds_source ON bonds(source_id);
14519
+ CREATE INDEX IF NOT EXISTS idx_bonds_target ON bonds(target_id);
14520
+ CREATE INDEX IF NOT EXISTS idx_event_log_time ON event_log(timestamp);
14521
+ CREATE INDEX IF NOT EXISTS idx_event_log_atom ON event_log(atom_id);
14522
+ CREATE INDEX IF NOT EXISTS idx_queue_atom ON queue(atom_id);
14523
+ CREATE INDEX IF NOT EXISTS idx_attachments_hash ON attachments(file_hash);
14524
+
14525
+ -- Auto-update block_count and bond_count triggers
14526
+ CREATE TRIGGER IF NOT EXISTS update_block_count_insert AFTER INSERT ON blocks BEGIN
14527
+ UPDATE atoms SET block_count = block_count + 1 WHERE id = NEW.atom_id;
14528
+ END;
14529
+
14530
+ CREATE TRIGGER IF NOT EXISTS update_block_count_delete AFTER DELETE ON blocks BEGIN
14531
+ UPDATE atoms SET block_count = block_count - 1 WHERE id = OLD.atom_id;
14532
+ END;
14533
+
14534
+ CREATE TRIGGER IF NOT EXISTS update_bond_count_insert AFTER INSERT ON bonds BEGIN
14535
+ UPDATE atoms SET bond_count = bond_count + 1 WHERE id = NEW.source_id OR id = NEW.target_id;
14536
+ END;
14537
+
14538
+ CREATE TRIGGER IF NOT EXISTS update_bond_count_delete AFTER DELETE ON bonds BEGIN
14539
+ UPDATE atoms SET bond_count = bond_count - 1 WHERE id = OLD.source_id OR id = OLD.target_id;
14540
+ END;
14541
+
14542
+ -- FTS5 FULL-TEXT SEARCH
14543
+ -- Separate tables to avoid rowid collisions between atoms and blocks
14544
+
14545
+ CREATE VIRTUAL TABLE IF NOT EXISTS search_atoms USING fts5(
14546
+ title, summary,
14547
+ content='atoms', content_rowid='rowid'
14548
+ );
14549
+
14550
+ CREATE VIRTUAL TABLE IF NOT EXISTS search_blocks USING fts5(
14551
+ content,
14552
+ content='blocks', content_rowid='rowid'
14553
+ );
14554
+
14555
+ -- Triggers to keep search_atoms in sync
14556
+ CREATE TRIGGER IF NOT EXISTS trig_search_atoms_insert AFTER INSERT ON atoms BEGIN
14557
+ INSERT INTO search_atoms(rowid, title, summary) VALUES (new.rowid, new.title, COALESCE(new.summary, ''));
14558
+ END;
14559
+
14560
+ CREATE TRIGGER IF NOT EXISTS trig_search_atoms_update AFTER UPDATE ON atoms BEGIN
14561
+ UPDATE search_atoms SET title = new.title, summary = COALESCE(new.summary, '') WHERE rowid = new.rowid;
14562
+ END;
14563
+
14564
+ CREATE TRIGGER IF NOT EXISTS trig_search_atoms_delete AFTER DELETE ON atoms BEGIN
14565
+ DELETE FROM search_atoms WHERE rowid = old.rowid;
14566
+ END;
14567
+
14568
+ -- Triggers to keep search_blocks in sync
14569
+ CREATE TRIGGER IF NOT EXISTS trig_search_blocks_insert AFTER INSERT ON blocks BEGIN
14570
+ INSERT INTO search_blocks(rowid, content) VALUES (new.rowid, COALESCE(new.content, ''));
14571
+ END;
14572
+
14573
+ CREATE TRIGGER IF NOT EXISTS trig_search_blocks_update AFTER UPDATE ON blocks BEGIN
14574
+ UPDATE search_blocks SET content = COALESCE(new.content, '') WHERE rowid = new.rowid;
14575
+ END;
14576
+
14577
+ CREATE TRIGGER IF NOT EXISTS trig_search_blocks_delete AFTER DELETE ON blocks BEGIN
14578
+ DELETE FROM search_blocks WHERE rowid = old.rowid;
14579
+ END;
14580
+
14581
+
14582
+ -- PER-ATOM PERMISSIONS (Granular access control)
14583
+ CREATE TABLE IF NOT EXISTS atom_permissions (
14584
+ id TEXT PRIMARY KEY,
14585
+ atom_id TEXT NOT NULL REFERENCES atoms(id) ON DELETE CASCADE,
14586
+ assistant_id TEXT NOT NULL REFERENCES assistants(id) ON DELETE CASCADE,
14587
+ level TEXT NOT NULL DEFAULT 'view',
14588
+ granted_by TEXT,
14589
+ granted_at INTEGER DEFAULT (unixepoch()),
14590
+ metadata TEXT DEFAULT '{}',
14591
+ UNIQUE(atom_id, assistant_id)
14592
+ );
14593
+
14594
+ -- sqlite-vec virtual table for semantic embeddings
14595
+ -- Created dynamically by connection.ts after loading the extension
14596
+ -- CREATE VIRTUAL TABLE IF NOT EXISTS atom_vectors USING vec0(atom_id TEXT PRIMARY KEY, embedding float[384]);
14597
+ `;
14598
+
14386
14599
  // src/core/Mnemosyne.ts
14387
14600
  var Mnemosyne = class {
14388
14601
  store;
@@ -14390,7 +14603,7 @@ var Mnemosyne = class {
14390
14603
  vecEnabled;
14391
14604
  db;
14392
14605
  constructor(options = {}) {
14393
- this.config = new MnemosyneConfig({ configPath: options.configPath });
14606
+ this.config = new MnemosyneConfig({ configPath: options.configPath, baseDir: options.baseDir });
14394
14607
  const cfg = this.config.config;
14395
14608
  const dbPath = options.dbPath || this.config.dbPath;
14396
14609
  this.db = new Database(dbPath);
@@ -14399,17 +14612,15 @@ var Mnemosyne = class {
14399
14612
  this.db.pragma("synchronous = NORMAL");
14400
14613
  this.vecEnabled = false;
14401
14614
  try {
14402
- const vecPath = resolve5(process.cwd(), cfg.database.vec_extension_path);
14615
+ const vecPath = resolve5(this.config.baseDirPath || process.cwd(), cfg.database.vec_extension_path);
14403
14616
  this.db.loadExtension(vecPath);
14404
14617
  this.vecEnabled = true;
14405
14618
  console.log("[DB] sqlite-vec extension loaded");
14406
14619
  } catch (err) {
14407
14620
  console.warn("[DB] sqlite-vec not available:", err.message);
14408
14621
  }
14409
- const schemaPath = resolve5(process.cwd(), "src", "db", "schema.sql");
14410
14622
  try {
14411
- const schema = readFileSync4(schemaPath, "utf-8");
14412
- this.db.exec(schema);
14623
+ this.db.exec(SCHEMA_SQL);
14413
14624
  } catch (err) {
14414
14625
  console.error("[DB] Failed to load schema:", err.message);
14415
14626
  }
@@ -14453,7 +14664,7 @@ var Mnemosyne = class {
14453
14664
 
14454
14665
  // src/server/MnemosyneServer.ts
14455
14666
  import { createServer } from "http";
14456
- import { readFileSync as readFileSync7, existsSync as existsSync6 } from "fs";
14667
+ import { readFileSync as readFileSync5, existsSync as existsSync6 } from "fs";
14457
14668
  import { resolve as resolve8 } from "path";
14458
14669
 
14459
14670
  // node_modules/ws/wrapper.mjs
@@ -15608,19 +15819,19 @@ function handleFiles(store, pathname, method, req, res, maxFileSizeMb) {
15608
15819
  // src/server/export-format.ts
15609
15820
  import AdmZip2 from "adm-zip";
15610
15821
  import { createHash as createHash2 } from "crypto";
15611
- import { readFileSync as readFileSync5, existsSync as existsSync5, readdirSync as readdirSync2, statSync as statSync2 } from "fs";
15822
+ import { readFileSync as readFileSync4, existsSync as existsSync5, readdirSync as readdirSync2, statSync as statSync2 } from "fs";
15612
15823
  import { resolve as resolve6 } from "path";
15613
15824
  var DB_PATH = resolve6(process.cwd(), "data", "nexus.db");
15614
15825
  var FILES_DIR2 = resolve6(process.cwd(), "data", "files");
15615
15826
  function sha256File(path) {
15616
- return createHash2("sha256").update(readFileSync5(path)).digest("hex");
15827
+ return createHash2("sha256").update(readFileSync4(path)).digest("hex");
15617
15828
  }
15618
15829
  function sha256Dir(dir) {
15619
15830
  const hash = createHash2("sha256");
15620
15831
  function walk(p) {
15621
15832
  const stat = statSync2(p);
15622
15833
  if (stat.isFile()) {
15623
- hash.update(readFileSync5(p));
15834
+ hash.update(readFileSync4(p));
15624
15835
  } else if (stat.isDirectory()) {
15625
15836
  for (const child of readdirSync2(p).sort()) walk(resolve6(p, child));
15626
15837
  }
@@ -15992,7 +16203,6 @@ var WebSocketHandler = class {
15992
16203
  // src/db/connection.ts
15993
16204
  init_config();
15994
16205
  import Database2 from "better-sqlite3";
15995
- import { readFileSync as readFileSync6 } from "fs";
15996
16206
  import { resolve as resolve7 } from "path";
15997
16207
  var DB_PATH2 = process.env.MNEMOSYNE_DB_PATH || resolve7(process.cwd(), CONFIG.database.path);
15998
16208
  var db = null;
@@ -16012,8 +16222,7 @@ function getDb() {
16012
16222
  console.warn("[DB] sqlite-vec not available:", err.message);
16013
16223
  vecEnabled = false;
16014
16224
  }
16015
- const schema = readFileSync6(resolve7(process.cwd(), "src", "db", "schema.sql"), "utf-8");
16016
- db.exec(schema);
16225
+ db.exec(SCHEMA_SQL);
16017
16226
  if (vecEnabled) {
16018
16227
  try {
16019
16228
  db.exec(`CREATE VIRTUAL TABLE IF NOT EXISTS atom_vectors USING vec0(atom_id TEXT PRIMARY KEY, embedding float[${CONFIG.embeddings.dimension}])`);
@@ -16113,7 +16322,7 @@ var MnemosyneServer = class {
16113
16322
  for (const dir of dirs) {
16114
16323
  const filePath = resolve8(dir, urlPath);
16115
16324
  if (existsSync6(filePath)) {
16116
- const data = readFileSync7(filePath);
16325
+ const data = readFileSync5(filePath);
16117
16326
  res.writeHead(200, { "Content-Type": mime[ext] || "application/octet-stream" });
16118
16327
  res.end(data);
16119
16328
  return;
@@ -16135,7 +16344,7 @@ var MnemosyneServer = class {
16135
16344
  async function startCommand(options) {
16136
16345
  const dataDir = resolve9(options.dataDir);
16137
16346
  const dbPath = resolve9(dataDir, "nexus.db");
16138
- const brain = new Mnemosyne({ dbPath, configPath: options.config });
16347
+ const brain = new Mnemosyne({ dbPath, configPath: options.config, baseDir: dataDir });
16139
16348
  await brain.init();
16140
16349
  if (options.mcpTransport === "stdio" && options.mcp) {
16141
16350
  if (options.verbose) {
@@ -16225,7 +16434,7 @@ async function initCommand(options) {
16225
16434
  }
16226
16435
  const dbPath = resolve10(dataDir, "nexus.db");
16227
16436
  if (!existsSync7(dbPath)) {
16228
- const brain = new Mnemosyne({ dbPath, configPath });
16437
+ const brain = new Mnemosyne({ dbPath, configPath, baseDir: dataDir });
16229
16438
  await brain.init();
16230
16439
  await brain.close();
16231
16440
  console.log(`\u2705 Initialized database: ${dbPath}`);
@@ -16239,14 +16448,14 @@ async function initCommand(options) {
16239
16448
 
16240
16449
  // src/cli/commands/migrate.ts
16241
16450
  import { resolve as resolve11 } from "path";
16242
- import { readFileSync as readFileSync8 } from "fs";
16451
+ import { readFileSync as readFileSync6 } from "fs";
16243
16452
  async function migrateCommand(options) {
16244
16453
  const fromPath = resolve11(options.from);
16245
16454
  const toPath = resolve11(options.to);
16246
16455
  console.log(`\u{1F504} Migrating v1.0 JSON \u2192 v2.0 SQLite`);
16247
16456
  console.log(` From: ${fromPath}`);
16248
16457
  console.log(` To: ${toPath}`);
16249
- const raw = readFileSync8(fromPath, "utf-8");
16458
+ const raw = readFileSync6(fromPath, "utf-8");
16250
16459
  const v1 = JSON.parse(raw);
16251
16460
  const brain = new Mnemosyne({ dbPath: toPath });
16252
16461
  await brain.init();