@signetai/connector-forge 0.197.17 → 0.198.1

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 +94 -2
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -11245,6 +11245,46 @@ function up129(db) {
11245
11245
  AND status IN ('pending', 'leased');
11246
11246
  `);
11247
11247
  }
11248
+ function up130(db) {
11249
+ db.exec(`
11250
+ CREATE TABLE IF NOT EXISTS embedding_repair_budget (
11251
+ id INTEGER PRIMARY KEY CHECK (id = 1),
11252
+ window_started_at TEXT NOT NULL,
11253
+ batches_started INTEGER NOT NULL DEFAULT 0 CHECK (batches_started >= 0),
11254
+ last_completed_at TEXT,
11255
+ last_affected INTEGER NOT NULL DEFAULT 0 CHECK (last_affected >= 0),
11256
+ lease_id TEXT,
11257
+ lease_expires_at TEXT,
11258
+ last_error TEXT,
11259
+ updated_at TEXT NOT NULL
11260
+ );
11261
+
11262
+ CREATE TABLE IF NOT EXISTS embedding_repair_backoff (
11263
+ memory_id TEXT NOT NULL,
11264
+ content_hash TEXT NOT NULL,
11265
+ model TEXT NOT NULL,
11266
+ attempts INTEGER NOT NULL DEFAULT 1 CHECK (attempts > 0),
11267
+ retry_at TEXT NOT NULL,
11268
+ updated_at TEXT NOT NULL,
11269
+ PRIMARY KEY (memory_id, content_hash, model)
11270
+ );
11271
+ CREATE INDEX IF NOT EXISTS idx_embedding_repair_backoff_retry
11272
+ ON embedding_repair_backoff(model, retry_at);
11273
+
11274
+ -- Backoff is derived state. Retire it when the source memory disappears
11275
+ -- or moves to a new hash so stale retry keys cannot accumulate forever.
11276
+ CREATE TRIGGER IF NOT EXISTS embedding_repair_backoff_memory_deleted
11277
+ AFTER DELETE ON memories BEGIN
11278
+ DELETE FROM embedding_repair_backoff WHERE memory_id = OLD.id;
11279
+ END;
11280
+ CREATE TRIGGER IF NOT EXISTS embedding_repair_backoff_content_hash_changed
11281
+ AFTER UPDATE OF content_hash ON memories
11282
+ WHEN OLD.content_hash IS NOT NEW.content_hash BEGIN
11283
+ DELETE FROM embedding_repair_backoff
11284
+ WHERE memory_id = OLD.id AND content_hash IS NOT NEW.content_hash;
11285
+ END;
11286
+ `);
11287
+ }
11248
11288
  var MIGRATIONS = [
11249
11289
  {
11250
11290
  version: 1,
@@ -12281,6 +12321,12 @@ var MIGRATIONS = [
12281
12321
  version: 129,
12282
12322
  name: "retire-structural-jobs",
12283
12323
  up: up129
12324
+ },
12325
+ {
12326
+ version: 130,
12327
+ name: "embedding-repair-state",
12328
+ up: up130,
12329
+ artifacts: { tables: ["embedding_repair_budget", "embedding_repair_backoff"] }
12284
12330
  }
12285
12331
  ];
12286
12332
  var LATEST_SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1]?.version ?? 0;
@@ -19896,7 +19942,7 @@ function memoriesFtsNeedsTokenizerRepair2(sql) {
19896
19942
  return true;
19897
19943
  return !normalized.includes(`tokenize='${MEMORIES_FTS_TOKENIZER2}'`);
19898
19944
  }
19899
- function up130(db) {
19945
+ function up131(db) {
19900
19946
  db.exec(`
19901
19947
  CREATE TABLE IF NOT EXISTS schema_migrations (
19902
19948
  version INTEGER PRIMARY KEY,
@@ -24066,11 +24112,51 @@ function up1292(db) {
24066
24112
  AND status IN ('pending', 'leased');
24067
24113
  `);
24068
24114
  }
24115
+ function up1302(db) {
24116
+ db.exec(`
24117
+ CREATE TABLE IF NOT EXISTS embedding_repair_budget (
24118
+ id INTEGER PRIMARY KEY CHECK (id = 1),
24119
+ window_started_at TEXT NOT NULL,
24120
+ batches_started INTEGER NOT NULL DEFAULT 0 CHECK (batches_started >= 0),
24121
+ last_completed_at TEXT,
24122
+ last_affected INTEGER NOT NULL DEFAULT 0 CHECK (last_affected >= 0),
24123
+ lease_id TEXT,
24124
+ lease_expires_at TEXT,
24125
+ last_error TEXT,
24126
+ updated_at TEXT NOT NULL
24127
+ );
24128
+
24129
+ CREATE TABLE IF NOT EXISTS embedding_repair_backoff (
24130
+ memory_id TEXT NOT NULL,
24131
+ content_hash TEXT NOT NULL,
24132
+ model TEXT NOT NULL,
24133
+ attempts INTEGER NOT NULL DEFAULT 1 CHECK (attempts > 0),
24134
+ retry_at TEXT NOT NULL,
24135
+ updated_at TEXT NOT NULL,
24136
+ PRIMARY KEY (memory_id, content_hash, model)
24137
+ );
24138
+ CREATE INDEX IF NOT EXISTS idx_embedding_repair_backoff_retry
24139
+ ON embedding_repair_backoff(model, retry_at);
24140
+
24141
+ -- Backoff is derived state. Retire it when the source memory disappears
24142
+ -- or moves to a new hash so stale retry keys cannot accumulate forever.
24143
+ CREATE TRIGGER IF NOT EXISTS embedding_repair_backoff_memory_deleted
24144
+ AFTER DELETE ON memories BEGIN
24145
+ DELETE FROM embedding_repair_backoff WHERE memory_id = OLD.id;
24146
+ END;
24147
+ CREATE TRIGGER IF NOT EXISTS embedding_repair_backoff_content_hash_changed
24148
+ AFTER UPDATE OF content_hash ON memories
24149
+ WHEN OLD.content_hash IS NOT NEW.content_hash BEGIN
24150
+ DELETE FROM embedding_repair_backoff
24151
+ WHERE memory_id = OLD.id AND content_hash IS NOT NEW.content_hash;
24152
+ END;
24153
+ `);
24154
+ }
24069
24155
  var MIGRATIONS2 = [
24070
24156
  {
24071
24157
  version: 1,
24072
24158
  name: "baseline",
24073
- up: up130,
24159
+ up: up131,
24074
24160
  artifacts: { tables: ["memories", "conversations", "embeddings"] }
24075
24161
  },
24076
24162
  {
@@ -25102,6 +25188,12 @@ var MIGRATIONS2 = [
25102
25188
  version: 129,
25103
25189
  name: "retire-structural-jobs",
25104
25190
  up: up1292
25191
+ },
25192
+ {
25193
+ version: 130,
25194
+ name: "embedding-repair-state",
25195
+ up: up1302,
25196
+ artifacts: { tables: ["embedding_repair_budget", "embedding_repair_backoff"] }
25105
25197
  }
25106
25198
  ];
25107
25199
  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-forge",
3
- "version": "0.197.17",
3
+ "version": "0.198.1",
4
4
  "description": "Signet connector for ForgeCode - installs MCP, identity, and skills integration",
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.17",
28
- "@signetai/core": "0.197.17"
27
+ "@signetai/connector-base": "0.198.1",
28
+ "@signetai/core": "0.198.1"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/node": "^22.0.0",