gnosys 5.2.22 → 5.2.24

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/dist/cli.js CHANGED
@@ -2703,29 +2703,39 @@ program
2703
2703
  const stores = resolver.getStores();
2704
2704
  console.log("Gnosys Doctor");
2705
2705
  console.log("=============\n");
2706
- // Check gnosys.db (v2.0 agent-native store)
2706
+ // Check local gnosys.db (legacy — should NOT exist in DB-only architecture)
2707
2707
  if (stores.length > 0) {
2708
- console.log("Agent-Native Store (gnosys.db):");
2709
- try {
2710
- const db = new GnosysDB(stores[0].path);
2711
- if (db.isAvailable() && db.isMigrated()) {
2712
- const counts = db.getMemoryCount();
2713
- console.log(` Status: migrated (schema v${db.getSchemaVersion()})`);
2714
- console.log(` Active: ${counts.active} | Archived: ${counts.archived} | Total: ${counts.total}`);
2715
- }
2716
- else if (db.isAvailable()) {
2717
- console.log(" Status: ✗ not migrated (run gnosys migrate)");
2718
- }
2719
- else {
2720
- console.log(" Status: — not available (better-sqlite3 not installed)");
2721
- }
2722
- db.close();
2708
+ const localDbPath = path.join(stores[0].path, "gnosys.db");
2709
+ const localDbExists = await fs.stat(localDbPath).then(() => true).catch(() => false);
2710
+ if (localDbExists) {
2711
+ console.log("Local Store (gnosys.db):");
2712
+ console.log(" ⚠ Local gnosys.db found — this is a legacy artifact.");
2713
+ console.log(" All memories should be in the central DB (~/.gnosys/gnosys.db).");
2714
+ console.log(` Safe to remove: rm "${localDbPath}"`);
2715
+ console.log("");
2723
2716
  }
2724
- catch {
2725
- console.log(" Status: not initialized");
2717
+ }
2718
+ // Check central DB
2719
+ console.log("Central DB (~/.gnosys/gnosys.db):");
2720
+ try {
2721
+ const db = GnosysDB.openCentral();
2722
+ if (db.isAvailable() && db.isMigrated()) {
2723
+ const counts = db.getMemoryCount();
2724
+ console.log(` Status: ✓ migrated (schema v${db.getSchemaVersion()})`);
2725
+ console.log(` Active: ${counts.active} | Archived: ${counts.archived} | Total: ${counts.total}`);
2726
2726
  }
2727
- console.log("");
2727
+ else if (db.isAvailable()) {
2728
+ console.log(" Status: ✗ not migrated (run gnosys upgrade)");
2729
+ }
2730
+ else {
2731
+ console.log(" Status: — not available (better-sqlite3 not installed)");
2732
+ }
2733
+ db.close();
2734
+ }
2735
+ catch {
2736
+ console.log(" Status: — not initialized");
2728
2737
  }
2738
+ console.log("");
2729
2739
  // Check stores
2730
2740
  console.log("Stores:");
2731
2741
  if (stores.length === 0) {