@signetai/connector-codex 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
|
@@ -11179,6 +11179,58 @@ function up128(db) {
|
|
|
11179
11179
|
AND error IS NOT NULL;
|
|
11180
11180
|
`);
|
|
11181
11181
|
}
|
|
11182
|
+
function tableExists3(db, table) {
|
|
11183
|
+
return db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = ?").get(table) != null;
|
|
11184
|
+
}
|
|
11185
|
+
function up129(db) {
|
|
11186
|
+
if (!tableExists3(db, "memory_jobs"))
|
|
11187
|
+
return;
|
|
11188
|
+
if (!tableExists3(db, "job_cancellations")) {
|
|
11189
|
+
throw new Error("job_cancellations table missing; cannot retire structural jobs without an audit trail");
|
|
11190
|
+
}
|
|
11191
|
+
db.prepare(`
|
|
11192
|
+
INSERT INTO job_cancellations (
|
|
11193
|
+
id, source_table, source_id, status_before, payload_json,
|
|
11194
|
+
reason, actor, actor_type, request_id, created_at
|
|
11195
|
+
)
|
|
11196
|
+
SELECT
|
|
11197
|
+
'retire-structural-jobs-129:' || id,
|
|
11198
|
+
'memory_jobs',
|
|
11199
|
+
id,
|
|
11200
|
+
status,
|
|
11201
|
+
json_object(
|
|
11202
|
+
'id', id,
|
|
11203
|
+
'memory_id', memory_id,
|
|
11204
|
+
'document_id', document_id,
|
|
11205
|
+
'job_type', job_type,
|
|
11206
|
+
'status', status,
|
|
11207
|
+
'payload', payload,
|
|
11208
|
+
'result', result,
|
|
11209
|
+
'attempts', attempts,
|
|
11210
|
+
'max_attempts', max_attempts,
|
|
11211
|
+
'leased_at', leased_at,
|
|
11212
|
+
'completed_at', completed_at,
|
|
11213
|
+
'failed_at', failed_at,
|
|
11214
|
+
'error', error,
|
|
11215
|
+
'created_at', created_at,
|
|
11216
|
+
'updated_at', updated_at
|
|
11217
|
+
),
|
|
11218
|
+
'retired structural queue after Dreaming cutover',
|
|
11219
|
+
'migration:129',
|
|
11220
|
+
'system',
|
|
11221
|
+
NULL,
|
|
11222
|
+
strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
|
|
11223
|
+
FROM memory_jobs
|
|
11224
|
+
WHERE job_type IN ('structural_classify', 'structural_dependency')
|
|
11225
|
+
AND status IN ('pending', 'leased');
|
|
11226
|
+
`).run();
|
|
11227
|
+
db.exec(`
|
|
11228
|
+
UPDATE memory_jobs
|
|
11229
|
+
SET status = 'cancelled', updated_at = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
|
|
11230
|
+
WHERE job_type IN ('structural_classify', 'structural_dependency')
|
|
11231
|
+
AND status IN ('pending', 'leased');
|
|
11232
|
+
`);
|
|
11233
|
+
}
|
|
11182
11234
|
var MIGRATIONS = [
|
|
11183
11235
|
{
|
|
11184
11236
|
version: 1,
|
|
@@ -12210,6 +12262,11 @@ var MIGRATIONS = [
|
|
|
12210
12262
|
version: 128,
|
|
12211
12263
|
name: "bounded-queue-diagnostics",
|
|
12212
12264
|
up: up128
|
|
12265
|
+
},
|
|
12266
|
+
{
|
|
12267
|
+
version: 129,
|
|
12268
|
+
name: "retire-structural-jobs",
|
|
12269
|
+
up: up129
|
|
12213
12270
|
}
|
|
12214
12271
|
];
|
|
12215
12272
|
var LATEST_SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1]?.version ?? 0;
|
|
@@ -19686,7 +19743,7 @@ function memoriesFtsNeedsTokenizerRepair2(sql) {
|
|
|
19686
19743
|
return true;
|
|
19687
19744
|
return !normalized.includes(`tokenize='${MEMORIES_FTS_TOKENIZER2}'`);
|
|
19688
19745
|
}
|
|
19689
|
-
function
|
|
19746
|
+
function up130(db) {
|
|
19690
19747
|
db.exec(`
|
|
19691
19748
|
CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
19692
19749
|
version INTEGER PRIMARY KEY,
|
|
@@ -22921,7 +22978,7 @@ function up1032(db) {
|
|
|
22921
22978
|
)
|
|
22922
22979
|
`);
|
|
22923
22980
|
}
|
|
22924
|
-
function
|
|
22981
|
+
function tableExists4(db, table) {
|
|
22925
22982
|
return db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = ?").get(table) !== undefined;
|
|
22926
22983
|
}
|
|
22927
22984
|
function hasColumn162(db, table, column) {
|
|
@@ -22943,7 +23000,7 @@ function up1042(db) {
|
|
|
22943
23000
|
CREATE INDEX IF NOT EXISTS idx_derived_memory_sources_source
|
|
22944
23001
|
ON derived_memory_sources(agent_id, source_kind, source_id);
|
|
22945
23002
|
`);
|
|
22946
|
-
if (
|
|
23003
|
+
if (tableExists4(db, "aggregate_evidence_sources")) {
|
|
22947
23004
|
db.exec(`
|
|
22948
23005
|
INSERT OR IGNORE INTO derived_memory_sources
|
|
22949
23006
|
(derived_memory_id, source_kind, source_id, source_path, agent_id, created_at)
|
|
@@ -22951,7 +23008,7 @@ function up1042(db) {
|
|
|
22951
23008
|
FROM aggregate_evidence_sources
|
|
22952
23009
|
`);
|
|
22953
23010
|
}
|
|
22954
|
-
if (
|
|
23011
|
+
if (tableExists4(db, "aggregate_memory_sources")) {
|
|
22955
23012
|
db.exec(`
|
|
22956
23013
|
INSERT OR IGNORE INTO derived_memory_sources
|
|
22957
23014
|
(derived_memory_id, source_kind, source_id, source_path, agent_id, created_at)
|
|
@@ -22959,10 +23016,10 @@ function up1042(db) {
|
|
|
22959
23016
|
FROM aggregate_memory_sources
|
|
22960
23017
|
`);
|
|
22961
23018
|
}
|
|
22962
|
-
if (
|
|
23019
|
+
if (tableExists4(db, "memories") && !hasColumn162(db, "memories", "stale_at")) {
|
|
22963
23020
|
db.exec("ALTER TABLE memories ADD COLUMN stale_at TEXT");
|
|
22964
23021
|
}
|
|
22965
|
-
if (
|
|
23022
|
+
if (tableExists4(db, "memories")) {
|
|
22966
23023
|
db.exec(`
|
|
22967
23024
|
CREATE INDEX IF NOT EXISTS idx_memories_stale_derived
|
|
22968
23025
|
ON memories(agent_id, stale_at)
|
|
@@ -23804,11 +23861,63 @@ function up1282(db) {
|
|
|
23804
23861
|
AND error IS NOT NULL;
|
|
23805
23862
|
`);
|
|
23806
23863
|
}
|
|
23864
|
+
function tableExists32(db, table) {
|
|
23865
|
+
return db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = ?").get(table) != null;
|
|
23866
|
+
}
|
|
23867
|
+
function up1292(db) {
|
|
23868
|
+
if (!tableExists32(db, "memory_jobs"))
|
|
23869
|
+
return;
|
|
23870
|
+
if (!tableExists32(db, "job_cancellations")) {
|
|
23871
|
+
throw new Error("job_cancellations table missing; cannot retire structural jobs without an audit trail");
|
|
23872
|
+
}
|
|
23873
|
+
db.prepare(`
|
|
23874
|
+
INSERT INTO job_cancellations (
|
|
23875
|
+
id, source_table, source_id, status_before, payload_json,
|
|
23876
|
+
reason, actor, actor_type, request_id, created_at
|
|
23877
|
+
)
|
|
23878
|
+
SELECT
|
|
23879
|
+
'retire-structural-jobs-129:' || id,
|
|
23880
|
+
'memory_jobs',
|
|
23881
|
+
id,
|
|
23882
|
+
status,
|
|
23883
|
+
json_object(
|
|
23884
|
+
'id', id,
|
|
23885
|
+
'memory_id', memory_id,
|
|
23886
|
+
'document_id', document_id,
|
|
23887
|
+
'job_type', job_type,
|
|
23888
|
+
'status', status,
|
|
23889
|
+
'payload', payload,
|
|
23890
|
+
'result', result,
|
|
23891
|
+
'attempts', attempts,
|
|
23892
|
+
'max_attempts', max_attempts,
|
|
23893
|
+
'leased_at', leased_at,
|
|
23894
|
+
'completed_at', completed_at,
|
|
23895
|
+
'failed_at', failed_at,
|
|
23896
|
+
'error', error,
|
|
23897
|
+
'created_at', created_at,
|
|
23898
|
+
'updated_at', updated_at
|
|
23899
|
+
),
|
|
23900
|
+
'retired structural queue after Dreaming cutover',
|
|
23901
|
+
'migration:129',
|
|
23902
|
+
'system',
|
|
23903
|
+
NULL,
|
|
23904
|
+
strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
|
|
23905
|
+
FROM memory_jobs
|
|
23906
|
+
WHERE job_type IN ('structural_classify', 'structural_dependency')
|
|
23907
|
+
AND status IN ('pending', 'leased');
|
|
23908
|
+
`).run();
|
|
23909
|
+
db.exec(`
|
|
23910
|
+
UPDATE memory_jobs
|
|
23911
|
+
SET status = 'cancelled', updated_at = strftime('%Y-%m-%dT%H:%M:%fZ', 'now')
|
|
23912
|
+
WHERE job_type IN ('structural_classify', 'structural_dependency')
|
|
23913
|
+
AND status IN ('pending', 'leased');
|
|
23914
|
+
`);
|
|
23915
|
+
}
|
|
23807
23916
|
var MIGRATIONS2 = [
|
|
23808
23917
|
{
|
|
23809
23918
|
version: 1,
|
|
23810
23919
|
name: "baseline",
|
|
23811
|
-
up:
|
|
23920
|
+
up: up130,
|
|
23812
23921
|
artifacts: { tables: ["memories", "conversations", "embeddings"] }
|
|
23813
23922
|
},
|
|
23814
23923
|
{
|
|
@@ -24835,6 +24944,11 @@ var MIGRATIONS2 = [
|
|
|
24835
24944
|
version: 128,
|
|
24836
24945
|
name: "bounded-queue-diagnostics",
|
|
24837
24946
|
up: up1282
|
|
24947
|
+
},
|
|
24948
|
+
{
|
|
24949
|
+
version: 129,
|
|
24950
|
+
name: "retire-structural-jobs",
|
|
24951
|
+
up: up1292
|
|
24838
24952
|
}
|
|
24839
24953
|
];
|
|
24840
24954
|
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-codex",
|
|
3
|
-
"version": "0.197.
|
|
3
|
+
"version": "0.197.9",
|
|
4
4
|
"description": "Signet connector for Codex 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",
|