@signetai/connector-forge 0.198.0 → 0.198.2
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 +98 -3
- 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;
|
|
@@ -12757,7 +12803,10 @@ ${content}`);
|
|
|
12757
12803
|
function isSignetGeneratedFile(raw) {
|
|
12758
12804
|
const lines = raw.split(`
|
|
12759
12805
|
`).slice(0, 6);
|
|
12760
|
-
return lines.some((line, i) =>
|
|
12806
|
+
return lines.some((line, i) => {
|
|
12807
|
+
const nextLine = lines[i + 1];
|
|
12808
|
+
return /^#\s+AUTO-GENERATED\s+from\s+.*\s+by\s+Signet/i.test(line) || /^#\s+Auto-generated\s+from\s+/.test(line) && /^#\s+Source:\s+/.test(nextLine ?? "");
|
|
12809
|
+
});
|
|
12761
12810
|
}
|
|
12762
12811
|
function atomicWriteText(path, content, mode) {
|
|
12763
12812
|
const tmp = join3(dirname5(path), `.${randomBytes(6).toString("hex")}.tmp`);
|
|
@@ -19896,7 +19945,7 @@ function memoriesFtsNeedsTokenizerRepair2(sql) {
|
|
|
19896
19945
|
return true;
|
|
19897
19946
|
return !normalized.includes(`tokenize='${MEMORIES_FTS_TOKENIZER2}'`);
|
|
19898
19947
|
}
|
|
19899
|
-
function
|
|
19948
|
+
function up131(db) {
|
|
19900
19949
|
db.exec(`
|
|
19901
19950
|
CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
19902
19951
|
version INTEGER PRIMARY KEY,
|
|
@@ -24066,11 +24115,51 @@ function up1292(db) {
|
|
|
24066
24115
|
AND status IN ('pending', 'leased');
|
|
24067
24116
|
`);
|
|
24068
24117
|
}
|
|
24118
|
+
function up1302(db) {
|
|
24119
|
+
db.exec(`
|
|
24120
|
+
CREATE TABLE IF NOT EXISTS embedding_repair_budget (
|
|
24121
|
+
id INTEGER PRIMARY KEY CHECK (id = 1),
|
|
24122
|
+
window_started_at TEXT NOT NULL,
|
|
24123
|
+
batches_started INTEGER NOT NULL DEFAULT 0 CHECK (batches_started >= 0),
|
|
24124
|
+
last_completed_at TEXT,
|
|
24125
|
+
last_affected INTEGER NOT NULL DEFAULT 0 CHECK (last_affected >= 0),
|
|
24126
|
+
lease_id TEXT,
|
|
24127
|
+
lease_expires_at TEXT,
|
|
24128
|
+
last_error TEXT,
|
|
24129
|
+
updated_at TEXT NOT NULL
|
|
24130
|
+
);
|
|
24131
|
+
|
|
24132
|
+
CREATE TABLE IF NOT EXISTS embedding_repair_backoff (
|
|
24133
|
+
memory_id TEXT NOT NULL,
|
|
24134
|
+
content_hash TEXT NOT NULL,
|
|
24135
|
+
model TEXT NOT NULL,
|
|
24136
|
+
attempts INTEGER NOT NULL DEFAULT 1 CHECK (attempts > 0),
|
|
24137
|
+
retry_at TEXT NOT NULL,
|
|
24138
|
+
updated_at TEXT NOT NULL,
|
|
24139
|
+
PRIMARY KEY (memory_id, content_hash, model)
|
|
24140
|
+
);
|
|
24141
|
+
CREATE INDEX IF NOT EXISTS idx_embedding_repair_backoff_retry
|
|
24142
|
+
ON embedding_repair_backoff(model, retry_at);
|
|
24143
|
+
|
|
24144
|
+
-- Backoff is derived state. Retire it when the source memory disappears
|
|
24145
|
+
-- or moves to a new hash so stale retry keys cannot accumulate forever.
|
|
24146
|
+
CREATE TRIGGER IF NOT EXISTS embedding_repair_backoff_memory_deleted
|
|
24147
|
+
AFTER DELETE ON memories BEGIN
|
|
24148
|
+
DELETE FROM embedding_repair_backoff WHERE memory_id = OLD.id;
|
|
24149
|
+
END;
|
|
24150
|
+
CREATE TRIGGER IF NOT EXISTS embedding_repair_backoff_content_hash_changed
|
|
24151
|
+
AFTER UPDATE OF content_hash ON memories
|
|
24152
|
+
WHEN OLD.content_hash IS NOT NEW.content_hash BEGIN
|
|
24153
|
+
DELETE FROM embedding_repair_backoff
|
|
24154
|
+
WHERE memory_id = OLD.id AND content_hash IS NOT NEW.content_hash;
|
|
24155
|
+
END;
|
|
24156
|
+
`);
|
|
24157
|
+
}
|
|
24069
24158
|
var MIGRATIONS2 = [
|
|
24070
24159
|
{
|
|
24071
24160
|
version: 1,
|
|
24072
24161
|
name: "baseline",
|
|
24073
|
-
up:
|
|
24162
|
+
up: up131,
|
|
24074
24163
|
artifacts: { tables: ["memories", "conversations", "embeddings"] }
|
|
24075
24164
|
},
|
|
24076
24165
|
{
|
|
@@ -25102,6 +25191,12 @@ var MIGRATIONS2 = [
|
|
|
25102
25191
|
version: 129,
|
|
25103
25192
|
name: "retire-structural-jobs",
|
|
25104
25193
|
up: up1292
|
|
25194
|
+
},
|
|
25195
|
+
{
|
|
25196
|
+
version: 130,
|
|
25197
|
+
name: "embedding-repair-state",
|
|
25198
|
+
up: up1302,
|
|
25199
|
+
artifacts: { tables: ["embedding_repair_budget", "embedding_repair_backoff"] }
|
|
25105
25200
|
}
|
|
25106
25201
|
];
|
|
25107
25202
|
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.198.
|
|
3
|
+
"version": "0.198.2",
|
|
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.198.
|
|
28
|
-
"@signetai/core": "0.198.
|
|
27
|
+
"@signetai/connector-base": "0.198.2",
|
|
28
|
+
"@signetai/core": "0.198.2"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/node": "^22.0.0",
|