opencode-memory-pro 1.3.2 → 1.3.3
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/README.md +1 -1
- package/dist/index.js +1 -1
- package/dist/logger.d.ts +1 -0
- package/dist/logger.js +11 -0
- package/dist/store.js +13 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,7 +40,7 @@ Published on npm — install directly (requires OpenCode ≥ 1.x and Node.js ≥
|
|
|
40
40
|
opencode plugin opencode-memory-pro
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
The latest release is **v1.3.
|
|
43
|
+
The latest release is **v1.3.3** on [npm](https://www.npmjs.com/package/opencode-memory-pro); source and releases are on [GitHub](https://github.com/tman204-50/opencode-memory-pro).
|
|
44
44
|
|
|
45
45
|
Remove the old plugin pin at the same time:
|
|
46
46
|
|
package/dist/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import { requestLLMCapture, isOwnSession } from "./llm.js";
|
|
|
11
11
|
import { createMemoryTools, createFeedbackTools, createEpisodicTools } from "./tools/index.js";
|
|
12
12
|
import { sweepExpiredMemories } from "./tools/memory.js";
|
|
13
13
|
import { createGraphStore } from "./graph.js";
|
|
14
|
-
const PLUGIN_VERSION = "1.3.
|
|
14
|
+
const PLUGIN_VERSION = "1.3.3";
|
|
15
15
|
const SCHEMA_VERSION = 1;
|
|
16
16
|
// Event-driven dedup: run consolidateDuplicates on session.idle (throttled to
|
|
17
17
|
// this interval so chatty sessions aren't re-scanning the store every turn)
|
package/dist/logger.d.ts
CHANGED
|
@@ -6,4 +6,5 @@ export declare function configureLogger(opts: {
|
|
|
6
6
|
logFile?: string;
|
|
7
7
|
}): void;
|
|
8
8
|
export declare function log(level: LogLevel, message: string, extra?: Record<string, unknown>): void;
|
|
9
|
+
export declare function logFileOnly(level: LogLevel, message: string, extra?: Record<string, unknown>): void;
|
|
9
10
|
export {};
|
package/dist/logger.js
CHANGED
|
@@ -123,4 +123,15 @@ function consoleFallback(level, message) {
|
|
|
123
123
|
console.log(formatted);
|
|
124
124
|
break;
|
|
125
125
|
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// File-sink-only logging: writes to the configured log file but never to the
|
|
129
|
+
// opencode /log bus or the console. Used for known-benign noise (e.g. LanceDB
|
|
130
|
+
// optimize commit-conflict warnings) that should stay out of the TUI while
|
|
131
|
+
// remaining debuggable in the plugin log.
|
|
132
|
+
export function logFileOnly(level, message, extra) {
|
|
133
|
+
const lvl = LOG_LEVELS[level] ?? LOG_LEVELS.info;
|
|
134
|
+
if (lvl < _minLevel)
|
|
135
|
+
return;
|
|
136
|
+
writeFileLog(level, message, extra);
|
|
126
137
|
}
|
package/dist/store.js
CHANGED
|
@@ -2,7 +2,7 @@ import { mkdir, readdir } from "node:fs/promises";
|
|
|
2
2
|
import { dirname, join } from "node:path";
|
|
3
3
|
import { validateEpisodicRecord, validateEpisodicRecordArray } from "./types.js";
|
|
4
4
|
import { tokenize } from "./utils.js";
|
|
5
|
-
import { log } from "./logger.js";
|
|
5
|
+
import { log, logFileOnly } from "./logger.js";
|
|
6
6
|
const TABLE_NAME = "memories";
|
|
7
7
|
const EVENTS_TABLE_NAME = "effectiveness_events";
|
|
8
8
|
const EVENTS_SOURCE_COLUMN = "source";
|
|
@@ -129,7 +129,18 @@ export class MemoryStore {
|
|
|
129
129
|
log("info", `[store] optimized ${table.name}: ${count} versions before, pruned=${stats.prune.oldVersionsRemoved}, bytesRemoved=${stats.prune.bytesRemoved}`);
|
|
130
130
|
}
|
|
131
131
|
catch (error) {
|
|
132
|
-
|
|
132
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
133
|
+
// Known-benign LanceDB compaction races: a concurrent write
|
|
134
|
+
// (or a second optimize pass) commits a newer version between
|
|
135
|
+
// our read and our commit. Lance leaves the rewritten
|
|
136
|
+
// fragments for GC and the next optimize retry succeeds (and
|
|
137
|
+
// the success line below is logged). Keep these out of the
|
|
138
|
+
// TUI; they still land in the plugin log file for debugging.
|
|
139
|
+
if (/Retryable commit conflict|Compaction commit failed/.test(message)) {
|
|
140
|
+
logFileOnly("warn", `[store] optimize conflict for ${table.name} (self-heals on retry): ${message}`);
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
143
|
+
log("warn", `[store] optimize failed for ${table.name}: ${message}`);
|
|
133
144
|
}
|
|
134
145
|
}
|
|
135
146
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-memory-pro",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.3",
|
|
4
4
|
"description": "LanceDB-backed long-term memory provider for OpenCode — standalone fork of lancedb-opencode-pro with entity graph, lifecycle, and retention",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|