@signetai/signet-memory-openclaw 0.197.7 → 0.197.8

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.
Files changed (2) hide show
  1. package/dist/index.js +57 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -11437,6 +11437,58 @@ function up128(db) {
11437
11437
  AND error IS NOT NULL;
11438
11438
  `);
11439
11439
  }
11440
+ function tableExists3(db, table) {
11441
+ return db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = ?").get(table) != null;
11442
+ }
11443
+ function up129(db) {
11444
+ if (!tableExists3(db, "memory_jobs"))
11445
+ return;
11446
+ if (!tableExists3(db, "job_cancellations")) {
11447
+ throw new Error("job_cancellations table missing; cannot retire structural jobs without an audit trail");
11448
+ }
11449
+ db.prepare(`
11450
+ INSERT INTO job_cancellations (
11451
+ id, source_table, source_id, status_before, payload_json,
11452
+ reason, actor, actor_type, request_id, created_at
11453
+ )
11454
+ SELECT
11455
+ 'retire-structural-jobs-129:' || id,
11456
+ 'memory_jobs',
11457
+ id,
11458
+ status,
11459
+ json_object(
11460
+ 'id', id,
11461
+ 'memory_id', memory_id,
11462
+ 'document_id', document_id,
11463
+ 'job_type', job_type,
11464
+ 'status', status,
11465
+ 'payload', payload,
11466
+ 'result', result,
11467
+ 'attempts', attempts,
11468
+ 'max_attempts', max_attempts,
11469
+ 'leased_at', leased_at,
11470
+ 'completed_at', completed_at,
11471
+ 'failed_at', failed_at,
11472
+ 'error', error,
11473
+ 'created_at', created_at,
11474
+ 'updated_at', updated_at
11475
+ ),
11476
+ 'retired structural queue after Dreaming cutover',
11477
+ 'migration:129',
11478
+ 'system',
11479
+ NULL,
11480
+ strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
11481
+ FROM memory_jobs
11482
+ WHERE job_type IN ('structural_classify', 'structural_dependency')
11483
+ AND status IN ('pending', 'leased');
11484
+ `).run();
11485
+ db.exec(`
11486
+ UPDATE memory_jobs
11487
+ SET status = 'cancelled', updated_at = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
11488
+ WHERE job_type IN ('structural_classify', 'structural_dependency')
11489
+ AND status IN ('pending', 'leased');
11490
+ `);
11491
+ }
11440
11492
  var MIGRATIONS = [
11441
11493
  {
11442
11494
  version: 1,
@@ -12468,6 +12520,11 @@ var MIGRATIONS = [
12468
12520
  version: 128,
12469
12521
  name: "bounded-queue-diagnostics",
12470
12522
  up: up128
12523
+ },
12524
+ {
12525
+ version: 129,
12526
+ name: "retire-structural-jobs",
12527
+ up: up129
12471
12528
  }
12472
12529
  ];
12473
12530
  var LATEST_SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1]?.version ?? 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signetai/signet-memory-openclaw",
3
- "version": "0.197.7",
3
+ "version": "0.197.8",
4
4
  "description": "Signet adapter for OpenClaw — runtime plugin for AI agent memory",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",