@signetai/connector-claude-code 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
@@ -11178,6 +11178,58 @@ function up128(db) {
11178
11178
  AND error IS NOT NULL;
11179
11179
  `);
11180
11180
  }
11181
+ function tableExists3(db, table) {
11182
+ return db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = ?").get(table) != null;
11183
+ }
11184
+ function up129(db) {
11185
+ if (!tableExists3(db, "memory_jobs"))
11186
+ return;
11187
+ if (!tableExists3(db, "job_cancellations")) {
11188
+ throw new Error("job_cancellations table missing; cannot retire structural jobs without an audit trail");
11189
+ }
11190
+ db.prepare(`
11191
+ INSERT INTO job_cancellations (
11192
+ id, source_table, source_id, status_before, payload_json,
11193
+ reason, actor, actor_type, request_id, created_at
11194
+ )
11195
+ SELECT
11196
+ 'retire-structural-jobs-129:' || id,
11197
+ 'memory_jobs',
11198
+ id,
11199
+ status,
11200
+ json_object(
11201
+ 'id', id,
11202
+ 'memory_id', memory_id,
11203
+ 'document_id', document_id,
11204
+ 'job_type', job_type,
11205
+ 'status', status,
11206
+ 'payload', payload,
11207
+ 'result', result,
11208
+ 'attempts', attempts,
11209
+ 'max_attempts', max_attempts,
11210
+ 'leased_at', leased_at,
11211
+ 'completed_at', completed_at,
11212
+ 'failed_at', failed_at,
11213
+ 'error', error,
11214
+ 'created_at', created_at,
11215
+ 'updated_at', updated_at
11216
+ ),
11217
+ 'retired structural queue after Dreaming cutover',
11218
+ 'migration:129',
11219
+ 'system',
11220
+ NULL,
11221
+ strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
11222
+ FROM memory_jobs
11223
+ WHERE job_type IN ('structural_classify', 'structural_dependency')
11224
+ AND status IN ('pending', 'leased');
11225
+ `).run();
11226
+ db.exec(`
11227
+ UPDATE memory_jobs
11228
+ SET status = 'cancelled', updated_at = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
11229
+ WHERE job_type IN ('structural_classify', 'structural_dependency')
11230
+ AND status IN ('pending', 'leased');
11231
+ `);
11232
+ }
11181
11233
  var MIGRATIONS = [
11182
11234
  {
11183
11235
  version: 1,
@@ -12209,6 +12261,11 @@ var MIGRATIONS = [
12209
12261
  version: 128,
12210
12262
  name: "bounded-queue-diagnostics",
12211
12263
  up: up128
12264
+ },
12265
+ {
12266
+ version: 129,
12267
+ name: "retire-structural-jobs",
12268
+ up: up129
12212
12269
  }
12213
12270
  ];
12214
12271
  var LATEST_SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1]?.version ?? 0;
@@ -19595,7 +19652,7 @@ function memoriesFtsNeedsTokenizerRepair2(sql) {
19595
19652
  return true;
19596
19653
  return !normalized.includes(`tokenize='${MEMORIES_FTS_TOKENIZER2}'`);
19597
19654
  }
19598
- function up129(db) {
19655
+ function up130(db) {
19599
19656
  db.exec(`
19600
19657
  CREATE TABLE IF NOT EXISTS schema_migrations (
19601
19658
  version INTEGER PRIMARY KEY,
@@ -22830,7 +22887,7 @@ function up1032(db) {
22830
22887
  )
22831
22888
  `);
22832
22889
  }
22833
- function tableExists3(db, table) {
22890
+ function tableExists4(db, table) {
22834
22891
  return db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = ?").get(table) !== undefined;
22835
22892
  }
22836
22893
  function hasColumn162(db, table, column) {
@@ -22852,7 +22909,7 @@ function up1042(db) {
22852
22909
  CREATE INDEX IF NOT EXISTS idx_derived_memory_sources_source
22853
22910
  ON derived_memory_sources(agent_id, source_kind, source_id);
22854
22911
  `);
22855
- if (tableExists3(db, "aggregate_evidence_sources")) {
22912
+ if (tableExists4(db, "aggregate_evidence_sources")) {
22856
22913
  db.exec(`
22857
22914
  INSERT OR IGNORE INTO derived_memory_sources
22858
22915
  (derived_memory_id, source_kind, source_id, source_path, agent_id, created_at)
@@ -22860,7 +22917,7 @@ function up1042(db) {
22860
22917
  FROM aggregate_evidence_sources
22861
22918
  `);
22862
22919
  }
22863
- if (tableExists3(db, "aggregate_memory_sources")) {
22920
+ if (tableExists4(db, "aggregate_memory_sources")) {
22864
22921
  db.exec(`
22865
22922
  INSERT OR IGNORE INTO derived_memory_sources
22866
22923
  (derived_memory_id, source_kind, source_id, source_path, agent_id, created_at)
@@ -22868,10 +22925,10 @@ function up1042(db) {
22868
22925
  FROM aggregate_memory_sources
22869
22926
  `);
22870
22927
  }
22871
- if (tableExists3(db, "memories") && !hasColumn162(db, "memories", "stale_at")) {
22928
+ if (tableExists4(db, "memories") && !hasColumn162(db, "memories", "stale_at")) {
22872
22929
  db.exec("ALTER TABLE memories ADD COLUMN stale_at TEXT");
22873
22930
  }
22874
- if (tableExists3(db, "memories")) {
22931
+ if (tableExists4(db, "memories")) {
22875
22932
  db.exec(`
22876
22933
  CREATE INDEX IF NOT EXISTS idx_memories_stale_derived
22877
22934
  ON memories(agent_id, stale_at)
@@ -23713,11 +23770,63 @@ function up1282(db) {
23713
23770
  AND error IS NOT NULL;
23714
23771
  `);
23715
23772
  }
23773
+ function tableExists32(db, table) {
23774
+ return db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = ?").get(table) != null;
23775
+ }
23776
+ function up1292(db) {
23777
+ if (!tableExists32(db, "memory_jobs"))
23778
+ return;
23779
+ if (!tableExists32(db, "job_cancellations")) {
23780
+ throw new Error("job_cancellations table missing; cannot retire structural jobs without an audit trail");
23781
+ }
23782
+ db.prepare(`
23783
+ INSERT INTO job_cancellations (
23784
+ id, source_table, source_id, status_before, payload_json,
23785
+ reason, actor, actor_type, request_id, created_at
23786
+ )
23787
+ SELECT
23788
+ 'retire-structural-jobs-129:' || id,
23789
+ 'memory_jobs',
23790
+ id,
23791
+ status,
23792
+ json_object(
23793
+ 'id', id,
23794
+ 'memory_id', memory_id,
23795
+ 'document_id', document_id,
23796
+ 'job_type', job_type,
23797
+ 'status', status,
23798
+ 'payload', payload,
23799
+ 'result', result,
23800
+ 'attempts', attempts,
23801
+ 'max_attempts', max_attempts,
23802
+ 'leased_at', leased_at,
23803
+ 'completed_at', completed_at,
23804
+ 'failed_at', failed_at,
23805
+ 'error', error,
23806
+ 'created_at', created_at,
23807
+ 'updated_at', updated_at
23808
+ ),
23809
+ 'retired structural queue after Dreaming cutover',
23810
+ 'migration:129',
23811
+ 'system',
23812
+ NULL,
23813
+ strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
23814
+ FROM memory_jobs
23815
+ WHERE job_type IN ('structural_classify', 'structural_dependency')
23816
+ AND status IN ('pending', 'leased');
23817
+ `).run();
23818
+ db.exec(`
23819
+ UPDATE memory_jobs
23820
+ SET status = 'cancelled', updated_at = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
23821
+ WHERE job_type IN ('structural_classify', 'structural_dependency')
23822
+ AND status IN ('pending', 'leased');
23823
+ `);
23824
+ }
23716
23825
  var MIGRATIONS2 = [
23717
23826
  {
23718
23827
  version: 1,
23719
23828
  name: "baseline",
23720
- up: up129,
23829
+ up: up130,
23721
23830
  artifacts: { tables: ["memories", "conversations", "embeddings"] }
23722
23831
  },
23723
23832
  {
@@ -24744,6 +24853,11 @@ var MIGRATIONS2 = [
24744
24853
  version: 128,
24745
24854
  name: "bounded-queue-diagnostics",
24746
24855
  up: up1282
24856
+ },
24857
+ {
24858
+ version: 129,
24859
+ name: "retire-structural-jobs",
24860
+ up: up1292
24747
24861
  }
24748
24862
  ];
24749
24863
  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-claude-code",
3
- "version": "0.197.7",
3
+ "version": "0.197.8",
4
4
  "description": "Signet connector for Claude Code (Anthropic CLI)",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -24,8 +24,8 @@
24
24
  "typecheck": "tsc --noEmit"
25
25
  },
26
26
  "dependencies": {
27
- "@signetai/connector-base": "0.197.7",
28
- "@signetai/core": "0.197.7"
27
+ "@signetai/connector-base": "0.197.8",
28
+ "@signetai/core": "0.197.8"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/node": "^22.0.0",