gnosys 5.2.22 → 5.2.23
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 +29 -19
- package/dist/cli.js.map +1 -1
- package/dist/index.js +1 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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 (
|
|
2706
|
+
// Check local gnosys.db (legacy — should NOT exist in DB-only architecture)
|
|
2707
2707
|
if (stores.length > 0) {
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
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
|
-
|
|
2725
|
-
|
|
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
|
-
|
|
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) {
|