linksee-memory 0.1.1 → 0.1.2
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/db/migrate.js +14 -0
- package/package.json +1 -1
package/dist/db/migrate.js
CHANGED
|
@@ -43,6 +43,20 @@ export function runMigrations(db) {
|
|
|
43
43
|
if (currentVersion > 0 && currentVersion < 4) {
|
|
44
44
|
db.exec(`INSERT INTO memories_fts(rowid, content) SELECT id, content FROM memories;`);
|
|
45
45
|
}
|
|
46
|
+
// v0.1.1 data migration: pin threshold lowered from 1.0 to 0.9.
|
|
47
|
+
//
|
|
48
|
+
// Before v0.1.1, `remember()` only set `protected = 1` for memories
|
|
49
|
+
// inserted with importance >= 1.0. After v0.1.1, the threshold is 0.9.
|
|
50
|
+
// Existing rows written under the old rule need to be reconciled so that
|
|
51
|
+
// `recall().pinned`, `list_entities.pinned_count`, and the auto-forget
|
|
52
|
+
// guard (`WHERE protected = 0 AND importance < 0.9`) all agree.
|
|
53
|
+
//
|
|
54
|
+
// This runs on every startup but is a no-op after the first successful
|
|
55
|
+
// run (UPDATE filter excludes already-protected rows).
|
|
56
|
+
const hasMemories = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'memories'").get();
|
|
57
|
+
if (hasMemories?.name) {
|
|
58
|
+
db.prepare(`UPDATE memories SET protected = 1 WHERE importance >= 0.9 AND protected = 0`).run();
|
|
59
|
+
}
|
|
46
60
|
}
|
|
47
61
|
// CLI entrypoint
|
|
48
62
|
if (import.meta.url === `file://${process.argv[1]}` || process.argv[1]?.endsWith('migrate.ts') || process.argv[1]?.endsWith('migrate.js')) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "linksee-memory",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"mcpName": "io.github.michielinksee/linksee-memory",
|
|
5
5
|
"description": "Local-first agent memory MCP — cross-agent brain with 6-layer structured memory + token-saving file diff cache",
|
|
6
6
|
"type": "module",
|