prism-mcp-server 9.2.4 → 9.2.5
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/storage/index.js +36 -13
- package/dist/storage/reconcile.js +1 -1
- package/package.json +1 -1
package/dist/storage/index.js
CHANGED
|
@@ -66,20 +66,43 @@ export async function getStorage() {
|
|
|
66
66
|
// the split-brain where Claude Desktop writes go to Supabase but
|
|
67
67
|
// Antigravity reads from SQLite and sees stale data.
|
|
68
68
|
//
|
|
69
|
-
//
|
|
70
|
-
//
|
|
71
|
-
//
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
const
|
|
78
|
-
await
|
|
69
|
+
// IMPORTANT: The supabaseReady check above only resolves dashboard
|
|
70
|
+
// credentials when requestedBackend==="supabase". For reconciliation
|
|
71
|
+
// we need credentials even when backend is "local", so we do a
|
|
72
|
+
// second probe here.
|
|
73
|
+
if (activeStorageBackend === "local") {
|
|
74
|
+
let canReconcile = supabaseReady;
|
|
75
|
+
if (!canReconcile) {
|
|
76
|
+
// Probe dashboard config for Supabase credentials
|
|
77
|
+
const dashUrl = await getSetting("SUPABASE_URL");
|
|
78
|
+
const dashKey = await getSetting("SUPABASE_KEY");
|
|
79
|
+
if (dashUrl && dashKey) {
|
|
80
|
+
try {
|
|
81
|
+
const parsed = new URL(dashUrl);
|
|
82
|
+
if (parsed.protocol === "http:" || parsed.protocol === "https:") {
|
|
83
|
+
canReconcile = true;
|
|
84
|
+
process.env.SUPABASE_URL = dashUrl;
|
|
85
|
+
process.env.SUPABASE_KEY = dashKey;
|
|
86
|
+
debugLog("[Prism Storage] Reconciliation: using Supabase credentials from dashboard config");
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
catch {
|
|
90
|
+
// Invalid URL — skip reconciliation
|
|
91
|
+
}
|
|
92
|
+
}
|
|
79
93
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
94
|
+
if (canReconcile) {
|
|
95
|
+
try {
|
|
96
|
+
const { reconcileHandoffs } = await import("./reconcile.js");
|
|
97
|
+
const { SqliteStorage } = await import("./sqlite.js");
|
|
98
|
+
const sqliteInstance = storageInstance;
|
|
99
|
+
const getTimestamps = () => sqliteInstance.getHandoffTimestamps();
|
|
100
|
+
await reconcileHandoffs(storageInstance, getTimestamps);
|
|
101
|
+
}
|
|
102
|
+
catch (err) {
|
|
103
|
+
// Non-fatal: reconciliation is best-effort
|
|
104
|
+
debugLog(`[Prism Storage] Reconciliation skipped: ${err instanceof Error ? err.message : String(err)}`);
|
|
105
|
+
}
|
|
83
106
|
}
|
|
84
107
|
}
|
|
85
108
|
return storageInstance;
|
|
@@ -78,7 +78,7 @@ export async function reconcileHandoffs(localStorage, getLocalTimestamps) {
|
|
|
78
78
|
// Timeout prevents startup freeze if Supabase is slow/unreachable.
|
|
79
79
|
const remoteHandoffs = await withTimeout(supabaseGet("session_handoffs", {
|
|
80
80
|
user_id: `eq.${PRISM_USER_ID}`,
|
|
81
|
-
select: "
|
|
81
|
+
select: "*",
|
|
82
82
|
}), RECONCILE_TIMEOUT_MS, "fetch handoffs");
|
|
83
83
|
if (!Array.isArray(remoteHandoffs) || remoteHandoffs.length === 0) {
|
|
84
84
|
debugLog("[Reconcile] No remote handoffs found — nothing to sync");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prism-mcp-server",
|
|
3
|
-
"version": "9.2.
|
|
3
|
+
"version": "9.2.5",
|
|
4
4
|
"mcpName": "io.github.dcostenco/prism-mcp",
|
|
5
5
|
"description": "The Mind Palace for AI Agents — a true Cognitive Architecture with Hebbian learning (episodic→semantic consolidation), ACT-R spreading activation (multi-hop causal reasoning), uncertainty-aware rejection gates (agents that know when they don't know), adversarial evaluation (anti-sycophancy), fail-closed Dark Factory pipelines, persistent memory (SQLite/Supabase), multi-agent Hivemind, time travel & visual dashboard. Zero-config local mode.",
|
|
6
6
|
"module": "index.ts",
|