@signetai/connector-claude-code 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
|
@@ -11230,6 +11230,46 @@ function up129(db) {
|
|
|
11230
11230
|
AND status IN ('pending', 'leased');
|
|
11231
11231
|
`);
|
|
11232
11232
|
}
|
|
11233
|
+
function up130(db) {
|
|
11234
|
+
db.exec(`
|
|
11235
|
+
CREATE TABLE IF NOT EXISTS embedding_repair_budget (
|
|
11236
|
+
id INTEGER PRIMARY KEY CHECK (id = 1),
|
|
11237
|
+
window_started_at TEXT NOT NULL,
|
|
11238
|
+
batches_started INTEGER NOT NULL DEFAULT 0 CHECK (batches_started >= 0),
|
|
11239
|
+
last_completed_at TEXT,
|
|
11240
|
+
last_affected INTEGER NOT NULL DEFAULT 0 CHECK (last_affected >= 0),
|
|
11241
|
+
lease_id TEXT,
|
|
11242
|
+
lease_expires_at TEXT,
|
|
11243
|
+
last_error TEXT,
|
|
11244
|
+
updated_at TEXT NOT NULL
|
|
11245
|
+
);
|
|
11246
|
+
|
|
11247
|
+
CREATE TABLE IF NOT EXISTS embedding_repair_backoff (
|
|
11248
|
+
memory_id TEXT NOT NULL,
|
|
11249
|
+
content_hash TEXT NOT NULL,
|
|
11250
|
+
model TEXT NOT NULL,
|
|
11251
|
+
attempts INTEGER NOT NULL DEFAULT 1 CHECK (attempts > 0),
|
|
11252
|
+
retry_at TEXT NOT NULL,
|
|
11253
|
+
updated_at TEXT NOT NULL,
|
|
11254
|
+
PRIMARY KEY (memory_id, content_hash, model)
|
|
11255
|
+
);
|
|
11256
|
+
CREATE INDEX IF NOT EXISTS idx_embedding_repair_backoff_retry
|
|
11257
|
+
ON embedding_repair_backoff(model, retry_at);
|
|
11258
|
+
|
|
11259
|
+
-- Backoff is derived state. Retire it when the source memory disappears
|
|
11260
|
+
-- or moves to a new hash so stale retry keys cannot accumulate forever.
|
|
11261
|
+
CREATE TRIGGER IF NOT EXISTS embedding_repair_backoff_memory_deleted
|
|
11262
|
+
AFTER DELETE ON memories BEGIN
|
|
11263
|
+
DELETE FROM embedding_repair_backoff WHERE memory_id = OLD.id;
|
|
11264
|
+
END;
|
|
11265
|
+
CREATE TRIGGER IF NOT EXISTS embedding_repair_backoff_content_hash_changed
|
|
11266
|
+
AFTER UPDATE OF content_hash ON memories
|
|
11267
|
+
WHEN OLD.content_hash IS NOT NEW.content_hash BEGIN
|
|
11268
|
+
DELETE FROM embedding_repair_backoff
|
|
11269
|
+
WHERE memory_id = OLD.id AND content_hash IS NOT NEW.content_hash;
|
|
11270
|
+
END;
|
|
11271
|
+
`);
|
|
11272
|
+
}
|
|
11233
11273
|
var MIGRATIONS = [
|
|
11234
11274
|
{
|
|
11235
11275
|
version: 1,
|
|
@@ -12266,6 +12306,12 @@ var MIGRATIONS = [
|
|
|
12266
12306
|
version: 129,
|
|
12267
12307
|
name: "retire-structural-jobs",
|
|
12268
12308
|
up: up129
|
|
12309
|
+
},
|
|
12310
|
+
{
|
|
12311
|
+
version: 130,
|
|
12312
|
+
name: "embedding-repair-state",
|
|
12313
|
+
up: up130,
|
|
12314
|
+
artifacts: { tables: ["embedding_repair_budget", "embedding_repair_backoff"] }
|
|
12269
12315
|
}
|
|
12270
12316
|
];
|
|
12271
12317
|
var LATEST_SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1]?.version ?? 0;
|
|
@@ -12559,7 +12605,10 @@ ${content}`);
|
|
|
12559
12605
|
function isSignetGeneratedFile(raw) {
|
|
12560
12606
|
const lines = raw.split(`
|
|
12561
12607
|
`).slice(0, 6);
|
|
12562
|
-
return lines.some((line, i) =>
|
|
12608
|
+
return lines.some((line, i) => {
|
|
12609
|
+
const nextLine = lines[i + 1];
|
|
12610
|
+
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 ?? "");
|
|
12611
|
+
});
|
|
12563
12612
|
}
|
|
12564
12613
|
function atomicWriteText(path, content, mode) {
|
|
12565
12614
|
const tmp = join3(dirname5(path), `.${randomBytes(6).toString("hex")}.tmp`);
|
|
@@ -19652,7 +19701,7 @@ function memoriesFtsNeedsTokenizerRepair2(sql) {
|
|
|
19652
19701
|
return true;
|
|
19653
19702
|
return !normalized.includes(`tokenize='${MEMORIES_FTS_TOKENIZER2}'`);
|
|
19654
19703
|
}
|
|
19655
|
-
function
|
|
19704
|
+
function up131(db) {
|
|
19656
19705
|
db.exec(`
|
|
19657
19706
|
CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
19658
19707
|
version INTEGER PRIMARY KEY,
|
|
@@ -23822,11 +23871,51 @@ function up1292(db) {
|
|
|
23822
23871
|
AND status IN ('pending', 'leased');
|
|
23823
23872
|
`);
|
|
23824
23873
|
}
|
|
23874
|
+
function up1302(db) {
|
|
23875
|
+
db.exec(`
|
|
23876
|
+
CREATE TABLE IF NOT EXISTS embedding_repair_budget (
|
|
23877
|
+
id INTEGER PRIMARY KEY CHECK (id = 1),
|
|
23878
|
+
window_started_at TEXT NOT NULL,
|
|
23879
|
+
batches_started INTEGER NOT NULL DEFAULT 0 CHECK (batches_started >= 0),
|
|
23880
|
+
last_completed_at TEXT,
|
|
23881
|
+
last_affected INTEGER NOT NULL DEFAULT 0 CHECK (last_affected >= 0),
|
|
23882
|
+
lease_id TEXT,
|
|
23883
|
+
lease_expires_at TEXT,
|
|
23884
|
+
last_error TEXT,
|
|
23885
|
+
updated_at TEXT NOT NULL
|
|
23886
|
+
);
|
|
23887
|
+
|
|
23888
|
+
CREATE TABLE IF NOT EXISTS embedding_repair_backoff (
|
|
23889
|
+
memory_id TEXT NOT NULL,
|
|
23890
|
+
content_hash TEXT NOT NULL,
|
|
23891
|
+
model TEXT NOT NULL,
|
|
23892
|
+
attempts INTEGER NOT NULL DEFAULT 1 CHECK (attempts > 0),
|
|
23893
|
+
retry_at TEXT NOT NULL,
|
|
23894
|
+
updated_at TEXT NOT NULL,
|
|
23895
|
+
PRIMARY KEY (memory_id, content_hash, model)
|
|
23896
|
+
);
|
|
23897
|
+
CREATE INDEX IF NOT EXISTS idx_embedding_repair_backoff_retry
|
|
23898
|
+
ON embedding_repair_backoff(model, retry_at);
|
|
23899
|
+
|
|
23900
|
+
-- Backoff is derived state. Retire it when the source memory disappears
|
|
23901
|
+
-- or moves to a new hash so stale retry keys cannot accumulate forever.
|
|
23902
|
+
CREATE TRIGGER IF NOT EXISTS embedding_repair_backoff_memory_deleted
|
|
23903
|
+
AFTER DELETE ON memories BEGIN
|
|
23904
|
+
DELETE FROM embedding_repair_backoff WHERE memory_id = OLD.id;
|
|
23905
|
+
END;
|
|
23906
|
+
CREATE TRIGGER IF NOT EXISTS embedding_repair_backoff_content_hash_changed
|
|
23907
|
+
AFTER UPDATE OF content_hash ON memories
|
|
23908
|
+
WHEN OLD.content_hash IS NOT NEW.content_hash BEGIN
|
|
23909
|
+
DELETE FROM embedding_repair_backoff
|
|
23910
|
+
WHERE memory_id = OLD.id AND content_hash IS NOT NEW.content_hash;
|
|
23911
|
+
END;
|
|
23912
|
+
`);
|
|
23913
|
+
}
|
|
23825
23914
|
var MIGRATIONS2 = [
|
|
23826
23915
|
{
|
|
23827
23916
|
version: 1,
|
|
23828
23917
|
name: "baseline",
|
|
23829
|
-
up:
|
|
23918
|
+
up: up131,
|
|
23830
23919
|
artifacts: { tables: ["memories", "conversations", "embeddings"] }
|
|
23831
23920
|
},
|
|
23832
23921
|
{
|
|
@@ -24858,6 +24947,12 @@ var MIGRATIONS2 = [
|
|
|
24858
24947
|
version: 129,
|
|
24859
24948
|
name: "retire-structural-jobs",
|
|
24860
24949
|
up: up1292
|
|
24950
|
+
},
|
|
24951
|
+
{
|
|
24952
|
+
version: 130,
|
|
24953
|
+
name: "embedding-repair-state",
|
|
24954
|
+
up: up1302,
|
|
24955
|
+
artifacts: { tables: ["embedding_repair_budget", "embedding_repair_backoff"] }
|
|
24861
24956
|
}
|
|
24862
24957
|
];
|
|
24863
24958
|
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.198.
|
|
3
|
+
"version": "0.198.2",
|
|
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.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",
|