@signetai/signet-memory-openclaw 0.194.0 → 0.195.0
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 +40 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11335,6 +11335,40 @@ function up125(db) {
|
|
|
11335
11335
|
scannedAt
|
|
11336
11336
|
});
|
|
11337
11337
|
}
|
|
11338
|
+
function up126(db) {
|
|
11339
|
+
const table = db.prepare("SELECT sql FROM sqlite_master WHERE type = 'table' AND name = 'dreaming_attention'").get();
|
|
11340
|
+
if (!table)
|
|
11341
|
+
return;
|
|
11342
|
+
if (table.sql?.includes("'surprisal'"))
|
|
11343
|
+
return;
|
|
11344
|
+
db.exec(`
|
|
11345
|
+
DROP INDEX IF EXISTS idx_dreaming_attention_pending;
|
|
11346
|
+
ALTER TABLE dreaming_attention RENAME TO dreaming_attention_legacy_126;
|
|
11347
|
+
CREATE TABLE dreaming_attention (
|
|
11348
|
+
id TEXT PRIMARY KEY,
|
|
11349
|
+
agent_id TEXT NOT NULL,
|
|
11350
|
+
kind TEXT NOT NULL CHECK (kind IN ('review_due', 'hygiene', 'contested_claim', 'evidence_requeue', 'surprisal')),
|
|
11351
|
+
subject_ref TEXT NOT NULL,
|
|
11352
|
+
details_json TEXT NOT NULL DEFAULT '{}',
|
|
11353
|
+
priority INTEGER NOT NULL DEFAULT 0 CHECK (priority >= 0 AND priority <= 100),
|
|
11354
|
+
created_at TEXT NOT NULL DEFAULT (datetime('now')),
|
|
11355
|
+
generation INTEGER NOT NULL DEFAULT 0,
|
|
11356
|
+
resolved_at TEXT,
|
|
11357
|
+
resolved_by_pass_id TEXT,
|
|
11358
|
+
UNIQUE(agent_id, kind, subject_ref)
|
|
11359
|
+
);
|
|
11360
|
+
INSERT INTO dreaming_attention (
|
|
11361
|
+
id, agent_id, kind, subject_ref, details_json, priority, created_at,
|
|
11362
|
+
generation, resolved_at, resolved_by_pass_id
|
|
11363
|
+
)
|
|
11364
|
+
SELECT id, agent_id, kind, subject_ref, details_json, priority, created_at,
|
|
11365
|
+
generation, resolved_at, resolved_by_pass_id
|
|
11366
|
+
FROM dreaming_attention_legacy_126;
|
|
11367
|
+
DROP TABLE dreaming_attention_legacy_126;
|
|
11368
|
+
CREATE INDEX idx_dreaming_attention_pending
|
|
11369
|
+
ON dreaming_attention (agent_id, resolved_at, priority DESC, created_at ASC);
|
|
11370
|
+
`);
|
|
11371
|
+
}
|
|
11338
11372
|
var MIGRATIONS = [
|
|
11339
11373
|
{
|
|
11340
11374
|
version: 1,
|
|
@@ -12349,6 +12383,12 @@ var MIGRATIONS = [
|
|
|
12349
12383
|
name: "memory-content-safety",
|
|
12350
12384
|
up: up125,
|
|
12351
12385
|
artifacts: { tables: ["memory_content_safety"] }
|
|
12386
|
+
},
|
|
12387
|
+
{
|
|
12388
|
+
version: 126,
|
|
12389
|
+
name: "dreaming-surprisal-attention",
|
|
12390
|
+
up: up126,
|
|
12391
|
+
artifacts: { tables: ["dreaming_attention"] }
|
|
12352
12392
|
}
|
|
12353
12393
|
];
|
|
12354
12394
|
var LATEST_SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1]?.version ?? 0;
|