@signetai/connector-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 +121 -7
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -11177,6 +11177,58 @@ function up128(db) {
11177
11177
  AND error IS NOT NULL;
11178
11178
  `);
11179
11179
  }
11180
+ function tableExists3(db, table) {
11181
+ return db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = ?").get(table) != null;
11182
+ }
11183
+ function up129(db) {
11184
+ if (!tableExists3(db, "memory_jobs"))
11185
+ return;
11186
+ if (!tableExists3(db, "job_cancellations")) {
11187
+ throw new Error("job_cancellations table missing; cannot retire structural jobs without an audit trail");
11188
+ }
11189
+ db.prepare(`
11190
+ INSERT INTO job_cancellations (
11191
+ id, source_table, source_id, status_before, payload_json,
11192
+ reason, actor, actor_type, request_id, created_at
11193
+ )
11194
+ SELECT
11195
+ 'retire-structural-jobs-129:' || id,
11196
+ 'memory_jobs',
11197
+ id,
11198
+ status,
11199
+ json_object(
11200
+ 'id', id,
11201
+ 'memory_id', memory_id,
11202
+ 'document_id', document_id,
11203
+ 'job_type', job_type,
11204
+ 'status', status,
11205
+ 'payload', payload,
11206
+ 'result', result,
11207
+ 'attempts', attempts,
11208
+ 'max_attempts', max_attempts,
11209
+ 'leased_at', leased_at,
11210
+ 'completed_at', completed_at,
11211
+ 'failed_at', failed_at,
11212
+ 'error', error,
11213
+ 'created_at', created_at,
11214
+ 'updated_at', updated_at
11215
+ ),
11216
+ 'retired structural queue after Dreaming cutover',
11217
+ 'migration:129',
11218
+ 'system',
11219
+ NULL,
11220
+ strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
11221
+ FROM memory_jobs
11222
+ WHERE job_type IN ('structural_classify', 'structural_dependency')
11223
+ AND status IN ('pending', 'leased');
11224
+ `).run();
11225
+ db.exec(`
11226
+ UPDATE memory_jobs
11227
+ SET status = 'cancelled', updated_at = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
11228
+ WHERE job_type IN ('structural_classify', 'structural_dependency')
11229
+ AND status IN ('pending', 'leased');
11230
+ `);
11231
+ }
11180
11232
  var MIGRATIONS = [
11181
11233
  {
11182
11234
  version: 1,
@@ -12208,6 +12260,11 @@ var MIGRATIONS = [
12208
12260
  version: 128,
12209
12261
  name: "bounded-queue-diagnostics",
12210
12262
  up: up128
12263
+ },
12264
+ {
12265
+ version: 129,
12266
+ name: "retire-structural-jobs",
12267
+ up: up129
12211
12268
  }
12212
12269
  ];
12213
12270
  var LATEST_SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1]?.version ?? 0;
@@ -21568,7 +21625,7 @@ function memoriesFtsNeedsTokenizerRepair2(sql) {
21568
21625
  return true;
21569
21626
  return !normalized.includes(`tokenize='${MEMORIES_FTS_TOKENIZER2}'`);
21570
21627
  }
21571
- function up129(db) {
21628
+ function up130(db) {
21572
21629
  db.exec(`
21573
21630
  CREATE TABLE IF NOT EXISTS schema_migrations (
21574
21631
  version INTEGER PRIMARY KEY,
@@ -24803,7 +24860,7 @@ function up1032(db) {
24803
24860
  )
24804
24861
  `);
24805
24862
  }
24806
- function tableExists3(db, table) {
24863
+ function tableExists4(db, table) {
24807
24864
  return db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = ?").get(table) !== undefined;
24808
24865
  }
24809
24866
  function hasColumn162(db, table, column) {
@@ -24825,7 +24882,7 @@ function up1042(db) {
24825
24882
  CREATE INDEX IF NOT EXISTS idx_derived_memory_sources_source
24826
24883
  ON derived_memory_sources(agent_id, source_kind, source_id);
24827
24884
  `);
24828
- if (tableExists3(db, "aggregate_evidence_sources")) {
24885
+ if (tableExists4(db, "aggregate_evidence_sources")) {
24829
24886
  db.exec(`
24830
24887
  INSERT OR IGNORE INTO derived_memory_sources
24831
24888
  (derived_memory_id, source_kind, source_id, source_path, agent_id, created_at)
@@ -24833,7 +24890,7 @@ function up1042(db) {
24833
24890
  FROM aggregate_evidence_sources
24834
24891
  `);
24835
24892
  }
24836
- if (tableExists3(db, "aggregate_memory_sources")) {
24893
+ if (tableExists4(db, "aggregate_memory_sources")) {
24837
24894
  db.exec(`
24838
24895
  INSERT OR IGNORE INTO derived_memory_sources
24839
24896
  (derived_memory_id, source_kind, source_id, source_path, agent_id, created_at)
@@ -24841,10 +24898,10 @@ function up1042(db) {
24841
24898
  FROM aggregate_memory_sources
24842
24899
  `);
24843
24900
  }
24844
- if (tableExists3(db, "memories") && !hasColumn162(db, "memories", "stale_at")) {
24901
+ if (tableExists4(db, "memories") && !hasColumn162(db, "memories", "stale_at")) {
24845
24902
  db.exec("ALTER TABLE memories ADD COLUMN stale_at TEXT");
24846
24903
  }
24847
- if (tableExists3(db, "memories")) {
24904
+ if (tableExists4(db, "memories")) {
24848
24905
  db.exec(`
24849
24906
  CREATE INDEX IF NOT EXISTS idx_memories_stale_derived
24850
24907
  ON memories(agent_id, stale_at)
@@ -25686,11 +25743,63 @@ function up1282(db) {
25686
25743
  AND error IS NOT NULL;
25687
25744
  `);
25688
25745
  }
25746
+ function tableExists32(db, table) {
25747
+ return db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = ?").get(table) != null;
25748
+ }
25749
+ function up1292(db) {
25750
+ if (!tableExists32(db, "memory_jobs"))
25751
+ return;
25752
+ if (!tableExists32(db, "job_cancellations")) {
25753
+ throw new Error("job_cancellations table missing; cannot retire structural jobs without an audit trail");
25754
+ }
25755
+ db.prepare(`
25756
+ INSERT INTO job_cancellations (
25757
+ id, source_table, source_id, status_before, payload_json,
25758
+ reason, actor, actor_type, request_id, created_at
25759
+ )
25760
+ SELECT
25761
+ 'retire-structural-jobs-129:' || id,
25762
+ 'memory_jobs',
25763
+ id,
25764
+ status,
25765
+ json_object(
25766
+ 'id', id,
25767
+ 'memory_id', memory_id,
25768
+ 'document_id', document_id,
25769
+ 'job_type', job_type,
25770
+ 'status', status,
25771
+ 'payload', payload,
25772
+ 'result', result,
25773
+ 'attempts', attempts,
25774
+ 'max_attempts', max_attempts,
25775
+ 'leased_at', leased_at,
25776
+ 'completed_at', completed_at,
25777
+ 'failed_at', failed_at,
25778
+ 'error', error,
25779
+ 'created_at', created_at,
25780
+ 'updated_at', updated_at
25781
+ ),
25782
+ 'retired structural queue after Dreaming cutover',
25783
+ 'migration:129',
25784
+ 'system',
25785
+ NULL,
25786
+ strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
25787
+ FROM memory_jobs
25788
+ WHERE job_type IN ('structural_classify', 'structural_dependency')
25789
+ AND status IN ('pending', 'leased');
25790
+ `).run();
25791
+ db.exec(`
25792
+ UPDATE memory_jobs
25793
+ SET status = 'cancelled', updated_at = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
25794
+ WHERE job_type IN ('structural_classify', 'structural_dependency')
25795
+ AND status IN ('pending', 'leased');
25796
+ `);
25797
+ }
25689
25798
  var MIGRATIONS2 = [
25690
25799
  {
25691
25800
  version: 1,
25692
25801
  name: "baseline",
25693
- up: up129,
25802
+ up: up130,
25694
25803
  artifacts: { tables: ["memories", "conversations", "embeddings"] }
25695
25804
  },
25696
25805
  {
@@ -26717,6 +26826,11 @@ var MIGRATIONS2 = [
26717
26826
  version: 128,
26718
26827
  name: "bounded-queue-diagnostics",
26719
26828
  up: up1282
26829
+ },
26830
+ {
26831
+ version: 129,
26832
+ name: "retire-structural-jobs",
26833
+ up: up1292
26720
26834
  }
26721
26835
  ];
26722
26836
  var LATEST_SCHEMA_VERSION2 = MIGRATIONS2[MIGRATIONS2.length - 1]?.version ?? 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@signetai/connector-openclaw",
3
- "version": "0.197.7",
3
+ "version": "0.197.8",
4
4
  "description": "Signet connector for OpenClaw - configures workspace and memory hooks",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -25,8 +25,8 @@
25
25
  "test": "bun test"
26
26
  },
27
27
  "dependencies": {
28
- "@signetai/connector-base": "0.197.7",
29
- "@signetai/core": "0.197.7"
28
+ "@signetai/connector-base": "0.197.8",
29
+ "@signetai/core": "0.197.8"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/node": "^22.0.0",