opencode-mastra-om 0.1.14 → 0.1.16
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/index.js +23 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -178168,6 +178168,29 @@ var MastraPlugin = async (ctx) => {
|
|
|
178168
178168
|
}
|
|
178169
178169
|
om = new ObservationalMemory(omOptions2);
|
|
178170
178170
|
omLog(`[init] ObservationalMemory created, model=${config2.model ?? "default"}`);
|
|
178171
|
+
try {
|
|
178172
|
+
const db = store.turso;
|
|
178173
|
+
if (db) {
|
|
178174
|
+
await db.execute(`CREATE TABLE IF NOT EXISTS mastra_om_backups (
|
|
178175
|
+
id TEXT PRIMARY KEY,
|
|
178176
|
+
lookupKey TEXT NOT NULL,
|
|
178177
|
+
slot INTEGER NOT NULL,
|
|
178178
|
+
generationCount INTEGER NOT NULL DEFAULT 0,
|
|
178179
|
+
observations TEXT,
|
|
178180
|
+
observationTokenCount INTEGER NOT NULL DEFAULT 0,
|
|
178181
|
+
lastObservedAt TEXT,
|
|
178182
|
+
lastReflectionAt TEXT,
|
|
178183
|
+
pendingMessageTokens INTEGER NOT NULL DEFAULT 0,
|
|
178184
|
+
observedMessageIds TEXT NOT NULL DEFAULT '[]',
|
|
178185
|
+
triggerEvent TEXT,
|
|
178186
|
+
savedAt TEXT NOT NULL,
|
|
178187
|
+
UNIQUE(lookupKey, slot)
|
|
178188
|
+
)`);
|
|
178189
|
+
omLog(`[init] mastra_om_backups table ready`);
|
|
178190
|
+
}
|
|
178191
|
+
} catch (tableErr) {
|
|
178192
|
+
omLog(`[init] WARNING: could not create mastra_om_backups: ${tableErr instanceof Error ? tableErr.message : String(tableErr)}`);
|
|
178193
|
+
}
|
|
178171
178194
|
}
|
|
178172
178195
|
} catch (err) {
|
|
178173
178196
|
const msg = err instanceof Error ? err.message : String(err);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "opencode-mastra-om",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.16",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"description": "Enhanced Mastra Observational Memory plugin for OpenCode — persistent cross-session memory with observation, reflection, and manual trigger tools",
|