@signetai/connector-gemini 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;
|
|
@@ -12684,7 +12730,10 @@ ${content}`);
|
|
|
12684
12730
|
function isSignetGeneratedFile(raw) {
|
|
12685
12731
|
const lines = raw.split(`
|
|
12686
12732
|
`).slice(0, 6);
|
|
12687
|
-
return lines.some((line, i) =>
|
|
12733
|
+
return lines.some((line, i) => {
|
|
12734
|
+
const nextLine = lines[i + 1];
|
|
12735
|
+
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 ?? "");
|
|
12736
|
+
});
|
|
12688
12737
|
}
|
|
12689
12738
|
function atomicWriteText(path, content, mode) {
|
|
12690
12739
|
const tmp = join3(dirname5(path), `.${randomBytes(6).toString("hex")}.tmp`);
|
|
@@ -19774,7 +19823,7 @@ function memoriesFtsNeedsTokenizerRepair2(sql) {
|
|
|
19774
19823
|
return true;
|
|
19775
19824
|
return !normalized.includes(`tokenize='${MEMORIES_FTS_TOKENIZER2}'`);
|
|
19776
19825
|
}
|
|
19777
|
-
function
|
|
19826
|
+
function up131(db) {
|
|
19778
19827
|
db.exec(`
|
|
19779
19828
|
CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
19780
19829
|
version INTEGER PRIMARY KEY,
|
|
@@ -23944,11 +23993,51 @@ function up1292(db) {
|
|
|
23944
23993
|
AND status IN ('pending', 'leased');
|
|
23945
23994
|
`);
|
|
23946
23995
|
}
|
|
23996
|
+
function up1302(db) {
|
|
23997
|
+
db.exec(`
|
|
23998
|
+
CREATE TABLE IF NOT EXISTS embedding_repair_budget (
|
|
23999
|
+
id INTEGER PRIMARY KEY CHECK (id = 1),
|
|
24000
|
+
window_started_at TEXT NOT NULL,
|
|
24001
|
+
batches_started INTEGER NOT NULL DEFAULT 0 CHECK (batches_started >= 0),
|
|
24002
|
+
last_completed_at TEXT,
|
|
24003
|
+
last_affected INTEGER NOT NULL DEFAULT 0 CHECK (last_affected >= 0),
|
|
24004
|
+
lease_id TEXT,
|
|
24005
|
+
lease_expires_at TEXT,
|
|
24006
|
+
last_error TEXT,
|
|
24007
|
+
updated_at TEXT NOT NULL
|
|
24008
|
+
);
|
|
24009
|
+
|
|
24010
|
+
CREATE TABLE IF NOT EXISTS embedding_repair_backoff (
|
|
24011
|
+
memory_id TEXT NOT NULL,
|
|
24012
|
+
content_hash TEXT NOT NULL,
|
|
24013
|
+
model TEXT NOT NULL,
|
|
24014
|
+
attempts INTEGER NOT NULL DEFAULT 1 CHECK (attempts > 0),
|
|
24015
|
+
retry_at TEXT NOT NULL,
|
|
24016
|
+
updated_at TEXT NOT NULL,
|
|
24017
|
+
PRIMARY KEY (memory_id, content_hash, model)
|
|
24018
|
+
);
|
|
24019
|
+
CREATE INDEX IF NOT EXISTS idx_embedding_repair_backoff_retry
|
|
24020
|
+
ON embedding_repair_backoff(model, retry_at);
|
|
24021
|
+
|
|
24022
|
+
-- Backoff is derived state. Retire it when the source memory disappears
|
|
24023
|
+
-- or moves to a new hash so stale retry keys cannot accumulate forever.
|
|
24024
|
+
CREATE TRIGGER IF NOT EXISTS embedding_repair_backoff_memory_deleted
|
|
24025
|
+
AFTER DELETE ON memories BEGIN
|
|
24026
|
+
DELETE FROM embedding_repair_backoff WHERE memory_id = OLD.id;
|
|
24027
|
+
END;
|
|
24028
|
+
CREATE TRIGGER IF NOT EXISTS embedding_repair_backoff_content_hash_changed
|
|
24029
|
+
AFTER UPDATE OF content_hash ON memories
|
|
24030
|
+
WHEN OLD.content_hash IS NOT NEW.content_hash BEGIN
|
|
24031
|
+
DELETE FROM embedding_repair_backoff
|
|
24032
|
+
WHERE memory_id = OLD.id AND content_hash IS NOT NEW.content_hash;
|
|
24033
|
+
END;
|
|
24034
|
+
`);
|
|
24035
|
+
}
|
|
23947
24036
|
var MIGRATIONS2 = [
|
|
23948
24037
|
{
|
|
23949
24038
|
version: 1,
|
|
23950
24039
|
name: "baseline",
|
|
23951
|
-
up:
|
|
24040
|
+
up: up131,
|
|
23952
24041
|
artifacts: { tables: ["memories", "conversations", "embeddings"] }
|
|
23953
24042
|
},
|
|
23954
24043
|
{
|
|
@@ -24980,6 +25069,12 @@ var MIGRATIONS2 = [
|
|
|
24980
25069
|
version: 129,
|
|
24981
25070
|
name: "retire-structural-jobs",
|
|
24982
25071
|
up: up1292
|
|
25072
|
+
},
|
|
25073
|
+
{
|
|
25074
|
+
version: 130,
|
|
25075
|
+
name: "embedding-repair-state",
|
|
25076
|
+
up: up1302,
|
|
25077
|
+
artifacts: { tables: ["embedding_repair_budget", "embedding_repair_backoff"] }
|
|
24983
25078
|
}
|
|
24984
25079
|
];
|
|
24985
25080
|
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-gemini",
|
|
3
|
-
"version": "0.198.
|
|
3
|
+
"version": "0.198.2",
|
|
4
4
|
"description": "Signet connector for Gemini 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",
|