opencode-mempalace-persistence 2.6.0 → 2.7.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.
package/README.md CHANGED
@@ -219,6 +219,13 @@ OPENCODE_MEMPALACE_BACKFILL=1 opencode
219
219
 
220
220
  The plugin exports everything in the opencode database on the next sync, then resumes incremental mode. Mining is idempotent — re-running is safe.
221
221
 
222
+ ### Durability notes (drawers vs KG)
223
+
224
+ - **Drawers** (transcripts) are append-mostly: a crash mid-mine can only leave already-filed content behind, never corrupt what's stored. Re-running the mine is always safe.
225
+ - **KG facts** live a different life: `kg_supersede` replaces a fact atomically at a shared boundary (single transaction) — a mid-write crash rolls back to the *old* fact: stale but present, never half-written.
226
+ - **Reads are validity-window only**: there is no liveness check on read, so a stale fact reads as current until the model revisits it (via checkpoint, diary review, or a new decision on the same subject).
227
+ - **Backfill mines transcripts into drawers only** — it never touches the KG. KG facts come exclusively from live MCP calls (conversation, checkpoints, diary). A crashed supersede therefore waits for the next model touch, not the next backfill.
228
+
222
229
  ---
223
230
 
224
231
  ## Architecture
package/dist/index.js CHANGED
@@ -925,6 +925,9 @@ export default (async ({ client }) => {
925
925
  const summary = summarizeToolCall(name, input?.args, output?.output || "");
926
926
  log(`tool: ${summary}`);
927
927
  toast("info", "MemPalace", summary);
928
+ // Diagnostic: MCP results may live outside `output` — record the
929
+ // real shape once so extraction can be fixed (see answered-empty).
930
+ const outAny = output || {};
928
931
  ilog("tool", {
929
932
  tool: String(name).replace(/^mcp_+/, "").replace(/^mempalace_mempalace_/, "").replace(/^mempalace_/, ""),
930
933
  asked: (() => { try {
@@ -933,7 +936,13 @@ export default (async ({ client }) => {
933
936
  catch {
934
937
  return "";
935
938
  } })(),
936
- answered: String(output?.output || "").replace(/\s+/g, " ").slice(0, 300),
939
+ answered: String(outAny.output || "").replace(/\s+/g, " ").slice(0, 300),
940
+ shape: {
941
+ keys: Object.keys(outAny),
942
+ title: outAny.title,
943
+ metaKeys: outAny.metadata && typeof outAny.metadata === "object" ? Object.keys(outAny.metadata) : typeof outAny.metadata,
944
+ raw: JSON.stringify(outAny).slice(0, 300),
945
+ },
937
946
  });
938
947
  }
939
948
  catch { }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-mempalace-persistence",
3
- "version": "2.6.0",
3
+ "version": "2.7.1",
4
4
  "description": "OpenCode plugin — auto-sync conversations to MemPalace memory in real-time. No forced wings, KG extraction via MCP tools.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",