@signetai/signet-memory-openclaw 0.118.0 → 0.118.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/index.js +36 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9159,6 +9159,7 @@ function up68(db) {
|
|
|
9159
9159
|
question TEXT,
|
|
9160
9160
|
answer TEXT,
|
|
9161
9161
|
answer_memory_id TEXT,
|
|
9162
|
+
content_key TEXT,
|
|
9162
9163
|
memory_ids TEXT NOT NULL DEFAULT '[]',
|
|
9163
9164
|
summary_ids TEXT NOT NULL DEFAULT '[]',
|
|
9164
9165
|
model TEXT,
|
|
@@ -9166,8 +9167,33 @@ function up68(db) {
|
|
|
9166
9167
|
answered_at TEXT
|
|
9167
9168
|
);
|
|
9168
9169
|
|
|
9169
|
-
CREATE
|
|
9170
|
-
ON daily_reflections(agent_id, date);
|
|
9170
|
+
CREATE INDEX IF NOT EXISTS idx_daily_reflections_agent_date
|
|
9171
|
+
ON daily_reflections(agent_id, date, created_at DESC);
|
|
9172
|
+
|
|
9173
|
+
CREATE UNIQUE INDEX IF NOT EXISTS idx_daily_reflections_agent_content_key
|
|
9174
|
+
ON daily_reflections(agent_id, date, content_key)
|
|
9175
|
+
WHERE content_key IS NOT NULL;
|
|
9176
|
+
`);
|
|
9177
|
+
}
|
|
9178
|
+
function up69(db) {
|
|
9179
|
+
const cols = db.prepare("PRAGMA table_info(daily_reflections)").all();
|
|
9180
|
+
const colNames = new Set(cols.flatMap((c) => typeof c.name === "string" ? [c.name] : []));
|
|
9181
|
+
if (!colNames.has("content_key")) {
|
|
9182
|
+
db.exec("ALTER TABLE daily_reflections ADD COLUMN content_key TEXT");
|
|
9183
|
+
}
|
|
9184
|
+
db.exec(`
|
|
9185
|
+
DROP INDEX IF EXISTS idx_daily_reflections_agent_date;
|
|
9186
|
+
DROP INDEX IF EXISTS idx_daily_reflections_agent_content_key;
|
|
9187
|
+
|
|
9188
|
+
CREATE INDEX IF NOT EXISTS idx_daily_reflections_agent_created
|
|
9189
|
+
ON daily_reflections(agent_id, created_at DESC);
|
|
9190
|
+
|
|
9191
|
+
CREATE INDEX IF NOT EXISTS idx_daily_reflections_agent_date
|
|
9192
|
+
ON daily_reflections(agent_id, date, created_at DESC);
|
|
9193
|
+
|
|
9194
|
+
CREATE UNIQUE INDEX IF NOT EXISTS idx_daily_reflections_agent_content_key
|
|
9195
|
+
ON daily_reflections(agent_id, date, content_key)
|
|
9196
|
+
WHERE content_key IS NOT NULL;
|
|
9171
9197
|
`);
|
|
9172
9198
|
}
|
|
9173
9199
|
var MIGRATIONS = [
|
|
@@ -9700,6 +9726,14 @@ var MIGRATIONS = [
|
|
|
9700
9726
|
artifacts: {
|
|
9701
9727
|
tables: ["daily_reflections"]
|
|
9702
9728
|
}
|
|
9729
|
+
},
|
|
9730
|
+
{
|
|
9731
|
+
version: 69,
|
|
9732
|
+
name: "daily-reflections-multiple-insights",
|
|
9733
|
+
up: up69,
|
|
9734
|
+
artifacts: {
|
|
9735
|
+
tables: ["daily_reflections"]
|
|
9736
|
+
}
|
|
9703
9737
|
}
|
|
9704
9738
|
];
|
|
9705
9739
|
var LATEST_SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1]?.version ?? 0;
|