@signetai/connector-gemini 0.197.7 → 0.197.9
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 +121 -7
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -11193,6 +11193,58 @@ function up128(db) {
|
|
|
11193
11193
|
AND error IS NOT NULL;
|
|
11194
11194
|
`);
|
|
11195
11195
|
}
|
|
11196
|
+
function tableExists3(db, table) {
|
|
11197
|
+
return db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = ?").get(table) != null;
|
|
11198
|
+
}
|
|
11199
|
+
function up129(db) {
|
|
11200
|
+
if (!tableExists3(db, "memory_jobs"))
|
|
11201
|
+
return;
|
|
11202
|
+
if (!tableExists3(db, "job_cancellations")) {
|
|
11203
|
+
throw new Error("job_cancellations table missing; cannot retire structural jobs without an audit trail");
|
|
11204
|
+
}
|
|
11205
|
+
db.prepare(`
|
|
11206
|
+
INSERT INTO job_cancellations (
|
|
11207
|
+
id, source_table, source_id, status_before, payload_json,
|
|
11208
|
+
reason, actor, actor_type, request_id, created_at
|
|
11209
|
+
)
|
|
11210
|
+
SELECT
|
|
11211
|
+
'retire-structural-jobs-129:' || id,
|
|
11212
|
+
'memory_jobs',
|
|
11213
|
+
id,
|
|
11214
|
+
status,
|
|
11215
|
+
json_object(
|
|
11216
|
+
'id', id,
|
|
11217
|
+
'memory_id', memory_id,
|
|
11218
|
+
'document_id', document_id,
|
|
11219
|
+
'job_type', job_type,
|
|
11220
|
+
'status', status,
|
|
11221
|
+
'payload', payload,
|
|
11222
|
+
'result', result,
|
|
11223
|
+
'attempts', attempts,
|
|
11224
|
+
'max_attempts', max_attempts,
|
|
11225
|
+
'leased_at', leased_at,
|
|
11226
|
+
'completed_at', completed_at,
|
|
11227
|
+
'failed_at', failed_at,
|
|
11228
|
+
'error', error,
|
|
11229
|
+
'created_at', created_at,
|
|
11230
|
+
'updated_at', updated_at
|
|
11231
|
+
),
|
|
11232
|
+
'retired structural queue after Dreaming cutover',
|
|
11233
|
+
'migration:129',
|
|
11234
|
+
'system',
|
|
11235
|
+
NULL,
|
|
11236
|
+
strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
|
|
11237
|
+
FROM memory_jobs
|
|
11238
|
+
WHERE job_type IN ('structural_classify', 'structural_dependency')
|
|
11239
|
+
AND status IN ('pending', 'leased');
|
|
11240
|
+
`).run();
|
|
11241
|
+
db.exec(`
|
|
11242
|
+
UPDATE memory_jobs
|
|
11243
|
+
SET status = 'cancelled', updated_at = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
|
|
11244
|
+
WHERE job_type IN ('structural_classify', 'structural_dependency')
|
|
11245
|
+
AND status IN ('pending', 'leased');
|
|
11246
|
+
`);
|
|
11247
|
+
}
|
|
11196
11248
|
var MIGRATIONS = [
|
|
11197
11249
|
{
|
|
11198
11250
|
version: 1,
|
|
@@ -12224,6 +12276,11 @@ var MIGRATIONS = [
|
|
|
12224
12276
|
version: 128,
|
|
12225
12277
|
name: "bounded-queue-diagnostics",
|
|
12226
12278
|
up: up128
|
|
12279
|
+
},
|
|
12280
|
+
{
|
|
12281
|
+
version: 129,
|
|
12282
|
+
name: "retire-structural-jobs",
|
|
12283
|
+
up: up129
|
|
12227
12284
|
}
|
|
12228
12285
|
];
|
|
12229
12286
|
var LATEST_SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1]?.version ?? 0;
|
|
@@ -19717,7 +19774,7 @@ function memoriesFtsNeedsTokenizerRepair2(sql) {
|
|
|
19717
19774
|
return true;
|
|
19718
19775
|
return !normalized.includes(`tokenize='${MEMORIES_FTS_TOKENIZER2}'`);
|
|
19719
19776
|
}
|
|
19720
|
-
function
|
|
19777
|
+
function up130(db) {
|
|
19721
19778
|
db.exec(`
|
|
19722
19779
|
CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
19723
19780
|
version INTEGER PRIMARY KEY,
|
|
@@ -22952,7 +23009,7 @@ function up1032(db) {
|
|
|
22952
23009
|
)
|
|
22953
23010
|
`);
|
|
22954
23011
|
}
|
|
22955
|
-
function
|
|
23012
|
+
function tableExists4(db, table) {
|
|
22956
23013
|
return db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = ?").get(table) !== undefined;
|
|
22957
23014
|
}
|
|
22958
23015
|
function hasColumn162(db, table, column) {
|
|
@@ -22974,7 +23031,7 @@ function up1042(db) {
|
|
|
22974
23031
|
CREATE INDEX IF NOT EXISTS idx_derived_memory_sources_source
|
|
22975
23032
|
ON derived_memory_sources(agent_id, source_kind, source_id);
|
|
22976
23033
|
`);
|
|
22977
|
-
if (
|
|
23034
|
+
if (tableExists4(db, "aggregate_evidence_sources")) {
|
|
22978
23035
|
db.exec(`
|
|
22979
23036
|
INSERT OR IGNORE INTO derived_memory_sources
|
|
22980
23037
|
(derived_memory_id, source_kind, source_id, source_path, agent_id, created_at)
|
|
@@ -22982,7 +23039,7 @@ function up1042(db) {
|
|
|
22982
23039
|
FROM aggregate_evidence_sources
|
|
22983
23040
|
`);
|
|
22984
23041
|
}
|
|
22985
|
-
if (
|
|
23042
|
+
if (tableExists4(db, "aggregate_memory_sources")) {
|
|
22986
23043
|
db.exec(`
|
|
22987
23044
|
INSERT OR IGNORE INTO derived_memory_sources
|
|
22988
23045
|
(derived_memory_id, source_kind, source_id, source_path, agent_id, created_at)
|
|
@@ -22990,10 +23047,10 @@ function up1042(db) {
|
|
|
22990
23047
|
FROM aggregate_memory_sources
|
|
22991
23048
|
`);
|
|
22992
23049
|
}
|
|
22993
|
-
if (
|
|
23050
|
+
if (tableExists4(db, "memories") && !hasColumn162(db, "memories", "stale_at")) {
|
|
22994
23051
|
db.exec("ALTER TABLE memories ADD COLUMN stale_at TEXT");
|
|
22995
23052
|
}
|
|
22996
|
-
if (
|
|
23053
|
+
if (tableExists4(db, "memories")) {
|
|
22997
23054
|
db.exec(`
|
|
22998
23055
|
CREATE INDEX IF NOT EXISTS idx_memories_stale_derived
|
|
22999
23056
|
ON memories(agent_id, stale_at)
|
|
@@ -23835,11 +23892,63 @@ function up1282(db) {
|
|
|
23835
23892
|
AND error IS NOT NULL;
|
|
23836
23893
|
`);
|
|
23837
23894
|
}
|
|
23895
|
+
function tableExists32(db, table) {
|
|
23896
|
+
return db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = ?").get(table) != null;
|
|
23897
|
+
}
|
|
23898
|
+
function up1292(db) {
|
|
23899
|
+
if (!tableExists32(db, "memory_jobs"))
|
|
23900
|
+
return;
|
|
23901
|
+
if (!tableExists32(db, "job_cancellations")) {
|
|
23902
|
+
throw new Error("job_cancellations table missing; cannot retire structural jobs without an audit trail");
|
|
23903
|
+
}
|
|
23904
|
+
db.prepare(`
|
|
23905
|
+
INSERT INTO job_cancellations (
|
|
23906
|
+
id, source_table, source_id, status_before, payload_json,
|
|
23907
|
+
reason, actor, actor_type, request_id, created_at
|
|
23908
|
+
)
|
|
23909
|
+
SELECT
|
|
23910
|
+
'retire-structural-jobs-129:' || id,
|
|
23911
|
+
'memory_jobs',
|
|
23912
|
+
id,
|
|
23913
|
+
status,
|
|
23914
|
+
json_object(
|
|
23915
|
+
'id', id,
|
|
23916
|
+
'memory_id', memory_id,
|
|
23917
|
+
'document_id', document_id,
|
|
23918
|
+
'job_type', job_type,
|
|
23919
|
+
'status', status,
|
|
23920
|
+
'payload', payload,
|
|
23921
|
+
'result', result,
|
|
23922
|
+
'attempts', attempts,
|
|
23923
|
+
'max_attempts', max_attempts,
|
|
23924
|
+
'leased_at', leased_at,
|
|
23925
|
+
'completed_at', completed_at,
|
|
23926
|
+
'failed_at', failed_at,
|
|
23927
|
+
'error', error,
|
|
23928
|
+
'created_at', created_at,
|
|
23929
|
+
'updated_at', updated_at
|
|
23930
|
+
),
|
|
23931
|
+
'retired structural queue after Dreaming cutover',
|
|
23932
|
+
'migration:129',
|
|
23933
|
+
'system',
|
|
23934
|
+
NULL,
|
|
23935
|
+
strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
|
|
23936
|
+
FROM memory_jobs
|
|
23937
|
+
WHERE job_type IN ('structural_classify', 'structural_dependency')
|
|
23938
|
+
AND status IN ('pending', 'leased');
|
|
23939
|
+
`).run();
|
|
23940
|
+
db.exec(`
|
|
23941
|
+
UPDATE memory_jobs
|
|
23942
|
+
SET status = 'cancelled', updated_at = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
|
|
23943
|
+
WHERE job_type IN ('structural_classify', 'structural_dependency')
|
|
23944
|
+
AND status IN ('pending', 'leased');
|
|
23945
|
+
`);
|
|
23946
|
+
}
|
|
23838
23947
|
var MIGRATIONS2 = [
|
|
23839
23948
|
{
|
|
23840
23949
|
version: 1,
|
|
23841
23950
|
name: "baseline",
|
|
23842
|
-
up:
|
|
23951
|
+
up: up130,
|
|
23843
23952
|
artifacts: { tables: ["memories", "conversations", "embeddings"] }
|
|
23844
23953
|
},
|
|
23845
23954
|
{
|
|
@@ -24866,6 +24975,11 @@ var MIGRATIONS2 = [
|
|
|
24866
24975
|
version: 128,
|
|
24867
24976
|
name: "bounded-queue-diagnostics",
|
|
24868
24977
|
up: up1282
|
|
24978
|
+
},
|
|
24979
|
+
{
|
|
24980
|
+
version: 129,
|
|
24981
|
+
name: "retire-structural-jobs",
|
|
24982
|
+
up: up1292
|
|
24869
24983
|
}
|
|
24870
24984
|
];
|
|
24871
24985
|
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.197.
|
|
3
|
+
"version": "0.197.9",
|
|
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.197.
|
|
28
|
-
"@signetai/core": "0.197.
|
|
27
|
+
"@signetai/connector-base": "0.197.9",
|
|
28
|
+
"@signetai/core": "0.197.9"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/node": "^22.0.0",
|