@signetai/connector-gemini 0.226.26 → 0.227.1
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 +638 -660
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -10731,6 +10731,9 @@ function up4(db) {
|
|
|
10731
10731
|
WHERE resolved_at IS NULL;
|
|
10732
10732
|
`);
|
|
10733
10733
|
}
|
|
10734
|
+
function up5(db) {
|
|
10735
|
+
db.exec("DROP TABLE IF EXISTS mcp_invocations");
|
|
10736
|
+
}
|
|
10734
10737
|
var MEMORIES_FTS_TOKENIZER = "unicode61";
|
|
10735
10738
|
var FTS_STATE_TABLE = "memories_fts_state";
|
|
10736
10739
|
function normalizeSql(sql) {
|
|
@@ -10846,7 +10849,7 @@ function memoriesFtsNeedsTokenizerRepair(sql) {
|
|
|
10846
10849
|
return true;
|
|
10847
10850
|
return !normalized.includes(`tokenize='${MEMORIES_FTS_TOKENIZER}'`);
|
|
10848
10851
|
}
|
|
10849
|
-
function
|
|
10852
|
+
function up6(db) {
|
|
10850
10853
|
db.exec(`
|
|
10851
10854
|
CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
10852
10855
|
version INTEGER PRIMARY KEY,
|
|
@@ -10944,7 +10947,7 @@ function addColumnIfMissing2(db, table, column, definition) {
|
|
|
10944
10947
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
10945
10948
|
}
|
|
10946
10949
|
}
|
|
10947
|
-
function
|
|
10950
|
+
function up7(db) {
|
|
10948
10951
|
addColumnIfMissing2(db, "memories", "content_hash", "TEXT");
|
|
10949
10952
|
addColumnIfMissing2(db, "memories", "normalized_content", "TEXT");
|
|
10950
10953
|
addColumnIfMissing2(db, "memories", "is_deleted", "INTEGER DEFAULT 0");
|
|
@@ -11062,7 +11065,7 @@ function addColumnIfMissing3(db, table, column, definition) {
|
|
|
11062
11065
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11063
11066
|
return true;
|
|
11064
11067
|
}
|
|
11065
|
-
function
|
|
11068
|
+
function up8(db) {
|
|
11066
11069
|
addColumnIfMissing3(db, "memories", "why", "TEXT");
|
|
11067
11070
|
addColumnIfMissing3(db, "memories", "project", "TEXT");
|
|
11068
11071
|
db.exec(`DROP INDEX IF EXISTS idx_memories_content_hash`);
|
|
@@ -11099,7 +11102,7 @@ function addColumnIfMissing4(db, table, column, definition) {
|
|
|
11099
11102
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11100
11103
|
}
|
|
11101
11104
|
}
|
|
11102
|
-
function
|
|
11105
|
+
function up9(db) {
|
|
11103
11106
|
addColumnIfMissing4(db, "memory_history", "actor_type", "TEXT");
|
|
11104
11107
|
addColumnIfMissing4(db, "memory_history", "session_id", "TEXT");
|
|
11105
11108
|
addColumnIfMissing4(db, "memory_history", "request_id", "TEXT");
|
|
@@ -11132,7 +11135,7 @@ function addColumnIfMissing5(db, table, column, definition) {
|
|
|
11132
11135
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11133
11136
|
}
|
|
11134
11137
|
}
|
|
11135
|
-
function
|
|
11138
|
+
function up10(db) {
|
|
11136
11139
|
addColumnIfMissing5(db, "entities", "canonical_name", "TEXT");
|
|
11137
11140
|
addColumnIfMissing5(db, "entities", "mentions", "INTEGER DEFAULT 0");
|
|
11138
11141
|
addColumnIfMissing5(db, "entities", "embedding", "BLOB");
|
|
@@ -11149,7 +11152,7 @@ function hasColumn4(db, table, column) {
|
|
|
11149
11152
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
11150
11153
|
return rows.some((r2) => r2.name === column);
|
|
11151
11154
|
}
|
|
11152
|
-
function
|
|
11155
|
+
function up11(db) {
|
|
11153
11156
|
if (!hasColumn4(db, "memories", "idempotency_key")) {
|
|
11154
11157
|
db.exec("ALTER TABLE memories ADD COLUMN idempotency_key TEXT");
|
|
11155
11158
|
}
|
|
@@ -11164,7 +11167,7 @@ function hasColumn5(db, table, column) {
|
|
|
11164
11167
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
11165
11168
|
return rows.some((r2) => r2.name === column);
|
|
11166
11169
|
}
|
|
11167
|
-
function
|
|
11170
|
+
function up12(db) {
|
|
11168
11171
|
db.exec(`
|
|
11169
11172
|
CREATE TABLE IF NOT EXISTS documents (
|
|
11170
11173
|
id TEXT PRIMARY KEY,
|
|
@@ -11221,7 +11224,7 @@ function up11(db) {
|
|
|
11221
11224
|
db.exec("ALTER TABLE memory_jobs ADD COLUMN document_id TEXT");
|
|
11222
11225
|
}
|
|
11223
11226
|
}
|
|
11224
|
-
function
|
|
11227
|
+
function up13(db) {
|
|
11225
11228
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='embeddings'").all();
|
|
11226
11229
|
if (tables.length === 0)
|
|
11227
11230
|
return;
|
|
@@ -11238,7 +11241,7 @@ function up12(db) {
|
|
|
11238
11241
|
ON embeddings(content_hash)
|
|
11239
11242
|
`);
|
|
11240
11243
|
}
|
|
11241
|
-
function
|
|
11244
|
+
function up14(db) {
|
|
11242
11245
|
db.exec(`
|
|
11243
11246
|
CREATE TABLE IF NOT EXISTS summary_jobs (
|
|
11244
11247
|
id TEXT PRIMARY KEY,
|
|
@@ -11258,7 +11261,7 @@ function up13(db) {
|
|
|
11258
11261
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_summary_jobs_status
|
|
11259
11262
|
ON summary_jobs(status)`);
|
|
11260
11263
|
}
|
|
11261
|
-
function
|
|
11264
|
+
function up15(db) {
|
|
11262
11265
|
db.exec(`
|
|
11263
11266
|
CREATE TABLE IF NOT EXISTS umap_cache (
|
|
11264
11267
|
id INTEGER PRIMARY KEY,
|
|
@@ -11269,7 +11272,7 @@ function up14(db) {
|
|
|
11269
11272
|
)
|
|
11270
11273
|
`);
|
|
11271
11274
|
}
|
|
11272
|
-
function
|
|
11275
|
+
function up16(db) {
|
|
11273
11276
|
db.exec(`
|
|
11274
11277
|
CREATE TABLE IF NOT EXISTS session_scores (
|
|
11275
11278
|
id TEXT PRIMARY KEY,
|
|
@@ -11289,7 +11292,7 @@ function up15(db) {
|
|
|
11289
11292
|
ON session_scores(session_key);
|
|
11290
11293
|
`);
|
|
11291
11294
|
}
|
|
11292
|
-
function
|
|
11295
|
+
function up17(db) {
|
|
11293
11296
|
db.exec(`
|
|
11294
11297
|
CREATE TABLE IF NOT EXISTS scheduled_tasks (
|
|
11295
11298
|
id TEXT PRIMARY KEY,
|
|
@@ -11330,7 +11333,7 @@ function addColumnIfMissing6(db, table, column, definition) {
|
|
|
11330
11333
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11331
11334
|
}
|
|
11332
11335
|
}
|
|
11333
|
-
function
|
|
11336
|
+
function up18(db) {
|
|
11334
11337
|
db.exec(`
|
|
11335
11338
|
CREATE TABLE IF NOT EXISTS ingestion_jobs (
|
|
11336
11339
|
id TEXT PRIMARY KEY,
|
|
@@ -11356,7 +11359,7 @@ function up17(db) {
|
|
|
11356
11359
|
addColumnIfMissing6(db, "memories", "source_path", "TEXT");
|
|
11357
11360
|
addColumnIfMissing6(db, "memories", "source_section", "TEXT");
|
|
11358
11361
|
}
|
|
11359
|
-
function
|
|
11362
|
+
function up19(db) {
|
|
11360
11363
|
db.exec(`
|
|
11361
11364
|
CREATE TABLE IF NOT EXISTS telemetry_events (
|
|
11362
11365
|
id TEXT PRIMARY KEY,
|
|
@@ -11381,7 +11384,7 @@ function addColumnIfMissing7(db, table, column, definition) {
|
|
|
11381
11384
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11382
11385
|
}
|
|
11383
11386
|
}
|
|
11384
|
-
function
|
|
11387
|
+
function up20(db) {
|
|
11385
11388
|
db.exec(`
|
|
11386
11389
|
CREATE TABLE IF NOT EXISTS session_memories (
|
|
11387
11390
|
id TEXT PRIMARY KEY,
|
|
@@ -11408,7 +11411,7 @@ function up19(db) {
|
|
|
11408
11411
|
addColumnIfMissing7(db, "session_scores", "confidence", "REAL");
|
|
11409
11412
|
addColumnIfMissing7(db, "session_scores", "continuity_reasoning", "TEXT");
|
|
11410
11413
|
}
|
|
11411
|
-
function
|
|
11414
|
+
function up21(db) {
|
|
11412
11415
|
db.exec(`
|
|
11413
11416
|
CREATE TABLE IF NOT EXISTS session_checkpoints (
|
|
11414
11417
|
id TEXT PRIMARY KEY,
|
|
@@ -11430,7 +11433,7 @@ function up20(db) {
|
|
|
11430
11433
|
ON session_checkpoints(project_normalized, created_at DESC);
|
|
11431
11434
|
`);
|
|
11432
11435
|
}
|
|
11433
|
-
function
|
|
11436
|
+
function up22(db) {
|
|
11434
11437
|
const cols = db.prepare("PRAGMA table_info(scheduled_tasks)").all();
|
|
11435
11438
|
const colNames = new Set(cols.flatMap((c2) => typeof c2.name === "string" ? [c2.name] : []));
|
|
11436
11439
|
if (!colNames.has("skill_name")) {
|
|
@@ -11441,7 +11444,7 @@ function up21(db) {
|
|
|
11441
11444
|
CHECK (skill_mode IN ('inject', 'slash') OR skill_mode IS NULL)`);
|
|
11442
11445
|
}
|
|
11443
11446
|
}
|
|
11444
|
-
function
|
|
11447
|
+
function up23(db) {
|
|
11445
11448
|
const existing = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='skill_meta'").get();
|
|
11446
11449
|
if (existing)
|
|
11447
11450
|
return;
|
|
@@ -11473,7 +11476,7 @@ function up22(db) {
|
|
|
11473
11476
|
CREATE INDEX idx_skill_meta_source ON skill_meta(source);
|
|
11474
11477
|
`);
|
|
11475
11478
|
}
|
|
11476
|
-
function
|
|
11479
|
+
function up24(db) {
|
|
11477
11480
|
const entityCols = db.prepare("PRAGMA table_info(entities)").all();
|
|
11478
11481
|
const entityColNames = new Set(entityCols.flatMap((c2) => typeof c2.name === "string" ? [c2.name] : []));
|
|
11479
11482
|
if (!entityColNames.has("agent_id")) {
|
|
@@ -11558,13 +11561,13 @@ function addColumnIfMissing8(db, table, column, definition) {
|
|
|
11558
11561
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11559
11562
|
}
|
|
11560
11563
|
}
|
|
11561
|
-
function
|
|
11564
|
+
function up25(db) {
|
|
11562
11565
|
addColumnIfMissing8(db, "session_memories", "entity_slot", "INTEGER");
|
|
11563
11566
|
addColumnIfMissing8(db, "session_memories", "aspect_slot", "INTEGER");
|
|
11564
11567
|
addColumnIfMissing8(db, "session_memories", "is_constraint", "INTEGER NOT NULL DEFAULT 0");
|
|
11565
11568
|
addColumnIfMissing8(db, "session_memories", "structural_density", "INTEGER");
|
|
11566
11569
|
}
|
|
11567
|
-
function
|
|
11570
|
+
function up26(db) {
|
|
11568
11571
|
const columns = db.prepare("PRAGMA table_info(session_checkpoints)").all();
|
|
11569
11572
|
const columnNames = new Set(columns.flatMap((column) => typeof column.name === "string" ? [column.name] : []));
|
|
11570
11573
|
if (!columnNames.has("focal_entity_ids")) {
|
|
@@ -11589,25 +11592,25 @@ function addColumnIfMissing9(db, table, column, definition) {
|
|
|
11589
11592
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11590
11593
|
}
|
|
11591
11594
|
}
|
|
11592
|
-
function
|
|
11595
|
+
function up27(db) {
|
|
11593
11596
|
addColumnIfMissing9(db, "entities", "pinned", "INTEGER NOT NULL DEFAULT 0");
|
|
11594
11597
|
addColumnIfMissing9(db, "entities", "pinned_at", "TEXT");
|
|
11595
11598
|
db.exec("CREATE INDEX IF NOT EXISTS idx_entities_pinned ON entities(agent_id, pinned, pinned_at DESC)");
|
|
11596
11599
|
}
|
|
11597
|
-
function up27(_db) {}
|
|
11598
11600
|
function up28(_db) {}
|
|
11601
|
+
function up29(_db) {}
|
|
11599
11602
|
function addColumnIfMissing10(db, table, column, definition) {
|
|
11600
11603
|
const cols = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
11601
11604
|
if (!cols.some((c2) => c2.name === column)) {
|
|
11602
11605
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11603
11606
|
}
|
|
11604
11607
|
}
|
|
11605
|
-
function
|
|
11608
|
+
function up30(db) {
|
|
11606
11609
|
addColumnIfMissing10(db, "session_memories", "agent_relevance_score", "REAL");
|
|
11607
11610
|
addColumnIfMissing10(db, "session_memories", "agent_feedback_count", "INTEGER DEFAULT 0");
|
|
11608
11611
|
}
|
|
11609
|
-
function
|
|
11610
|
-
function
|
|
11612
|
+
function up31(_db) {}
|
|
11613
|
+
function up32(db) {
|
|
11611
11614
|
db.exec(`
|
|
11612
11615
|
UPDATE entities
|
|
11613
11616
|
SET canonical_name = REPLACE(REPLACE(REPLACE(
|
|
@@ -11616,7 +11619,7 @@ function up31(db) {
|
|
|
11616
11619
|
WHERE canonical_name IS NULL
|
|
11617
11620
|
`);
|
|
11618
11621
|
}
|
|
11619
|
-
function
|
|
11622
|
+
function up33(db) {
|
|
11620
11623
|
db.exec(`
|
|
11621
11624
|
CREATE TABLE IF NOT EXISTS memories_cold (
|
|
11622
11625
|
archive_id TEXT PRIMARY KEY,
|
|
@@ -11653,7 +11656,7 @@ function up32(db) {
|
|
|
11653
11656
|
CREATE INDEX IF NOT EXISTS idx_cold_source ON memories_cold(cold_source_id);
|
|
11654
11657
|
`);
|
|
11655
11658
|
}
|
|
11656
|
-
function
|
|
11659
|
+
function up34(db) {
|
|
11657
11660
|
db.exec(`
|
|
11658
11661
|
CREATE TABLE IF NOT EXISTS session_summaries (
|
|
11659
11662
|
id TEXT PRIMARY KEY,
|
|
@@ -11698,7 +11701,7 @@ function up33(db) {
|
|
|
11698
11701
|
WHERE session_key IS NOT NULL;
|
|
11699
11702
|
`);
|
|
11700
11703
|
}
|
|
11701
|
-
function
|
|
11704
|
+
function up35(db) {
|
|
11702
11705
|
db.exec(`
|
|
11703
11706
|
CREATE TABLE IF NOT EXISTS memory_jobs_new (
|
|
11704
11707
|
id TEXT PRIMARY KEY,
|
|
@@ -11743,7 +11746,7 @@ function up34(db) {
|
|
|
11743
11746
|
ON memory_jobs(failed_at);
|
|
11744
11747
|
`);
|
|
11745
11748
|
}
|
|
11746
|
-
function
|
|
11749
|
+
function up36(db) {
|
|
11747
11750
|
const depCols = db.prepare("PRAGMA table_info(entity_dependencies)").all();
|
|
11748
11751
|
if (!depCols.some((c2) => c2.name === "reason")) {
|
|
11749
11752
|
db.exec("ALTER TABLE entity_dependencies ADD COLUMN reason TEXT");
|
|
@@ -11753,7 +11756,7 @@ function up35(db) {
|
|
|
11753
11756
|
db.exec("ALTER TABLE entities ADD COLUMN last_synthesized_at TEXT");
|
|
11754
11757
|
}
|
|
11755
11758
|
}
|
|
11756
|
-
function
|
|
11759
|
+
function up37(db) {
|
|
11757
11760
|
const cols = db.prepare("PRAGMA table_info(embeddings)").all();
|
|
11758
11761
|
if (cols.length === 0)
|
|
11759
11762
|
return;
|
|
@@ -11761,14 +11764,14 @@ function up36(db) {
|
|
|
11761
11764
|
db.exec("ALTER TABLE embeddings ADD COLUMN vector BLOB");
|
|
11762
11765
|
}
|
|
11763
11766
|
}
|
|
11764
|
-
function
|
|
11767
|
+
function up38(db) {
|
|
11765
11768
|
const cols = db.prepare("PRAGMA table_info(memories)").all();
|
|
11766
11769
|
if (!cols.some((c2) => c2.name === "scope")) {
|
|
11767
11770
|
db.exec("ALTER TABLE memories ADD COLUMN scope TEXT DEFAULT NULL");
|
|
11768
11771
|
}
|
|
11769
11772
|
db.exec("CREATE INDEX IF NOT EXISTS idx_memories_scope ON memories(scope) WHERE scope IS NOT NULL");
|
|
11770
11773
|
}
|
|
11771
|
-
function
|
|
11774
|
+
function up39(db) {
|
|
11772
11775
|
db.exec("DROP INDEX IF EXISTS idx_memories_content_hash_unique");
|
|
11773
11776
|
db.exec(`
|
|
11774
11777
|
CREATE UNIQUE INDEX idx_memories_content_hash_unique
|
|
@@ -11776,7 +11779,7 @@ function up38(db) {
|
|
|
11776
11779
|
WHERE content_hash IS NOT NULL AND is_deleted = 0
|
|
11777
11780
|
`);
|
|
11778
11781
|
}
|
|
11779
|
-
function
|
|
11782
|
+
function up40(db) {
|
|
11780
11783
|
db.exec(`
|
|
11781
11784
|
CREATE VIRTUAL TABLE IF NOT EXISTS entities_fts USING fts5(
|
|
11782
11785
|
name, canonical_name,
|
|
@@ -11808,13 +11811,13 @@ function up39(db) {
|
|
|
11808
11811
|
END
|
|
11809
11812
|
`);
|
|
11810
11813
|
}
|
|
11811
|
-
function
|
|
11814
|
+
function up41(db) {
|
|
11812
11815
|
const cols = db.prepare("PRAGMA table_info(entity_dependencies)").all();
|
|
11813
11816
|
if (!cols.some((c2) => c2.name === "confidence")) {
|
|
11814
11817
|
db.exec("ALTER TABLE entity_dependencies ADD COLUMN confidence REAL DEFAULT 0.7");
|
|
11815
11818
|
}
|
|
11816
11819
|
}
|
|
11817
|
-
function
|
|
11820
|
+
function up42(db) {
|
|
11818
11821
|
db.exec(`
|
|
11819
11822
|
CREATE TABLE IF NOT EXISTS entity_communities (
|
|
11820
11823
|
id TEXT PRIMARY KEY,
|
|
@@ -11832,7 +11835,7 @@ function up41(db) {
|
|
|
11832
11835
|
db.exec("ALTER TABLE entities ADD COLUMN community_id TEXT REFERENCES entity_communities(id)");
|
|
11833
11836
|
}
|
|
11834
11837
|
}
|
|
11835
|
-
function
|
|
11838
|
+
function up43(db) {
|
|
11836
11839
|
db.exec(`
|
|
11837
11840
|
CREATE TABLE IF NOT EXISTS memory_hints (
|
|
11838
11841
|
id TEXT PRIMARY KEY,
|
|
@@ -11872,7 +11875,7 @@ function up42(db) {
|
|
|
11872
11875
|
END
|
|
11873
11876
|
`);
|
|
11874
11877
|
}
|
|
11875
|
-
function
|
|
11878
|
+
function up44(db) {
|
|
11876
11879
|
db.exec(`
|
|
11877
11880
|
DELETE FROM entity_dependencies
|
|
11878
11881
|
WHERE id NOT IN (
|
|
@@ -11890,7 +11893,7 @@ function up43(db) {
|
|
|
11890
11893
|
)
|
|
11891
11894
|
`);
|
|
11892
11895
|
}
|
|
11893
|
-
function
|
|
11896
|
+
function up45(db) {
|
|
11894
11897
|
db.exec(`
|
|
11895
11898
|
CREATE TABLE IF NOT EXISTS session_transcripts (
|
|
11896
11899
|
session_key TEXT PRIMARY KEY,
|
|
@@ -11913,7 +11916,7 @@ function addColumnIfMissing11(db, table, column, definition) {
|
|
|
11913
11916
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11914
11917
|
}
|
|
11915
11918
|
}
|
|
11916
|
-
function
|
|
11919
|
+
function up46(db) {
|
|
11917
11920
|
addColumnIfMissing11(db, "session_memories", "path_json", "TEXT");
|
|
11918
11921
|
db.exec(`
|
|
11919
11922
|
CREATE TABLE IF NOT EXISTS path_feedback_events (
|
|
@@ -11988,7 +11991,7 @@ function addColumnIfMissing12(db, table, column, definition) {
|
|
|
11988
11991
|
return;
|
|
11989
11992
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11990
11993
|
}
|
|
11991
|
-
function
|
|
11994
|
+
function up47(db) {
|
|
11992
11995
|
addColumnIfMissing12(db, "session_memories", "entity_slot", "INTEGER");
|
|
11993
11996
|
addColumnIfMissing12(db, "session_memories", "aspect_slot", "INTEGER");
|
|
11994
11997
|
addColumnIfMissing12(db, "session_memories", "is_constraint", "INTEGER NOT NULL DEFAULT 0");
|
|
@@ -12076,7 +12079,7 @@ function addColumnIfMissing13(db, table, column, definition) {
|
|
|
12076
12079
|
return;
|
|
12077
12080
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12078
12081
|
}
|
|
12079
|
-
function
|
|
12082
|
+
function up48(db) {
|
|
12080
12083
|
db.exec(`
|
|
12081
12084
|
CREATE TABLE IF NOT EXISTS agents (
|
|
12082
12085
|
id TEXT PRIMARY KEY,
|
|
@@ -12105,7 +12108,7 @@ function addColumnIfMissing14(db, table, column, definition) {
|
|
|
12105
12108
|
return;
|
|
12106
12109
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12107
12110
|
}
|
|
12108
|
-
function
|
|
12111
|
+
function up49(db) {
|
|
12109
12112
|
addColumnIfMissing14(db, "session_summaries", "source_type", "TEXT");
|
|
12110
12113
|
addColumnIfMissing14(db, "session_summaries", "source_ref", "TEXT");
|
|
12111
12114
|
addColumnIfMissing14(db, "session_summaries", "meta_json", "TEXT");
|
|
@@ -12131,7 +12134,7 @@ function addColumnIfMissing15(db, table, column, definition) {
|
|
|
12131
12134
|
return;
|
|
12132
12135
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12133
12136
|
}
|
|
12134
|
-
function
|
|
12137
|
+
function up50(db) {
|
|
12135
12138
|
addColumnIfMissing15(db, "session_transcripts", "updated_at", "TEXT");
|
|
12136
12139
|
addColumnIfMissing15(db, "summary_jobs", "agent_id", "TEXT NOT NULL DEFAULT 'default'");
|
|
12137
12140
|
addColumnIfMissing15(db, "session_scores", "agent_id", "TEXT NOT NULL DEFAULT 'default'");
|
|
@@ -12202,7 +12205,7 @@ function up49(db) {
|
|
|
12202
12205
|
ON memory_md_heads(lease_expires_at);
|
|
12203
12206
|
`);
|
|
12204
12207
|
}
|
|
12205
|
-
function
|
|
12208
|
+
function up51(db) {
|
|
12206
12209
|
db.exec(`
|
|
12207
12210
|
DROP INDEX IF EXISTS idx_summaries_session_depth;
|
|
12208
12211
|
|
|
@@ -12263,7 +12266,7 @@ function up50(db) {
|
|
|
12263
12266
|
AND COALESCE(source_type, 'summary') = 'summary';
|
|
12264
12267
|
`);
|
|
12265
12268
|
}
|
|
12266
|
-
function
|
|
12269
|
+
function up52(db) {
|
|
12267
12270
|
db.exec(`
|
|
12268
12271
|
DROP TRIGGER IF EXISTS session_transcripts_fts_ai;
|
|
12269
12272
|
DROP TRIGGER IF EXISTS session_transcripts_fts_ad;
|
|
@@ -12361,7 +12364,7 @@ function up51(db) {
|
|
|
12361
12364
|
AND COALESCE(source_type, 'summary') = 'summary';
|
|
12362
12365
|
`);
|
|
12363
12366
|
}
|
|
12364
|
-
function
|
|
12367
|
+
function up53(db) {
|
|
12365
12368
|
db.exec(`
|
|
12366
12369
|
CREATE TABLE IF NOT EXISTS memory_thread_heads (
|
|
12367
12370
|
agent_id TEXT NOT NULL DEFAULT 'default',
|
|
@@ -12479,7 +12482,7 @@ function up52(db) {
|
|
|
12479
12482
|
WHERE excluded.latest_at >= memory_thread_heads.latest_at;
|
|
12480
12483
|
`);
|
|
12481
12484
|
}
|
|
12482
|
-
function
|
|
12485
|
+
function up54(db) {
|
|
12483
12486
|
db.exec(`
|
|
12484
12487
|
CREATE TABLE IF NOT EXISTS session_extract_cursors (
|
|
12485
12488
|
session_key TEXT NOT NULL,
|
|
@@ -12496,7 +12499,7 @@ function hasTable(db, name) {
|
|
|
12496
12499
|
WHERE type = 'table' AND name = ?
|
|
12497
12500
|
LIMIT 1`).get(name) !== undefined;
|
|
12498
12501
|
}
|
|
12499
|
-
function
|
|
12502
|
+
function up55(db) {
|
|
12500
12503
|
db.exec(`
|
|
12501
12504
|
CREATE TABLE IF NOT EXISTS entity_dependency_history (
|
|
12502
12505
|
id TEXT PRIMARY KEY,
|
|
@@ -12666,7 +12669,7 @@ function addColumnIfMissing16(db, table, column, definition) {
|
|
|
12666
12669
|
return;
|
|
12667
12670
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12668
12671
|
}
|
|
12669
|
-
function
|
|
12672
|
+
function up56(db) {
|
|
12670
12673
|
addColumnIfMissing16(db, "summary_jobs", "session_id", "TEXT");
|
|
12671
12674
|
addColumnIfMissing16(db, "summary_jobs", "trigger", "TEXT NOT NULL DEFAULT 'session_end'");
|
|
12672
12675
|
addColumnIfMissing16(db, "summary_jobs", "captured_at", "TEXT");
|
|
@@ -12758,24 +12761,8 @@ function up55(db) {
|
|
|
12758
12761
|
VALUES ('rebuild');
|
|
12759
12762
|
`);
|
|
12760
12763
|
}
|
|
12761
|
-
function
|
|
12762
|
-
|
|
12763
|
-
CREATE TABLE IF NOT EXISTS mcp_invocations (
|
|
12764
|
-
id TEXT PRIMARY KEY,
|
|
12765
|
-
server_id TEXT NOT NULL,
|
|
12766
|
-
tool_name TEXT NOT NULL,
|
|
12767
|
-
agent_id TEXT NOT NULL DEFAULT 'default',
|
|
12768
|
-
source TEXT NOT NULL CHECK(source IN ('cli','agent','mcp','dashboard')),
|
|
12769
|
-
latency_ms INTEGER NOT NULL,
|
|
12770
|
-
success INTEGER NOT NULL DEFAULT 1,
|
|
12771
|
-
error_text TEXT,
|
|
12772
|
-
created_at TEXT NOT NULL DEFAULT (datetime('now'))
|
|
12773
|
-
);
|
|
12774
|
-
CREATE INDEX IF NOT EXISTS idx_mcp_inv_server ON mcp_invocations(server_id, created_at);
|
|
12775
|
-
CREATE INDEX IF NOT EXISTS idx_mcp_inv_agent ON mcp_invocations(agent_id, created_at);
|
|
12776
|
-
`);
|
|
12777
|
-
}
|
|
12778
|
-
function up57(db) {
|
|
12764
|
+
function up57(_db) {}
|
|
12765
|
+
function up58(db) {
|
|
12779
12766
|
db.exec(`
|
|
12780
12767
|
CREATE TABLE IF NOT EXISTS skill_invocations (
|
|
12781
12768
|
id TEXT PRIMARY KEY,
|
|
@@ -12791,7 +12778,7 @@ function up57(db) {
|
|
|
12791
12778
|
CREATE INDEX IF NOT EXISTS idx_skill_inv_agent ON skill_invocations(agent_id, created_at);
|
|
12792
12779
|
`);
|
|
12793
12780
|
}
|
|
12794
|
-
function
|
|
12781
|
+
function up59(db) {
|
|
12795
12782
|
db.exec(`
|
|
12796
12783
|
CREATE TABLE IF NOT EXISTS task_scope_hints (
|
|
12797
12784
|
task_id TEXT PRIMARY KEY REFERENCES scheduled_tasks(id) ON DELETE CASCADE,
|
|
@@ -12822,7 +12809,7 @@ function up58(db) {
|
|
|
12822
12809
|
ON task_scope_hints(agent_id, updated_at);
|
|
12823
12810
|
`);
|
|
12824
12811
|
}
|
|
12825
|
-
function
|
|
12812
|
+
function up60(db) {
|
|
12826
12813
|
db.exec(`
|
|
12827
12814
|
CREATE TABLE IF NOT EXISTS dreaming_state (
|
|
12828
12815
|
agent_id TEXT PRIMARY KEY NOT NULL,
|
|
@@ -12865,7 +12852,7 @@ function ensureMemoriesScopeColumns(db) {
|
|
|
12865
12852
|
if (!names.has("scope"))
|
|
12866
12853
|
db.exec("ALTER TABLE memories ADD COLUMN scope TEXT");
|
|
12867
12854
|
}
|
|
12868
|
-
function
|
|
12855
|
+
function up61(db) {
|
|
12869
12856
|
ensureMemoriesScopeColumns(db);
|
|
12870
12857
|
db.exec("DROP INDEX IF EXISTS idx_memories_content_hash_unique");
|
|
12871
12858
|
db.exec(`
|
|
@@ -12878,20 +12865,20 @@ function up60(db) {
|
|
|
12878
12865
|
WHERE content_hash IS NOT NULL AND is_deleted = 0
|
|
12879
12866
|
`);
|
|
12880
12867
|
}
|
|
12881
|
-
function
|
|
12868
|
+
function up62(db) {
|
|
12882
12869
|
const sql = readMemoriesFtsSql(db);
|
|
12883
12870
|
if (sql !== null && !memoriesFtsNeedsTokenizerRepair(sql))
|
|
12884
12871
|
return;
|
|
12885
12872
|
recreateMemoriesFts(db);
|
|
12886
12873
|
}
|
|
12887
|
-
function
|
|
12874
|
+
function up63(db) {
|
|
12888
12875
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_entities_order
|
|
12889
12876
|
ON entities(agent_id, pinned DESC, pinned_at DESC, mentions DESC, updated_at DESC, name)`);
|
|
12890
12877
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_entities_extracted_mentions
|
|
12891
12878
|
ON entities(entity_type, mentions)
|
|
12892
12879
|
WHERE entity_type = 'extracted'`);
|
|
12893
12880
|
}
|
|
12894
|
-
function
|
|
12881
|
+
function up64(db) {
|
|
12895
12882
|
const cols = db.prepare("PRAGMA table_info(entity_attributes)").all();
|
|
12896
12883
|
if (!cols.some((col) => col.name === "claim_key")) {
|
|
12897
12884
|
db.exec("ALTER TABLE entity_attributes ADD COLUMN claim_key TEXT");
|
|
@@ -12900,7 +12887,7 @@ function up63(db) {
|
|
|
12900
12887
|
ON entity_attributes(agent_id, aspect_id, claim_key, status)
|
|
12901
12888
|
WHERE claim_key IS NOT NULL`);
|
|
12902
12889
|
}
|
|
12903
|
-
function
|
|
12890
|
+
function up65(db) {
|
|
12904
12891
|
const cols = db.prepare("PRAGMA table_info(entity_attributes)").all();
|
|
12905
12892
|
if (!cols.some((col) => col.name === "group_key")) {
|
|
12906
12893
|
db.exec("ALTER TABLE entity_attributes ADD COLUMN group_key TEXT");
|
|
@@ -12912,13 +12899,13 @@ function up64(db) {
|
|
|
12912
12899
|
ON entity_attributes(agent_id, aspect_id, group_key, claim_key, status)
|
|
12913
12900
|
WHERE claim_key IS NOT NULL`);
|
|
12914
12901
|
}
|
|
12915
|
-
function
|
|
12902
|
+
function up66(db) {
|
|
12916
12903
|
const cols = db.prepare("PRAGMA table_info(memory_artifacts)").all();
|
|
12917
12904
|
if (cols.some((col) => col.name === "source_mtime_ms"))
|
|
12918
12905
|
return;
|
|
12919
12906
|
db.exec("ALTER TABLE memory_artifacts ADD COLUMN source_mtime_ms REAL");
|
|
12920
12907
|
}
|
|
12921
|
-
function
|
|
12908
|
+
function up67(db) {
|
|
12922
12909
|
const cols = db.prepare("PRAGMA table_info(memory_artifacts)").all();
|
|
12923
12910
|
const names = new Set(cols.map((col) => col.name));
|
|
12924
12911
|
if (!names.has("is_deleted")) {
|
|
@@ -12932,7 +12919,7 @@ function up66(db) {
|
|
|
12932
12919
|
ON memory_artifacts(agent_id, is_deleted, deleted_at)
|
|
12933
12920
|
`);
|
|
12934
12921
|
}
|
|
12935
|
-
function
|
|
12922
|
+
function up68(db) {
|
|
12936
12923
|
db.exec("DROP TRIGGER IF EXISTS memories_au");
|
|
12937
12924
|
db.exec(`
|
|
12938
12925
|
CREATE TRIGGER IF NOT EXISTS memories_au AFTER UPDATE OF content ON memories BEGIN
|
|
@@ -12950,7 +12937,7 @@ function addColumnIfMissing17(db, table, column, definition) {
|
|
|
12950
12937
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12951
12938
|
}
|
|
12952
12939
|
}
|
|
12953
|
-
function
|
|
12940
|
+
function up69(db) {
|
|
12954
12941
|
for (const table of ["entities", "entity_communities", "entity_attributes", "entity_dependencies"]) {
|
|
12955
12942
|
addColumnIfMissing17(db, table, "source_id", "TEXT");
|
|
12956
12943
|
addColumnIfMissing17(db, table, "source_kind", "TEXT");
|
|
@@ -12970,7 +12957,7 @@ function hasColumn7(db, table, column) {
|
|
|
12970
12957
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
12971
12958
|
return rows.some((row) => row.name === column);
|
|
12972
12959
|
}
|
|
12973
|
-
function
|
|
12960
|
+
function up70(db) {
|
|
12974
12961
|
if (!hasTable2(db, "embeddings"))
|
|
12975
12962
|
return;
|
|
12976
12963
|
if (!hasColumn7(db, "embeddings", "agent_id")) {
|
|
@@ -12978,7 +12965,7 @@ function up69(db) {
|
|
|
12978
12965
|
}
|
|
12979
12966
|
db.exec("CREATE INDEX IF NOT EXISTS idx_embeddings_agent_source ON embeddings(agent_id, source_type, source_id)");
|
|
12980
12967
|
}
|
|
12981
|
-
function
|
|
12968
|
+
function up71(db) {
|
|
12982
12969
|
db.exec(`
|
|
12983
12970
|
CREATE TABLE IF NOT EXISTS memory_search_telemetry (
|
|
12984
12971
|
id TEXT PRIMARY KEY,
|
|
@@ -13019,7 +13006,7 @@ function addColumnIfMissing18(db, table, column, definition) {
|
|
|
13019
13006
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
13020
13007
|
}
|
|
13021
13008
|
}
|
|
13022
|
-
function
|
|
13009
|
+
function up72(db) {
|
|
13023
13010
|
db.exec(`
|
|
13024
13011
|
CREATE TABLE IF NOT EXISTS ontology_proposals (
|
|
13025
13012
|
id TEXT PRIMARY KEY,
|
|
@@ -13062,7 +13049,7 @@ function up71(db) {
|
|
|
13062
13049
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_${table}_proposal ON ${table}(agent_id, proposal_id)`);
|
|
13063
13050
|
}
|
|
13064
13051
|
}
|
|
13065
|
-
function
|
|
13052
|
+
function up73(db) {
|
|
13066
13053
|
db.exec(`
|
|
13067
13054
|
CREATE TABLE IF NOT EXISTS daily_reflections (
|
|
13068
13055
|
id TEXT PRIMARY KEY,
|
|
@@ -13089,7 +13076,7 @@ function up72(db) {
|
|
|
13089
13076
|
WHERE content_key IS NOT NULL;
|
|
13090
13077
|
`);
|
|
13091
13078
|
}
|
|
13092
|
-
function
|
|
13079
|
+
function up74(db) {
|
|
13093
13080
|
const cols = db.prepare("PRAGMA table_info(daily_reflections)").all();
|
|
13094
13081
|
const colNames = new Set(cols.flatMap((c2) => typeof c2.name === "string" ? [c2.name] : []));
|
|
13095
13082
|
if (!colNames.has("content_key")) {
|
|
@@ -13126,7 +13113,7 @@ function backfillVersionRoots(db) {
|
|
|
13126
13113
|
WHERE version_root_id IS NULL
|
|
13127
13114
|
`);
|
|
13128
13115
|
}
|
|
13129
|
-
function
|
|
13116
|
+
function up75(db) {
|
|
13130
13117
|
for (const table of ["entities", "entity_aspects", "entity_dependencies"]) {
|
|
13131
13118
|
addColumnIfMissing19(db, table, "status", "TEXT NOT NULL DEFAULT 'active'");
|
|
13132
13119
|
addColumnIfMissing19(db, table, "archived_at", "TEXT");
|
|
@@ -13161,7 +13148,7 @@ function up74(db) {
|
|
|
13161
13148
|
ON entity_aspects(agent_id, proposal_id);
|
|
13162
13149
|
`);
|
|
13163
13150
|
}
|
|
13164
|
-
function
|
|
13151
|
+
function up76(db) {
|
|
13165
13152
|
db.exec(`
|
|
13166
13153
|
CREATE TABLE IF NOT EXISTS epistemic_assertions (
|
|
13167
13154
|
id TEXT PRIMARY KEY,
|
|
@@ -13217,7 +13204,7 @@ function ensureMemoriesScopeColumns2(db) {
|
|
|
13217
13204
|
if (!names.has("runtime_path"))
|
|
13218
13205
|
db.exec("ALTER TABLE memories ADD COLUMN runtime_path TEXT");
|
|
13219
13206
|
}
|
|
13220
|
-
function
|
|
13207
|
+
function up77(db) {
|
|
13221
13208
|
ensureMemoriesScopeColumns2(db);
|
|
13222
13209
|
db.exec("DROP INDEX IF EXISTS idx_memories_idempotency_key");
|
|
13223
13210
|
db.exec(`
|
|
@@ -13231,7 +13218,7 @@ function up76(db) {
|
|
|
13231
13218
|
WHERE idempotency_key IS NOT NULL AND is_deleted = 0
|
|
13232
13219
|
`);
|
|
13233
13220
|
}
|
|
13234
|
-
function
|
|
13221
|
+
function up78(db) {
|
|
13235
13222
|
db.exec(`
|
|
13236
13223
|
CREATE TABLE IF NOT EXISTS session_context_epochs (
|
|
13237
13224
|
session_key TEXT NOT NULL,
|
|
@@ -13266,7 +13253,7 @@ function up77(db) {
|
|
|
13266
13253
|
ON session_recall_events(item_kind, item_id, created_at DESC);
|
|
13267
13254
|
`);
|
|
13268
13255
|
}
|
|
13269
|
-
function
|
|
13256
|
+
function up79(db) {
|
|
13270
13257
|
db.exec(`
|
|
13271
13258
|
CREATE TABLE IF NOT EXISTS aggregate_memory_sources (
|
|
13272
13259
|
aggregate_memory_id TEXT NOT NULL,
|
|
@@ -13285,7 +13272,7 @@ function addColumnIfMissing20(db, table, column, definition) {
|
|
|
13285
13272
|
return;
|
|
13286
13273
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
13287
13274
|
}
|
|
13288
|
-
function
|
|
13275
|
+
function up80(db) {
|
|
13289
13276
|
addColumnIfMissing20(db, "memory_artifacts", "source_id", "TEXT");
|
|
13290
13277
|
addColumnIfMissing20(db, "memory_artifacts", "source_root", "TEXT");
|
|
13291
13278
|
addColumnIfMissing20(db, "memory_artifacts", "source_external_id", "TEXT");
|
|
@@ -13298,7 +13285,7 @@ function up79(db) {
|
|
|
13298
13285
|
ON memory_artifacts(agent_id, source_id, source_root);
|
|
13299
13286
|
`);
|
|
13300
13287
|
}
|
|
13301
|
-
function
|
|
13288
|
+
function up81(db) {
|
|
13302
13289
|
db.exec(`
|
|
13303
13290
|
CREATE TABLE IF NOT EXISTS temporal_edges (
|
|
13304
13291
|
id TEXT PRIMARY KEY,
|
|
@@ -13321,7 +13308,7 @@ function up80(db) {
|
|
|
13321
13308
|
ON temporal_edges(agent_id, subject_type, subject_id);
|
|
13322
13309
|
`);
|
|
13323
13310
|
}
|
|
13324
|
-
function
|
|
13311
|
+
function up82(db) {
|
|
13325
13312
|
db.exec(`
|
|
13326
13313
|
CREATE TABLE IF NOT EXISTS entity_aliases (
|
|
13327
13314
|
id TEXT PRIMARY KEY,
|
|
@@ -13345,7 +13332,7 @@ function up81(db) {
|
|
|
13345
13332
|
ON entity_aliases(agent_id, canonical_alias, status);
|
|
13346
13333
|
`);
|
|
13347
13334
|
}
|
|
13348
|
-
function
|
|
13335
|
+
function up83(db) {
|
|
13349
13336
|
db.exec(`
|
|
13350
13337
|
CREATE TABLE IF NOT EXISTS api_keys (
|
|
13351
13338
|
id TEXT PRIMARY KEY,
|
|
@@ -13373,7 +13360,7 @@ function up82(db) {
|
|
|
13373
13360
|
ON api_keys(connector, harness);
|
|
13374
13361
|
`);
|
|
13375
13362
|
}
|
|
13376
|
-
function
|
|
13363
|
+
function up84(db) {
|
|
13377
13364
|
db.exec(`
|
|
13378
13365
|
CREATE TABLE IF NOT EXISTS transcript_capture_jobs (
|
|
13379
13366
|
id TEXT PRIMARY KEY,
|
|
@@ -13408,7 +13395,7 @@ function hasColumn10(db, table, column) {
|
|
|
13408
13395
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
13409
13396
|
return rows.some((row) => row.name === column);
|
|
13410
13397
|
}
|
|
13411
|
-
function
|
|
13398
|
+
function up85(db) {
|
|
13412
13399
|
if (!hasColumn10(db, "documents", "agent_id")) {
|
|
13413
13400
|
db.exec("ALTER TABLE documents ADD COLUMN agent_id TEXT NOT NULL DEFAULT 'default'");
|
|
13414
13401
|
}
|
|
@@ -13494,7 +13481,7 @@ function up84(db) {
|
|
|
13494
13481
|
db.exec("CREATE INDEX IF NOT EXISTS idx_documents_agent_project ON documents(agent_id, project)");
|
|
13495
13482
|
db.exec("CREATE INDEX IF NOT EXISTS idx_documents_source_scope ON documents(source_url, agent_id, project)");
|
|
13496
13483
|
}
|
|
13497
|
-
function
|
|
13484
|
+
function up86(db) {
|
|
13498
13485
|
db.exec(`
|
|
13499
13486
|
CREATE TABLE IF NOT EXISTS aggregate_evidence_sources (
|
|
13500
13487
|
aggregate_memory_id TEXT NOT NULL,
|
|
@@ -13516,7 +13503,7 @@ function hasColumn11(db, table, column) {
|
|
|
13516
13503
|
return rows.some((row) => row.name === column);
|
|
13517
13504
|
}
|
|
13518
13505
|
var COLUMNS = ["harness", "session_id", "tool_use_id", "cwd", "origin", "args"];
|
|
13519
|
-
function
|
|
13506
|
+
function up87(db) {
|
|
13520
13507
|
for (const column of COLUMNS) {
|
|
13521
13508
|
if (!hasColumn11(db, "skill_invocations", column)) {
|
|
13522
13509
|
db.exec(`ALTER TABLE skill_invocations ADD COLUMN ${column} TEXT`);
|
|
@@ -13597,7 +13584,7 @@ function documentScopeColumnsPreservingExisting(db) {
|
|
|
13597
13584
|
`);
|
|
13598
13585
|
}
|
|
13599
13586
|
try {
|
|
13600
|
-
|
|
13587
|
+
up85(db);
|
|
13601
13588
|
if (preserveAgentId) {
|
|
13602
13589
|
db.exec(`
|
|
13603
13590
|
UPDATE documents
|
|
@@ -13617,12 +13604,12 @@ function documentScopeColumnsPreservingExisting(db) {
|
|
|
13617
13604
|
db.exec("DROP TABLE IF EXISTS temp.__signet_doc_project_guard");
|
|
13618
13605
|
}
|
|
13619
13606
|
}
|
|
13620
|
-
function
|
|
13621
|
-
|
|
13607
|
+
function up88(db) {
|
|
13608
|
+
up84(db);
|
|
13622
13609
|
if (hasTable3(db, "documents")) {
|
|
13623
13610
|
documentScopeColumnsPreservingExisting(db);
|
|
13624
13611
|
}
|
|
13625
|
-
|
|
13612
|
+
up86(db);
|
|
13626
13613
|
addColumnIfMissing21(db, "memories", "superseded_by", "TEXT");
|
|
13627
13614
|
addColumnIfMissing21(db, "memories", "superseded_at", "TEXT");
|
|
13628
13615
|
addColumnIfMissing21(db, "memories", "superseded_reason", "TEXT");
|
|
@@ -13679,7 +13666,7 @@ function up87(db) {
|
|
|
13679
13666
|
AND ${sourceAgentId} = ${targetAgentId}
|
|
13680
13667
|
`);
|
|
13681
13668
|
}
|
|
13682
|
-
function
|
|
13669
|
+
function up89(db) {
|
|
13683
13670
|
db.exec(`
|
|
13684
13671
|
CREATE TABLE IF NOT EXISTS legacy_markdown_imports (
|
|
13685
13672
|
path TEXT PRIMARY KEY,
|
|
@@ -13709,7 +13696,7 @@ function up88(db) {
|
|
|
13709
13696
|
ON legacy_markdown_chunks(memory_id);
|
|
13710
13697
|
`);
|
|
13711
13698
|
}
|
|
13712
|
-
function
|
|
13699
|
+
function up90(db) {
|
|
13713
13700
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name IN ('relations', 'entity_dependencies')").all();
|
|
13714
13701
|
const tableNames = new Set(tables.map((r2) => String(r2.name)));
|
|
13715
13702
|
if (!tableNames.has("relations") || !tableNames.has("entity_dependencies"))
|
|
@@ -13768,7 +13755,7 @@ function addColumnIfMissing22(db, table, column, definition) {
|
|
|
13768
13755
|
return;
|
|
13769
13756
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
13770
13757
|
}
|
|
13771
|
-
function
|
|
13758
|
+
function up91(db) {
|
|
13772
13759
|
addColumnIfMissing22(db, "summary_jobs", "content_hash", "TEXT");
|
|
13773
13760
|
db.exec(`
|
|
13774
13761
|
CREATE INDEX IF NOT EXISTS idx_summary_jobs_agent_session_content_hash
|
|
@@ -13781,14 +13768,14 @@ function addColumnIfMissing23(db, table, column, definition) {
|
|
|
13781
13768
|
return;
|
|
13782
13769
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
13783
13770
|
}
|
|
13784
|
-
function
|
|
13771
|
+
function up92(db) {
|
|
13785
13772
|
addColumnIfMissing23(db, "summary_jobs", "boundary_reason", "TEXT");
|
|
13786
13773
|
db.exec(`
|
|
13787
13774
|
CREATE INDEX IF NOT EXISTS idx_summary_jobs_boundary_reason
|
|
13788
13775
|
ON summary_jobs(agent_id, session_key, boundary_reason)
|
|
13789
13776
|
`);
|
|
13790
13777
|
}
|
|
13791
|
-
function
|
|
13778
|
+
function up93(db) {
|
|
13792
13779
|
db.exec(`
|
|
13793
13780
|
CREATE TABLE IF NOT EXISTS transcript_recovery_files (
|
|
13794
13781
|
agent_id TEXT NOT NULL,
|
|
@@ -13806,7 +13793,7 @@ function up92(db) {
|
|
|
13806
13793
|
ON transcript_capture_jobs(agent_id, session_id, status);
|
|
13807
13794
|
`);
|
|
13808
13795
|
}
|
|
13809
|
-
function
|
|
13796
|
+
function up94(db) {
|
|
13810
13797
|
db.exec(`
|
|
13811
13798
|
CREATE TABLE IF NOT EXISTS job_cancellations (
|
|
13812
13799
|
id TEXT PRIMARY KEY,
|
|
@@ -13834,7 +13821,7 @@ function indexExists(db, table, indexName) {
|
|
|
13834
13821
|
const rows = db.prepare(`PRAGMA index_list(${table})`).all();
|
|
13835
13822
|
return rows.some((row) => row.name === indexName);
|
|
13836
13823
|
}
|
|
13837
|
-
function
|
|
13824
|
+
function up95(db) {
|
|
13838
13825
|
db.exec(`
|
|
13839
13826
|
CREATE TABLE IF NOT EXISTS job_archive (
|
|
13840
13827
|
id TEXT PRIMARY KEY,
|
|
@@ -13861,7 +13848,7 @@ function indexExists2(db, table, indexName) {
|
|
|
13861
13848
|
const rows = db.prepare(`PRAGMA index_list(${table})`).all();
|
|
13862
13849
|
return rows.some((row) => row.name === indexName);
|
|
13863
13850
|
}
|
|
13864
|
-
function
|
|
13851
|
+
function up96(db) {
|
|
13865
13852
|
db.exec(`
|
|
13866
13853
|
CREATE TABLE IF NOT EXISTS embedding_index_state (
|
|
13867
13854
|
id INTEGER PRIMARY KEY CHECK (id = 1),
|
|
@@ -13874,7 +13861,7 @@ function up95(db) {
|
|
|
13874
13861
|
)
|
|
13875
13862
|
`);
|
|
13876
13863
|
}
|
|
13877
|
-
function
|
|
13864
|
+
function up97(db) {
|
|
13878
13865
|
db.exec(`
|
|
13879
13866
|
CREATE TABLE IF NOT EXISTS embeddings_staging (
|
|
13880
13867
|
id TEXT PRIMARY KEY,
|
|
@@ -13893,7 +13880,7 @@ function up96(db) {
|
|
|
13893
13880
|
ON embeddings_staging(agent_id, source_type, source_id);
|
|
13894
13881
|
`);
|
|
13895
13882
|
}
|
|
13896
|
-
function
|
|
13883
|
+
function up98(db) {
|
|
13897
13884
|
const columns = db.prepare("PRAGMA table_info(dreaming_state)").all();
|
|
13898
13885
|
if (!columns.some((column) => column.name === "evidence_cursor")) {
|
|
13899
13886
|
db.exec("ALTER TABLE dreaming_state ADD COLUMN evidence_cursor TEXT");
|
|
@@ -13904,7 +13891,7 @@ function hasColumn13(db, table, column) {
|
|
|
13904
13891
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
13905
13892
|
return rows.some((r2) => r2.name === column);
|
|
13906
13893
|
}
|
|
13907
|
-
function
|
|
13894
|
+
function up99(db) {
|
|
13908
13895
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name = 'memories'").all();
|
|
13909
13896
|
if (tables.length === 0)
|
|
13910
13897
|
return;
|
|
@@ -13929,23 +13916,23 @@ function up98(db) {
|
|
|
13929
13916
|
function hasColumn14(db, table, column) {
|
|
13930
13917
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
13931
13918
|
}
|
|
13932
|
-
function
|
|
13919
|
+
function up100(db) {
|
|
13933
13920
|
const hasMemories = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'memories'").get();
|
|
13934
13921
|
if (!hasMemories || !hasColumn14(db, "memories", "memory_kind") || !hasColumn14(db, "memories", "type"))
|
|
13935
13922
|
return;
|
|
13936
13923
|
db.exec("UPDATE memories SET memory_kind = NULL WHERE type = 'session_summary'");
|
|
13937
13924
|
}
|
|
13938
|
-
function
|
|
13925
|
+
function up101(db) {
|
|
13939
13926
|
db.exec("DROP TABLE IF EXISTS ingestion_jobs");
|
|
13940
13927
|
}
|
|
13941
|
-
function
|
|
13928
|
+
function up102(db) {
|
|
13942
13929
|
const columns = db.prepare("PRAGMA table_info(dreaming_state)").all();
|
|
13943
13930
|
if (!columns.some((column) => column.name === "last_failure_at")) {
|
|
13944
13931
|
db.exec("ALTER TABLE dreaming_state ADD COLUMN last_failure_at TEXT");
|
|
13945
13932
|
}
|
|
13946
13933
|
db.exec("UPDATE dreaming_state SET last_failure_at = updated_at WHERE consecutive_failures > 0 AND last_failure_at IS NULL");
|
|
13947
13934
|
}
|
|
13948
|
-
function
|
|
13935
|
+
function up103(db) {
|
|
13949
13936
|
db.exec(`
|
|
13950
13937
|
CREATE TABLE IF NOT EXISTS dreaming_evidence_exclusions (
|
|
13951
13938
|
agent_id TEXT NOT NULL,
|
|
@@ -13962,7 +13949,7 @@ function up102(db) {
|
|
|
13962
13949
|
ON dreaming_evidence_exclusions (agent_id, resolved_at, requeue_requested_at, excluded_at DESC);
|
|
13963
13950
|
`);
|
|
13964
13951
|
}
|
|
13965
|
-
function
|
|
13952
|
+
function up104(db) {
|
|
13966
13953
|
db.exec(`
|
|
13967
13954
|
CREATE TABLE IF NOT EXISTS dreaming_tool_calls (
|
|
13968
13955
|
id TEXT PRIMARY KEY,
|
|
@@ -13982,7 +13969,7 @@ function up103(db) {
|
|
|
13982
13969
|
ON dreaming_tool_calls (agent_id, pass_id, sequence ASC);
|
|
13983
13970
|
`);
|
|
13984
13971
|
}
|
|
13985
|
-
function
|
|
13972
|
+
function up105(db) {
|
|
13986
13973
|
const columns = db.prepare("PRAGMA table_info(dreaming_passes)").all();
|
|
13987
13974
|
if (!columns.some((column) => column.name === "evidence_window_json")) {
|
|
13988
13975
|
db.exec("ALTER TABLE dreaming_passes ADD COLUMN evidence_window_json TEXT");
|
|
@@ -13991,7 +13978,7 @@ function up104(db) {
|
|
|
13991
13978
|
db.exec("ALTER TABLE dreaming_passes ADD COLUMN runbook_json TEXT");
|
|
13992
13979
|
}
|
|
13993
13980
|
}
|
|
13994
|
-
function
|
|
13981
|
+
function up106(db) {
|
|
13995
13982
|
db.exec(`
|
|
13996
13983
|
CREATE TABLE IF NOT EXISTS dreaming_attention (
|
|
13997
13984
|
id TEXT PRIMARY KEY,
|
|
@@ -14013,7 +14000,7 @@ function up105(db) {
|
|
|
14013
14000
|
function hasColumn15(db, table, column) {
|
|
14014
14001
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
14015
14002
|
}
|
|
14016
|
-
function
|
|
14003
|
+
function up107(db) {
|
|
14017
14004
|
const requiredMemoryColumns = [
|
|
14018
14005
|
"content_hash",
|
|
14019
14006
|
"normalized_content",
|
|
@@ -14064,7 +14051,7 @@ function up106(db) {
|
|
|
14064
14051
|
WHERE EXISTS (SELECT 1 FROM memory_entity_mentions WHERE entity_id = entities.id)
|
|
14065
14052
|
`);
|
|
14066
14053
|
}
|
|
14067
|
-
function
|
|
14054
|
+
function up108(db) {
|
|
14068
14055
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name IN ('memories', 'entity_attributes')").all();
|
|
14069
14056
|
if (tables.length !== 2)
|
|
14070
14057
|
return;
|
|
@@ -14087,7 +14074,7 @@ function tableExists(db, table) {
|
|
|
14087
14074
|
function hasColumn16(db, table, column) {
|
|
14088
14075
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
14089
14076
|
}
|
|
14090
|
-
function
|
|
14077
|
+
function up109(db) {
|
|
14091
14078
|
db.exec(`
|
|
14092
14079
|
CREATE TABLE IF NOT EXISTS derived_memory_sources (
|
|
14093
14080
|
derived_memory_id TEXT NOT NULL,
|
|
@@ -14130,7 +14117,7 @@ function up108(db) {
|
|
|
14130
14117
|
`);
|
|
14131
14118
|
}
|
|
14132
14119
|
}
|
|
14133
|
-
function
|
|
14120
|
+
function up110(db) {
|
|
14134
14121
|
db.exec(`
|
|
14135
14122
|
DROP TRIGGER IF EXISTS entities_fts_ai;
|
|
14136
14123
|
DROP TRIGGER IF EXISTS entities_fts_ad;
|
|
@@ -14219,7 +14206,7 @@ function up109(db) {
|
|
|
14219
14206
|
function hasColumn17(db, table, column) {
|
|
14220
14207
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
14221
14208
|
}
|
|
14222
|
-
function
|
|
14209
|
+
function up111(db) {
|
|
14223
14210
|
if (!hasColumn17(db, "memories", "review_after")) {
|
|
14224
14211
|
db.exec("ALTER TABLE memories ADD COLUMN review_after TEXT;");
|
|
14225
14212
|
}
|
|
@@ -14235,14 +14222,14 @@ var TOKEN_COLUMNS = [
|
|
|
14235
14222
|
["tokens_cache_write", "INTEGER"],
|
|
14236
14223
|
["tokens_cost", "REAL"]
|
|
14237
14224
|
];
|
|
14238
|
-
function
|
|
14225
|
+
function up112(db) {
|
|
14239
14226
|
for (const [column, type] of TOKEN_COLUMNS) {
|
|
14240
14227
|
if (!hasColumn18(db, "dreaming_passes", column)) {
|
|
14241
14228
|
db.exec(`ALTER TABLE dreaming_passes ADD COLUMN ${column} ${type};`);
|
|
14242
14229
|
}
|
|
14243
14230
|
}
|
|
14244
14231
|
}
|
|
14245
|
-
function
|
|
14232
|
+
function up113(db) {
|
|
14246
14233
|
db.exec(`
|
|
14247
14234
|
CREATE TABLE IF NOT EXISTS embedding_usage (
|
|
14248
14235
|
day TEXT NOT NULL,
|
|
@@ -14255,7 +14242,7 @@ function up112(db) {
|
|
|
14255
14242
|
);
|
|
14256
14243
|
`);
|
|
14257
14244
|
}
|
|
14258
|
-
function
|
|
14245
|
+
function up114(db) {
|
|
14259
14246
|
db.exec(`
|
|
14260
14247
|
CREATE TABLE IF NOT EXISTS telemetry_install (
|
|
14261
14248
|
id TEXT PRIMARY KEY,
|
|
@@ -14263,7 +14250,7 @@ function up113(db) {
|
|
|
14263
14250
|
);
|
|
14264
14251
|
`);
|
|
14265
14252
|
}
|
|
14266
|
-
function
|
|
14253
|
+
function up115(db) {
|
|
14267
14254
|
db.exec(`
|
|
14268
14255
|
CREATE INDEX IF NOT EXISTS idx_memory_entity_mentions_entity_memory
|
|
14269
14256
|
ON memory_entity_mentions(entity_id, memory_id);
|
|
@@ -14274,7 +14261,7 @@ function hasColumn19(db, table, column) {
|
|
|
14274
14261
|
return rows.some((row) => row.name === column);
|
|
14275
14262
|
}
|
|
14276
14263
|
var COLUMNS2 = ["first_remember_at", "first_recall_at"];
|
|
14277
|
-
function
|
|
14264
|
+
function up116(db) {
|
|
14278
14265
|
for (const column of COLUMNS2) {
|
|
14279
14266
|
if (!hasColumn19(db, "telemetry_install", column)) {
|
|
14280
14267
|
db.exec(`ALTER TABLE telemetry_install ADD COLUMN ${column} TEXT`);
|
|
@@ -14290,7 +14277,7 @@ function addColumnIfMissing24(db, column, definition) {
|
|
|
14290
14277
|
db.exec(`ALTER TABLE telemetry_events ADD COLUMN ${column} ${definition}`);
|
|
14291
14278
|
}
|
|
14292
14279
|
}
|
|
14293
|
-
function
|
|
14280
|
+
function up117(db) {
|
|
14294
14281
|
addColumnIfMissing24(db, "source", "TEXT NOT NULL DEFAULT 'daemon'");
|
|
14295
14282
|
addColumnIfMissing24(db, "claim_token", "TEXT");
|
|
14296
14283
|
addColumnIfMissing24(db, "claimed_at", "TEXT");
|
|
@@ -14299,7 +14286,7 @@ function up116(db) {
|
|
|
14299
14286
|
ON telemetry_events(source, sent_to_posthog, claimed_at, timestamp);
|
|
14300
14287
|
`);
|
|
14301
14288
|
}
|
|
14302
|
-
function
|
|
14289
|
+
function up118(db) {
|
|
14303
14290
|
db.exec(`
|
|
14304
14291
|
CREATE TABLE IF NOT EXISTS session_claims (
|
|
14305
14292
|
session_key TEXT NOT NULL,
|
|
@@ -14320,7 +14307,7 @@ function up117(db) {
|
|
|
14320
14307
|
ON session_claims(agent_id, state, expires_at);
|
|
14321
14308
|
`);
|
|
14322
14309
|
}
|
|
14323
|
-
function
|
|
14310
|
+
function up119(db) {
|
|
14324
14311
|
const table = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'entity_attributes'").get();
|
|
14325
14312
|
if (table == null)
|
|
14326
14313
|
return;
|
|
@@ -14329,7 +14316,7 @@ function up118(db) {
|
|
|
14329
14316
|
ON entity_attributes(memory_id, agent_id, status, importance);
|
|
14330
14317
|
`);
|
|
14331
14318
|
}
|
|
14332
|
-
function
|
|
14319
|
+
function up120(db) {
|
|
14333
14320
|
db.exec(`
|
|
14334
14321
|
CREATE TABLE IF NOT EXISTS cross_agent_messages (
|
|
14335
14322
|
id TEXT PRIMARY KEY,
|
|
@@ -14386,7 +14373,7 @@ function addColumnIfMissing25(db, column, definition) {
|
|
|
14386
14373
|
db.exec(`ALTER TABLE cross_agent_messages ADD COLUMN ${column} ${definition}`);
|
|
14387
14374
|
}
|
|
14388
14375
|
}
|
|
14389
|
-
function
|
|
14376
|
+
function up121(db) {
|
|
14390
14377
|
const table = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'cross_agent_messages'").get();
|
|
14391
14378
|
if (table == null)
|
|
14392
14379
|
return;
|
|
@@ -14587,7 +14574,7 @@ function backfillTranscriptsFromSummaryJobs(db) {
|
|
|
14587
14574
|
insert.run(...values);
|
|
14588
14575
|
}
|
|
14589
14576
|
}
|
|
14590
|
-
function
|
|
14577
|
+
function up122(db) {
|
|
14591
14578
|
if (!hasTable4(db, "session_transcripts"))
|
|
14592
14579
|
return;
|
|
14593
14580
|
addColumnIfMissing26(db, "session_transcripts", "completed_at", "TEXT");
|
|
@@ -14640,7 +14627,7 @@ function up121(db) {
|
|
|
14640
14627
|
ON session_transcripts(agent_id, content_hash);
|
|
14641
14628
|
`);
|
|
14642
14629
|
}
|
|
14643
|
-
function
|
|
14630
|
+
function up123(db) {
|
|
14644
14631
|
db.exec(`
|
|
14645
14632
|
CREATE INDEX IF NOT EXISTS idx_memory_jobs_pressure_status
|
|
14646
14633
|
ON memory_jobs(status)
|
|
@@ -14659,12 +14646,12 @@ function up122(db) {
|
|
|
14659
14646
|
function hasColumn22(db, table, column) {
|
|
14660
14647
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
14661
14648
|
}
|
|
14662
|
-
function
|
|
14649
|
+
function up124(db) {
|
|
14663
14650
|
if (!hasColumn22(db, "telemetry_install", "last_seen_version")) {
|
|
14664
14651
|
db.exec("ALTER TABLE telemetry_install ADD COLUMN last_seen_version TEXT");
|
|
14665
14652
|
}
|
|
14666
14653
|
}
|
|
14667
|
-
function
|
|
14654
|
+
function up125(db) {
|
|
14668
14655
|
db.exec(`
|
|
14669
14656
|
CREATE TABLE IF NOT EXISTS source_lifecycle_state (
|
|
14670
14657
|
agent_id TEXT NOT NULL,
|
|
@@ -14693,7 +14680,7 @@ function addColumnIfMissing27(db, column, definition) {
|
|
|
14693
14680
|
db.exec(`ALTER TABLE telemetry_events ADD COLUMN ${column} ${definition}`);
|
|
14694
14681
|
}
|
|
14695
14682
|
}
|
|
14696
|
-
function
|
|
14683
|
+
function up126(db) {
|
|
14697
14684
|
addColumnIfMissing27(db, "delivery_attempts", "INTEGER NOT NULL DEFAULT 0");
|
|
14698
14685
|
addColumnIfMissing27(db, "last_attempt_at", "TEXT");
|
|
14699
14686
|
addColumnIfMissing27(db, "sent_at", "TEXT");
|
|
@@ -14714,7 +14701,7 @@ function up125(db) {
|
|
|
14714
14701
|
VALUES (1, CURRENT_TIMESTAMP);
|
|
14715
14702
|
`);
|
|
14716
14703
|
}
|
|
14717
|
-
function
|
|
14704
|
+
function up127(db) {
|
|
14718
14705
|
const columns = db.prepare("PRAGMA table_info(dreaming_evidence_exclusions)").all();
|
|
14719
14706
|
const names = new Set(columns.map((column) => column.name));
|
|
14720
14707
|
if (!names.has("failure_class")) {
|
|
@@ -14731,7 +14718,7 @@ function up126(db) {
|
|
|
14731
14718
|
}
|
|
14732
14719
|
db.exec("CREATE INDEX IF NOT EXISTS idx_dreaming_evidence_exclusions_retry ON dreaming_evidence_exclusions (resolved_at, requeue_requested_at, failure_class, retry_count, last_requeued_at)");
|
|
14733
14720
|
}
|
|
14734
|
-
function
|
|
14721
|
+
function up128(db) {
|
|
14735
14722
|
db.exec(`
|
|
14736
14723
|
CREATE TABLE IF NOT EXISTS embedding_index_failures (
|
|
14737
14724
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
@@ -14755,7 +14742,7 @@ function up127(db) {
|
|
|
14755
14742
|
ON embedding_index_failures(source_type, source_id);
|
|
14756
14743
|
`);
|
|
14757
14744
|
}
|
|
14758
|
-
function
|
|
14745
|
+
function up129(db) {
|
|
14759
14746
|
db.exec(`
|
|
14760
14747
|
CREATE TABLE IF NOT EXISTS imported_source_lifecycle (
|
|
14761
14748
|
id TEXT PRIMARY KEY,
|
|
@@ -14805,7 +14792,7 @@ function backfillTable(db, params) {
|
|
|
14805
14792
|
FROM ${params.table}${params.where ? ` WHERE ${params.where}` : ""}`).all();
|
|
14806
14793
|
backfill(db, rows, params.sourceKind, params.scannedAt);
|
|
14807
14794
|
}
|
|
14808
|
-
function
|
|
14795
|
+
function up130(db) {
|
|
14809
14796
|
db.exec(`
|
|
14810
14797
|
CREATE TABLE IF NOT EXISTS memory_content_safety (
|
|
14811
14798
|
agent_id TEXT NOT NULL,
|
|
@@ -14862,7 +14849,7 @@ function up129(db) {
|
|
|
14862
14849
|
scannedAt
|
|
14863
14850
|
});
|
|
14864
14851
|
}
|
|
14865
|
-
function
|
|
14852
|
+
function up131(db) {
|
|
14866
14853
|
const table = db.prepare("SELECT sql FROM sqlite_master WHERE type = 'table' AND name = 'dreaming_attention'").get();
|
|
14867
14854
|
if (!table)
|
|
14868
14855
|
return;
|
|
@@ -14896,7 +14883,7 @@ function up130(db) {
|
|
|
14896
14883
|
ON dreaming_attention (agent_id, resolved_at, priority DESC, created_at ASC);
|
|
14897
14884
|
`);
|
|
14898
14885
|
}
|
|
14899
|
-
function
|
|
14886
|
+
function up132(db) {
|
|
14900
14887
|
db.exec(`
|
|
14901
14888
|
CREATE TABLE IF NOT EXISTS ontology_contradictions (
|
|
14902
14889
|
id TEXT PRIMARY KEY,
|
|
@@ -14952,7 +14939,7 @@ function up131(db) {
|
|
|
14952
14939
|
ON ontology_contradictions(agent_id, left_source_id, right_source_id);
|
|
14953
14940
|
`);
|
|
14954
14941
|
}
|
|
14955
|
-
function
|
|
14942
|
+
function up133(db) {
|
|
14956
14943
|
db.exec(`
|
|
14957
14944
|
CREATE INDEX IF NOT EXISTS idx_memory_jobs_diagnostics_status_created_at
|
|
14958
14945
|
ON memory_jobs(status, created_at)
|
|
@@ -14967,7 +14954,7 @@ function up132(db) {
|
|
|
14967
14954
|
function tableExists3(db, table) {
|
|
14968
14955
|
return db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = ?").get(table) != null;
|
|
14969
14956
|
}
|
|
14970
|
-
function
|
|
14957
|
+
function up134(db) {
|
|
14971
14958
|
if (!tableExists3(db, "memory_jobs"))
|
|
14972
14959
|
return;
|
|
14973
14960
|
if (!tableExists3(db, "job_cancellations")) {
|
|
@@ -15016,7 +15003,7 @@ function up133(db) {
|
|
|
15016
15003
|
AND status IN ('pending', 'leased');
|
|
15017
15004
|
`);
|
|
15018
15005
|
}
|
|
15019
|
-
function
|
|
15006
|
+
function up135(db) {
|
|
15020
15007
|
db.exec(`
|
|
15021
15008
|
CREATE TABLE IF NOT EXISTS embedding_repair_budget (
|
|
15022
15009
|
id INTEGER PRIMARY KEY CHECK (id = 1),
|
|
@@ -15056,7 +15043,7 @@ function up134(db) {
|
|
|
15056
15043
|
END;
|
|
15057
15044
|
`);
|
|
15058
15045
|
}
|
|
15059
|
-
function
|
|
15046
|
+
function up136(db) {
|
|
15060
15047
|
db.exec(`
|
|
15061
15048
|
CREATE TABLE IF NOT EXISTS dreaming_evidence_consumption (
|
|
15062
15049
|
agent_id TEXT NOT NULL,
|
|
@@ -15079,13 +15066,13 @@ function up135(db) {
|
|
|
15079
15066
|
ON dreaming_evidence_consumption(agent_id, pass_id, delivered_offset, source_length);
|
|
15080
15067
|
`);
|
|
15081
15068
|
}
|
|
15082
|
-
function
|
|
15069
|
+
function up137(db) {
|
|
15083
15070
|
db.exec(`
|
|
15084
15071
|
CREATE INDEX IF NOT EXISTS idx_epistemic_assertions_observer_entity
|
|
15085
15072
|
ON epistemic_assertions(agent_id, subject_entity_id, status, asserted_at DESC, created_at DESC);
|
|
15086
15073
|
`);
|
|
15087
15074
|
}
|
|
15088
|
-
function
|
|
15075
|
+
function up138(db) {
|
|
15089
15076
|
db.exec(`
|
|
15090
15077
|
CREATE TABLE IF NOT EXISTS memory_head_revisions (
|
|
15091
15078
|
id TEXT PRIMARY KEY,
|
|
@@ -15137,7 +15124,7 @@ function up137(db) {
|
|
|
15137
15124
|
if (!names.has("format_version"))
|
|
15138
15125
|
db.exec("ALTER TABLE memory_md_heads ADD COLUMN format_version INTEGER NOT NULL DEFAULT 1");
|
|
15139
15126
|
}
|
|
15140
|
-
function
|
|
15127
|
+
function up139(db) {
|
|
15141
15128
|
db.exec(`
|
|
15142
15129
|
CREATE TABLE memory_head_entries_v134 (
|
|
15143
15130
|
entry_id TEXT NOT NULL, agent_id TEXT NOT NULL, canonical_text TEXT NOT NULL,
|
|
@@ -15155,7 +15142,7 @@ function up138(db) {
|
|
|
15155
15142
|
ON memory_head_entries(agent_id, entry_id, last_revision DESC);
|
|
15156
15143
|
`);
|
|
15157
15144
|
}
|
|
15158
|
-
function
|
|
15145
|
+
function up140(db) {
|
|
15159
15146
|
db.exec(`
|
|
15160
15147
|
CREATE TABLE IF NOT EXISTS memory_head_publications (
|
|
15161
15148
|
agent_id TEXT NOT NULL,
|
|
@@ -15171,7 +15158,7 @@ function up139(db) {
|
|
|
15171
15158
|
ON memory_head_publications(agent_id, status, revision DESC);
|
|
15172
15159
|
`);
|
|
15173
15160
|
}
|
|
15174
|
-
function
|
|
15161
|
+
function up141(db) {
|
|
15175
15162
|
const cols = new Set(db.prepare("PRAGMA table_info(memory_head_revisions)").all().map((r2) => r2.name));
|
|
15176
15163
|
for (const [name, type] of [
|
|
15177
15164
|
["entry_id", "TEXT"],
|
|
@@ -15185,7 +15172,7 @@ function up140(db) {
|
|
|
15185
15172
|
}
|
|
15186
15173
|
db.exec("CREATE UNIQUE INDEX IF NOT EXISTS idx_memory_head_revisions_entry ON memory_head_revisions(agent_id, revision, entry_id)");
|
|
15187
15174
|
}
|
|
15188
|
-
function
|
|
15175
|
+
function up142(db) {
|
|
15189
15176
|
const cols = new Set(db.prepare("PRAGMA table_info(dreaming_passes)").all().map((r2) => r2.name));
|
|
15190
15177
|
for (const [name, type] of [
|
|
15191
15178
|
["head_revision", "INTEGER"],
|
|
@@ -15207,7 +15194,7 @@ function addColumnIfMissing28(db, table, column, definition) {
|
|
|
15207
15194
|
if (!hasColumn25(db, table, column))
|
|
15208
15195
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
15209
15196
|
}
|
|
15210
|
-
function
|
|
15197
|
+
function up143(db) {
|
|
15211
15198
|
addColumnIfMissing28(db, "memories", "manual_override", "INTEGER DEFAULT 0");
|
|
15212
15199
|
db.exec(`
|
|
15213
15200
|
CREATE TABLE IF NOT EXISTS transcript_capture_status (
|
|
@@ -15512,7 +15499,7 @@ function up142(db) {
|
|
|
15512
15499
|
GROUP BY j.agent_id;
|
|
15513
15500
|
`);
|
|
15514
15501
|
}
|
|
15515
|
-
function
|
|
15502
|
+
function up144(db) {
|
|
15516
15503
|
db.exec(`
|
|
15517
15504
|
CREATE TABLE IF NOT EXISTS native_source_sync_state (
|
|
15518
15505
|
agent_id TEXT NOT NULL,
|
|
@@ -15528,7 +15515,7 @@ function up143(db) {
|
|
|
15528
15515
|
ON native_source_sync_state(agent_id, status);
|
|
15529
15516
|
`);
|
|
15530
15517
|
}
|
|
15531
|
-
function
|
|
15518
|
+
function up145(db) {
|
|
15532
15519
|
db.exec(`
|
|
15533
15520
|
CREATE TABLE IF NOT EXISTS transcript_recovery_frontiers (
|
|
15534
15521
|
agent_id TEXT NOT NULL,
|
|
@@ -15540,7 +15527,7 @@ function up144(db) {
|
|
|
15540
15527
|
);
|
|
15541
15528
|
`);
|
|
15542
15529
|
}
|
|
15543
|
-
function
|
|
15530
|
+
function up146(db) {
|
|
15544
15531
|
db.exec(`
|
|
15545
15532
|
CREATE TABLE IF NOT EXISTS source_sync_checkpoints (
|
|
15546
15533
|
agent_id TEXT NOT NULL,
|
|
@@ -15554,13 +15541,13 @@ function up145(db) {
|
|
|
15554
15541
|
);
|
|
15555
15542
|
`);
|
|
15556
15543
|
}
|
|
15557
|
-
function
|
|
15544
|
+
function up147(db) {
|
|
15558
15545
|
const columns = db.prepare("PRAGMA table_info(source_sync_checkpoints)").all();
|
|
15559
15546
|
if (!columns.some((column) => column.name === "frontier")) {
|
|
15560
15547
|
db.exec("ALTER TABLE source_sync_checkpoints ADD COLUMN frontier TEXT");
|
|
15561
15548
|
}
|
|
15562
15549
|
}
|
|
15563
|
-
function
|
|
15550
|
+
function up148(db) {
|
|
15564
15551
|
const columns = new Set(db.prepare("PRAGMA table_info(embedding_index_state)").all().map((row) => row.name).filter((name) => typeof name === "string"));
|
|
15565
15552
|
const additions = [
|
|
15566
15553
|
["migration_phase", "TEXT"],
|
|
@@ -15595,13 +15582,13 @@ function up147(db) {
|
|
|
15595
15582
|
`);
|
|
15596
15583
|
}
|
|
15597
15584
|
}
|
|
15598
|
-
function
|
|
15585
|
+
function up149(db) {
|
|
15599
15586
|
const columns = new Set(db.prepare("PRAGMA table_info(memory_jobs)").all().map((row) => row.name).filter((name) => typeof name === "string"));
|
|
15600
15587
|
if (!columns.has("lease_token")) {
|
|
15601
15588
|
db.exec("ALTER TABLE memory_jobs ADD COLUMN lease_token TEXT");
|
|
15602
15589
|
}
|
|
15603
15590
|
}
|
|
15604
|
-
function
|
|
15591
|
+
function up150(db) {
|
|
15605
15592
|
db.exec(`
|
|
15606
15593
|
CREATE TABLE IF NOT EXISTS dreaming_evidence_reviews (
|
|
15607
15594
|
agent_id TEXT NOT NULL,
|
|
@@ -15619,7 +15606,7 @@ function up149(db) {
|
|
|
15619
15606
|
ON dreaming_evidence_reviews (agent_id, reviewed_at DESC);
|
|
15620
15607
|
`);
|
|
15621
15608
|
}
|
|
15622
|
-
function
|
|
15609
|
+
function up151(db) {
|
|
15623
15610
|
db.exec(`
|
|
15624
15611
|
CREATE TABLE IF NOT EXISTS source_import_jobs (
|
|
15625
15612
|
id TEXT PRIMARY KEY, kind TEXT NOT NULL CHECK (kind = 'import'), agent_id TEXT NOT NULL,
|
|
@@ -15686,16 +15673,16 @@ function up150(db) {
|
|
|
15686
15673
|
}
|
|
15687
15674
|
db.exec("CREATE INDEX IF NOT EXISTS idx_session_transcripts_agent_source ON session_transcripts(agent_id, source_id)");
|
|
15688
15675
|
}
|
|
15689
|
-
function
|
|
15676
|
+
function up152(db) {
|
|
15690
15677
|
db.exec("CREATE INDEX IF NOT EXISTS idx_source_import_files_job_state ON source_import_files(job_id, state)");
|
|
15691
15678
|
}
|
|
15692
|
-
function
|
|
15679
|
+
function up153(db) {
|
|
15693
15680
|
const columns = db.prepare("PRAGMA table_info(source_import_record_attempts)").all();
|
|
15694
15681
|
if (!columns.some((column) => column.name === "source_id")) {
|
|
15695
15682
|
db.exec("ALTER TABLE source_import_record_attempts ADD COLUMN source_id TEXT");
|
|
15696
15683
|
}
|
|
15697
15684
|
}
|
|
15698
|
-
function
|
|
15685
|
+
function up154(db) {
|
|
15699
15686
|
const addColumn = (table, column, definition) => {
|
|
15700
15687
|
const statement = db.prepare("SELECT 1 AS found FROM pragma_table_info(?) WHERE name = ?");
|
|
15701
15688
|
let exists;
|
|
@@ -15716,7 +15703,7 @@ function addColumnIfMissing29(db, table, column, definition) {
|
|
|
15716
15703
|
if (!columns.some((row) => row.name === column))
|
|
15717
15704
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
15718
15705
|
}
|
|
15719
|
-
function
|
|
15706
|
+
function up155(db) {
|
|
15720
15707
|
addColumnIfMissing29(db, "memory_md_heads", "is_current", "INTEGER NOT NULL DEFAULT 0");
|
|
15721
15708
|
addColumnIfMissing29(db, "dreaming_passes", "head_base_revision", "INTEGER");
|
|
15722
15709
|
db.exec("CREATE INDEX IF NOT EXISTS idx_memory_head_revisions_content_hash ON memory_head_revisions(content_hash)");
|
|
@@ -15866,7 +15853,7 @@ function up154(db) {
|
|
|
15866
15853
|
`);
|
|
15867
15854
|
}
|
|
15868
15855
|
}
|
|
15869
|
-
function
|
|
15856
|
+
function up156(db) {
|
|
15870
15857
|
db.exec(`
|
|
15871
15858
|
CREATE TABLE IF NOT EXISTS vector_repair_checkpoints (
|
|
15872
15859
|
operation TEXT NOT NULL CHECK (operation IN ('resync', 'clean-orphans')),
|
|
@@ -15891,7 +15878,7 @@ function up155(db) {
|
|
|
15891
15878
|
ON vector_repair_checkpoints(status, updated_at);
|
|
15892
15879
|
`);
|
|
15893
15880
|
}
|
|
15894
|
-
function
|
|
15881
|
+
function up157(db) {
|
|
15895
15882
|
db.exec(`
|
|
15896
15883
|
CREATE TABLE IF NOT EXISTS embedding_repair_checkpoints (
|
|
15897
15884
|
checkpoint_id TEXT PRIMARY KEY,
|
|
@@ -15912,7 +15899,7 @@ function up156(db) {
|
|
|
15912
15899
|
ON embedding_repair_checkpoints(status, updated_at);
|
|
15913
15900
|
`);
|
|
15914
15901
|
}
|
|
15915
|
-
function
|
|
15902
|
+
function up158(db) {
|
|
15916
15903
|
const columns = new Set(db.prepare("PRAGMA table_info(embedding_repair_checkpoints)").all().map((row) => row.name));
|
|
15917
15904
|
if (!columns.has("profile_fingerprint")) {
|
|
15918
15905
|
db.exec("ALTER TABLE embedding_repair_checkpoints ADD COLUMN profile_fingerprint TEXT");
|
|
@@ -15927,7 +15914,7 @@ function up157(db) {
|
|
|
15927
15914
|
);
|
|
15928
15915
|
`);
|
|
15929
15916
|
}
|
|
15930
|
-
function
|
|
15917
|
+
function up159(db) {
|
|
15931
15918
|
db.exec(`
|
|
15932
15919
|
CREATE INDEX IF NOT EXISTS idx_memories_agent_kind
|
|
15933
15920
|
ON memories(agent_id, memory_kind);
|
|
@@ -15937,13 +15924,13 @@ var MIGRATIONS = [
|
|
|
15937
15924
|
{
|
|
15938
15925
|
version: 1,
|
|
15939
15926
|
name: "baseline",
|
|
15940
|
-
up:
|
|
15927
|
+
up: up6,
|
|
15941
15928
|
artifacts: { tables: ["memories", "conversations", "embeddings"] }
|
|
15942
15929
|
},
|
|
15943
15930
|
{
|
|
15944
15931
|
version: 2,
|
|
15945
15932
|
name: "pipeline-v2",
|
|
15946
|
-
up:
|
|
15933
|
+
up: up7,
|
|
15947
15934
|
artifacts: {
|
|
15948
15935
|
tables: ["memory_history", "memory_jobs", "entities", "relations", "memory_entity_mentions"]
|
|
15949
15936
|
}
|
|
@@ -15951,12 +15938,12 @@ var MIGRATIONS = [
|
|
|
15951
15938
|
{
|
|
15952
15939
|
version: 3,
|
|
15953
15940
|
name: "unique-content-hash",
|
|
15954
|
-
up:
|
|
15941
|
+
up: up8
|
|
15955
15942
|
},
|
|
15956
15943
|
{
|
|
15957
15944
|
version: 4,
|
|
15958
15945
|
name: "history-actor-and-retention",
|
|
15959
|
-
up:
|
|
15946
|
+
up: up9,
|
|
15960
15947
|
artifacts: {
|
|
15961
15948
|
columns: [{ table: "memory_history", column: "actor_type" }]
|
|
15962
15949
|
}
|
|
@@ -15964,7 +15951,7 @@ var MIGRATIONS = [
|
|
|
15964
15951
|
{
|
|
15965
15952
|
version: 5,
|
|
15966
15953
|
name: "graph-extended",
|
|
15967
|
-
up:
|
|
15954
|
+
up: up10,
|
|
15968
15955
|
artifacts: {
|
|
15969
15956
|
columns: [{ table: "entities", column: "canonical_name" }]
|
|
15970
15957
|
}
|
|
@@ -15972,7 +15959,7 @@ var MIGRATIONS = [
|
|
|
15972
15959
|
{
|
|
15973
15960
|
version: 6,
|
|
15974
15961
|
name: "idempotency-key",
|
|
15975
|
-
up:
|
|
15962
|
+
up: up11,
|
|
15976
15963
|
artifacts: {
|
|
15977
15964
|
columns: [{ table: "memories", column: "idempotency_key" }]
|
|
15978
15965
|
}
|
|
@@ -15980,42 +15967,42 @@ var MIGRATIONS = [
|
|
|
15980
15967
|
{
|
|
15981
15968
|
version: 7,
|
|
15982
15969
|
name: "documents-and-connectors",
|
|
15983
|
-
up:
|
|
15970
|
+
up: up12,
|
|
15984
15971
|
artifacts: { tables: ["documents", "document_memories", "connectors"] }
|
|
15985
15972
|
},
|
|
15986
15973
|
{
|
|
15987
15974
|
version: 8,
|
|
15988
15975
|
name: "embeddings-unique-hash",
|
|
15989
|
-
up:
|
|
15976
|
+
up: up13
|
|
15990
15977
|
},
|
|
15991
15978
|
{
|
|
15992
15979
|
version: 9,
|
|
15993
15980
|
name: "summary-jobs",
|
|
15994
|
-
up:
|
|
15981
|
+
up: up14,
|
|
15995
15982
|
artifacts: { tables: ["summary_jobs"] }
|
|
15996
15983
|
},
|
|
15997
15984
|
{
|
|
15998
15985
|
version: 10,
|
|
15999
15986
|
name: "umap-cache",
|
|
16000
|
-
up:
|
|
15987
|
+
up: up15,
|
|
16001
15988
|
artifacts: { tables: ["umap_cache"] }
|
|
16002
15989
|
},
|
|
16003
15990
|
{
|
|
16004
15991
|
version: 11,
|
|
16005
15992
|
name: "session-scores",
|
|
16006
|
-
up:
|
|
15993
|
+
up: up16,
|
|
16007
15994
|
artifacts: { tables: ["session_scores"] }
|
|
16008
15995
|
},
|
|
16009
15996
|
{
|
|
16010
15997
|
version: 12,
|
|
16011
15998
|
name: "scheduled-tasks",
|
|
16012
|
-
up:
|
|
15999
|
+
up: up17,
|
|
16013
16000
|
artifacts: { tables: ["scheduled_tasks", "task_runs"] }
|
|
16014
16001
|
},
|
|
16015
16002
|
{
|
|
16016
16003
|
version: 13,
|
|
16017
16004
|
name: "ingestion-tracking",
|
|
16018
|
-
up:
|
|
16005
|
+
up: up18,
|
|
16019
16006
|
artifacts: {
|
|
16020
16007
|
columns: [
|
|
16021
16008
|
{ table: "memories", column: "source_path" },
|
|
@@ -16026,13 +16013,13 @@ var MIGRATIONS = [
|
|
|
16026
16013
|
{
|
|
16027
16014
|
version: 14,
|
|
16028
16015
|
name: "telemetry",
|
|
16029
|
-
up:
|
|
16016
|
+
up: up19,
|
|
16030
16017
|
artifacts: { tables: ["telemetry_events"] }
|
|
16031
16018
|
},
|
|
16032
16019
|
{
|
|
16033
16020
|
version: 15,
|
|
16034
16021
|
name: "session-memories",
|
|
16035
|
-
up:
|
|
16022
|
+
up: up20,
|
|
16036
16023
|
artifacts: {
|
|
16037
16024
|
tables: ["session_memories"],
|
|
16038
16025
|
columns: [
|
|
@@ -16044,13 +16031,13 @@ var MIGRATIONS = [
|
|
|
16044
16031
|
{
|
|
16045
16032
|
version: 16,
|
|
16046
16033
|
name: "session-checkpoints",
|
|
16047
|
-
up:
|
|
16034
|
+
up: up21,
|
|
16048
16035
|
artifacts: { tables: ["session_checkpoints"] }
|
|
16049
16036
|
},
|
|
16050
16037
|
{
|
|
16051
16038
|
version: 17,
|
|
16052
16039
|
name: "task-skills",
|
|
16053
|
-
up:
|
|
16040
|
+
up: up22,
|
|
16054
16041
|
artifacts: {
|
|
16055
16042
|
columns: [{ table: "scheduled_tasks", column: "skill_name" }]
|
|
16056
16043
|
}
|
|
@@ -16058,13 +16045,13 @@ var MIGRATIONS = [
|
|
|
16058
16045
|
{
|
|
16059
16046
|
version: 18,
|
|
16060
16047
|
name: "skill-meta",
|
|
16061
|
-
up:
|
|
16048
|
+
up: up23,
|
|
16062
16049
|
artifacts: { tables: ["skill_meta"] }
|
|
16063
16050
|
},
|
|
16064
16051
|
{
|
|
16065
16052
|
version: 19,
|
|
16066
16053
|
name: "knowledge-structure",
|
|
16067
|
-
up:
|
|
16054
|
+
up: up24,
|
|
16068
16055
|
artifacts: {
|
|
16069
16056
|
tables: ["entity_aspects", "entity_attributes", "entity_dependencies", "task_meta"],
|
|
16070
16057
|
columns: [{ table: "entities", column: "agent_id" }]
|
|
@@ -16073,7 +16060,7 @@ var MIGRATIONS = [
|
|
|
16073
16060
|
{
|
|
16074
16061
|
version: 20,
|
|
16075
16062
|
name: "session-structural-columns",
|
|
16076
|
-
up:
|
|
16063
|
+
up: up25,
|
|
16077
16064
|
artifacts: {
|
|
16078
16065
|
columns: [
|
|
16079
16066
|
{ table: "session_memories", column: "entity_slot" },
|
|
@@ -16086,7 +16073,7 @@ var MIGRATIONS = [
|
|
|
16086
16073
|
{
|
|
16087
16074
|
version: 21,
|
|
16088
16075
|
name: "checkpoint-structural",
|
|
16089
|
-
up:
|
|
16076
|
+
up: up26,
|
|
16090
16077
|
artifacts: {
|
|
16091
16078
|
columns: [{ table: "session_checkpoints", column: "focal_entity_ids" }]
|
|
16092
16079
|
}
|
|
@@ -16094,7 +16081,7 @@ var MIGRATIONS = [
|
|
|
16094
16081
|
{
|
|
16095
16082
|
version: 22,
|
|
16096
16083
|
name: "entity-pinning",
|
|
16097
|
-
up:
|
|
16084
|
+
up: up27,
|
|
16098
16085
|
artifacts: {
|
|
16099
16086
|
columns: [
|
|
16100
16087
|
{ table: "entities", column: "pinned" },
|
|
@@ -16105,17 +16092,17 @@ var MIGRATIONS = [
|
|
|
16105
16092
|
{
|
|
16106
16093
|
version: 23,
|
|
16107
16094
|
name: "retired-scorer-gap",
|
|
16108
|
-
up:
|
|
16095
|
+
up: up28
|
|
16109
16096
|
},
|
|
16110
16097
|
{
|
|
16111
16098
|
version: 24,
|
|
16112
16099
|
name: "retired-scorer-gap",
|
|
16113
|
-
up:
|
|
16100
|
+
up: up29
|
|
16114
16101
|
},
|
|
16115
16102
|
{
|
|
16116
16103
|
version: 25,
|
|
16117
16104
|
name: "agent-feedback",
|
|
16118
|
-
up:
|
|
16105
|
+
up: up30,
|
|
16119
16106
|
artifacts: {
|
|
16120
16107
|
columns: [{ table: "session_memories", column: "agent_relevance_score" }]
|
|
16121
16108
|
}
|
|
@@ -16123,32 +16110,32 @@ var MIGRATIONS = [
|
|
|
16123
16110
|
{
|
|
16124
16111
|
version: 26,
|
|
16125
16112
|
name: "retired-scorer-gap",
|
|
16126
|
-
up:
|
|
16113
|
+
up: up31
|
|
16127
16114
|
},
|
|
16128
16115
|
{
|
|
16129
16116
|
version: 27,
|
|
16130
16117
|
name: "backfill-canonical-names",
|
|
16131
|
-
up:
|
|
16118
|
+
up: up32
|
|
16132
16119
|
},
|
|
16133
16120
|
{
|
|
16134
16121
|
version: 28,
|
|
16135
16122
|
name: "lossless-retention",
|
|
16136
|
-
up:
|
|
16123
|
+
up: up33
|
|
16137
16124
|
},
|
|
16138
16125
|
{
|
|
16139
16126
|
version: 29,
|
|
16140
16127
|
name: "session-summary-dag",
|
|
16141
|
-
up:
|
|
16128
|
+
up: up34
|
|
16142
16129
|
},
|
|
16143
16130
|
{
|
|
16144
16131
|
version: 30,
|
|
16145
16132
|
name: "nullable-memory-job-memory-id",
|
|
16146
|
-
up:
|
|
16133
|
+
up: up35
|
|
16147
16134
|
},
|
|
16148
16135
|
{
|
|
16149
16136
|
version: 31,
|
|
16150
16137
|
name: "dependency-reason",
|
|
16151
|
-
up:
|
|
16138
|
+
up: up36,
|
|
16152
16139
|
artifacts: {
|
|
16153
16140
|
columns: [
|
|
16154
16141
|
{ table: "entity_dependencies", column: "reason" },
|
|
@@ -16159,7 +16146,7 @@ var MIGRATIONS = [
|
|
|
16159
16146
|
{
|
|
16160
16147
|
version: 32,
|
|
16161
16148
|
name: "embeddings-vector-column",
|
|
16162
|
-
up:
|
|
16149
|
+
up: up37,
|
|
16163
16150
|
artifacts: {
|
|
16164
16151
|
columns: [{ table: "embeddings", column: "vector", optional: true }]
|
|
16165
16152
|
}
|
|
@@ -16167,7 +16154,7 @@ var MIGRATIONS = [
|
|
|
16167
16154
|
{
|
|
16168
16155
|
version: 33,
|
|
16169
16156
|
name: "scope",
|
|
16170
|
-
up:
|
|
16157
|
+
up: up38,
|
|
16171
16158
|
artifacts: {
|
|
16172
16159
|
columns: [{ table: "memories", column: "scope" }]
|
|
16173
16160
|
}
|
|
@@ -16175,17 +16162,17 @@ var MIGRATIONS = [
|
|
|
16175
16162
|
{
|
|
16176
16163
|
version: 34,
|
|
16177
16164
|
name: "scope-aware-dedup",
|
|
16178
|
-
up:
|
|
16165
|
+
up: up39
|
|
16179
16166
|
},
|
|
16180
16167
|
{
|
|
16181
16168
|
version: 35,
|
|
16182
16169
|
name: "entity-fts",
|
|
16183
|
-
up:
|
|
16170
|
+
up: up40
|
|
16184
16171
|
},
|
|
16185
16172
|
{
|
|
16186
16173
|
version: 36,
|
|
16187
16174
|
name: "dependency-confidence",
|
|
16188
|
-
up:
|
|
16175
|
+
up: up41,
|
|
16189
16176
|
artifacts: {
|
|
16190
16177
|
columns: [{ table: "entity_dependencies", column: "confidence" }]
|
|
16191
16178
|
}
|
|
@@ -16193,7 +16180,7 @@ var MIGRATIONS = [
|
|
|
16193
16180
|
{
|
|
16194
16181
|
version: 37,
|
|
16195
16182
|
name: "entity-communities",
|
|
16196
|
-
up:
|
|
16183
|
+
up: up42,
|
|
16197
16184
|
artifacts: {
|
|
16198
16185
|
tables: ["entity_communities"],
|
|
16199
16186
|
columns: [{ table: "entities", column: "community_id" }]
|
|
@@ -16202,24 +16189,24 @@ var MIGRATIONS = [
|
|
|
16202
16189
|
{
|
|
16203
16190
|
version: 38,
|
|
16204
16191
|
name: "memory-hints",
|
|
16205
|
-
up:
|
|
16192
|
+
up: up43,
|
|
16206
16193
|
artifacts: { tables: ["memory_hints"] }
|
|
16207
16194
|
},
|
|
16208
16195
|
{
|
|
16209
16196
|
version: 39,
|
|
16210
16197
|
name: "dedup-entity-dependencies",
|
|
16211
|
-
up:
|
|
16198
|
+
up: up44
|
|
16212
16199
|
},
|
|
16213
16200
|
{
|
|
16214
16201
|
version: 40,
|
|
16215
16202
|
name: "session-transcripts",
|
|
16216
|
-
up:
|
|
16203
|
+
up: up45,
|
|
16217
16204
|
artifacts: { tables: ["session_transcripts"] }
|
|
16218
16205
|
},
|
|
16219
16206
|
{
|
|
16220
16207
|
version: 41,
|
|
16221
16208
|
name: "path-feedback",
|
|
16222
|
-
up:
|
|
16209
|
+
up: up46,
|
|
16223
16210
|
artifacts: {
|
|
16224
16211
|
tables: [
|
|
16225
16212
|
"path_feedback_events",
|
|
@@ -16234,7 +16221,7 @@ var MIGRATIONS = [
|
|
|
16234
16221
|
{
|
|
16235
16222
|
version: 42,
|
|
16236
16223
|
name: "session-memories-agent-id",
|
|
16237
|
-
up:
|
|
16224
|
+
up: up47,
|
|
16238
16225
|
artifacts: {
|
|
16239
16226
|
columns: [{ table: "session_memories", column: "agent_id" }]
|
|
16240
16227
|
}
|
|
@@ -16242,7 +16229,7 @@ var MIGRATIONS = [
|
|
|
16242
16229
|
{
|
|
16243
16230
|
version: 43,
|
|
16244
16231
|
name: "agents-table",
|
|
16245
|
-
up:
|
|
16232
|
+
up: up48,
|
|
16246
16233
|
artifacts: {
|
|
16247
16234
|
tables: ["agents"],
|
|
16248
16235
|
columns: [
|
|
@@ -16254,7 +16241,7 @@ var MIGRATIONS = [
|
|
|
16254
16241
|
{
|
|
16255
16242
|
version: 44,
|
|
16256
16243
|
name: "memory-md-temporal-head",
|
|
16257
|
-
up:
|
|
16244
|
+
up: up49,
|
|
16258
16245
|
artifacts: {
|
|
16259
16246
|
columns: [
|
|
16260
16247
|
{ table: "session_summaries", column: "source_type" },
|
|
@@ -16266,7 +16253,7 @@ var MIGRATIONS = [
|
|
|
16266
16253
|
{
|
|
16267
16254
|
version: 45,
|
|
16268
16255
|
name: "lossless-working-memory-hardening",
|
|
16269
|
-
up:
|
|
16256
|
+
up: up50,
|
|
16270
16257
|
artifacts: {
|
|
16271
16258
|
tables: ["session_transcripts_fts", "memory_md_heads"],
|
|
16272
16259
|
columns: [
|
|
@@ -16279,17 +16266,17 @@ var MIGRATIONS = [
|
|
|
16279
16266
|
{
|
|
16280
16267
|
version: 46,
|
|
16281
16268
|
name: "session-summary-uniqueness",
|
|
16282
|
-
up:
|
|
16269
|
+
up: up51
|
|
16283
16270
|
},
|
|
16284
16271
|
{
|
|
16285
16272
|
version: 47,
|
|
16286
16273
|
name: "agent-scoped-temporal-uniqueness",
|
|
16287
|
-
up:
|
|
16274
|
+
up: up52
|
|
16288
16275
|
},
|
|
16289
16276
|
{
|
|
16290
16277
|
version: 48,
|
|
16291
16278
|
name: "thread-heads",
|
|
16292
|
-
up:
|
|
16279
|
+
up: up53,
|
|
16293
16280
|
artifacts: {
|
|
16294
16281
|
tables: ["memory_thread_heads"]
|
|
16295
16282
|
}
|
|
@@ -16297,7 +16284,7 @@ var MIGRATIONS = [
|
|
|
16297
16284
|
{
|
|
16298
16285
|
version: 49,
|
|
16299
16286
|
name: "session-extract-cursors",
|
|
16300
|
-
up:
|
|
16287
|
+
up: up54,
|
|
16301
16288
|
artifacts: {
|
|
16302
16289
|
tables: ["session_extract_cursors"]
|
|
16303
16290
|
}
|
|
@@ -16305,7 +16292,7 @@ var MIGRATIONS = [
|
|
|
16305
16292
|
{
|
|
16306
16293
|
version: 50,
|
|
16307
16294
|
name: "related-to-audit",
|
|
16308
|
-
up:
|
|
16295
|
+
up: up55,
|
|
16309
16296
|
artifacts: {
|
|
16310
16297
|
tables: ["entity_dependency_history"]
|
|
16311
16298
|
}
|
|
@@ -16313,7 +16300,7 @@ var MIGRATIONS = [
|
|
|
16313
16300
|
{
|
|
16314
16301
|
version: 51,
|
|
16315
16302
|
name: "memory-md-rolling-window-lineage",
|
|
16316
|
-
up:
|
|
16303
|
+
up: up56,
|
|
16317
16304
|
artifacts: {
|
|
16318
16305
|
tables: ["memory_artifacts", "memory_artifact_tombstones", "memory_artifacts_fts"],
|
|
16319
16306
|
columns: [
|
|
@@ -16328,15 +16315,12 @@ var MIGRATIONS = [
|
|
|
16328
16315
|
{
|
|
16329
16316
|
version: 52,
|
|
16330
16317
|
name: "mcp-invocations",
|
|
16331
|
-
up:
|
|
16332
|
-
artifacts: {
|
|
16333
|
-
tables: ["mcp_invocations"]
|
|
16334
|
-
}
|
|
16318
|
+
up: up57
|
|
16335
16319
|
},
|
|
16336
16320
|
{
|
|
16337
16321
|
version: 53,
|
|
16338
16322
|
name: "skill-invocations",
|
|
16339
|
-
up:
|
|
16323
|
+
up: up58,
|
|
16340
16324
|
artifacts: {
|
|
16341
16325
|
tables: ["skill_invocations"]
|
|
16342
16326
|
}
|
|
@@ -16344,7 +16328,7 @@ var MIGRATIONS = [
|
|
|
16344
16328
|
{
|
|
16345
16329
|
version: 54,
|
|
16346
16330
|
name: "task-agent-scope",
|
|
16347
|
-
up:
|
|
16331
|
+
up: up59,
|
|
16348
16332
|
artifacts: {
|
|
16349
16333
|
tables: ["task_scope_hints"]
|
|
16350
16334
|
}
|
|
@@ -16352,7 +16336,7 @@ var MIGRATIONS = [
|
|
|
16352
16336
|
{
|
|
16353
16337
|
version: 55,
|
|
16354
16338
|
name: "dreaming-state",
|
|
16355
|
-
up:
|
|
16339
|
+
up: up60,
|
|
16356
16340
|
artifacts: {
|
|
16357
16341
|
tables: ["dreaming_state", "dreaming_passes"]
|
|
16358
16342
|
}
|
|
@@ -16360,22 +16344,22 @@ var MIGRATIONS = [
|
|
|
16360
16344
|
{
|
|
16361
16345
|
version: 56,
|
|
16362
16346
|
name: "agent-scoped-content-hash",
|
|
16363
|
-
up:
|
|
16347
|
+
up: up61
|
|
16364
16348
|
},
|
|
16365
16349
|
{
|
|
16366
16350
|
version: 57,
|
|
16367
16351
|
name: "memories-fts-tokenizer-repair",
|
|
16368
|
-
up:
|
|
16352
|
+
up: up62
|
|
16369
16353
|
},
|
|
16370
16354
|
{
|
|
16371
16355
|
version: 58,
|
|
16372
16356
|
name: "knowledge-graph-indices",
|
|
16373
|
-
up:
|
|
16357
|
+
up: up63
|
|
16374
16358
|
},
|
|
16375
16359
|
{
|
|
16376
16360
|
version: 59,
|
|
16377
16361
|
name: "entity-attribute-claim-key",
|
|
16378
|
-
up:
|
|
16362
|
+
up: up64,
|
|
16379
16363
|
artifacts: {
|
|
16380
16364
|
columns: [{ table: "entity_attributes", column: "claim_key" }]
|
|
16381
16365
|
}
|
|
@@ -16383,7 +16367,7 @@ var MIGRATIONS = [
|
|
|
16383
16367
|
{
|
|
16384
16368
|
version: 60,
|
|
16385
16369
|
name: "entity-attribute-group-key",
|
|
16386
|
-
up:
|
|
16370
|
+
up: up65,
|
|
16387
16371
|
artifacts: {
|
|
16388
16372
|
columns: [{ table: "entity_attributes", column: "group_key" }]
|
|
16389
16373
|
}
|
|
@@ -16391,7 +16375,7 @@ var MIGRATIONS = [
|
|
|
16391
16375
|
{
|
|
16392
16376
|
version: 61,
|
|
16393
16377
|
name: "memory-artifact-source-mtime",
|
|
16394
|
-
up:
|
|
16378
|
+
up: up66,
|
|
16395
16379
|
artifacts: {
|
|
16396
16380
|
columns: [{ table: "memory_artifacts", column: "source_mtime_ms" }]
|
|
16397
16381
|
}
|
|
@@ -16399,7 +16383,7 @@ var MIGRATIONS = [
|
|
|
16399
16383
|
{
|
|
16400
16384
|
version: 62,
|
|
16401
16385
|
name: "memory-artifact-soft-delete",
|
|
16402
|
-
up:
|
|
16386
|
+
up: up67,
|
|
16403
16387
|
artifacts: {
|
|
16404
16388
|
columns: [
|
|
16405
16389
|
{ table: "memory_artifacts", column: "is_deleted" },
|
|
@@ -16410,12 +16394,12 @@ var MIGRATIONS = [
|
|
|
16410
16394
|
{
|
|
16411
16395
|
version: 63,
|
|
16412
16396
|
name: "content-only-memories-fts-update",
|
|
16413
|
-
up:
|
|
16397
|
+
up: up68
|
|
16414
16398
|
},
|
|
16415
16399
|
{
|
|
16416
16400
|
version: 64,
|
|
16417
16401
|
name: "source-graph-provenance",
|
|
16418
|
-
up:
|
|
16402
|
+
up: up69,
|
|
16419
16403
|
artifacts: {
|
|
16420
16404
|
columns: [
|
|
16421
16405
|
{ table: "entities", column: "source_path" },
|
|
@@ -16428,7 +16412,7 @@ var MIGRATIONS = [
|
|
|
16428
16412
|
{
|
|
16429
16413
|
version: 65,
|
|
16430
16414
|
name: "source-embedding-agent-scope",
|
|
16431
|
-
up:
|
|
16415
|
+
up: up70,
|
|
16432
16416
|
artifacts: {
|
|
16433
16417
|
columns: [{ table: "embeddings", column: "agent_id", optional: true }]
|
|
16434
16418
|
}
|
|
@@ -16436,7 +16420,7 @@ var MIGRATIONS = [
|
|
|
16436
16420
|
{
|
|
16437
16421
|
version: 66,
|
|
16438
16422
|
name: "memory-search-telemetry",
|
|
16439
|
-
up:
|
|
16423
|
+
up: up71,
|
|
16440
16424
|
artifacts: {
|
|
16441
16425
|
tables: ["memory_search_telemetry"]
|
|
16442
16426
|
}
|
|
@@ -16444,7 +16428,7 @@ var MIGRATIONS = [
|
|
|
16444
16428
|
{
|
|
16445
16429
|
version: 67,
|
|
16446
16430
|
name: "ontology-proposals",
|
|
16447
|
-
up:
|
|
16431
|
+
up: up72,
|
|
16448
16432
|
artifacts: {
|
|
16449
16433
|
tables: ["ontology_proposals"],
|
|
16450
16434
|
columns: [
|
|
@@ -16458,7 +16442,7 @@ var MIGRATIONS = [
|
|
|
16458
16442
|
{
|
|
16459
16443
|
version: 68,
|
|
16460
16444
|
name: "daily-reflections",
|
|
16461
|
-
up:
|
|
16445
|
+
up: up73,
|
|
16462
16446
|
artifacts: {
|
|
16463
16447
|
tables: ["daily_reflections"]
|
|
16464
16448
|
}
|
|
@@ -16466,7 +16450,7 @@ var MIGRATIONS = [
|
|
|
16466
16450
|
{
|
|
16467
16451
|
version: 69,
|
|
16468
16452
|
name: "daily-reflections-multiple-insights",
|
|
16469
|
-
up:
|
|
16453
|
+
up: up74,
|
|
16470
16454
|
artifacts: {
|
|
16471
16455
|
tables: ["daily_reflections"]
|
|
16472
16456
|
}
|
|
@@ -16474,7 +16458,7 @@ var MIGRATIONS = [
|
|
|
16474
16458
|
{
|
|
16475
16459
|
version: 70,
|
|
16476
16460
|
name: "ontology-control-plane-state",
|
|
16477
|
-
up:
|
|
16461
|
+
up: up75,
|
|
16478
16462
|
artifacts: {
|
|
16479
16463
|
columns: [
|
|
16480
16464
|
{ table: "entities", column: "status" },
|
|
@@ -16489,7 +16473,7 @@ var MIGRATIONS = [
|
|
|
16489
16473
|
{
|
|
16490
16474
|
version: 71,
|
|
16491
16475
|
name: "epistemic-assertions",
|
|
16492
|
-
up:
|
|
16476
|
+
up: up76,
|
|
16493
16477
|
artifacts: {
|
|
16494
16478
|
tables: ["epistemic_assertions"]
|
|
16495
16479
|
}
|
|
@@ -16497,7 +16481,7 @@ var MIGRATIONS = [
|
|
|
16497
16481
|
{
|
|
16498
16482
|
version: 72,
|
|
16499
16483
|
name: "agent-scoped-idempotency-key",
|
|
16500
|
-
up:
|
|
16484
|
+
up: up77,
|
|
16501
16485
|
artifacts: {
|
|
16502
16486
|
columns: [
|
|
16503
16487
|
{ table: "memories", column: "idempotency_key" },
|
|
@@ -16508,7 +16492,7 @@ var MIGRATIONS = [
|
|
|
16508
16492
|
{
|
|
16509
16493
|
version: 73,
|
|
16510
16494
|
name: "recall-context-dedupe",
|
|
16511
|
-
up:
|
|
16495
|
+
up: up78,
|
|
16512
16496
|
artifacts: {
|
|
16513
16497
|
tables: ["session_context_epochs", "session_recall_events"]
|
|
16514
16498
|
}
|
|
@@ -16516,7 +16500,7 @@ var MIGRATIONS = [
|
|
|
16516
16500
|
{
|
|
16517
16501
|
version: 74,
|
|
16518
16502
|
name: "aggregate-memory-links",
|
|
16519
|
-
up:
|
|
16503
|
+
up: up79,
|
|
16520
16504
|
artifacts: {
|
|
16521
16505
|
tables: ["aggregate_memory_sources"]
|
|
16522
16506
|
}
|
|
@@ -16524,7 +16508,7 @@ var MIGRATIONS = [
|
|
|
16524
16508
|
{
|
|
16525
16509
|
version: 75,
|
|
16526
16510
|
name: "memory-artifact-source-provenance",
|
|
16527
|
-
up:
|
|
16511
|
+
up: up80,
|
|
16528
16512
|
artifacts: {
|
|
16529
16513
|
columns: [
|
|
16530
16514
|
{ table: "memory_artifacts", column: "source_id" },
|
|
@@ -16538,7 +16522,7 @@ var MIGRATIONS = [
|
|
|
16538
16522
|
{
|
|
16539
16523
|
version: 76,
|
|
16540
16524
|
name: "temporal-edges",
|
|
16541
|
-
up:
|
|
16525
|
+
up: up81,
|
|
16542
16526
|
artifacts: {
|
|
16543
16527
|
tables: ["temporal_edges"]
|
|
16544
16528
|
}
|
|
@@ -16546,7 +16530,7 @@ var MIGRATIONS = [
|
|
|
16546
16530
|
{
|
|
16547
16531
|
version: 77,
|
|
16548
16532
|
name: "entity-aliases",
|
|
16549
|
-
up:
|
|
16533
|
+
up: up82,
|
|
16550
16534
|
artifacts: {
|
|
16551
16535
|
tables: ["entity_aliases"]
|
|
16552
16536
|
}
|
|
@@ -16554,7 +16538,7 @@ var MIGRATIONS = [
|
|
|
16554
16538
|
{
|
|
16555
16539
|
version: 78,
|
|
16556
16540
|
name: "api-keys",
|
|
16557
|
-
up:
|
|
16541
|
+
up: up83,
|
|
16558
16542
|
artifacts: {
|
|
16559
16543
|
tables: ["api_keys"]
|
|
16560
16544
|
}
|
|
@@ -16562,7 +16546,7 @@ var MIGRATIONS = [
|
|
|
16562
16546
|
{
|
|
16563
16547
|
version: 79,
|
|
16564
16548
|
name: "transcript-capture-jobs",
|
|
16565
|
-
up:
|
|
16549
|
+
up: up84,
|
|
16566
16550
|
artifacts: {
|
|
16567
16551
|
tables: ["transcript_capture_jobs"]
|
|
16568
16552
|
}
|
|
@@ -16570,7 +16554,7 @@ var MIGRATIONS = [
|
|
|
16570
16554
|
{
|
|
16571
16555
|
version: 80,
|
|
16572
16556
|
name: "document-scope-columns",
|
|
16573
|
-
up:
|
|
16557
|
+
up: up85,
|
|
16574
16558
|
artifacts: {
|
|
16575
16559
|
columns: [
|
|
16576
16560
|
{ table: "documents", column: "agent_id" },
|
|
@@ -16581,7 +16565,7 @@ var MIGRATIONS = [
|
|
|
16581
16565
|
{
|
|
16582
16566
|
version: 81,
|
|
16583
16567
|
name: "aggregate-evidence-sources",
|
|
16584
|
-
up:
|
|
16568
|
+
up: up86,
|
|
16585
16569
|
artifacts: {
|
|
16586
16570
|
tables: ["aggregate_evidence_sources"]
|
|
16587
16571
|
}
|
|
@@ -16589,7 +16573,7 @@ var MIGRATIONS = [
|
|
|
16589
16573
|
{
|
|
16590
16574
|
version: 82,
|
|
16591
16575
|
name: "skill-invocations-harness",
|
|
16592
|
-
up:
|
|
16576
|
+
up: up87,
|
|
16593
16577
|
artifacts: {
|
|
16594
16578
|
columns: [
|
|
16595
16579
|
{ table: "skill_invocations", column: "harness" },
|
|
@@ -16600,7 +16584,7 @@ var MIGRATIONS = [
|
|
|
16600
16584
|
{
|
|
16601
16585
|
version: 83,
|
|
16602
16586
|
name: "memory-lifecycle-repair",
|
|
16603
|
-
up:
|
|
16587
|
+
up: up88,
|
|
16604
16588
|
artifacts: {
|
|
16605
16589
|
tables: ["transcript_capture_jobs", "aggregate_evidence_sources", "entity_dependencies"],
|
|
16606
16590
|
columns: [
|
|
@@ -16615,7 +16599,7 @@ var MIGRATIONS = [
|
|
|
16615
16599
|
{
|
|
16616
16600
|
version: 84,
|
|
16617
16601
|
name: "legacy-markdown-import-state",
|
|
16618
|
-
up:
|
|
16602
|
+
up: up89,
|
|
16619
16603
|
artifacts: {
|
|
16620
16604
|
tables: ["legacy_markdown_imports", "legacy_markdown_chunks"]
|
|
16621
16605
|
}
|
|
@@ -16623,7 +16607,7 @@ var MIGRATIONS = [
|
|
|
16623
16607
|
{
|
|
16624
16608
|
version: 85,
|
|
16625
16609
|
name: "backfill-relations-to-dependencies",
|
|
16626
|
-
up:
|
|
16610
|
+
up: up90,
|
|
16627
16611
|
artifacts: {
|
|
16628
16612
|
tables: ["entity_dependencies"]
|
|
16629
16613
|
}
|
|
@@ -16631,7 +16615,7 @@ var MIGRATIONS = [
|
|
|
16631
16615
|
{
|
|
16632
16616
|
version: 86,
|
|
16633
16617
|
name: "summary-jobs-content-hash",
|
|
16634
|
-
up:
|
|
16618
|
+
up: up91,
|
|
16635
16619
|
artifacts: {
|
|
16636
16620
|
columns: [{ table: "summary_jobs", column: "content_hash" }]
|
|
16637
16621
|
}
|
|
@@ -16639,7 +16623,7 @@ var MIGRATIONS = [
|
|
|
16639
16623
|
{
|
|
16640
16624
|
version: 87,
|
|
16641
16625
|
name: "summary-jobs-boundary-reason",
|
|
16642
|
-
up:
|
|
16626
|
+
up: up92,
|
|
16643
16627
|
artifacts: {
|
|
16644
16628
|
columns: [{ table: "summary_jobs", column: "boundary_reason" }]
|
|
16645
16629
|
}
|
|
@@ -16647,7 +16631,7 @@ var MIGRATIONS = [
|
|
|
16647
16631
|
{
|
|
16648
16632
|
version: 88,
|
|
16649
16633
|
name: "transcript-recovery-files",
|
|
16650
|
-
up:
|
|
16634
|
+
up: up93,
|
|
16651
16635
|
artifacts: {
|
|
16652
16636
|
tables: ["transcript_recovery_files"]
|
|
16653
16637
|
}
|
|
@@ -16655,7 +16639,7 @@ var MIGRATIONS = [
|
|
|
16655
16639
|
{
|
|
16656
16640
|
version: 89,
|
|
16657
16641
|
name: "job-cancellations",
|
|
16658
|
-
up:
|
|
16642
|
+
up: up94,
|
|
16659
16643
|
artifacts: {
|
|
16660
16644
|
tables: ["job_cancellations"]
|
|
16661
16645
|
}
|
|
@@ -16663,7 +16647,7 @@ var MIGRATIONS = [
|
|
|
16663
16647
|
{
|
|
16664
16648
|
version: 90,
|
|
16665
16649
|
name: "job-archive",
|
|
16666
|
-
up:
|
|
16650
|
+
up: up95,
|
|
16667
16651
|
artifacts: {
|
|
16668
16652
|
tables: ["job_archive"]
|
|
16669
16653
|
}
|
|
@@ -16671,25 +16655,25 @@ var MIGRATIONS = [
|
|
|
16671
16655
|
{
|
|
16672
16656
|
version: 91,
|
|
16673
16657
|
name: "embedding-index-generations",
|
|
16674
|
-
up:
|
|
16658
|
+
up: up96,
|
|
16675
16659
|
artifacts: { tables: ["embedding_index_state"] }
|
|
16676
16660
|
},
|
|
16677
16661
|
{
|
|
16678
16662
|
version: 92,
|
|
16679
16663
|
name: "embedding-staging-store",
|
|
16680
|
-
up:
|
|
16664
|
+
up: up97,
|
|
16681
16665
|
artifacts: { tables: ["embeddings_staging"] }
|
|
16682
16666
|
},
|
|
16683
16667
|
{
|
|
16684
16668
|
version: 93,
|
|
16685
16669
|
name: "dreaming-evidence-cursor",
|
|
16686
|
-
up:
|
|
16670
|
+
up: up98,
|
|
16687
16671
|
artifacts: { columns: [{ table: "dreaming_state", column: "evidence_cursor" }] }
|
|
16688
16672
|
},
|
|
16689
16673
|
{
|
|
16690
16674
|
version: 94,
|
|
16691
16675
|
name: "memory-kind",
|
|
16692
|
-
up:
|
|
16676
|
+
up: up99,
|
|
16693
16677
|
artifacts: {
|
|
16694
16678
|
columns: [
|
|
16695
16679
|
{ table: "memories", column: "memory_kind" },
|
|
@@ -16700,35 +16684,35 @@ var MIGRATIONS = [
|
|
|
16700
16684
|
{
|
|
16701
16685
|
version: 95,
|
|
16702
16686
|
name: "compaction-recall-projections",
|
|
16703
|
-
up:
|
|
16687
|
+
up: up100
|
|
16704
16688
|
},
|
|
16705
16689
|
{
|
|
16706
16690
|
version: 96,
|
|
16707
16691
|
name: "retire-legacy-ingestion",
|
|
16708
|
-
up:
|
|
16692
|
+
up: up101
|
|
16709
16693
|
},
|
|
16710
16694
|
{
|
|
16711
16695
|
version: 97,
|
|
16712
16696
|
name: "dreaming-failure-backoff",
|
|
16713
|
-
up:
|
|
16697
|
+
up: up102,
|
|
16714
16698
|
artifacts: { columns: [{ table: "dreaming_state", column: "last_failure_at" }] }
|
|
16715
16699
|
},
|
|
16716
16700
|
{
|
|
16717
16701
|
version: 98,
|
|
16718
16702
|
name: "dreaming-evidence-exclusions",
|
|
16719
|
-
up:
|
|
16703
|
+
up: up103,
|
|
16720
16704
|
artifacts: { tables: ["dreaming_evidence_exclusions"] }
|
|
16721
16705
|
},
|
|
16722
16706
|
{
|
|
16723
16707
|
version: 99,
|
|
16724
16708
|
name: "dreaming-tool-calls",
|
|
16725
|
-
up:
|
|
16709
|
+
up: up104,
|
|
16726
16710
|
artifacts: { tables: ["dreaming_tool_calls"] }
|
|
16727
16711
|
},
|
|
16728
16712
|
{
|
|
16729
16713
|
version: 100,
|
|
16730
16714
|
name: "dreaming-runbook",
|
|
16731
|
-
up:
|
|
16715
|
+
up: up105,
|
|
16732
16716
|
artifacts: {
|
|
16733
16717
|
columns: [
|
|
16734
16718
|
{ table: "dreaming_passes", column: "evidence_window_json" },
|
|
@@ -16739,23 +16723,23 @@ var MIGRATIONS = [
|
|
|
16739
16723
|
{
|
|
16740
16724
|
version: 101,
|
|
16741
16725
|
name: "dreaming-attention",
|
|
16742
|
-
up:
|
|
16726
|
+
up: up106,
|
|
16743
16727
|
artifacts: { tables: ["dreaming_attention"] }
|
|
16744
16728
|
},
|
|
16745
16729
|
{
|
|
16746
16730
|
version: 102,
|
|
16747
16731
|
name: "attribute-semantic-memories",
|
|
16748
|
-
up:
|
|
16732
|
+
up: up107
|
|
16749
16733
|
},
|
|
16750
16734
|
{
|
|
16751
16735
|
version: 103,
|
|
16752
16736
|
name: "semantic-memory-kind",
|
|
16753
|
-
up:
|
|
16737
|
+
up: up108
|
|
16754
16738
|
},
|
|
16755
16739
|
{
|
|
16756
16740
|
version: 104,
|
|
16757
16741
|
name: "derived-memory-provenance",
|
|
16758
|
-
up:
|
|
16742
|
+
up: up109,
|
|
16759
16743
|
artifacts: {
|
|
16760
16744
|
tables: ["derived_memory_sources"],
|
|
16761
16745
|
columns: [{ table: "memories", column: "stale_at" }]
|
|
@@ -16764,12 +16748,12 @@ var MIGRATIONS = [
|
|
|
16764
16748
|
{
|
|
16765
16749
|
version: 105,
|
|
16766
16750
|
name: "agent-scoped-entity-name",
|
|
16767
|
-
up:
|
|
16751
|
+
up: up110
|
|
16768
16752
|
},
|
|
16769
16753
|
{
|
|
16770
16754
|
version: 106,
|
|
16771
16755
|
name: "memory-review-after",
|
|
16772
|
-
up:
|
|
16756
|
+
up: up111,
|
|
16773
16757
|
artifacts: {
|
|
16774
16758
|
columns: [{ table: "memories", column: "review_after" }]
|
|
16775
16759
|
}
|
|
@@ -16777,7 +16761,7 @@ var MIGRATIONS = [
|
|
|
16777
16761
|
{
|
|
16778
16762
|
version: 107,
|
|
16779
16763
|
name: "dreaming-pass-usage",
|
|
16780
|
-
up:
|
|
16764
|
+
up: up112,
|
|
16781
16765
|
artifacts: {
|
|
16782
16766
|
columns: [
|
|
16783
16767
|
{ table: "dreaming_passes", column: "tokens_input" },
|
|
@@ -16791,7 +16775,7 @@ var MIGRATIONS = [
|
|
|
16791
16775
|
{
|
|
16792
16776
|
version: 108,
|
|
16793
16777
|
name: "embedding-usage",
|
|
16794
|
-
up:
|
|
16778
|
+
up: up113,
|
|
16795
16779
|
artifacts: {
|
|
16796
16780
|
tables: ["embedding_usage"]
|
|
16797
16781
|
}
|
|
@@ -16799,7 +16783,7 @@ var MIGRATIONS = [
|
|
|
16799
16783
|
{
|
|
16800
16784
|
version: 109,
|
|
16801
16785
|
name: "telemetry-install",
|
|
16802
|
-
up:
|
|
16786
|
+
up: up114,
|
|
16803
16787
|
artifacts: {
|
|
16804
16788
|
tables: ["telemetry_install"]
|
|
16805
16789
|
}
|
|
@@ -16807,12 +16791,12 @@ var MIGRATIONS = [
|
|
|
16807
16791
|
{
|
|
16808
16792
|
version: 110,
|
|
16809
16793
|
name: "memory-mention-join-index",
|
|
16810
|
-
up:
|
|
16794
|
+
up: up115
|
|
16811
16795
|
},
|
|
16812
16796
|
{
|
|
16813
16797
|
version: 111,
|
|
16814
16798
|
name: "telemetry-first-use",
|
|
16815
|
-
up:
|
|
16799
|
+
up: up116,
|
|
16816
16800
|
artifacts: {
|
|
16817
16801
|
columns: [
|
|
16818
16802
|
{ table: "telemetry_install", column: "first_remember_at" },
|
|
@@ -16823,7 +16807,7 @@ var MIGRATIONS = [
|
|
|
16823
16807
|
{
|
|
16824
16808
|
version: 112,
|
|
16825
16809
|
name: "telemetry-queue-ownership",
|
|
16826
|
-
up:
|
|
16810
|
+
up: up117,
|
|
16827
16811
|
artifacts: {
|
|
16828
16812
|
columns: [
|
|
16829
16813
|
{ table: "telemetry_events", column: "source" },
|
|
@@ -16835,7 +16819,7 @@ var MIGRATIONS = [
|
|
|
16835
16819
|
{
|
|
16836
16820
|
version: 113,
|
|
16837
16821
|
name: "session-claims",
|
|
16838
|
-
up:
|
|
16822
|
+
up: up118,
|
|
16839
16823
|
artifacts: {
|
|
16840
16824
|
tables: ["session_claims"],
|
|
16841
16825
|
columns: [
|
|
@@ -16849,12 +16833,12 @@ var MIGRATIONS = [
|
|
|
16849
16833
|
{
|
|
16850
16834
|
version: 114,
|
|
16851
16835
|
name: "memory-traversal-hydration-index",
|
|
16852
|
-
up:
|
|
16836
|
+
up: up119
|
|
16853
16837
|
},
|
|
16854
16838
|
{
|
|
16855
16839
|
version: 115,
|
|
16856
16840
|
name: "cross-agent-message-notifications",
|
|
16857
|
-
up:
|
|
16841
|
+
up: up120,
|
|
16858
16842
|
artifacts: {
|
|
16859
16843
|
tables: ["cross_agent_messages", "cross_agent_message_receipts"]
|
|
16860
16844
|
}
|
|
@@ -16862,7 +16846,7 @@ var MIGRATIONS = [
|
|
|
16862
16846
|
{
|
|
16863
16847
|
version: 116,
|
|
16864
16848
|
name: "acp-delivery-reconciliation",
|
|
16865
|
-
up:
|
|
16849
|
+
up: up121,
|
|
16866
16850
|
artifacts: {
|
|
16867
16851
|
columns: [
|
|
16868
16852
|
{ table: "cross_agent_messages", column: "delivery_state" },
|
|
@@ -16876,7 +16860,7 @@ var MIGRATIONS = [
|
|
|
16876
16860
|
{
|
|
16877
16861
|
version: 117,
|
|
16878
16862
|
name: "retire-summary-worker",
|
|
16879
|
-
up:
|
|
16863
|
+
up: up122,
|
|
16880
16864
|
artifacts: {
|
|
16881
16865
|
columns: [
|
|
16882
16866
|
{ table: "session_transcripts", column: "completed_at" },
|
|
@@ -16887,24 +16871,24 @@ var MIGRATIONS = [
|
|
|
16887
16871
|
{
|
|
16888
16872
|
version: 118,
|
|
16889
16873
|
name: "queue-pressure-indices",
|
|
16890
|
-
up:
|
|
16874
|
+
up: up123
|
|
16891
16875
|
},
|
|
16892
16876
|
{
|
|
16893
16877
|
version: 119,
|
|
16894
16878
|
name: "telemetry-version-observation",
|
|
16895
|
-
up:
|
|
16879
|
+
up: up124,
|
|
16896
16880
|
artifacts: { columns: [{ table: "telemetry_install", column: "last_seen_version" }] }
|
|
16897
16881
|
},
|
|
16898
16882
|
{
|
|
16899
16883
|
version: 120,
|
|
16900
16884
|
name: "source-lifecycle-telemetry",
|
|
16901
|
-
up:
|
|
16885
|
+
up: up125,
|
|
16902
16886
|
artifacts: { tables: ["source_lifecycle_state"] }
|
|
16903
16887
|
},
|
|
16904
16888
|
{
|
|
16905
16889
|
version: 121,
|
|
16906
16890
|
name: "telemetry-delivery-health",
|
|
16907
|
-
up:
|
|
16891
|
+
up: up126,
|
|
16908
16892
|
artifacts: {
|
|
16909
16893
|
tables: ["telemetry_delivery_state"],
|
|
16910
16894
|
columns: [
|
|
@@ -16918,7 +16902,7 @@ var MIGRATIONS = [
|
|
|
16918
16902
|
{
|
|
16919
16903
|
version: 122,
|
|
16920
16904
|
name: "dreaming-evidence-retry",
|
|
16921
|
-
up:
|
|
16905
|
+
up: up127,
|
|
16922
16906
|
artifacts: {
|
|
16923
16907
|
columns: [
|
|
16924
16908
|
{ table: "dreaming_evidence_exclusions", column: "failure_class" },
|
|
@@ -16931,13 +16915,13 @@ var MIGRATIONS = [
|
|
|
16931
16915
|
{
|
|
16932
16916
|
version: 123,
|
|
16933
16917
|
name: "embedding-index-failures",
|
|
16934
|
-
up:
|
|
16918
|
+
up: up128,
|
|
16935
16919
|
artifacts: { tables: ["embedding_index_failures"] }
|
|
16936
16920
|
},
|
|
16937
16921
|
{
|
|
16938
16922
|
version: 124,
|
|
16939
16923
|
name: "import-derived-lifecycle",
|
|
16940
|
-
up:
|
|
16924
|
+
up: up129,
|
|
16941
16925
|
artifacts: {
|
|
16942
16926
|
tables: ["imported_source_lifecycle"]
|
|
16943
16927
|
}
|
|
@@ -16945,77 +16929,77 @@ var MIGRATIONS = [
|
|
|
16945
16929
|
{
|
|
16946
16930
|
version: 125,
|
|
16947
16931
|
name: "memory-content-safety",
|
|
16948
|
-
up:
|
|
16932
|
+
up: up130,
|
|
16949
16933
|
artifacts: { tables: ["memory_content_safety"] }
|
|
16950
16934
|
},
|
|
16951
16935
|
{
|
|
16952
16936
|
version: 126,
|
|
16953
16937
|
name: "dreaming-surprisal-attention",
|
|
16954
|
-
up:
|
|
16938
|
+
up: up131,
|
|
16955
16939
|
artifacts: { tables: ["dreaming_attention"] }
|
|
16956
16940
|
},
|
|
16957
16941
|
{
|
|
16958
16942
|
version: 127,
|
|
16959
16943
|
name: "ontology-contradictions",
|
|
16960
|
-
up:
|
|
16944
|
+
up: up132,
|
|
16961
16945
|
artifacts: { tables: ["ontology_contradictions"] }
|
|
16962
16946
|
},
|
|
16963
16947
|
{
|
|
16964
16948
|
version: 128,
|
|
16965
16949
|
name: "bounded-queue-diagnostics",
|
|
16966
|
-
up:
|
|
16950
|
+
up: up133
|
|
16967
16951
|
},
|
|
16968
16952
|
{
|
|
16969
16953
|
version: 129,
|
|
16970
16954
|
name: "retire-structural-jobs",
|
|
16971
|
-
up:
|
|
16955
|
+
up: up134
|
|
16972
16956
|
},
|
|
16973
16957
|
{
|
|
16974
16958
|
version: 130,
|
|
16975
16959
|
name: "embedding-repair-state",
|
|
16976
|
-
up:
|
|
16960
|
+
up: up135,
|
|
16977
16961
|
artifacts: { tables: ["embedding_repair_budget", "embedding_repair_backoff"] }
|
|
16978
16962
|
},
|
|
16979
16963
|
{
|
|
16980
16964
|
version: 131,
|
|
16981
16965
|
name: "dreaming-evidence-consumption",
|
|
16982
|
-
up:
|
|
16966
|
+
up: up136,
|
|
16983
16967
|
artifacts: { tables: ["dreaming_evidence_consumption"] }
|
|
16984
16968
|
},
|
|
16985
16969
|
{
|
|
16986
16970
|
version: 132,
|
|
16987
16971
|
name: "observer-scoped-epistemic-assertions",
|
|
16988
|
-
up:
|
|
16972
|
+
up: up137,
|
|
16989
16973
|
artifacts: { tables: ["epistemic_assertions"] }
|
|
16990
16974
|
},
|
|
16991
16975
|
{
|
|
16992
16976
|
version: 133,
|
|
16993
16977
|
name: "dreaming-memory-head",
|
|
16994
|
-
up:
|
|
16978
|
+
up: up138,
|
|
16995
16979
|
artifacts: { tables: ["memory_head_revisions", "memory_head_entries", "memory_head_revision_entries"] }
|
|
16996
16980
|
},
|
|
16997
16981
|
{
|
|
16998
16982
|
version: 134,
|
|
16999
16983
|
name: "scope-memory-head-entries",
|
|
17000
|
-
up:
|
|
16984
|
+
up: up139,
|
|
17001
16985
|
artifacts: { tables: ["memory_head_entries"] }
|
|
17002
16986
|
},
|
|
17003
16987
|
{
|
|
17004
16988
|
version: 135,
|
|
17005
16989
|
name: "memory-head-publication",
|
|
17006
|
-
up:
|
|
16990
|
+
up: up140,
|
|
17007
16991
|
artifacts: { tables: ["memory_head_publications"] }
|
|
17008
16992
|
},
|
|
17009
16993
|
{
|
|
17010
16994
|
version: 136,
|
|
17011
16995
|
name: "memory-head-revisions",
|
|
17012
|
-
up:
|
|
16996
|
+
up: up141,
|
|
17013
16997
|
artifacts: { tables: ["memory_head_revisions"] }
|
|
17014
16998
|
},
|
|
17015
16999
|
{
|
|
17016
17000
|
version: 137,
|
|
17017
17001
|
name: "dreaming-head-manifest",
|
|
17018
|
-
up:
|
|
17002
|
+
up: up142,
|
|
17019
17003
|
artifacts: {
|
|
17020
17004
|
columns: [
|
|
17021
17005
|
{ table: "dreaming_passes", column: "head_revision" },
|
|
@@ -17026,7 +17010,7 @@ var MIGRATIONS = [
|
|
|
17026
17010
|
{
|
|
17027
17011
|
version: 138,
|
|
17028
17012
|
name: "bounded-status-projections",
|
|
17029
|
-
up:
|
|
17013
|
+
up: up143,
|
|
17030
17014
|
artifacts: {
|
|
17031
17015
|
tables: ["transcript_capture_status", "memories_duplicate_hash_counts", "memories_diagnostics_state"]
|
|
17032
17016
|
}
|
|
@@ -17034,31 +17018,31 @@ var MIGRATIONS = [
|
|
|
17034
17018
|
{
|
|
17035
17019
|
version: 139,
|
|
17036
17020
|
name: "native-source-sync-state",
|
|
17037
|
-
up:
|
|
17021
|
+
up: up144,
|
|
17038
17022
|
artifacts: { tables: ["native_source_sync_state"] }
|
|
17039
17023
|
},
|
|
17040
17024
|
{
|
|
17041
17025
|
version: 140,
|
|
17042
17026
|
name: "transcript-recovery-frontier",
|
|
17043
|
-
up:
|
|
17027
|
+
up: up145,
|
|
17044
17028
|
artifacts: { tables: ["transcript_recovery_frontiers"] }
|
|
17045
17029
|
},
|
|
17046
17030
|
{
|
|
17047
17031
|
version: 141,
|
|
17048
17032
|
name: "source-sync-checkpoints",
|
|
17049
|
-
up:
|
|
17033
|
+
up: up146,
|
|
17050
17034
|
artifacts: { tables: ["source_sync_checkpoints"] }
|
|
17051
17035
|
},
|
|
17052
17036
|
{
|
|
17053
17037
|
version: 142,
|
|
17054
17038
|
name: "source-sync-frontier",
|
|
17055
|
-
up:
|
|
17039
|
+
up: up147,
|
|
17056
17040
|
artifacts: { columns: [{ table: "source_sync_checkpoints", column: "frontier" }] }
|
|
17057
17041
|
},
|
|
17058
17042
|
{
|
|
17059
17043
|
version: 143,
|
|
17060
17044
|
name: "embedding-index-progress",
|
|
17061
|
-
up:
|
|
17045
|
+
up: up148,
|
|
17062
17046
|
artifacts: {
|
|
17063
17047
|
columns: [
|
|
17064
17048
|
{ table: "embedding_index_state", column: "migration_phase" },
|
|
@@ -17074,19 +17058,19 @@ var MIGRATIONS = [
|
|
|
17074
17058
|
{
|
|
17075
17059
|
version: 144,
|
|
17076
17060
|
name: "memory-job-lease-token",
|
|
17077
|
-
up:
|
|
17061
|
+
up: up149,
|
|
17078
17062
|
artifacts: { columns: [{ table: "memory_jobs", column: "lease_token" }] }
|
|
17079
17063
|
},
|
|
17080
17064
|
{
|
|
17081
17065
|
version: 145,
|
|
17082
17066
|
name: "dreaming-evidence-reviews",
|
|
17083
|
-
up:
|
|
17067
|
+
up: up150,
|
|
17084
17068
|
artifacts: { tables: ["dreaming_evidence_reviews"] }
|
|
17085
17069
|
},
|
|
17086
17070
|
{
|
|
17087
17071
|
version: 146,
|
|
17088
17072
|
name: "source-transcript-import",
|
|
17089
|
-
up:
|
|
17073
|
+
up: up151,
|
|
17090
17074
|
artifacts: {
|
|
17091
17075
|
tables: [
|
|
17092
17076
|
"source_import_jobs",
|
|
@@ -17105,19 +17089,19 @@ var MIGRATIONS = [
|
|
|
17105
17089
|
{
|
|
17106
17090
|
version: 147,
|
|
17107
17091
|
name: "source-import-replay-file-slots",
|
|
17108
|
-
up:
|
|
17092
|
+
up: up152,
|
|
17109
17093
|
artifacts: { tables: ["source_import_files"] }
|
|
17110
17094
|
},
|
|
17111
17095
|
{
|
|
17112
17096
|
version: 148,
|
|
17113
17097
|
name: "source-import-attempt-provenance",
|
|
17114
|
-
up:
|
|
17098
|
+
up: up153,
|
|
17115
17099
|
artifacts: { columns: [{ table: "source_import_record_attempts", column: "source_id" }] }
|
|
17116
17100
|
},
|
|
17117
17101
|
{
|
|
17118
17102
|
version: 149,
|
|
17119
17103
|
name: "transcript-import-state-machine",
|
|
17120
|
-
up:
|
|
17104
|
+
up: up154,
|
|
17121
17105
|
artifacts: {
|
|
17122
17106
|
columns: [
|
|
17123
17107
|
{ table: "source_import_jobs", column: "duplicate_mode" },
|
|
@@ -17129,7 +17113,7 @@ var MIGRATIONS = [
|
|
|
17129
17113
|
{
|
|
17130
17114
|
version: 150,
|
|
17131
17115
|
name: "memory-head-freshness",
|
|
17132
|
-
up:
|
|
17116
|
+
up: up155,
|
|
17133
17117
|
artifacts: {
|
|
17134
17118
|
columns: [
|
|
17135
17119
|
{ table: "memory_md_heads", column: "is_current" },
|
|
@@ -17175,7 +17159,7 @@ var MIGRATIONS = [
|
|
|
17175
17159
|
{
|
|
17176
17160
|
version: 153,
|
|
17177
17161
|
name: "vector-repair-checkpoints",
|
|
17178
|
-
up:
|
|
17162
|
+
up: up156,
|
|
17179
17163
|
artifacts: { tables: ["vector_repair_checkpoints"] }
|
|
17180
17164
|
},
|
|
17181
17165
|
{
|
|
@@ -17202,13 +17186,13 @@ var MIGRATIONS = [
|
|
|
17202
17186
|
{
|
|
17203
17187
|
version: 156,
|
|
17204
17188
|
name: "embedding-repair-checkpoints",
|
|
17205
|
-
up:
|
|
17189
|
+
up: up157,
|
|
17206
17190
|
artifacts: { tables: ["embedding_repair_checkpoints"] }
|
|
17207
17191
|
},
|
|
17208
17192
|
{
|
|
17209
17193
|
version: 157,
|
|
17210
17194
|
name: "embedding-repair-progress",
|
|
17211
|
-
up:
|
|
17195
|
+
up: up158,
|
|
17212
17196
|
artifacts: {
|
|
17213
17197
|
tables: ["embedding_repair_progress"],
|
|
17214
17198
|
columns: [{ table: "embedding_repair_checkpoints", column: "profile_fingerprint" }]
|
|
@@ -17217,8 +17201,13 @@ var MIGRATIONS = [
|
|
|
17217
17201
|
{
|
|
17218
17202
|
version: 158,
|
|
17219
17203
|
name: "dreaming-candidate-scan-index",
|
|
17220
|
-
up:
|
|
17204
|
+
up: up159,
|
|
17221
17205
|
artifacts: { indexes: ["idx_memories_agent_kind"] }
|
|
17206
|
+
},
|
|
17207
|
+
{
|
|
17208
|
+
version: 159,
|
|
17209
|
+
name: "retire-obsolete-invocation-ledger",
|
|
17210
|
+
up: up5
|
|
17222
17211
|
}
|
|
17223
17212
|
];
|
|
17224
17213
|
var LATEST_SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1]?.version ?? 0;
|
|
@@ -28298,7 +28287,7 @@ var DAEMON_DERIVED_MEMORY_SOURCE_TYPES2 = [
|
|
|
28298
28287
|
"checkpoint",
|
|
28299
28288
|
"dreaming"
|
|
28300
28289
|
];
|
|
28301
|
-
function
|
|
28290
|
+
function up160(db) {
|
|
28302
28291
|
const hasColumn26 = (table, column) => {
|
|
28303
28292
|
const statement = db.prepare(`SELECT 1 FROM pragma_table_info('${table}') WHERE name = ?`);
|
|
28304
28293
|
try {
|
|
@@ -28410,6 +28399,9 @@ function up410(db) {
|
|
|
28410
28399
|
WHERE resolved_at IS NULL;
|
|
28411
28400
|
`);
|
|
28412
28401
|
}
|
|
28402
|
+
function up510(db) {
|
|
28403
|
+
db.exec("DROP TABLE IF EXISTS mcp_invocations");
|
|
28404
|
+
}
|
|
28413
28405
|
var MEMORIES_FTS_TOKENIZER2 = "unicode61";
|
|
28414
28406
|
var FTS_STATE_TABLE2 = "memories_fts_state";
|
|
28415
28407
|
function normalizeSql2(sql) {
|
|
@@ -28525,7 +28517,7 @@ function memoriesFtsNeedsTokenizerRepair2(sql) {
|
|
|
28525
28517
|
return true;
|
|
28526
28518
|
return !normalized.includes(`tokenize='${MEMORIES_FTS_TOKENIZER2}'`);
|
|
28527
28519
|
}
|
|
28528
|
-
function
|
|
28520
|
+
function up610(db) {
|
|
28529
28521
|
db.exec(`
|
|
28530
28522
|
CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
28531
28523
|
version INTEGER PRIMARY KEY,
|
|
@@ -28623,7 +28615,7 @@ function addColumnIfMissing210(db, table, column, definition) {
|
|
|
28623
28615
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
28624
28616
|
}
|
|
28625
28617
|
}
|
|
28626
|
-
function
|
|
28618
|
+
function up710(db) {
|
|
28627
28619
|
addColumnIfMissing210(db, "memories", "content_hash", "TEXT");
|
|
28628
28620
|
addColumnIfMissing210(db, "memories", "normalized_content", "TEXT");
|
|
28629
28621
|
addColumnIfMissing210(db, "memories", "is_deleted", "INTEGER DEFAULT 0");
|
|
@@ -28741,7 +28733,7 @@ function addColumnIfMissing32(db, table, column, definition) {
|
|
|
28741
28733
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
28742
28734
|
return true;
|
|
28743
28735
|
}
|
|
28744
|
-
function
|
|
28736
|
+
function up810(db) {
|
|
28745
28737
|
addColumnIfMissing32(db, "memories", "why", "TEXT");
|
|
28746
28738
|
addColumnIfMissing32(db, "memories", "project", "TEXT");
|
|
28747
28739
|
db.exec(`DROP INDEX IF EXISTS idx_memories_content_hash`);
|
|
@@ -28778,7 +28770,7 @@ function addColumnIfMissing42(db, table, column, definition) {
|
|
|
28778
28770
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
28779
28771
|
}
|
|
28780
28772
|
}
|
|
28781
|
-
function
|
|
28773
|
+
function up910(db) {
|
|
28782
28774
|
addColumnIfMissing42(db, "memory_history", "actor_type", "TEXT");
|
|
28783
28775
|
addColumnIfMissing42(db, "memory_history", "session_id", "TEXT");
|
|
28784
28776
|
addColumnIfMissing42(db, "memory_history", "request_id", "TEXT");
|
|
@@ -28811,7 +28803,7 @@ function addColumnIfMissing52(db, table, column, definition) {
|
|
|
28811
28803
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
28812
28804
|
}
|
|
28813
28805
|
}
|
|
28814
|
-
function
|
|
28806
|
+
function up1010(db) {
|
|
28815
28807
|
addColumnIfMissing52(db, "entities", "canonical_name", "TEXT");
|
|
28816
28808
|
addColumnIfMissing52(db, "entities", "mentions", "INTEGER DEFAULT 0");
|
|
28817
28809
|
addColumnIfMissing52(db, "entities", "embedding", "BLOB");
|
|
@@ -28828,7 +28820,7 @@ function hasColumn42(db, table, column) {
|
|
|
28828
28820
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
28829
28821
|
return rows.some((r3) => r3.name === column);
|
|
28830
28822
|
}
|
|
28831
|
-
function
|
|
28823
|
+
function up1110(db) {
|
|
28832
28824
|
if (!hasColumn42(db, "memories", "idempotency_key")) {
|
|
28833
28825
|
db.exec("ALTER TABLE memories ADD COLUMN idempotency_key TEXT");
|
|
28834
28826
|
}
|
|
@@ -28843,7 +28835,7 @@ function hasColumn52(db, table, column) {
|
|
|
28843
28835
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
28844
28836
|
return rows.some((r3) => r3.name === column);
|
|
28845
28837
|
}
|
|
28846
|
-
function
|
|
28838
|
+
function up1210(db) {
|
|
28847
28839
|
db.exec(`
|
|
28848
28840
|
CREATE TABLE IF NOT EXISTS documents (
|
|
28849
28841
|
id TEXT PRIMARY KEY,
|
|
@@ -28900,7 +28892,7 @@ function up1110(db) {
|
|
|
28900
28892
|
db.exec("ALTER TABLE memory_jobs ADD COLUMN document_id TEXT");
|
|
28901
28893
|
}
|
|
28902
28894
|
}
|
|
28903
|
-
function
|
|
28895
|
+
function up1310(db) {
|
|
28904
28896
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='embeddings'").all();
|
|
28905
28897
|
if (tables.length === 0)
|
|
28906
28898
|
return;
|
|
@@ -28917,7 +28909,7 @@ function up1210(db) {
|
|
|
28917
28909
|
ON embeddings(content_hash)
|
|
28918
28910
|
`);
|
|
28919
28911
|
}
|
|
28920
|
-
function
|
|
28912
|
+
function up1410(db) {
|
|
28921
28913
|
db.exec(`
|
|
28922
28914
|
CREATE TABLE IF NOT EXISTS summary_jobs (
|
|
28923
28915
|
id TEXT PRIMARY KEY,
|
|
@@ -28937,7 +28929,7 @@ function up1310(db) {
|
|
|
28937
28929
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_summary_jobs_status
|
|
28938
28930
|
ON summary_jobs(status)`);
|
|
28939
28931
|
}
|
|
28940
|
-
function
|
|
28932
|
+
function up1510(db) {
|
|
28941
28933
|
db.exec(`
|
|
28942
28934
|
CREATE TABLE IF NOT EXISTS umap_cache (
|
|
28943
28935
|
id INTEGER PRIMARY KEY,
|
|
@@ -28948,7 +28940,7 @@ function up1410(db) {
|
|
|
28948
28940
|
)
|
|
28949
28941
|
`);
|
|
28950
28942
|
}
|
|
28951
|
-
function
|
|
28943
|
+
function up162(db) {
|
|
28952
28944
|
db.exec(`
|
|
28953
28945
|
CREATE TABLE IF NOT EXISTS session_scores (
|
|
28954
28946
|
id TEXT PRIMARY KEY,
|
|
@@ -28968,7 +28960,7 @@ function up1510(db) {
|
|
|
28968
28960
|
ON session_scores(session_key);
|
|
28969
28961
|
`);
|
|
28970
28962
|
}
|
|
28971
|
-
function
|
|
28963
|
+
function up172(db) {
|
|
28972
28964
|
db.exec(`
|
|
28973
28965
|
CREATE TABLE IF NOT EXISTS scheduled_tasks (
|
|
28974
28966
|
id TEXT PRIMARY KEY,
|
|
@@ -29009,7 +29001,7 @@ function addColumnIfMissing62(db, table, column, definition) {
|
|
|
29009
29001
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
29010
29002
|
}
|
|
29011
29003
|
}
|
|
29012
|
-
function
|
|
29004
|
+
function up182(db) {
|
|
29013
29005
|
db.exec(`
|
|
29014
29006
|
CREATE TABLE IF NOT EXISTS ingestion_jobs (
|
|
29015
29007
|
id TEXT PRIMARY KEY,
|
|
@@ -29035,7 +29027,7 @@ function up172(db) {
|
|
|
29035
29027
|
addColumnIfMissing62(db, "memories", "source_path", "TEXT");
|
|
29036
29028
|
addColumnIfMissing62(db, "memories", "source_section", "TEXT");
|
|
29037
29029
|
}
|
|
29038
|
-
function
|
|
29030
|
+
function up192(db) {
|
|
29039
29031
|
db.exec(`
|
|
29040
29032
|
CREATE TABLE IF NOT EXISTS telemetry_events (
|
|
29041
29033
|
id TEXT PRIMARY KEY,
|
|
@@ -29060,7 +29052,7 @@ function addColumnIfMissing72(db, table, column, definition) {
|
|
|
29060
29052
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
29061
29053
|
}
|
|
29062
29054
|
}
|
|
29063
|
-
function
|
|
29055
|
+
function up202(db) {
|
|
29064
29056
|
db.exec(`
|
|
29065
29057
|
CREATE TABLE IF NOT EXISTS session_memories (
|
|
29066
29058
|
id TEXT PRIMARY KEY,
|
|
@@ -29087,7 +29079,7 @@ function up192(db) {
|
|
|
29087
29079
|
addColumnIfMissing72(db, "session_scores", "confidence", "REAL");
|
|
29088
29080
|
addColumnIfMissing72(db, "session_scores", "continuity_reasoning", "TEXT");
|
|
29089
29081
|
}
|
|
29090
|
-
function
|
|
29082
|
+
function up212(db) {
|
|
29091
29083
|
db.exec(`
|
|
29092
29084
|
CREATE TABLE IF NOT EXISTS session_checkpoints (
|
|
29093
29085
|
id TEXT PRIMARY KEY,
|
|
@@ -29109,7 +29101,7 @@ function up202(db) {
|
|
|
29109
29101
|
ON session_checkpoints(project_normalized, created_at DESC);
|
|
29110
29102
|
`);
|
|
29111
29103
|
}
|
|
29112
|
-
function
|
|
29104
|
+
function up222(db) {
|
|
29113
29105
|
const cols = db.prepare("PRAGMA table_info(scheduled_tasks)").all();
|
|
29114
29106
|
const colNames = new Set(cols.flatMap((c3) => typeof c3.name === "string" ? [c3.name] : []));
|
|
29115
29107
|
if (!colNames.has("skill_name")) {
|
|
@@ -29120,7 +29112,7 @@ function up212(db) {
|
|
|
29120
29112
|
CHECK (skill_mode IN ('inject', 'slash') OR skill_mode IS NULL)`);
|
|
29121
29113
|
}
|
|
29122
29114
|
}
|
|
29123
|
-
function
|
|
29115
|
+
function up232(db) {
|
|
29124
29116
|
const existing = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='skill_meta'").get();
|
|
29125
29117
|
if (existing)
|
|
29126
29118
|
return;
|
|
@@ -29152,7 +29144,7 @@ function up222(db) {
|
|
|
29152
29144
|
CREATE INDEX idx_skill_meta_source ON skill_meta(source);
|
|
29153
29145
|
`);
|
|
29154
29146
|
}
|
|
29155
|
-
function
|
|
29147
|
+
function up242(db) {
|
|
29156
29148
|
const entityCols = db.prepare("PRAGMA table_info(entities)").all();
|
|
29157
29149
|
const entityColNames = new Set(entityCols.flatMap((c3) => typeof c3.name === "string" ? [c3.name] : []));
|
|
29158
29150
|
if (!entityColNames.has("agent_id")) {
|
|
@@ -29237,13 +29229,13 @@ function addColumnIfMissing82(db, table, column, definition) {
|
|
|
29237
29229
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
29238
29230
|
}
|
|
29239
29231
|
}
|
|
29240
|
-
function
|
|
29232
|
+
function up252(db) {
|
|
29241
29233
|
addColumnIfMissing82(db, "session_memories", "entity_slot", "INTEGER");
|
|
29242
29234
|
addColumnIfMissing82(db, "session_memories", "aspect_slot", "INTEGER");
|
|
29243
29235
|
addColumnIfMissing82(db, "session_memories", "is_constraint", "INTEGER NOT NULL DEFAULT 0");
|
|
29244
29236
|
addColumnIfMissing82(db, "session_memories", "structural_density", "INTEGER");
|
|
29245
29237
|
}
|
|
29246
|
-
function
|
|
29238
|
+
function up262(db) {
|
|
29247
29239
|
const columns = db.prepare("PRAGMA table_info(session_checkpoints)").all();
|
|
29248
29240
|
const columnNames = new Set(columns.flatMap((column) => typeof column.name === "string" ? [column.name] : []));
|
|
29249
29241
|
if (!columnNames.has("focal_entity_ids")) {
|
|
@@ -29268,25 +29260,25 @@ function addColumnIfMissing92(db, table, column, definition) {
|
|
|
29268
29260
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
29269
29261
|
}
|
|
29270
29262
|
}
|
|
29271
|
-
function
|
|
29263
|
+
function up272(db) {
|
|
29272
29264
|
addColumnIfMissing92(db, "entities", "pinned", "INTEGER NOT NULL DEFAULT 0");
|
|
29273
29265
|
addColumnIfMissing92(db, "entities", "pinned_at", "TEXT");
|
|
29274
29266
|
db.exec("CREATE INDEX IF NOT EXISTS idx_entities_pinned ON entities(agent_id, pinned, pinned_at DESC)");
|
|
29275
29267
|
}
|
|
29276
|
-
function up272(_db) {}
|
|
29277
29268
|
function up282(_db) {}
|
|
29269
|
+
function up292(_db) {}
|
|
29278
29270
|
function addColumnIfMissing102(db, table, column, definition) {
|
|
29279
29271
|
const cols = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
29280
29272
|
if (!cols.some((c3) => c3.name === column)) {
|
|
29281
29273
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
29282
29274
|
}
|
|
29283
29275
|
}
|
|
29284
|
-
function
|
|
29276
|
+
function up302(db) {
|
|
29285
29277
|
addColumnIfMissing102(db, "session_memories", "agent_relevance_score", "REAL");
|
|
29286
29278
|
addColumnIfMissing102(db, "session_memories", "agent_feedback_count", "INTEGER DEFAULT 0");
|
|
29287
29279
|
}
|
|
29288
|
-
function
|
|
29289
|
-
function
|
|
29280
|
+
function up312(_db) {}
|
|
29281
|
+
function up322(db) {
|
|
29290
29282
|
db.exec(`
|
|
29291
29283
|
UPDATE entities
|
|
29292
29284
|
SET canonical_name = REPLACE(REPLACE(REPLACE(
|
|
@@ -29295,7 +29287,7 @@ function up312(db) {
|
|
|
29295
29287
|
WHERE canonical_name IS NULL
|
|
29296
29288
|
`);
|
|
29297
29289
|
}
|
|
29298
|
-
function
|
|
29290
|
+
function up332(db) {
|
|
29299
29291
|
db.exec(`
|
|
29300
29292
|
CREATE TABLE IF NOT EXISTS memories_cold (
|
|
29301
29293
|
archive_id TEXT PRIMARY KEY,
|
|
@@ -29332,7 +29324,7 @@ function up322(db) {
|
|
|
29332
29324
|
CREATE INDEX IF NOT EXISTS idx_cold_source ON memories_cold(cold_source_id);
|
|
29333
29325
|
`);
|
|
29334
29326
|
}
|
|
29335
|
-
function
|
|
29327
|
+
function up342(db) {
|
|
29336
29328
|
db.exec(`
|
|
29337
29329
|
CREATE TABLE IF NOT EXISTS session_summaries (
|
|
29338
29330
|
id TEXT PRIMARY KEY,
|
|
@@ -29377,7 +29369,7 @@ function up332(db) {
|
|
|
29377
29369
|
WHERE session_key IS NOT NULL;
|
|
29378
29370
|
`);
|
|
29379
29371
|
}
|
|
29380
|
-
function
|
|
29372
|
+
function up352(db) {
|
|
29381
29373
|
db.exec(`
|
|
29382
29374
|
CREATE TABLE IF NOT EXISTS memory_jobs_new (
|
|
29383
29375
|
id TEXT PRIMARY KEY,
|
|
@@ -29422,7 +29414,7 @@ function up342(db) {
|
|
|
29422
29414
|
ON memory_jobs(failed_at);
|
|
29423
29415
|
`);
|
|
29424
29416
|
}
|
|
29425
|
-
function
|
|
29417
|
+
function up362(db) {
|
|
29426
29418
|
const depCols = db.prepare("PRAGMA table_info(entity_dependencies)").all();
|
|
29427
29419
|
if (!depCols.some((c3) => c3.name === "reason")) {
|
|
29428
29420
|
db.exec("ALTER TABLE entity_dependencies ADD COLUMN reason TEXT");
|
|
@@ -29432,7 +29424,7 @@ function up352(db) {
|
|
|
29432
29424
|
db.exec("ALTER TABLE entities ADD COLUMN last_synthesized_at TEXT");
|
|
29433
29425
|
}
|
|
29434
29426
|
}
|
|
29435
|
-
function
|
|
29427
|
+
function up372(db) {
|
|
29436
29428
|
const cols = db.prepare("PRAGMA table_info(embeddings)").all();
|
|
29437
29429
|
if (cols.length === 0)
|
|
29438
29430
|
return;
|
|
@@ -29440,14 +29432,14 @@ function up362(db) {
|
|
|
29440
29432
|
db.exec("ALTER TABLE embeddings ADD COLUMN vector BLOB");
|
|
29441
29433
|
}
|
|
29442
29434
|
}
|
|
29443
|
-
function
|
|
29435
|
+
function up382(db) {
|
|
29444
29436
|
const cols = db.prepare("PRAGMA table_info(memories)").all();
|
|
29445
29437
|
if (!cols.some((c3) => c3.name === "scope")) {
|
|
29446
29438
|
db.exec("ALTER TABLE memories ADD COLUMN scope TEXT DEFAULT NULL");
|
|
29447
29439
|
}
|
|
29448
29440
|
db.exec("CREATE INDEX IF NOT EXISTS idx_memories_scope ON memories(scope) WHERE scope IS NOT NULL");
|
|
29449
29441
|
}
|
|
29450
|
-
function
|
|
29442
|
+
function up392(db) {
|
|
29451
29443
|
db.exec("DROP INDEX IF EXISTS idx_memories_content_hash_unique");
|
|
29452
29444
|
db.exec(`
|
|
29453
29445
|
CREATE UNIQUE INDEX idx_memories_content_hash_unique
|
|
@@ -29455,7 +29447,7 @@ function up382(db) {
|
|
|
29455
29447
|
WHERE content_hash IS NOT NULL AND is_deleted = 0
|
|
29456
29448
|
`);
|
|
29457
29449
|
}
|
|
29458
|
-
function
|
|
29450
|
+
function up402(db) {
|
|
29459
29451
|
db.exec(`
|
|
29460
29452
|
CREATE VIRTUAL TABLE IF NOT EXISTS entities_fts USING fts5(
|
|
29461
29453
|
name, canonical_name,
|
|
@@ -29487,13 +29479,13 @@ function up392(db) {
|
|
|
29487
29479
|
END
|
|
29488
29480
|
`);
|
|
29489
29481
|
}
|
|
29490
|
-
function
|
|
29482
|
+
function up412(db) {
|
|
29491
29483
|
const cols = db.prepare("PRAGMA table_info(entity_dependencies)").all();
|
|
29492
29484
|
if (!cols.some((c3) => c3.name === "confidence")) {
|
|
29493
29485
|
db.exec("ALTER TABLE entity_dependencies ADD COLUMN confidence REAL DEFAULT 0.7");
|
|
29494
29486
|
}
|
|
29495
29487
|
}
|
|
29496
|
-
function
|
|
29488
|
+
function up422(db) {
|
|
29497
29489
|
db.exec(`
|
|
29498
29490
|
CREATE TABLE IF NOT EXISTS entity_communities (
|
|
29499
29491
|
id TEXT PRIMARY KEY,
|
|
@@ -29511,7 +29503,7 @@ function up412(db) {
|
|
|
29511
29503
|
db.exec("ALTER TABLE entities ADD COLUMN community_id TEXT REFERENCES entity_communities(id)");
|
|
29512
29504
|
}
|
|
29513
29505
|
}
|
|
29514
|
-
function
|
|
29506
|
+
function up432(db) {
|
|
29515
29507
|
db.exec(`
|
|
29516
29508
|
CREATE TABLE IF NOT EXISTS memory_hints (
|
|
29517
29509
|
id TEXT PRIMARY KEY,
|
|
@@ -29551,7 +29543,7 @@ function up422(db) {
|
|
|
29551
29543
|
END
|
|
29552
29544
|
`);
|
|
29553
29545
|
}
|
|
29554
|
-
function
|
|
29546
|
+
function up442(db) {
|
|
29555
29547
|
db.exec(`
|
|
29556
29548
|
DELETE FROM entity_dependencies
|
|
29557
29549
|
WHERE id NOT IN (
|
|
@@ -29569,7 +29561,7 @@ function up432(db) {
|
|
|
29569
29561
|
)
|
|
29570
29562
|
`);
|
|
29571
29563
|
}
|
|
29572
|
-
function
|
|
29564
|
+
function up452(db) {
|
|
29573
29565
|
db.exec(`
|
|
29574
29566
|
CREATE TABLE IF NOT EXISTS session_transcripts (
|
|
29575
29567
|
session_key TEXT PRIMARY KEY,
|
|
@@ -29592,7 +29584,7 @@ function addColumnIfMissing112(db, table, column, definition) {
|
|
|
29592
29584
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
29593
29585
|
}
|
|
29594
29586
|
}
|
|
29595
|
-
function
|
|
29587
|
+
function up462(db) {
|
|
29596
29588
|
addColumnIfMissing112(db, "session_memories", "path_json", "TEXT");
|
|
29597
29589
|
db.exec(`
|
|
29598
29590
|
CREATE TABLE IF NOT EXISTS path_feedback_events (
|
|
@@ -29667,7 +29659,7 @@ function addColumnIfMissing122(db, table, column, definition) {
|
|
|
29667
29659
|
return;
|
|
29668
29660
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
29669
29661
|
}
|
|
29670
|
-
function
|
|
29662
|
+
function up472(db) {
|
|
29671
29663
|
addColumnIfMissing122(db, "session_memories", "entity_slot", "INTEGER");
|
|
29672
29664
|
addColumnIfMissing122(db, "session_memories", "aspect_slot", "INTEGER");
|
|
29673
29665
|
addColumnIfMissing122(db, "session_memories", "is_constraint", "INTEGER NOT NULL DEFAULT 0");
|
|
@@ -29755,7 +29747,7 @@ function addColumnIfMissing132(db, table, column, definition) {
|
|
|
29755
29747
|
return;
|
|
29756
29748
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
29757
29749
|
}
|
|
29758
|
-
function
|
|
29750
|
+
function up482(db) {
|
|
29759
29751
|
db.exec(`
|
|
29760
29752
|
CREATE TABLE IF NOT EXISTS agents (
|
|
29761
29753
|
id TEXT PRIMARY KEY,
|
|
@@ -29784,7 +29776,7 @@ function addColumnIfMissing142(db, table, column, definition) {
|
|
|
29784
29776
|
return;
|
|
29785
29777
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
29786
29778
|
}
|
|
29787
|
-
function
|
|
29779
|
+
function up492(db) {
|
|
29788
29780
|
addColumnIfMissing142(db, "session_summaries", "source_type", "TEXT");
|
|
29789
29781
|
addColumnIfMissing142(db, "session_summaries", "source_ref", "TEXT");
|
|
29790
29782
|
addColumnIfMissing142(db, "session_summaries", "meta_json", "TEXT");
|
|
@@ -29810,7 +29802,7 @@ function addColumnIfMissing152(db, table, column, definition) {
|
|
|
29810
29802
|
return;
|
|
29811
29803
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
29812
29804
|
}
|
|
29813
|
-
function
|
|
29805
|
+
function up502(db) {
|
|
29814
29806
|
addColumnIfMissing152(db, "session_transcripts", "updated_at", "TEXT");
|
|
29815
29807
|
addColumnIfMissing152(db, "summary_jobs", "agent_id", "TEXT NOT NULL DEFAULT 'default'");
|
|
29816
29808
|
addColumnIfMissing152(db, "session_scores", "agent_id", "TEXT NOT NULL DEFAULT 'default'");
|
|
@@ -29881,7 +29873,7 @@ function up492(db) {
|
|
|
29881
29873
|
ON memory_md_heads(lease_expires_at);
|
|
29882
29874
|
`);
|
|
29883
29875
|
}
|
|
29884
|
-
function
|
|
29876
|
+
function up512(db) {
|
|
29885
29877
|
db.exec(`
|
|
29886
29878
|
DROP INDEX IF EXISTS idx_summaries_session_depth;
|
|
29887
29879
|
|
|
@@ -29942,7 +29934,7 @@ function up502(db) {
|
|
|
29942
29934
|
AND COALESCE(source_type, 'summary') = 'summary';
|
|
29943
29935
|
`);
|
|
29944
29936
|
}
|
|
29945
|
-
function
|
|
29937
|
+
function up522(db) {
|
|
29946
29938
|
db.exec(`
|
|
29947
29939
|
DROP TRIGGER IF EXISTS session_transcripts_fts_ai;
|
|
29948
29940
|
DROP TRIGGER IF EXISTS session_transcripts_fts_ad;
|
|
@@ -30040,7 +30032,7 @@ function up512(db) {
|
|
|
30040
30032
|
AND COALESCE(source_type, 'summary') = 'summary';
|
|
30041
30033
|
`);
|
|
30042
30034
|
}
|
|
30043
|
-
function
|
|
30035
|
+
function up532(db) {
|
|
30044
30036
|
db.exec(`
|
|
30045
30037
|
CREATE TABLE IF NOT EXISTS memory_thread_heads (
|
|
30046
30038
|
agent_id TEXT NOT NULL DEFAULT 'default',
|
|
@@ -30158,7 +30150,7 @@ function up522(db) {
|
|
|
30158
30150
|
WHERE excluded.latest_at >= memory_thread_heads.latest_at;
|
|
30159
30151
|
`);
|
|
30160
30152
|
}
|
|
30161
|
-
function
|
|
30153
|
+
function up542(db) {
|
|
30162
30154
|
db.exec(`
|
|
30163
30155
|
CREATE TABLE IF NOT EXISTS session_extract_cursors (
|
|
30164
30156
|
session_key TEXT NOT NULL,
|
|
@@ -30175,7 +30167,7 @@ function hasTable5(db, name) {
|
|
|
30175
30167
|
WHERE type = 'table' AND name = ?
|
|
30176
30168
|
LIMIT 1`).get(name) !== undefined;
|
|
30177
30169
|
}
|
|
30178
|
-
function
|
|
30170
|
+
function up552(db) {
|
|
30179
30171
|
db.exec(`
|
|
30180
30172
|
CREATE TABLE IF NOT EXISTS entity_dependency_history (
|
|
30181
30173
|
id TEXT PRIMARY KEY,
|
|
@@ -30345,7 +30337,7 @@ function addColumnIfMissing162(db, table, column, definition) {
|
|
|
30345
30337
|
return;
|
|
30346
30338
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
30347
30339
|
}
|
|
30348
|
-
function
|
|
30340
|
+
function up562(db) {
|
|
30349
30341
|
addColumnIfMissing162(db, "summary_jobs", "session_id", "TEXT");
|
|
30350
30342
|
addColumnIfMissing162(db, "summary_jobs", "trigger", "TEXT NOT NULL DEFAULT 'session_end'");
|
|
30351
30343
|
addColumnIfMissing162(db, "summary_jobs", "captured_at", "TEXT");
|
|
@@ -30437,24 +30429,8 @@ function up552(db) {
|
|
|
30437
30429
|
VALUES ('rebuild');
|
|
30438
30430
|
`);
|
|
30439
30431
|
}
|
|
30440
|
-
function
|
|
30441
|
-
|
|
30442
|
-
CREATE TABLE IF NOT EXISTS mcp_invocations (
|
|
30443
|
-
id TEXT PRIMARY KEY,
|
|
30444
|
-
server_id TEXT NOT NULL,
|
|
30445
|
-
tool_name TEXT NOT NULL,
|
|
30446
|
-
agent_id TEXT NOT NULL DEFAULT 'default',
|
|
30447
|
-
source TEXT NOT NULL CHECK(source IN ('cli','agent','mcp','dashboard')),
|
|
30448
|
-
latency_ms INTEGER NOT NULL,
|
|
30449
|
-
success INTEGER NOT NULL DEFAULT 1,
|
|
30450
|
-
error_text TEXT,
|
|
30451
|
-
created_at TEXT NOT NULL DEFAULT (datetime('now'))
|
|
30452
|
-
);
|
|
30453
|
-
CREATE INDEX IF NOT EXISTS idx_mcp_inv_server ON mcp_invocations(server_id, created_at);
|
|
30454
|
-
CREATE INDEX IF NOT EXISTS idx_mcp_inv_agent ON mcp_invocations(agent_id, created_at);
|
|
30455
|
-
`);
|
|
30456
|
-
}
|
|
30457
|
-
function up572(db) {
|
|
30432
|
+
function up572(_db) {}
|
|
30433
|
+
function up582(db) {
|
|
30458
30434
|
db.exec(`
|
|
30459
30435
|
CREATE TABLE IF NOT EXISTS skill_invocations (
|
|
30460
30436
|
id TEXT PRIMARY KEY,
|
|
@@ -30470,7 +30446,7 @@ function up572(db) {
|
|
|
30470
30446
|
CREATE INDEX IF NOT EXISTS idx_skill_inv_agent ON skill_invocations(agent_id, created_at);
|
|
30471
30447
|
`);
|
|
30472
30448
|
}
|
|
30473
|
-
function
|
|
30449
|
+
function up592(db) {
|
|
30474
30450
|
db.exec(`
|
|
30475
30451
|
CREATE TABLE IF NOT EXISTS task_scope_hints (
|
|
30476
30452
|
task_id TEXT PRIMARY KEY REFERENCES scheduled_tasks(id) ON DELETE CASCADE,
|
|
@@ -30501,7 +30477,7 @@ function up582(db) {
|
|
|
30501
30477
|
ON task_scope_hints(agent_id, updated_at);
|
|
30502
30478
|
`);
|
|
30503
30479
|
}
|
|
30504
|
-
function
|
|
30480
|
+
function up602(db) {
|
|
30505
30481
|
db.exec(`
|
|
30506
30482
|
CREATE TABLE IF NOT EXISTS dreaming_state (
|
|
30507
30483
|
agent_id TEXT PRIMARY KEY NOT NULL,
|
|
@@ -30544,7 +30520,7 @@ function ensureMemoriesScopeColumns3(db) {
|
|
|
30544
30520
|
if (!names.has("scope"))
|
|
30545
30521
|
db.exec("ALTER TABLE memories ADD COLUMN scope TEXT");
|
|
30546
30522
|
}
|
|
30547
|
-
function
|
|
30523
|
+
function up612(db) {
|
|
30548
30524
|
ensureMemoriesScopeColumns3(db);
|
|
30549
30525
|
db.exec("DROP INDEX IF EXISTS idx_memories_content_hash_unique");
|
|
30550
30526
|
db.exec(`
|
|
@@ -30557,20 +30533,20 @@ function up602(db) {
|
|
|
30557
30533
|
WHERE content_hash IS NOT NULL AND is_deleted = 0
|
|
30558
30534
|
`);
|
|
30559
30535
|
}
|
|
30560
|
-
function
|
|
30536
|
+
function up622(db) {
|
|
30561
30537
|
const sql = readMemoriesFtsSql2(db);
|
|
30562
30538
|
if (sql !== null && !memoriesFtsNeedsTokenizerRepair2(sql))
|
|
30563
30539
|
return;
|
|
30564
30540
|
recreateMemoriesFts2(db);
|
|
30565
30541
|
}
|
|
30566
|
-
function
|
|
30542
|
+
function up632(db) {
|
|
30567
30543
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_entities_order
|
|
30568
30544
|
ON entities(agent_id, pinned DESC, pinned_at DESC, mentions DESC, updated_at DESC, name)`);
|
|
30569
30545
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_entities_extracted_mentions
|
|
30570
30546
|
ON entities(entity_type, mentions)
|
|
30571
30547
|
WHERE entity_type = 'extracted'`);
|
|
30572
30548
|
}
|
|
30573
|
-
function
|
|
30549
|
+
function up642(db) {
|
|
30574
30550
|
const cols = db.prepare("PRAGMA table_info(entity_attributes)").all();
|
|
30575
30551
|
if (!cols.some((col) => col.name === "claim_key")) {
|
|
30576
30552
|
db.exec("ALTER TABLE entity_attributes ADD COLUMN claim_key TEXT");
|
|
@@ -30579,7 +30555,7 @@ function up632(db) {
|
|
|
30579
30555
|
ON entity_attributes(agent_id, aspect_id, claim_key, status)
|
|
30580
30556
|
WHERE claim_key IS NOT NULL`);
|
|
30581
30557
|
}
|
|
30582
|
-
function
|
|
30558
|
+
function up652(db) {
|
|
30583
30559
|
const cols = db.prepare("PRAGMA table_info(entity_attributes)").all();
|
|
30584
30560
|
if (!cols.some((col) => col.name === "group_key")) {
|
|
30585
30561
|
db.exec("ALTER TABLE entity_attributes ADD COLUMN group_key TEXT");
|
|
@@ -30591,13 +30567,13 @@ function up642(db) {
|
|
|
30591
30567
|
ON entity_attributes(agent_id, aspect_id, group_key, claim_key, status)
|
|
30592
30568
|
WHERE claim_key IS NOT NULL`);
|
|
30593
30569
|
}
|
|
30594
|
-
function
|
|
30570
|
+
function up662(db) {
|
|
30595
30571
|
const cols = db.prepare("PRAGMA table_info(memory_artifacts)").all();
|
|
30596
30572
|
if (cols.some((col) => col.name === "source_mtime_ms"))
|
|
30597
30573
|
return;
|
|
30598
30574
|
db.exec("ALTER TABLE memory_artifacts ADD COLUMN source_mtime_ms REAL");
|
|
30599
30575
|
}
|
|
30600
|
-
function
|
|
30576
|
+
function up672(db) {
|
|
30601
30577
|
const cols = db.prepare("PRAGMA table_info(memory_artifacts)").all();
|
|
30602
30578
|
const names = new Set(cols.map((col) => col.name));
|
|
30603
30579
|
if (!names.has("is_deleted")) {
|
|
@@ -30611,7 +30587,7 @@ function up662(db) {
|
|
|
30611
30587
|
ON memory_artifacts(agent_id, is_deleted, deleted_at)
|
|
30612
30588
|
`);
|
|
30613
30589
|
}
|
|
30614
|
-
function
|
|
30590
|
+
function up682(db) {
|
|
30615
30591
|
db.exec("DROP TRIGGER IF EXISTS memories_au");
|
|
30616
30592
|
db.exec(`
|
|
30617
30593
|
CREATE TRIGGER IF NOT EXISTS memories_au AFTER UPDATE OF content ON memories BEGIN
|
|
@@ -30629,7 +30605,7 @@ function addColumnIfMissing172(db, table, column, definition) {
|
|
|
30629
30605
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
30630
30606
|
}
|
|
30631
30607
|
}
|
|
30632
|
-
function
|
|
30608
|
+
function up692(db) {
|
|
30633
30609
|
for (const table of ["entities", "entity_communities", "entity_attributes", "entity_dependencies"]) {
|
|
30634
30610
|
addColumnIfMissing172(db, table, "source_id", "TEXT");
|
|
30635
30611
|
addColumnIfMissing172(db, table, "source_kind", "TEXT");
|
|
@@ -30649,7 +30625,7 @@ function hasColumn72(db, table, column) {
|
|
|
30649
30625
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
30650
30626
|
return rows.some((row) => row.name === column);
|
|
30651
30627
|
}
|
|
30652
|
-
function
|
|
30628
|
+
function up702(db) {
|
|
30653
30629
|
if (!hasTable22(db, "embeddings"))
|
|
30654
30630
|
return;
|
|
30655
30631
|
if (!hasColumn72(db, "embeddings", "agent_id")) {
|
|
@@ -30657,7 +30633,7 @@ function up692(db) {
|
|
|
30657
30633
|
}
|
|
30658
30634
|
db.exec("CREATE INDEX IF NOT EXISTS idx_embeddings_agent_source ON embeddings(agent_id, source_type, source_id)");
|
|
30659
30635
|
}
|
|
30660
|
-
function
|
|
30636
|
+
function up712(db) {
|
|
30661
30637
|
db.exec(`
|
|
30662
30638
|
CREATE TABLE IF NOT EXISTS memory_search_telemetry (
|
|
30663
30639
|
id TEXT PRIMARY KEY,
|
|
@@ -30698,7 +30674,7 @@ function addColumnIfMissing182(db, table, column, definition) {
|
|
|
30698
30674
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
30699
30675
|
}
|
|
30700
30676
|
}
|
|
30701
|
-
function
|
|
30677
|
+
function up722(db) {
|
|
30702
30678
|
db.exec(`
|
|
30703
30679
|
CREATE TABLE IF NOT EXISTS ontology_proposals (
|
|
30704
30680
|
id TEXT PRIMARY KEY,
|
|
@@ -30741,7 +30717,7 @@ function up712(db) {
|
|
|
30741
30717
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_${table}_proposal ON ${table}(agent_id, proposal_id)`);
|
|
30742
30718
|
}
|
|
30743
30719
|
}
|
|
30744
|
-
function
|
|
30720
|
+
function up732(db) {
|
|
30745
30721
|
db.exec(`
|
|
30746
30722
|
CREATE TABLE IF NOT EXISTS daily_reflections (
|
|
30747
30723
|
id TEXT PRIMARY KEY,
|
|
@@ -30768,7 +30744,7 @@ function up722(db) {
|
|
|
30768
30744
|
WHERE content_key IS NOT NULL;
|
|
30769
30745
|
`);
|
|
30770
30746
|
}
|
|
30771
|
-
function
|
|
30747
|
+
function up742(db) {
|
|
30772
30748
|
const cols = db.prepare("PRAGMA table_info(daily_reflections)").all();
|
|
30773
30749
|
const colNames = new Set(cols.flatMap((c3) => typeof c3.name === "string" ? [c3.name] : []));
|
|
30774
30750
|
if (!colNames.has("content_key")) {
|
|
@@ -30805,7 +30781,7 @@ function backfillVersionRoots2(db) {
|
|
|
30805
30781
|
WHERE version_root_id IS NULL
|
|
30806
30782
|
`);
|
|
30807
30783
|
}
|
|
30808
|
-
function
|
|
30784
|
+
function up752(db) {
|
|
30809
30785
|
for (const table of ["entities", "entity_aspects", "entity_dependencies"]) {
|
|
30810
30786
|
addColumnIfMissing192(db, table, "status", "TEXT NOT NULL DEFAULT 'active'");
|
|
30811
30787
|
addColumnIfMissing192(db, table, "archived_at", "TEXT");
|
|
@@ -30840,7 +30816,7 @@ function up742(db) {
|
|
|
30840
30816
|
ON entity_aspects(agent_id, proposal_id);
|
|
30841
30817
|
`);
|
|
30842
30818
|
}
|
|
30843
|
-
function
|
|
30819
|
+
function up762(db) {
|
|
30844
30820
|
db.exec(`
|
|
30845
30821
|
CREATE TABLE IF NOT EXISTS epistemic_assertions (
|
|
30846
30822
|
id TEXT PRIMARY KEY,
|
|
@@ -30896,7 +30872,7 @@ function ensureMemoriesScopeColumns22(db) {
|
|
|
30896
30872
|
if (!names.has("runtime_path"))
|
|
30897
30873
|
db.exec("ALTER TABLE memories ADD COLUMN runtime_path TEXT");
|
|
30898
30874
|
}
|
|
30899
|
-
function
|
|
30875
|
+
function up772(db) {
|
|
30900
30876
|
ensureMemoriesScopeColumns22(db);
|
|
30901
30877
|
db.exec("DROP INDEX IF EXISTS idx_memories_idempotency_key");
|
|
30902
30878
|
db.exec(`
|
|
@@ -30910,7 +30886,7 @@ function up762(db) {
|
|
|
30910
30886
|
WHERE idempotency_key IS NOT NULL AND is_deleted = 0
|
|
30911
30887
|
`);
|
|
30912
30888
|
}
|
|
30913
|
-
function
|
|
30889
|
+
function up782(db) {
|
|
30914
30890
|
db.exec(`
|
|
30915
30891
|
CREATE TABLE IF NOT EXISTS session_context_epochs (
|
|
30916
30892
|
session_key TEXT NOT NULL,
|
|
@@ -30945,7 +30921,7 @@ function up772(db) {
|
|
|
30945
30921
|
ON session_recall_events(item_kind, item_id, created_at DESC);
|
|
30946
30922
|
`);
|
|
30947
30923
|
}
|
|
30948
|
-
function
|
|
30924
|
+
function up792(db) {
|
|
30949
30925
|
db.exec(`
|
|
30950
30926
|
CREATE TABLE IF NOT EXISTS aggregate_memory_sources (
|
|
30951
30927
|
aggregate_memory_id TEXT NOT NULL,
|
|
@@ -30964,7 +30940,7 @@ function addColumnIfMissing202(db, table, column, definition) {
|
|
|
30964
30940
|
return;
|
|
30965
30941
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
30966
30942
|
}
|
|
30967
|
-
function
|
|
30943
|
+
function up802(db) {
|
|
30968
30944
|
addColumnIfMissing202(db, "memory_artifacts", "source_id", "TEXT");
|
|
30969
30945
|
addColumnIfMissing202(db, "memory_artifacts", "source_root", "TEXT");
|
|
30970
30946
|
addColumnIfMissing202(db, "memory_artifacts", "source_external_id", "TEXT");
|
|
@@ -30977,7 +30953,7 @@ function up792(db) {
|
|
|
30977
30953
|
ON memory_artifacts(agent_id, source_id, source_root);
|
|
30978
30954
|
`);
|
|
30979
30955
|
}
|
|
30980
|
-
function
|
|
30956
|
+
function up812(db) {
|
|
30981
30957
|
db.exec(`
|
|
30982
30958
|
CREATE TABLE IF NOT EXISTS temporal_edges (
|
|
30983
30959
|
id TEXT PRIMARY KEY,
|
|
@@ -31000,7 +30976,7 @@ function up802(db) {
|
|
|
31000
30976
|
ON temporal_edges(agent_id, subject_type, subject_id);
|
|
31001
30977
|
`);
|
|
31002
30978
|
}
|
|
31003
|
-
function
|
|
30979
|
+
function up822(db) {
|
|
31004
30980
|
db.exec(`
|
|
31005
30981
|
CREATE TABLE IF NOT EXISTS entity_aliases (
|
|
31006
30982
|
id TEXT PRIMARY KEY,
|
|
@@ -31024,7 +31000,7 @@ function up812(db) {
|
|
|
31024
31000
|
ON entity_aliases(agent_id, canonical_alias, status);
|
|
31025
31001
|
`);
|
|
31026
31002
|
}
|
|
31027
|
-
function
|
|
31003
|
+
function up832(db) {
|
|
31028
31004
|
db.exec(`
|
|
31029
31005
|
CREATE TABLE IF NOT EXISTS api_keys (
|
|
31030
31006
|
id TEXT PRIMARY KEY,
|
|
@@ -31052,7 +31028,7 @@ function up822(db) {
|
|
|
31052
31028
|
ON api_keys(connector, harness);
|
|
31053
31029
|
`);
|
|
31054
31030
|
}
|
|
31055
|
-
function
|
|
31031
|
+
function up842(db) {
|
|
31056
31032
|
db.exec(`
|
|
31057
31033
|
CREATE TABLE IF NOT EXISTS transcript_capture_jobs (
|
|
31058
31034
|
id TEXT PRIMARY KEY,
|
|
@@ -31087,7 +31063,7 @@ function hasColumn102(db, table, column) {
|
|
|
31087
31063
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
31088
31064
|
return rows.some((row) => row.name === column);
|
|
31089
31065
|
}
|
|
31090
|
-
function
|
|
31066
|
+
function up852(db) {
|
|
31091
31067
|
if (!hasColumn102(db, "documents", "agent_id")) {
|
|
31092
31068
|
db.exec("ALTER TABLE documents ADD COLUMN agent_id TEXT NOT NULL DEFAULT 'default'");
|
|
31093
31069
|
}
|
|
@@ -31173,7 +31149,7 @@ function up842(db) {
|
|
|
31173
31149
|
db.exec("CREATE INDEX IF NOT EXISTS idx_documents_agent_project ON documents(agent_id, project)");
|
|
31174
31150
|
db.exec("CREATE INDEX IF NOT EXISTS idx_documents_source_scope ON documents(source_url, agent_id, project)");
|
|
31175
31151
|
}
|
|
31176
|
-
function
|
|
31152
|
+
function up862(db) {
|
|
31177
31153
|
db.exec(`
|
|
31178
31154
|
CREATE TABLE IF NOT EXISTS aggregate_evidence_sources (
|
|
31179
31155
|
aggregate_memory_id TEXT NOT NULL,
|
|
@@ -31195,7 +31171,7 @@ function hasColumn112(db, table, column) {
|
|
|
31195
31171
|
return rows.some((row) => row.name === column);
|
|
31196
31172
|
}
|
|
31197
31173
|
var COLUMNS3 = ["harness", "session_id", "tool_use_id", "cwd", "origin", "args"];
|
|
31198
|
-
function
|
|
31174
|
+
function up872(db) {
|
|
31199
31175
|
for (const column of COLUMNS3) {
|
|
31200
31176
|
if (!hasColumn112(db, "skill_invocations", column)) {
|
|
31201
31177
|
db.exec(`ALTER TABLE skill_invocations ADD COLUMN ${column} TEXT`);
|
|
@@ -31276,7 +31252,7 @@ function documentScopeColumnsPreservingExisting2(db) {
|
|
|
31276
31252
|
`);
|
|
31277
31253
|
}
|
|
31278
31254
|
try {
|
|
31279
|
-
|
|
31255
|
+
up852(db);
|
|
31280
31256
|
if (preserveAgentId) {
|
|
31281
31257
|
db.exec(`
|
|
31282
31258
|
UPDATE documents
|
|
@@ -31296,12 +31272,12 @@ function documentScopeColumnsPreservingExisting2(db) {
|
|
|
31296
31272
|
db.exec("DROP TABLE IF EXISTS temp.__signet_doc_project_guard");
|
|
31297
31273
|
}
|
|
31298
31274
|
}
|
|
31299
|
-
function
|
|
31300
|
-
|
|
31275
|
+
function up882(db) {
|
|
31276
|
+
up842(db);
|
|
31301
31277
|
if (hasTable32(db, "documents")) {
|
|
31302
31278
|
documentScopeColumnsPreservingExisting2(db);
|
|
31303
31279
|
}
|
|
31304
|
-
|
|
31280
|
+
up862(db);
|
|
31305
31281
|
addColumnIfMissing212(db, "memories", "superseded_by", "TEXT");
|
|
31306
31282
|
addColumnIfMissing212(db, "memories", "superseded_at", "TEXT");
|
|
31307
31283
|
addColumnIfMissing212(db, "memories", "superseded_reason", "TEXT");
|
|
@@ -31358,7 +31334,7 @@ function up872(db) {
|
|
|
31358
31334
|
AND ${sourceAgentId} = ${targetAgentId}
|
|
31359
31335
|
`);
|
|
31360
31336
|
}
|
|
31361
|
-
function
|
|
31337
|
+
function up892(db) {
|
|
31362
31338
|
db.exec(`
|
|
31363
31339
|
CREATE TABLE IF NOT EXISTS legacy_markdown_imports (
|
|
31364
31340
|
path TEXT PRIMARY KEY,
|
|
@@ -31388,7 +31364,7 @@ function up882(db) {
|
|
|
31388
31364
|
ON legacy_markdown_chunks(memory_id);
|
|
31389
31365
|
`);
|
|
31390
31366
|
}
|
|
31391
|
-
function
|
|
31367
|
+
function up902(db) {
|
|
31392
31368
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name IN ('relations', 'entity_dependencies')").all();
|
|
31393
31369
|
const tableNames = new Set(tables.map((r3) => String(r3.name)));
|
|
31394
31370
|
if (!tableNames.has("relations") || !tableNames.has("entity_dependencies"))
|
|
@@ -31447,7 +31423,7 @@ function addColumnIfMissing222(db, table, column, definition) {
|
|
|
31447
31423
|
return;
|
|
31448
31424
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
31449
31425
|
}
|
|
31450
|
-
function
|
|
31426
|
+
function up912(db) {
|
|
31451
31427
|
addColumnIfMissing222(db, "summary_jobs", "content_hash", "TEXT");
|
|
31452
31428
|
db.exec(`
|
|
31453
31429
|
CREATE INDEX IF NOT EXISTS idx_summary_jobs_agent_session_content_hash
|
|
@@ -31460,14 +31436,14 @@ function addColumnIfMissing232(db, table, column, definition) {
|
|
|
31460
31436
|
return;
|
|
31461
31437
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
31462
31438
|
}
|
|
31463
|
-
function
|
|
31439
|
+
function up922(db) {
|
|
31464
31440
|
addColumnIfMissing232(db, "summary_jobs", "boundary_reason", "TEXT");
|
|
31465
31441
|
db.exec(`
|
|
31466
31442
|
CREATE INDEX IF NOT EXISTS idx_summary_jobs_boundary_reason
|
|
31467
31443
|
ON summary_jobs(agent_id, session_key, boundary_reason)
|
|
31468
31444
|
`);
|
|
31469
31445
|
}
|
|
31470
|
-
function
|
|
31446
|
+
function up932(db) {
|
|
31471
31447
|
db.exec(`
|
|
31472
31448
|
CREATE TABLE IF NOT EXISTS transcript_recovery_files (
|
|
31473
31449
|
agent_id TEXT NOT NULL,
|
|
@@ -31485,7 +31461,7 @@ function up922(db) {
|
|
|
31485
31461
|
ON transcript_capture_jobs(agent_id, session_id, status);
|
|
31486
31462
|
`);
|
|
31487
31463
|
}
|
|
31488
|
-
function
|
|
31464
|
+
function up942(db) {
|
|
31489
31465
|
db.exec(`
|
|
31490
31466
|
CREATE TABLE IF NOT EXISTS job_cancellations (
|
|
31491
31467
|
id TEXT PRIMARY KEY,
|
|
@@ -31513,7 +31489,7 @@ function indexExists3(db, table, indexName) {
|
|
|
31513
31489
|
const rows = db.prepare(`PRAGMA index_list(${table})`).all();
|
|
31514
31490
|
return rows.some((row) => row.name === indexName);
|
|
31515
31491
|
}
|
|
31516
|
-
function
|
|
31492
|
+
function up952(db) {
|
|
31517
31493
|
db.exec(`
|
|
31518
31494
|
CREATE TABLE IF NOT EXISTS job_archive (
|
|
31519
31495
|
id TEXT PRIMARY KEY,
|
|
@@ -31540,7 +31516,7 @@ function indexExists22(db, table, indexName) {
|
|
|
31540
31516
|
const rows = db.prepare(`PRAGMA index_list(${table})`).all();
|
|
31541
31517
|
return rows.some((row) => row.name === indexName);
|
|
31542
31518
|
}
|
|
31543
|
-
function
|
|
31519
|
+
function up962(db) {
|
|
31544
31520
|
db.exec(`
|
|
31545
31521
|
CREATE TABLE IF NOT EXISTS embedding_index_state (
|
|
31546
31522
|
id INTEGER PRIMARY KEY CHECK (id = 1),
|
|
@@ -31553,7 +31529,7 @@ function up952(db) {
|
|
|
31553
31529
|
)
|
|
31554
31530
|
`);
|
|
31555
31531
|
}
|
|
31556
|
-
function
|
|
31532
|
+
function up972(db) {
|
|
31557
31533
|
db.exec(`
|
|
31558
31534
|
CREATE TABLE IF NOT EXISTS embeddings_staging (
|
|
31559
31535
|
id TEXT PRIMARY KEY,
|
|
@@ -31572,7 +31548,7 @@ function up962(db) {
|
|
|
31572
31548
|
ON embeddings_staging(agent_id, source_type, source_id);
|
|
31573
31549
|
`);
|
|
31574
31550
|
}
|
|
31575
|
-
function
|
|
31551
|
+
function up982(db) {
|
|
31576
31552
|
const columns = db.prepare("PRAGMA table_info(dreaming_state)").all();
|
|
31577
31553
|
if (!columns.some((column) => column.name === "evidence_cursor")) {
|
|
31578
31554
|
db.exec("ALTER TABLE dreaming_state ADD COLUMN evidence_cursor TEXT");
|
|
@@ -31583,7 +31559,7 @@ function hasColumn132(db, table, column) {
|
|
|
31583
31559
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
31584
31560
|
return rows.some((r3) => r3.name === column);
|
|
31585
31561
|
}
|
|
31586
|
-
function
|
|
31562
|
+
function up992(db) {
|
|
31587
31563
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name = 'memories'").all();
|
|
31588
31564
|
if (tables.length === 0)
|
|
31589
31565
|
return;
|
|
@@ -31608,23 +31584,23 @@ function up982(db) {
|
|
|
31608
31584
|
function hasColumn142(db, table, column) {
|
|
31609
31585
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
31610
31586
|
}
|
|
31611
|
-
function
|
|
31587
|
+
function up1002(db) {
|
|
31612
31588
|
const hasMemories = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'memories'").get();
|
|
31613
31589
|
if (!hasMemories || !hasColumn142(db, "memories", "memory_kind") || !hasColumn142(db, "memories", "type"))
|
|
31614
31590
|
return;
|
|
31615
31591
|
db.exec("UPDATE memories SET memory_kind = NULL WHERE type = 'session_summary'");
|
|
31616
31592
|
}
|
|
31617
|
-
function
|
|
31593
|
+
function up1012(db) {
|
|
31618
31594
|
db.exec("DROP TABLE IF EXISTS ingestion_jobs");
|
|
31619
31595
|
}
|
|
31620
|
-
function
|
|
31596
|
+
function up1022(db) {
|
|
31621
31597
|
const columns = db.prepare("PRAGMA table_info(dreaming_state)").all();
|
|
31622
31598
|
if (!columns.some((column) => column.name === "last_failure_at")) {
|
|
31623
31599
|
db.exec("ALTER TABLE dreaming_state ADD COLUMN last_failure_at TEXT");
|
|
31624
31600
|
}
|
|
31625
31601
|
db.exec("UPDATE dreaming_state SET last_failure_at = updated_at WHERE consecutive_failures > 0 AND last_failure_at IS NULL");
|
|
31626
31602
|
}
|
|
31627
|
-
function
|
|
31603
|
+
function up1032(db) {
|
|
31628
31604
|
db.exec(`
|
|
31629
31605
|
CREATE TABLE IF NOT EXISTS dreaming_evidence_exclusions (
|
|
31630
31606
|
agent_id TEXT NOT NULL,
|
|
@@ -31641,7 +31617,7 @@ function up1022(db) {
|
|
|
31641
31617
|
ON dreaming_evidence_exclusions (agent_id, resolved_at, requeue_requested_at, excluded_at DESC);
|
|
31642
31618
|
`);
|
|
31643
31619
|
}
|
|
31644
|
-
function
|
|
31620
|
+
function up1042(db) {
|
|
31645
31621
|
db.exec(`
|
|
31646
31622
|
CREATE TABLE IF NOT EXISTS dreaming_tool_calls (
|
|
31647
31623
|
id TEXT PRIMARY KEY,
|
|
@@ -31661,7 +31637,7 @@ function up1032(db) {
|
|
|
31661
31637
|
ON dreaming_tool_calls (agent_id, pass_id, sequence ASC);
|
|
31662
31638
|
`);
|
|
31663
31639
|
}
|
|
31664
|
-
function
|
|
31640
|
+
function up1052(db) {
|
|
31665
31641
|
const columns = db.prepare("PRAGMA table_info(dreaming_passes)").all();
|
|
31666
31642
|
if (!columns.some((column) => column.name === "evidence_window_json")) {
|
|
31667
31643
|
db.exec("ALTER TABLE dreaming_passes ADD COLUMN evidence_window_json TEXT");
|
|
@@ -31670,7 +31646,7 @@ function up1042(db) {
|
|
|
31670
31646
|
db.exec("ALTER TABLE dreaming_passes ADD COLUMN runbook_json TEXT");
|
|
31671
31647
|
}
|
|
31672
31648
|
}
|
|
31673
|
-
function
|
|
31649
|
+
function up1062(db) {
|
|
31674
31650
|
db.exec(`
|
|
31675
31651
|
CREATE TABLE IF NOT EXISTS dreaming_attention (
|
|
31676
31652
|
id TEXT PRIMARY KEY,
|
|
@@ -31692,7 +31668,7 @@ function up1052(db) {
|
|
|
31692
31668
|
function hasColumn152(db, table, column) {
|
|
31693
31669
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
31694
31670
|
}
|
|
31695
|
-
function
|
|
31671
|
+
function up1072(db) {
|
|
31696
31672
|
const requiredMemoryColumns = [
|
|
31697
31673
|
"content_hash",
|
|
31698
31674
|
"normalized_content",
|
|
@@ -31743,7 +31719,7 @@ function up1062(db) {
|
|
|
31743
31719
|
WHERE EXISTS (SELECT 1 FROM memory_entity_mentions WHERE entity_id = entities.id)
|
|
31744
31720
|
`);
|
|
31745
31721
|
}
|
|
31746
|
-
function
|
|
31722
|
+
function up1082(db) {
|
|
31747
31723
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name IN ('memories', 'entity_attributes')").all();
|
|
31748
31724
|
if (tables.length !== 2)
|
|
31749
31725
|
return;
|
|
@@ -31766,7 +31742,7 @@ function tableExists4(db, table) {
|
|
|
31766
31742
|
function hasColumn162(db, table, column) {
|
|
31767
31743
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
31768
31744
|
}
|
|
31769
|
-
function
|
|
31745
|
+
function up1092(db) {
|
|
31770
31746
|
db.exec(`
|
|
31771
31747
|
CREATE TABLE IF NOT EXISTS derived_memory_sources (
|
|
31772
31748
|
derived_memory_id TEXT NOT NULL,
|
|
@@ -31809,7 +31785,7 @@ function up1082(db) {
|
|
|
31809
31785
|
`);
|
|
31810
31786
|
}
|
|
31811
31787
|
}
|
|
31812
|
-
function
|
|
31788
|
+
function up1102(db) {
|
|
31813
31789
|
db.exec(`
|
|
31814
31790
|
DROP TRIGGER IF EXISTS entities_fts_ai;
|
|
31815
31791
|
DROP TRIGGER IF EXISTS entities_fts_ad;
|
|
@@ -31898,7 +31874,7 @@ function up1092(db) {
|
|
|
31898
31874
|
function hasColumn172(db, table, column) {
|
|
31899
31875
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
31900
31876
|
}
|
|
31901
|
-
function
|
|
31877
|
+
function up1112(db) {
|
|
31902
31878
|
if (!hasColumn172(db, "memories", "review_after")) {
|
|
31903
31879
|
db.exec("ALTER TABLE memories ADD COLUMN review_after TEXT;");
|
|
31904
31880
|
}
|
|
@@ -31914,14 +31890,14 @@ var TOKEN_COLUMNS2 = [
|
|
|
31914
31890
|
["tokens_cache_write", "INTEGER"],
|
|
31915
31891
|
["tokens_cost", "REAL"]
|
|
31916
31892
|
];
|
|
31917
|
-
function
|
|
31893
|
+
function up1122(db) {
|
|
31918
31894
|
for (const [column, type] of TOKEN_COLUMNS2) {
|
|
31919
31895
|
if (!hasColumn182(db, "dreaming_passes", column)) {
|
|
31920
31896
|
db.exec(`ALTER TABLE dreaming_passes ADD COLUMN ${column} ${type};`);
|
|
31921
31897
|
}
|
|
31922
31898
|
}
|
|
31923
31899
|
}
|
|
31924
|
-
function
|
|
31900
|
+
function up1132(db) {
|
|
31925
31901
|
db.exec(`
|
|
31926
31902
|
CREATE TABLE IF NOT EXISTS embedding_usage (
|
|
31927
31903
|
day TEXT NOT NULL,
|
|
@@ -31934,7 +31910,7 @@ function up1122(db) {
|
|
|
31934
31910
|
);
|
|
31935
31911
|
`);
|
|
31936
31912
|
}
|
|
31937
|
-
function
|
|
31913
|
+
function up1142(db) {
|
|
31938
31914
|
db.exec(`
|
|
31939
31915
|
CREATE TABLE IF NOT EXISTS telemetry_install (
|
|
31940
31916
|
id TEXT PRIMARY KEY,
|
|
@@ -31942,7 +31918,7 @@ function up1132(db) {
|
|
|
31942
31918
|
);
|
|
31943
31919
|
`);
|
|
31944
31920
|
}
|
|
31945
|
-
function
|
|
31921
|
+
function up1152(db) {
|
|
31946
31922
|
db.exec(`
|
|
31947
31923
|
CREATE INDEX IF NOT EXISTS idx_memory_entity_mentions_entity_memory
|
|
31948
31924
|
ON memory_entity_mentions(entity_id, memory_id);
|
|
@@ -31953,7 +31929,7 @@ function hasColumn192(db, table, column) {
|
|
|
31953
31929
|
return rows.some((row) => row.name === column);
|
|
31954
31930
|
}
|
|
31955
31931
|
var COLUMNS22 = ["first_remember_at", "first_recall_at"];
|
|
31956
|
-
function
|
|
31932
|
+
function up1162(db) {
|
|
31957
31933
|
for (const column of COLUMNS22) {
|
|
31958
31934
|
if (!hasColumn192(db, "telemetry_install", column)) {
|
|
31959
31935
|
db.exec(`ALTER TABLE telemetry_install ADD COLUMN ${column} TEXT`);
|
|
@@ -31969,7 +31945,7 @@ function addColumnIfMissing242(db, column, definition) {
|
|
|
31969
31945
|
db.exec(`ALTER TABLE telemetry_events ADD COLUMN ${column} ${definition}`);
|
|
31970
31946
|
}
|
|
31971
31947
|
}
|
|
31972
|
-
function
|
|
31948
|
+
function up1172(db) {
|
|
31973
31949
|
addColumnIfMissing242(db, "source", "TEXT NOT NULL DEFAULT 'daemon'");
|
|
31974
31950
|
addColumnIfMissing242(db, "claim_token", "TEXT");
|
|
31975
31951
|
addColumnIfMissing242(db, "claimed_at", "TEXT");
|
|
@@ -31978,7 +31954,7 @@ function up1162(db) {
|
|
|
31978
31954
|
ON telemetry_events(source, sent_to_posthog, claimed_at, timestamp);
|
|
31979
31955
|
`);
|
|
31980
31956
|
}
|
|
31981
|
-
function
|
|
31957
|
+
function up1182(db) {
|
|
31982
31958
|
db.exec(`
|
|
31983
31959
|
CREATE TABLE IF NOT EXISTS session_claims (
|
|
31984
31960
|
session_key TEXT NOT NULL,
|
|
@@ -31999,7 +31975,7 @@ function up1172(db) {
|
|
|
31999
31975
|
ON session_claims(agent_id, state, expires_at);
|
|
32000
31976
|
`);
|
|
32001
31977
|
}
|
|
32002
|
-
function
|
|
31978
|
+
function up1192(db) {
|
|
32003
31979
|
const table = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'entity_attributes'").get();
|
|
32004
31980
|
if (table == null)
|
|
32005
31981
|
return;
|
|
@@ -32008,7 +31984,7 @@ function up1182(db) {
|
|
|
32008
31984
|
ON entity_attributes(memory_id, agent_id, status, importance);
|
|
32009
31985
|
`);
|
|
32010
31986
|
}
|
|
32011
|
-
function
|
|
31987
|
+
function up1202(db) {
|
|
32012
31988
|
db.exec(`
|
|
32013
31989
|
CREATE TABLE IF NOT EXISTS cross_agent_messages (
|
|
32014
31990
|
id TEXT PRIMARY KEY,
|
|
@@ -32065,7 +32041,7 @@ function addColumnIfMissing252(db, column, definition) {
|
|
|
32065
32041
|
db.exec(`ALTER TABLE cross_agent_messages ADD COLUMN ${column} ${definition}`);
|
|
32066
32042
|
}
|
|
32067
32043
|
}
|
|
32068
|
-
function
|
|
32044
|
+
function up1212(db) {
|
|
32069
32045
|
const table = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'cross_agent_messages'").get();
|
|
32070
32046
|
if (table == null)
|
|
32071
32047
|
return;
|
|
@@ -32266,7 +32242,7 @@ function backfillTranscriptsFromSummaryJobs2(db) {
|
|
|
32266
32242
|
insert.run(...values);
|
|
32267
32243
|
}
|
|
32268
32244
|
}
|
|
32269
|
-
function
|
|
32245
|
+
function up1222(db) {
|
|
32270
32246
|
if (!hasTable42(db, "session_transcripts"))
|
|
32271
32247
|
return;
|
|
32272
32248
|
addColumnIfMissing262(db, "session_transcripts", "completed_at", "TEXT");
|
|
@@ -32319,7 +32295,7 @@ function up1212(db) {
|
|
|
32319
32295
|
ON session_transcripts(agent_id, content_hash);
|
|
32320
32296
|
`);
|
|
32321
32297
|
}
|
|
32322
|
-
function
|
|
32298
|
+
function up1232(db) {
|
|
32323
32299
|
db.exec(`
|
|
32324
32300
|
CREATE INDEX IF NOT EXISTS idx_memory_jobs_pressure_status
|
|
32325
32301
|
ON memory_jobs(status)
|
|
@@ -32338,12 +32314,12 @@ function up1222(db) {
|
|
|
32338
32314
|
function hasColumn222(db, table, column) {
|
|
32339
32315
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
32340
32316
|
}
|
|
32341
|
-
function
|
|
32317
|
+
function up1242(db) {
|
|
32342
32318
|
if (!hasColumn222(db, "telemetry_install", "last_seen_version")) {
|
|
32343
32319
|
db.exec("ALTER TABLE telemetry_install ADD COLUMN last_seen_version TEXT");
|
|
32344
32320
|
}
|
|
32345
32321
|
}
|
|
32346
|
-
function
|
|
32322
|
+
function up1252(db) {
|
|
32347
32323
|
db.exec(`
|
|
32348
32324
|
CREATE TABLE IF NOT EXISTS source_lifecycle_state (
|
|
32349
32325
|
agent_id TEXT NOT NULL,
|
|
@@ -32372,7 +32348,7 @@ function addColumnIfMissing272(db, column, definition) {
|
|
|
32372
32348
|
db.exec(`ALTER TABLE telemetry_events ADD COLUMN ${column} ${definition}`);
|
|
32373
32349
|
}
|
|
32374
32350
|
}
|
|
32375
|
-
function
|
|
32351
|
+
function up1262(db) {
|
|
32376
32352
|
addColumnIfMissing272(db, "delivery_attempts", "INTEGER NOT NULL DEFAULT 0");
|
|
32377
32353
|
addColumnIfMissing272(db, "last_attempt_at", "TEXT");
|
|
32378
32354
|
addColumnIfMissing272(db, "sent_at", "TEXT");
|
|
@@ -32393,7 +32369,7 @@ function up1252(db) {
|
|
|
32393
32369
|
VALUES (1, CURRENT_TIMESTAMP);
|
|
32394
32370
|
`);
|
|
32395
32371
|
}
|
|
32396
|
-
function
|
|
32372
|
+
function up1272(db) {
|
|
32397
32373
|
const columns = db.prepare("PRAGMA table_info(dreaming_evidence_exclusions)").all();
|
|
32398
32374
|
const names = new Set(columns.map((column) => column.name));
|
|
32399
32375
|
if (!names.has("failure_class")) {
|
|
@@ -32410,7 +32386,7 @@ function up1262(db) {
|
|
|
32410
32386
|
}
|
|
32411
32387
|
db.exec("CREATE INDEX IF NOT EXISTS idx_dreaming_evidence_exclusions_retry ON dreaming_evidence_exclusions (resolved_at, requeue_requested_at, failure_class, retry_count, last_requeued_at)");
|
|
32412
32388
|
}
|
|
32413
|
-
function
|
|
32389
|
+
function up1282(db) {
|
|
32414
32390
|
db.exec(`
|
|
32415
32391
|
CREATE TABLE IF NOT EXISTS embedding_index_failures (
|
|
32416
32392
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
@@ -32434,7 +32410,7 @@ function up1272(db) {
|
|
|
32434
32410
|
ON embedding_index_failures(source_type, source_id);
|
|
32435
32411
|
`);
|
|
32436
32412
|
}
|
|
32437
|
-
function
|
|
32413
|
+
function up1292(db) {
|
|
32438
32414
|
db.exec(`
|
|
32439
32415
|
CREATE TABLE IF NOT EXISTS imported_source_lifecycle (
|
|
32440
32416
|
id TEXT PRIMARY KEY,
|
|
@@ -32484,7 +32460,7 @@ function backfillTable2(db, params) {
|
|
|
32484
32460
|
FROM ${params.table}${params.where ? ` WHERE ${params.where}` : ""}`).all();
|
|
32485
32461
|
backfill2(db, rows, params.sourceKind, params.scannedAt);
|
|
32486
32462
|
}
|
|
32487
|
-
function
|
|
32463
|
+
function up1302(db) {
|
|
32488
32464
|
db.exec(`
|
|
32489
32465
|
CREATE TABLE IF NOT EXISTS memory_content_safety (
|
|
32490
32466
|
agent_id TEXT NOT NULL,
|
|
@@ -32541,7 +32517,7 @@ function up1292(db) {
|
|
|
32541
32517
|
scannedAt
|
|
32542
32518
|
});
|
|
32543
32519
|
}
|
|
32544
|
-
function
|
|
32520
|
+
function up1312(db) {
|
|
32545
32521
|
const table = db.prepare("SELECT sql FROM sqlite_master WHERE type = 'table' AND name = 'dreaming_attention'").get();
|
|
32546
32522
|
if (!table)
|
|
32547
32523
|
return;
|
|
@@ -32575,7 +32551,7 @@ function up1302(db) {
|
|
|
32575
32551
|
ON dreaming_attention (agent_id, resolved_at, priority DESC, created_at ASC);
|
|
32576
32552
|
`);
|
|
32577
32553
|
}
|
|
32578
|
-
function
|
|
32554
|
+
function up1322(db) {
|
|
32579
32555
|
db.exec(`
|
|
32580
32556
|
CREATE TABLE IF NOT EXISTS ontology_contradictions (
|
|
32581
32557
|
id TEXT PRIMARY KEY,
|
|
@@ -32631,7 +32607,7 @@ function up1312(db) {
|
|
|
32631
32607
|
ON ontology_contradictions(agent_id, left_source_id, right_source_id);
|
|
32632
32608
|
`);
|
|
32633
32609
|
}
|
|
32634
|
-
function
|
|
32610
|
+
function up1332(db) {
|
|
32635
32611
|
db.exec(`
|
|
32636
32612
|
CREATE INDEX IF NOT EXISTS idx_memory_jobs_diagnostics_status_created_at
|
|
32637
32613
|
ON memory_jobs(status, created_at)
|
|
@@ -32646,7 +32622,7 @@ function up1322(db) {
|
|
|
32646
32622
|
function tableExists32(db, table) {
|
|
32647
32623
|
return db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = ?").get(table) != null;
|
|
32648
32624
|
}
|
|
32649
|
-
function
|
|
32625
|
+
function up1342(db) {
|
|
32650
32626
|
if (!tableExists32(db, "memory_jobs"))
|
|
32651
32627
|
return;
|
|
32652
32628
|
if (!tableExists32(db, "job_cancellations")) {
|
|
@@ -32695,7 +32671,7 @@ function up1332(db) {
|
|
|
32695
32671
|
AND status IN ('pending', 'leased');
|
|
32696
32672
|
`);
|
|
32697
32673
|
}
|
|
32698
|
-
function
|
|
32674
|
+
function up1352(db) {
|
|
32699
32675
|
db.exec(`
|
|
32700
32676
|
CREATE TABLE IF NOT EXISTS embedding_repair_budget (
|
|
32701
32677
|
id INTEGER PRIMARY KEY CHECK (id = 1),
|
|
@@ -32735,7 +32711,7 @@ function up1342(db) {
|
|
|
32735
32711
|
END;
|
|
32736
32712
|
`);
|
|
32737
32713
|
}
|
|
32738
|
-
function
|
|
32714
|
+
function up1362(db) {
|
|
32739
32715
|
db.exec(`
|
|
32740
32716
|
CREATE TABLE IF NOT EXISTS dreaming_evidence_consumption (
|
|
32741
32717
|
agent_id TEXT NOT NULL,
|
|
@@ -32758,13 +32734,13 @@ function up1352(db) {
|
|
|
32758
32734
|
ON dreaming_evidence_consumption(agent_id, pass_id, delivered_offset, source_length);
|
|
32759
32735
|
`);
|
|
32760
32736
|
}
|
|
32761
|
-
function
|
|
32737
|
+
function up1372(db) {
|
|
32762
32738
|
db.exec(`
|
|
32763
32739
|
CREATE INDEX IF NOT EXISTS idx_epistemic_assertions_observer_entity
|
|
32764
32740
|
ON epistemic_assertions(agent_id, subject_entity_id, status, asserted_at DESC, created_at DESC);
|
|
32765
32741
|
`);
|
|
32766
32742
|
}
|
|
32767
|
-
function
|
|
32743
|
+
function up1382(db) {
|
|
32768
32744
|
db.exec(`
|
|
32769
32745
|
CREATE TABLE IF NOT EXISTS memory_head_revisions (
|
|
32770
32746
|
id TEXT PRIMARY KEY,
|
|
@@ -32816,7 +32792,7 @@ function up1372(db) {
|
|
|
32816
32792
|
if (!names.has("format_version"))
|
|
32817
32793
|
db.exec("ALTER TABLE memory_md_heads ADD COLUMN format_version INTEGER NOT NULL DEFAULT 1");
|
|
32818
32794
|
}
|
|
32819
|
-
function
|
|
32795
|
+
function up1392(db) {
|
|
32820
32796
|
db.exec(`
|
|
32821
32797
|
CREATE TABLE memory_head_entries_v134 (
|
|
32822
32798
|
entry_id TEXT NOT NULL, agent_id TEXT NOT NULL, canonical_text TEXT NOT NULL,
|
|
@@ -32834,7 +32810,7 @@ function up1382(db) {
|
|
|
32834
32810
|
ON memory_head_entries(agent_id, entry_id, last_revision DESC);
|
|
32835
32811
|
`);
|
|
32836
32812
|
}
|
|
32837
|
-
function
|
|
32813
|
+
function up1402(db) {
|
|
32838
32814
|
db.exec(`
|
|
32839
32815
|
CREATE TABLE IF NOT EXISTS memory_head_publications (
|
|
32840
32816
|
agent_id TEXT NOT NULL,
|
|
@@ -32850,7 +32826,7 @@ function up1392(db) {
|
|
|
32850
32826
|
ON memory_head_publications(agent_id, status, revision DESC);
|
|
32851
32827
|
`);
|
|
32852
32828
|
}
|
|
32853
|
-
function
|
|
32829
|
+
function up1412(db) {
|
|
32854
32830
|
const cols = new Set(db.prepare("PRAGMA table_info(memory_head_revisions)").all().map((r3) => r3.name));
|
|
32855
32831
|
for (const [name, type] of [
|
|
32856
32832
|
["entry_id", "TEXT"],
|
|
@@ -32864,7 +32840,7 @@ function up1402(db) {
|
|
|
32864
32840
|
}
|
|
32865
32841
|
db.exec("CREATE UNIQUE INDEX IF NOT EXISTS idx_memory_head_revisions_entry ON memory_head_revisions(agent_id, revision, entry_id)");
|
|
32866
32842
|
}
|
|
32867
|
-
function
|
|
32843
|
+
function up1422(db) {
|
|
32868
32844
|
const cols = new Set(db.prepare("PRAGMA table_info(dreaming_passes)").all().map((r3) => r3.name));
|
|
32869
32845
|
for (const [name, type] of [
|
|
32870
32846
|
["head_revision", "INTEGER"],
|
|
@@ -32886,7 +32862,7 @@ function addColumnIfMissing282(db, table, column, definition) {
|
|
|
32886
32862
|
if (!hasColumn252(db, table, column))
|
|
32887
32863
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
32888
32864
|
}
|
|
32889
|
-
function
|
|
32865
|
+
function up1432(db) {
|
|
32890
32866
|
addColumnIfMissing282(db, "memories", "manual_override", "INTEGER DEFAULT 0");
|
|
32891
32867
|
db.exec(`
|
|
32892
32868
|
CREATE TABLE IF NOT EXISTS transcript_capture_status (
|
|
@@ -33191,7 +33167,7 @@ function up1422(db) {
|
|
|
33191
33167
|
GROUP BY j.agent_id;
|
|
33192
33168
|
`);
|
|
33193
33169
|
}
|
|
33194
|
-
function
|
|
33170
|
+
function up1442(db) {
|
|
33195
33171
|
db.exec(`
|
|
33196
33172
|
CREATE TABLE IF NOT EXISTS native_source_sync_state (
|
|
33197
33173
|
agent_id TEXT NOT NULL,
|
|
@@ -33207,7 +33183,7 @@ function up1432(db) {
|
|
|
33207
33183
|
ON native_source_sync_state(agent_id, status);
|
|
33208
33184
|
`);
|
|
33209
33185
|
}
|
|
33210
|
-
function
|
|
33186
|
+
function up1452(db) {
|
|
33211
33187
|
db.exec(`
|
|
33212
33188
|
CREATE TABLE IF NOT EXISTS transcript_recovery_frontiers (
|
|
33213
33189
|
agent_id TEXT NOT NULL,
|
|
@@ -33219,7 +33195,7 @@ function up1442(db) {
|
|
|
33219
33195
|
);
|
|
33220
33196
|
`);
|
|
33221
33197
|
}
|
|
33222
|
-
function
|
|
33198
|
+
function up1462(db) {
|
|
33223
33199
|
db.exec(`
|
|
33224
33200
|
CREATE TABLE IF NOT EXISTS source_sync_checkpoints (
|
|
33225
33201
|
agent_id TEXT NOT NULL,
|
|
@@ -33233,13 +33209,13 @@ function up1452(db) {
|
|
|
33233
33209
|
);
|
|
33234
33210
|
`);
|
|
33235
33211
|
}
|
|
33236
|
-
function
|
|
33212
|
+
function up1472(db) {
|
|
33237
33213
|
const columns = db.prepare("PRAGMA table_info(source_sync_checkpoints)").all();
|
|
33238
33214
|
if (!columns.some((column) => column.name === "frontier")) {
|
|
33239
33215
|
db.exec("ALTER TABLE source_sync_checkpoints ADD COLUMN frontier TEXT");
|
|
33240
33216
|
}
|
|
33241
33217
|
}
|
|
33242
|
-
function
|
|
33218
|
+
function up1482(db) {
|
|
33243
33219
|
const columns = new Set(db.prepare("PRAGMA table_info(embedding_index_state)").all().map((row) => row.name).filter((name) => typeof name === "string"));
|
|
33244
33220
|
const additions = [
|
|
33245
33221
|
["migration_phase", "TEXT"],
|
|
@@ -33274,13 +33250,13 @@ function up1472(db) {
|
|
|
33274
33250
|
`);
|
|
33275
33251
|
}
|
|
33276
33252
|
}
|
|
33277
|
-
function
|
|
33253
|
+
function up1492(db) {
|
|
33278
33254
|
const columns = new Set(db.prepare("PRAGMA table_info(memory_jobs)").all().map((row) => row.name).filter((name) => typeof name === "string"));
|
|
33279
33255
|
if (!columns.has("lease_token")) {
|
|
33280
33256
|
db.exec("ALTER TABLE memory_jobs ADD COLUMN lease_token TEXT");
|
|
33281
33257
|
}
|
|
33282
33258
|
}
|
|
33283
|
-
function
|
|
33259
|
+
function up1502(db) {
|
|
33284
33260
|
db.exec(`
|
|
33285
33261
|
CREATE TABLE IF NOT EXISTS dreaming_evidence_reviews (
|
|
33286
33262
|
agent_id TEXT NOT NULL,
|
|
@@ -33298,7 +33274,7 @@ function up1492(db) {
|
|
|
33298
33274
|
ON dreaming_evidence_reviews (agent_id, reviewed_at DESC);
|
|
33299
33275
|
`);
|
|
33300
33276
|
}
|
|
33301
|
-
function
|
|
33277
|
+
function up1512(db) {
|
|
33302
33278
|
db.exec(`
|
|
33303
33279
|
CREATE TABLE IF NOT EXISTS source_import_jobs (
|
|
33304
33280
|
id TEXT PRIMARY KEY, kind TEXT NOT NULL CHECK (kind = 'import'), agent_id TEXT NOT NULL,
|
|
@@ -33365,16 +33341,16 @@ function up1502(db) {
|
|
|
33365
33341
|
}
|
|
33366
33342
|
db.exec("CREATE INDEX IF NOT EXISTS idx_session_transcripts_agent_source ON session_transcripts(agent_id, source_id)");
|
|
33367
33343
|
}
|
|
33368
|
-
function
|
|
33344
|
+
function up1522(db) {
|
|
33369
33345
|
db.exec("CREATE INDEX IF NOT EXISTS idx_source_import_files_job_state ON source_import_files(job_id, state)");
|
|
33370
33346
|
}
|
|
33371
|
-
function
|
|
33347
|
+
function up1532(db) {
|
|
33372
33348
|
const columns = db.prepare("PRAGMA table_info(source_import_record_attempts)").all();
|
|
33373
33349
|
if (!columns.some((column) => column.name === "source_id")) {
|
|
33374
33350
|
db.exec("ALTER TABLE source_import_record_attempts ADD COLUMN source_id TEXT");
|
|
33375
33351
|
}
|
|
33376
33352
|
}
|
|
33377
|
-
function
|
|
33353
|
+
function up1542(db) {
|
|
33378
33354
|
const addColumn = (table, column, definition) => {
|
|
33379
33355
|
const statement = db.prepare("SELECT 1 AS found FROM pragma_table_info(?) WHERE name = ?");
|
|
33380
33356
|
let exists;
|
|
@@ -33395,7 +33371,7 @@ function addColumnIfMissing292(db, table, column, definition) {
|
|
|
33395
33371
|
if (!columns.some((row) => row.name === column))
|
|
33396
33372
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
33397
33373
|
}
|
|
33398
|
-
function
|
|
33374
|
+
function up1552(db) {
|
|
33399
33375
|
addColumnIfMissing292(db, "memory_md_heads", "is_current", "INTEGER NOT NULL DEFAULT 0");
|
|
33400
33376
|
addColumnIfMissing292(db, "dreaming_passes", "head_base_revision", "INTEGER");
|
|
33401
33377
|
db.exec("CREATE INDEX IF NOT EXISTS idx_memory_head_revisions_content_hash ON memory_head_revisions(content_hash)");
|
|
@@ -33545,7 +33521,7 @@ function up1542(db) {
|
|
|
33545
33521
|
`);
|
|
33546
33522
|
}
|
|
33547
33523
|
}
|
|
33548
|
-
function
|
|
33524
|
+
function up1562(db) {
|
|
33549
33525
|
db.exec(`
|
|
33550
33526
|
CREATE TABLE IF NOT EXISTS vector_repair_checkpoints (
|
|
33551
33527
|
operation TEXT NOT NULL CHECK (operation IN ('resync', 'clean-orphans')),
|
|
@@ -33570,7 +33546,7 @@ function up1552(db) {
|
|
|
33570
33546
|
ON vector_repair_checkpoints(status, updated_at);
|
|
33571
33547
|
`);
|
|
33572
33548
|
}
|
|
33573
|
-
function
|
|
33549
|
+
function up1572(db) {
|
|
33574
33550
|
db.exec(`
|
|
33575
33551
|
CREATE TABLE IF NOT EXISTS embedding_repair_checkpoints (
|
|
33576
33552
|
checkpoint_id TEXT PRIMARY KEY,
|
|
@@ -33591,7 +33567,7 @@ function up1562(db) {
|
|
|
33591
33567
|
ON embedding_repair_checkpoints(status, updated_at);
|
|
33592
33568
|
`);
|
|
33593
33569
|
}
|
|
33594
|
-
function
|
|
33570
|
+
function up1582(db) {
|
|
33595
33571
|
const columns = new Set(db.prepare("PRAGMA table_info(embedding_repair_checkpoints)").all().map((row) => row.name));
|
|
33596
33572
|
if (!columns.has("profile_fingerprint")) {
|
|
33597
33573
|
db.exec("ALTER TABLE embedding_repair_checkpoints ADD COLUMN profile_fingerprint TEXT");
|
|
@@ -33606,7 +33582,7 @@ function up1572(db) {
|
|
|
33606
33582
|
);
|
|
33607
33583
|
`);
|
|
33608
33584
|
}
|
|
33609
|
-
function
|
|
33585
|
+
function up1592(db) {
|
|
33610
33586
|
db.exec(`
|
|
33611
33587
|
CREATE INDEX IF NOT EXISTS idx_memories_agent_kind
|
|
33612
33588
|
ON memories(agent_id, memory_kind);
|
|
@@ -33616,13 +33592,13 @@ var MIGRATIONS2 = [
|
|
|
33616
33592
|
{
|
|
33617
33593
|
version: 1,
|
|
33618
33594
|
name: "baseline",
|
|
33619
|
-
up:
|
|
33595
|
+
up: up610,
|
|
33620
33596
|
artifacts: { tables: ["memories", "conversations", "embeddings"] }
|
|
33621
33597
|
},
|
|
33622
33598
|
{
|
|
33623
33599
|
version: 2,
|
|
33624
33600
|
name: "pipeline-v2",
|
|
33625
|
-
up:
|
|
33601
|
+
up: up710,
|
|
33626
33602
|
artifacts: {
|
|
33627
33603
|
tables: ["memory_history", "memory_jobs", "entities", "relations", "memory_entity_mentions"]
|
|
33628
33604
|
}
|
|
@@ -33630,12 +33606,12 @@ var MIGRATIONS2 = [
|
|
|
33630
33606
|
{
|
|
33631
33607
|
version: 3,
|
|
33632
33608
|
name: "unique-content-hash",
|
|
33633
|
-
up:
|
|
33609
|
+
up: up810
|
|
33634
33610
|
},
|
|
33635
33611
|
{
|
|
33636
33612
|
version: 4,
|
|
33637
33613
|
name: "history-actor-and-retention",
|
|
33638
|
-
up:
|
|
33614
|
+
up: up910,
|
|
33639
33615
|
artifacts: {
|
|
33640
33616
|
columns: [{ table: "memory_history", column: "actor_type" }]
|
|
33641
33617
|
}
|
|
@@ -33643,7 +33619,7 @@ var MIGRATIONS2 = [
|
|
|
33643
33619
|
{
|
|
33644
33620
|
version: 5,
|
|
33645
33621
|
name: "graph-extended",
|
|
33646
|
-
up:
|
|
33622
|
+
up: up1010,
|
|
33647
33623
|
artifacts: {
|
|
33648
33624
|
columns: [{ table: "entities", column: "canonical_name" }]
|
|
33649
33625
|
}
|
|
@@ -33651,7 +33627,7 @@ var MIGRATIONS2 = [
|
|
|
33651
33627
|
{
|
|
33652
33628
|
version: 6,
|
|
33653
33629
|
name: "idempotency-key",
|
|
33654
|
-
up:
|
|
33630
|
+
up: up1110,
|
|
33655
33631
|
artifacts: {
|
|
33656
33632
|
columns: [{ table: "memories", column: "idempotency_key" }]
|
|
33657
33633
|
}
|
|
@@ -33659,42 +33635,42 @@ var MIGRATIONS2 = [
|
|
|
33659
33635
|
{
|
|
33660
33636
|
version: 7,
|
|
33661
33637
|
name: "documents-and-connectors",
|
|
33662
|
-
up:
|
|
33638
|
+
up: up1210,
|
|
33663
33639
|
artifacts: { tables: ["documents", "document_memories", "connectors"] }
|
|
33664
33640
|
},
|
|
33665
33641
|
{
|
|
33666
33642
|
version: 8,
|
|
33667
33643
|
name: "embeddings-unique-hash",
|
|
33668
|
-
up:
|
|
33644
|
+
up: up1310
|
|
33669
33645
|
},
|
|
33670
33646
|
{
|
|
33671
33647
|
version: 9,
|
|
33672
33648
|
name: "summary-jobs",
|
|
33673
|
-
up:
|
|
33649
|
+
up: up1410,
|
|
33674
33650
|
artifacts: { tables: ["summary_jobs"] }
|
|
33675
33651
|
},
|
|
33676
33652
|
{
|
|
33677
33653
|
version: 10,
|
|
33678
33654
|
name: "umap-cache",
|
|
33679
|
-
up:
|
|
33655
|
+
up: up1510,
|
|
33680
33656
|
artifacts: { tables: ["umap_cache"] }
|
|
33681
33657
|
},
|
|
33682
33658
|
{
|
|
33683
33659
|
version: 11,
|
|
33684
33660
|
name: "session-scores",
|
|
33685
|
-
up:
|
|
33661
|
+
up: up162,
|
|
33686
33662
|
artifacts: { tables: ["session_scores"] }
|
|
33687
33663
|
},
|
|
33688
33664
|
{
|
|
33689
33665
|
version: 12,
|
|
33690
33666
|
name: "scheduled-tasks",
|
|
33691
|
-
up:
|
|
33667
|
+
up: up172,
|
|
33692
33668
|
artifacts: { tables: ["scheduled_tasks", "task_runs"] }
|
|
33693
33669
|
},
|
|
33694
33670
|
{
|
|
33695
33671
|
version: 13,
|
|
33696
33672
|
name: "ingestion-tracking",
|
|
33697
|
-
up:
|
|
33673
|
+
up: up182,
|
|
33698
33674
|
artifacts: {
|
|
33699
33675
|
columns: [
|
|
33700
33676
|
{ table: "memories", column: "source_path" },
|
|
@@ -33705,13 +33681,13 @@ var MIGRATIONS2 = [
|
|
|
33705
33681
|
{
|
|
33706
33682
|
version: 14,
|
|
33707
33683
|
name: "telemetry",
|
|
33708
|
-
up:
|
|
33684
|
+
up: up192,
|
|
33709
33685
|
artifacts: { tables: ["telemetry_events"] }
|
|
33710
33686
|
},
|
|
33711
33687
|
{
|
|
33712
33688
|
version: 15,
|
|
33713
33689
|
name: "session-memories",
|
|
33714
|
-
up:
|
|
33690
|
+
up: up202,
|
|
33715
33691
|
artifacts: {
|
|
33716
33692
|
tables: ["session_memories"],
|
|
33717
33693
|
columns: [
|
|
@@ -33723,13 +33699,13 @@ var MIGRATIONS2 = [
|
|
|
33723
33699
|
{
|
|
33724
33700
|
version: 16,
|
|
33725
33701
|
name: "session-checkpoints",
|
|
33726
|
-
up:
|
|
33702
|
+
up: up212,
|
|
33727
33703
|
artifacts: { tables: ["session_checkpoints"] }
|
|
33728
33704
|
},
|
|
33729
33705
|
{
|
|
33730
33706
|
version: 17,
|
|
33731
33707
|
name: "task-skills",
|
|
33732
|
-
up:
|
|
33708
|
+
up: up222,
|
|
33733
33709
|
artifacts: {
|
|
33734
33710
|
columns: [{ table: "scheduled_tasks", column: "skill_name" }]
|
|
33735
33711
|
}
|
|
@@ -33737,13 +33713,13 @@ var MIGRATIONS2 = [
|
|
|
33737
33713
|
{
|
|
33738
33714
|
version: 18,
|
|
33739
33715
|
name: "skill-meta",
|
|
33740
|
-
up:
|
|
33716
|
+
up: up232,
|
|
33741
33717
|
artifacts: { tables: ["skill_meta"] }
|
|
33742
33718
|
},
|
|
33743
33719
|
{
|
|
33744
33720
|
version: 19,
|
|
33745
33721
|
name: "knowledge-structure",
|
|
33746
|
-
up:
|
|
33722
|
+
up: up242,
|
|
33747
33723
|
artifacts: {
|
|
33748
33724
|
tables: ["entity_aspects", "entity_attributes", "entity_dependencies", "task_meta"],
|
|
33749
33725
|
columns: [{ table: "entities", column: "agent_id" }]
|
|
@@ -33752,7 +33728,7 @@ var MIGRATIONS2 = [
|
|
|
33752
33728
|
{
|
|
33753
33729
|
version: 20,
|
|
33754
33730
|
name: "session-structural-columns",
|
|
33755
|
-
up:
|
|
33731
|
+
up: up252,
|
|
33756
33732
|
artifacts: {
|
|
33757
33733
|
columns: [
|
|
33758
33734
|
{ table: "session_memories", column: "entity_slot" },
|
|
@@ -33765,7 +33741,7 @@ var MIGRATIONS2 = [
|
|
|
33765
33741
|
{
|
|
33766
33742
|
version: 21,
|
|
33767
33743
|
name: "checkpoint-structural",
|
|
33768
|
-
up:
|
|
33744
|
+
up: up262,
|
|
33769
33745
|
artifacts: {
|
|
33770
33746
|
columns: [{ table: "session_checkpoints", column: "focal_entity_ids" }]
|
|
33771
33747
|
}
|
|
@@ -33773,7 +33749,7 @@ var MIGRATIONS2 = [
|
|
|
33773
33749
|
{
|
|
33774
33750
|
version: 22,
|
|
33775
33751
|
name: "entity-pinning",
|
|
33776
|
-
up:
|
|
33752
|
+
up: up272,
|
|
33777
33753
|
artifacts: {
|
|
33778
33754
|
columns: [
|
|
33779
33755
|
{ table: "entities", column: "pinned" },
|
|
@@ -33784,17 +33760,17 @@ var MIGRATIONS2 = [
|
|
|
33784
33760
|
{
|
|
33785
33761
|
version: 23,
|
|
33786
33762
|
name: "retired-scorer-gap",
|
|
33787
|
-
up:
|
|
33763
|
+
up: up282
|
|
33788
33764
|
},
|
|
33789
33765
|
{
|
|
33790
33766
|
version: 24,
|
|
33791
33767
|
name: "retired-scorer-gap",
|
|
33792
|
-
up:
|
|
33768
|
+
up: up292
|
|
33793
33769
|
},
|
|
33794
33770
|
{
|
|
33795
33771
|
version: 25,
|
|
33796
33772
|
name: "agent-feedback",
|
|
33797
|
-
up:
|
|
33773
|
+
up: up302,
|
|
33798
33774
|
artifacts: {
|
|
33799
33775
|
columns: [{ table: "session_memories", column: "agent_relevance_score" }]
|
|
33800
33776
|
}
|
|
@@ -33802,32 +33778,32 @@ var MIGRATIONS2 = [
|
|
|
33802
33778
|
{
|
|
33803
33779
|
version: 26,
|
|
33804
33780
|
name: "retired-scorer-gap",
|
|
33805
|
-
up:
|
|
33781
|
+
up: up312
|
|
33806
33782
|
},
|
|
33807
33783
|
{
|
|
33808
33784
|
version: 27,
|
|
33809
33785
|
name: "backfill-canonical-names",
|
|
33810
|
-
up:
|
|
33786
|
+
up: up322
|
|
33811
33787
|
},
|
|
33812
33788
|
{
|
|
33813
33789
|
version: 28,
|
|
33814
33790
|
name: "lossless-retention",
|
|
33815
|
-
up:
|
|
33791
|
+
up: up332
|
|
33816
33792
|
},
|
|
33817
33793
|
{
|
|
33818
33794
|
version: 29,
|
|
33819
33795
|
name: "session-summary-dag",
|
|
33820
|
-
up:
|
|
33796
|
+
up: up342
|
|
33821
33797
|
},
|
|
33822
33798
|
{
|
|
33823
33799
|
version: 30,
|
|
33824
33800
|
name: "nullable-memory-job-memory-id",
|
|
33825
|
-
up:
|
|
33801
|
+
up: up352
|
|
33826
33802
|
},
|
|
33827
33803
|
{
|
|
33828
33804
|
version: 31,
|
|
33829
33805
|
name: "dependency-reason",
|
|
33830
|
-
up:
|
|
33806
|
+
up: up362,
|
|
33831
33807
|
artifacts: {
|
|
33832
33808
|
columns: [
|
|
33833
33809
|
{ table: "entity_dependencies", column: "reason" },
|
|
@@ -33838,7 +33814,7 @@ var MIGRATIONS2 = [
|
|
|
33838
33814
|
{
|
|
33839
33815
|
version: 32,
|
|
33840
33816
|
name: "embeddings-vector-column",
|
|
33841
|
-
up:
|
|
33817
|
+
up: up372,
|
|
33842
33818
|
artifacts: {
|
|
33843
33819
|
columns: [{ table: "embeddings", column: "vector", optional: true }]
|
|
33844
33820
|
}
|
|
@@ -33846,7 +33822,7 @@ var MIGRATIONS2 = [
|
|
|
33846
33822
|
{
|
|
33847
33823
|
version: 33,
|
|
33848
33824
|
name: "scope",
|
|
33849
|
-
up:
|
|
33825
|
+
up: up382,
|
|
33850
33826
|
artifacts: {
|
|
33851
33827
|
columns: [{ table: "memories", column: "scope" }]
|
|
33852
33828
|
}
|
|
@@ -33854,17 +33830,17 @@ var MIGRATIONS2 = [
|
|
|
33854
33830
|
{
|
|
33855
33831
|
version: 34,
|
|
33856
33832
|
name: "scope-aware-dedup",
|
|
33857
|
-
up:
|
|
33833
|
+
up: up392
|
|
33858
33834
|
},
|
|
33859
33835
|
{
|
|
33860
33836
|
version: 35,
|
|
33861
33837
|
name: "entity-fts",
|
|
33862
|
-
up:
|
|
33838
|
+
up: up402
|
|
33863
33839
|
},
|
|
33864
33840
|
{
|
|
33865
33841
|
version: 36,
|
|
33866
33842
|
name: "dependency-confidence",
|
|
33867
|
-
up:
|
|
33843
|
+
up: up412,
|
|
33868
33844
|
artifacts: {
|
|
33869
33845
|
columns: [{ table: "entity_dependencies", column: "confidence" }]
|
|
33870
33846
|
}
|
|
@@ -33872,7 +33848,7 @@ var MIGRATIONS2 = [
|
|
|
33872
33848
|
{
|
|
33873
33849
|
version: 37,
|
|
33874
33850
|
name: "entity-communities",
|
|
33875
|
-
up:
|
|
33851
|
+
up: up422,
|
|
33876
33852
|
artifacts: {
|
|
33877
33853
|
tables: ["entity_communities"],
|
|
33878
33854
|
columns: [{ table: "entities", column: "community_id" }]
|
|
@@ -33881,24 +33857,24 @@ var MIGRATIONS2 = [
|
|
|
33881
33857
|
{
|
|
33882
33858
|
version: 38,
|
|
33883
33859
|
name: "memory-hints",
|
|
33884
|
-
up:
|
|
33860
|
+
up: up432,
|
|
33885
33861
|
artifacts: { tables: ["memory_hints"] }
|
|
33886
33862
|
},
|
|
33887
33863
|
{
|
|
33888
33864
|
version: 39,
|
|
33889
33865
|
name: "dedup-entity-dependencies",
|
|
33890
|
-
up:
|
|
33866
|
+
up: up442
|
|
33891
33867
|
},
|
|
33892
33868
|
{
|
|
33893
33869
|
version: 40,
|
|
33894
33870
|
name: "session-transcripts",
|
|
33895
|
-
up:
|
|
33871
|
+
up: up452,
|
|
33896
33872
|
artifacts: { tables: ["session_transcripts"] }
|
|
33897
33873
|
},
|
|
33898
33874
|
{
|
|
33899
33875
|
version: 41,
|
|
33900
33876
|
name: "path-feedback",
|
|
33901
|
-
up:
|
|
33877
|
+
up: up462,
|
|
33902
33878
|
artifacts: {
|
|
33903
33879
|
tables: [
|
|
33904
33880
|
"path_feedback_events",
|
|
@@ -33913,7 +33889,7 @@ var MIGRATIONS2 = [
|
|
|
33913
33889
|
{
|
|
33914
33890
|
version: 42,
|
|
33915
33891
|
name: "session-memories-agent-id",
|
|
33916
|
-
up:
|
|
33892
|
+
up: up472,
|
|
33917
33893
|
artifacts: {
|
|
33918
33894
|
columns: [{ table: "session_memories", column: "agent_id" }]
|
|
33919
33895
|
}
|
|
@@ -33921,7 +33897,7 @@ var MIGRATIONS2 = [
|
|
|
33921
33897
|
{
|
|
33922
33898
|
version: 43,
|
|
33923
33899
|
name: "agents-table",
|
|
33924
|
-
up:
|
|
33900
|
+
up: up482,
|
|
33925
33901
|
artifacts: {
|
|
33926
33902
|
tables: ["agents"],
|
|
33927
33903
|
columns: [
|
|
@@ -33933,7 +33909,7 @@ var MIGRATIONS2 = [
|
|
|
33933
33909
|
{
|
|
33934
33910
|
version: 44,
|
|
33935
33911
|
name: "memory-md-temporal-head",
|
|
33936
|
-
up:
|
|
33912
|
+
up: up492,
|
|
33937
33913
|
artifacts: {
|
|
33938
33914
|
columns: [
|
|
33939
33915
|
{ table: "session_summaries", column: "source_type" },
|
|
@@ -33945,7 +33921,7 @@ var MIGRATIONS2 = [
|
|
|
33945
33921
|
{
|
|
33946
33922
|
version: 45,
|
|
33947
33923
|
name: "lossless-working-memory-hardening",
|
|
33948
|
-
up:
|
|
33924
|
+
up: up502,
|
|
33949
33925
|
artifacts: {
|
|
33950
33926
|
tables: ["session_transcripts_fts", "memory_md_heads"],
|
|
33951
33927
|
columns: [
|
|
@@ -33958,17 +33934,17 @@ var MIGRATIONS2 = [
|
|
|
33958
33934
|
{
|
|
33959
33935
|
version: 46,
|
|
33960
33936
|
name: "session-summary-uniqueness",
|
|
33961
|
-
up:
|
|
33937
|
+
up: up512
|
|
33962
33938
|
},
|
|
33963
33939
|
{
|
|
33964
33940
|
version: 47,
|
|
33965
33941
|
name: "agent-scoped-temporal-uniqueness",
|
|
33966
|
-
up:
|
|
33942
|
+
up: up522
|
|
33967
33943
|
},
|
|
33968
33944
|
{
|
|
33969
33945
|
version: 48,
|
|
33970
33946
|
name: "thread-heads",
|
|
33971
|
-
up:
|
|
33947
|
+
up: up532,
|
|
33972
33948
|
artifacts: {
|
|
33973
33949
|
tables: ["memory_thread_heads"]
|
|
33974
33950
|
}
|
|
@@ -33976,7 +33952,7 @@ var MIGRATIONS2 = [
|
|
|
33976
33952
|
{
|
|
33977
33953
|
version: 49,
|
|
33978
33954
|
name: "session-extract-cursors",
|
|
33979
|
-
up:
|
|
33955
|
+
up: up542,
|
|
33980
33956
|
artifacts: {
|
|
33981
33957
|
tables: ["session_extract_cursors"]
|
|
33982
33958
|
}
|
|
@@ -33984,7 +33960,7 @@ var MIGRATIONS2 = [
|
|
|
33984
33960
|
{
|
|
33985
33961
|
version: 50,
|
|
33986
33962
|
name: "related-to-audit",
|
|
33987
|
-
up:
|
|
33963
|
+
up: up552,
|
|
33988
33964
|
artifacts: {
|
|
33989
33965
|
tables: ["entity_dependency_history"]
|
|
33990
33966
|
}
|
|
@@ -33992,7 +33968,7 @@ var MIGRATIONS2 = [
|
|
|
33992
33968
|
{
|
|
33993
33969
|
version: 51,
|
|
33994
33970
|
name: "memory-md-rolling-window-lineage",
|
|
33995
|
-
up:
|
|
33971
|
+
up: up562,
|
|
33996
33972
|
artifacts: {
|
|
33997
33973
|
tables: ["memory_artifacts", "memory_artifact_tombstones", "memory_artifacts_fts"],
|
|
33998
33974
|
columns: [
|
|
@@ -34007,15 +33983,12 @@ var MIGRATIONS2 = [
|
|
|
34007
33983
|
{
|
|
34008
33984
|
version: 52,
|
|
34009
33985
|
name: "mcp-invocations",
|
|
34010
|
-
up:
|
|
34011
|
-
artifacts: {
|
|
34012
|
-
tables: ["mcp_invocations"]
|
|
34013
|
-
}
|
|
33986
|
+
up: up572
|
|
34014
33987
|
},
|
|
34015
33988
|
{
|
|
34016
33989
|
version: 53,
|
|
34017
33990
|
name: "skill-invocations",
|
|
34018
|
-
up:
|
|
33991
|
+
up: up582,
|
|
34019
33992
|
artifacts: {
|
|
34020
33993
|
tables: ["skill_invocations"]
|
|
34021
33994
|
}
|
|
@@ -34023,7 +33996,7 @@ var MIGRATIONS2 = [
|
|
|
34023
33996
|
{
|
|
34024
33997
|
version: 54,
|
|
34025
33998
|
name: "task-agent-scope",
|
|
34026
|
-
up:
|
|
33999
|
+
up: up592,
|
|
34027
34000
|
artifacts: {
|
|
34028
34001
|
tables: ["task_scope_hints"]
|
|
34029
34002
|
}
|
|
@@ -34031,7 +34004,7 @@ var MIGRATIONS2 = [
|
|
|
34031
34004
|
{
|
|
34032
34005
|
version: 55,
|
|
34033
34006
|
name: "dreaming-state",
|
|
34034
|
-
up:
|
|
34007
|
+
up: up602,
|
|
34035
34008
|
artifacts: {
|
|
34036
34009
|
tables: ["dreaming_state", "dreaming_passes"]
|
|
34037
34010
|
}
|
|
@@ -34039,22 +34012,22 @@ var MIGRATIONS2 = [
|
|
|
34039
34012
|
{
|
|
34040
34013
|
version: 56,
|
|
34041
34014
|
name: "agent-scoped-content-hash",
|
|
34042
|
-
up:
|
|
34015
|
+
up: up612
|
|
34043
34016
|
},
|
|
34044
34017
|
{
|
|
34045
34018
|
version: 57,
|
|
34046
34019
|
name: "memories-fts-tokenizer-repair",
|
|
34047
|
-
up:
|
|
34020
|
+
up: up622
|
|
34048
34021
|
},
|
|
34049
34022
|
{
|
|
34050
34023
|
version: 58,
|
|
34051
34024
|
name: "knowledge-graph-indices",
|
|
34052
|
-
up:
|
|
34025
|
+
up: up632
|
|
34053
34026
|
},
|
|
34054
34027
|
{
|
|
34055
34028
|
version: 59,
|
|
34056
34029
|
name: "entity-attribute-claim-key",
|
|
34057
|
-
up:
|
|
34030
|
+
up: up642,
|
|
34058
34031
|
artifacts: {
|
|
34059
34032
|
columns: [{ table: "entity_attributes", column: "claim_key" }]
|
|
34060
34033
|
}
|
|
@@ -34062,7 +34035,7 @@ var MIGRATIONS2 = [
|
|
|
34062
34035
|
{
|
|
34063
34036
|
version: 60,
|
|
34064
34037
|
name: "entity-attribute-group-key",
|
|
34065
|
-
up:
|
|
34038
|
+
up: up652,
|
|
34066
34039
|
artifacts: {
|
|
34067
34040
|
columns: [{ table: "entity_attributes", column: "group_key" }]
|
|
34068
34041
|
}
|
|
@@ -34070,7 +34043,7 @@ var MIGRATIONS2 = [
|
|
|
34070
34043
|
{
|
|
34071
34044
|
version: 61,
|
|
34072
34045
|
name: "memory-artifact-source-mtime",
|
|
34073
|
-
up:
|
|
34046
|
+
up: up662,
|
|
34074
34047
|
artifacts: {
|
|
34075
34048
|
columns: [{ table: "memory_artifacts", column: "source_mtime_ms" }]
|
|
34076
34049
|
}
|
|
@@ -34078,7 +34051,7 @@ var MIGRATIONS2 = [
|
|
|
34078
34051
|
{
|
|
34079
34052
|
version: 62,
|
|
34080
34053
|
name: "memory-artifact-soft-delete",
|
|
34081
|
-
up:
|
|
34054
|
+
up: up672,
|
|
34082
34055
|
artifacts: {
|
|
34083
34056
|
columns: [
|
|
34084
34057
|
{ table: "memory_artifacts", column: "is_deleted" },
|
|
@@ -34089,12 +34062,12 @@ var MIGRATIONS2 = [
|
|
|
34089
34062
|
{
|
|
34090
34063
|
version: 63,
|
|
34091
34064
|
name: "content-only-memories-fts-update",
|
|
34092
|
-
up:
|
|
34065
|
+
up: up682
|
|
34093
34066
|
},
|
|
34094
34067
|
{
|
|
34095
34068
|
version: 64,
|
|
34096
34069
|
name: "source-graph-provenance",
|
|
34097
|
-
up:
|
|
34070
|
+
up: up692,
|
|
34098
34071
|
artifacts: {
|
|
34099
34072
|
columns: [
|
|
34100
34073
|
{ table: "entities", column: "source_path" },
|
|
@@ -34107,7 +34080,7 @@ var MIGRATIONS2 = [
|
|
|
34107
34080
|
{
|
|
34108
34081
|
version: 65,
|
|
34109
34082
|
name: "source-embedding-agent-scope",
|
|
34110
|
-
up:
|
|
34083
|
+
up: up702,
|
|
34111
34084
|
artifacts: {
|
|
34112
34085
|
columns: [{ table: "embeddings", column: "agent_id", optional: true }]
|
|
34113
34086
|
}
|
|
@@ -34115,7 +34088,7 @@ var MIGRATIONS2 = [
|
|
|
34115
34088
|
{
|
|
34116
34089
|
version: 66,
|
|
34117
34090
|
name: "memory-search-telemetry",
|
|
34118
|
-
up:
|
|
34091
|
+
up: up712,
|
|
34119
34092
|
artifacts: {
|
|
34120
34093
|
tables: ["memory_search_telemetry"]
|
|
34121
34094
|
}
|
|
@@ -34123,7 +34096,7 @@ var MIGRATIONS2 = [
|
|
|
34123
34096
|
{
|
|
34124
34097
|
version: 67,
|
|
34125
34098
|
name: "ontology-proposals",
|
|
34126
|
-
up:
|
|
34099
|
+
up: up722,
|
|
34127
34100
|
artifacts: {
|
|
34128
34101
|
tables: ["ontology_proposals"],
|
|
34129
34102
|
columns: [
|
|
@@ -34137,7 +34110,7 @@ var MIGRATIONS2 = [
|
|
|
34137
34110
|
{
|
|
34138
34111
|
version: 68,
|
|
34139
34112
|
name: "daily-reflections",
|
|
34140
|
-
up:
|
|
34113
|
+
up: up732,
|
|
34141
34114
|
artifacts: {
|
|
34142
34115
|
tables: ["daily_reflections"]
|
|
34143
34116
|
}
|
|
@@ -34145,7 +34118,7 @@ var MIGRATIONS2 = [
|
|
|
34145
34118
|
{
|
|
34146
34119
|
version: 69,
|
|
34147
34120
|
name: "daily-reflections-multiple-insights",
|
|
34148
|
-
up:
|
|
34121
|
+
up: up742,
|
|
34149
34122
|
artifacts: {
|
|
34150
34123
|
tables: ["daily_reflections"]
|
|
34151
34124
|
}
|
|
@@ -34153,7 +34126,7 @@ var MIGRATIONS2 = [
|
|
|
34153
34126
|
{
|
|
34154
34127
|
version: 70,
|
|
34155
34128
|
name: "ontology-control-plane-state",
|
|
34156
|
-
up:
|
|
34129
|
+
up: up752,
|
|
34157
34130
|
artifacts: {
|
|
34158
34131
|
columns: [
|
|
34159
34132
|
{ table: "entities", column: "status" },
|
|
@@ -34168,7 +34141,7 @@ var MIGRATIONS2 = [
|
|
|
34168
34141
|
{
|
|
34169
34142
|
version: 71,
|
|
34170
34143
|
name: "epistemic-assertions",
|
|
34171
|
-
up:
|
|
34144
|
+
up: up762,
|
|
34172
34145
|
artifacts: {
|
|
34173
34146
|
tables: ["epistemic_assertions"]
|
|
34174
34147
|
}
|
|
@@ -34176,7 +34149,7 @@ var MIGRATIONS2 = [
|
|
|
34176
34149
|
{
|
|
34177
34150
|
version: 72,
|
|
34178
34151
|
name: "agent-scoped-idempotency-key",
|
|
34179
|
-
up:
|
|
34152
|
+
up: up772,
|
|
34180
34153
|
artifacts: {
|
|
34181
34154
|
columns: [
|
|
34182
34155
|
{ table: "memories", column: "idempotency_key" },
|
|
@@ -34187,7 +34160,7 @@ var MIGRATIONS2 = [
|
|
|
34187
34160
|
{
|
|
34188
34161
|
version: 73,
|
|
34189
34162
|
name: "recall-context-dedupe",
|
|
34190
|
-
up:
|
|
34163
|
+
up: up782,
|
|
34191
34164
|
artifacts: {
|
|
34192
34165
|
tables: ["session_context_epochs", "session_recall_events"]
|
|
34193
34166
|
}
|
|
@@ -34195,7 +34168,7 @@ var MIGRATIONS2 = [
|
|
|
34195
34168
|
{
|
|
34196
34169
|
version: 74,
|
|
34197
34170
|
name: "aggregate-memory-links",
|
|
34198
|
-
up:
|
|
34171
|
+
up: up792,
|
|
34199
34172
|
artifacts: {
|
|
34200
34173
|
tables: ["aggregate_memory_sources"]
|
|
34201
34174
|
}
|
|
@@ -34203,7 +34176,7 @@ var MIGRATIONS2 = [
|
|
|
34203
34176
|
{
|
|
34204
34177
|
version: 75,
|
|
34205
34178
|
name: "memory-artifact-source-provenance",
|
|
34206
|
-
up:
|
|
34179
|
+
up: up802,
|
|
34207
34180
|
artifacts: {
|
|
34208
34181
|
columns: [
|
|
34209
34182
|
{ table: "memory_artifacts", column: "source_id" },
|
|
@@ -34217,7 +34190,7 @@ var MIGRATIONS2 = [
|
|
|
34217
34190
|
{
|
|
34218
34191
|
version: 76,
|
|
34219
34192
|
name: "temporal-edges",
|
|
34220
|
-
up:
|
|
34193
|
+
up: up812,
|
|
34221
34194
|
artifacts: {
|
|
34222
34195
|
tables: ["temporal_edges"]
|
|
34223
34196
|
}
|
|
@@ -34225,7 +34198,7 @@ var MIGRATIONS2 = [
|
|
|
34225
34198
|
{
|
|
34226
34199
|
version: 77,
|
|
34227
34200
|
name: "entity-aliases",
|
|
34228
|
-
up:
|
|
34201
|
+
up: up822,
|
|
34229
34202
|
artifacts: {
|
|
34230
34203
|
tables: ["entity_aliases"]
|
|
34231
34204
|
}
|
|
@@ -34233,7 +34206,7 @@ var MIGRATIONS2 = [
|
|
|
34233
34206
|
{
|
|
34234
34207
|
version: 78,
|
|
34235
34208
|
name: "api-keys",
|
|
34236
|
-
up:
|
|
34209
|
+
up: up832,
|
|
34237
34210
|
artifacts: {
|
|
34238
34211
|
tables: ["api_keys"]
|
|
34239
34212
|
}
|
|
@@ -34241,7 +34214,7 @@ var MIGRATIONS2 = [
|
|
|
34241
34214
|
{
|
|
34242
34215
|
version: 79,
|
|
34243
34216
|
name: "transcript-capture-jobs",
|
|
34244
|
-
up:
|
|
34217
|
+
up: up842,
|
|
34245
34218
|
artifacts: {
|
|
34246
34219
|
tables: ["transcript_capture_jobs"]
|
|
34247
34220
|
}
|
|
@@ -34249,7 +34222,7 @@ var MIGRATIONS2 = [
|
|
|
34249
34222
|
{
|
|
34250
34223
|
version: 80,
|
|
34251
34224
|
name: "document-scope-columns",
|
|
34252
|
-
up:
|
|
34225
|
+
up: up852,
|
|
34253
34226
|
artifacts: {
|
|
34254
34227
|
columns: [
|
|
34255
34228
|
{ table: "documents", column: "agent_id" },
|
|
@@ -34260,7 +34233,7 @@ var MIGRATIONS2 = [
|
|
|
34260
34233
|
{
|
|
34261
34234
|
version: 81,
|
|
34262
34235
|
name: "aggregate-evidence-sources",
|
|
34263
|
-
up:
|
|
34236
|
+
up: up862,
|
|
34264
34237
|
artifacts: {
|
|
34265
34238
|
tables: ["aggregate_evidence_sources"]
|
|
34266
34239
|
}
|
|
@@ -34268,7 +34241,7 @@ var MIGRATIONS2 = [
|
|
|
34268
34241
|
{
|
|
34269
34242
|
version: 82,
|
|
34270
34243
|
name: "skill-invocations-harness",
|
|
34271
|
-
up:
|
|
34244
|
+
up: up872,
|
|
34272
34245
|
artifacts: {
|
|
34273
34246
|
columns: [
|
|
34274
34247
|
{ table: "skill_invocations", column: "harness" },
|
|
@@ -34279,7 +34252,7 @@ var MIGRATIONS2 = [
|
|
|
34279
34252
|
{
|
|
34280
34253
|
version: 83,
|
|
34281
34254
|
name: "memory-lifecycle-repair",
|
|
34282
|
-
up:
|
|
34255
|
+
up: up882,
|
|
34283
34256
|
artifacts: {
|
|
34284
34257
|
tables: ["transcript_capture_jobs", "aggregate_evidence_sources", "entity_dependencies"],
|
|
34285
34258
|
columns: [
|
|
@@ -34294,7 +34267,7 @@ var MIGRATIONS2 = [
|
|
|
34294
34267
|
{
|
|
34295
34268
|
version: 84,
|
|
34296
34269
|
name: "legacy-markdown-import-state",
|
|
34297
|
-
up:
|
|
34270
|
+
up: up892,
|
|
34298
34271
|
artifacts: {
|
|
34299
34272
|
tables: ["legacy_markdown_imports", "legacy_markdown_chunks"]
|
|
34300
34273
|
}
|
|
@@ -34302,7 +34275,7 @@ var MIGRATIONS2 = [
|
|
|
34302
34275
|
{
|
|
34303
34276
|
version: 85,
|
|
34304
34277
|
name: "backfill-relations-to-dependencies",
|
|
34305
|
-
up:
|
|
34278
|
+
up: up902,
|
|
34306
34279
|
artifacts: {
|
|
34307
34280
|
tables: ["entity_dependencies"]
|
|
34308
34281
|
}
|
|
@@ -34310,7 +34283,7 @@ var MIGRATIONS2 = [
|
|
|
34310
34283
|
{
|
|
34311
34284
|
version: 86,
|
|
34312
34285
|
name: "summary-jobs-content-hash",
|
|
34313
|
-
up:
|
|
34286
|
+
up: up912,
|
|
34314
34287
|
artifacts: {
|
|
34315
34288
|
columns: [{ table: "summary_jobs", column: "content_hash" }]
|
|
34316
34289
|
}
|
|
@@ -34318,7 +34291,7 @@ var MIGRATIONS2 = [
|
|
|
34318
34291
|
{
|
|
34319
34292
|
version: 87,
|
|
34320
34293
|
name: "summary-jobs-boundary-reason",
|
|
34321
|
-
up:
|
|
34294
|
+
up: up922,
|
|
34322
34295
|
artifacts: {
|
|
34323
34296
|
columns: [{ table: "summary_jobs", column: "boundary_reason" }]
|
|
34324
34297
|
}
|
|
@@ -34326,7 +34299,7 @@ var MIGRATIONS2 = [
|
|
|
34326
34299
|
{
|
|
34327
34300
|
version: 88,
|
|
34328
34301
|
name: "transcript-recovery-files",
|
|
34329
|
-
up:
|
|
34302
|
+
up: up932,
|
|
34330
34303
|
artifacts: {
|
|
34331
34304
|
tables: ["transcript_recovery_files"]
|
|
34332
34305
|
}
|
|
@@ -34334,7 +34307,7 @@ var MIGRATIONS2 = [
|
|
|
34334
34307
|
{
|
|
34335
34308
|
version: 89,
|
|
34336
34309
|
name: "job-cancellations",
|
|
34337
|
-
up:
|
|
34310
|
+
up: up942,
|
|
34338
34311
|
artifacts: {
|
|
34339
34312
|
tables: ["job_cancellations"]
|
|
34340
34313
|
}
|
|
@@ -34342,7 +34315,7 @@ var MIGRATIONS2 = [
|
|
|
34342
34315
|
{
|
|
34343
34316
|
version: 90,
|
|
34344
34317
|
name: "job-archive",
|
|
34345
|
-
up:
|
|
34318
|
+
up: up952,
|
|
34346
34319
|
artifacts: {
|
|
34347
34320
|
tables: ["job_archive"]
|
|
34348
34321
|
}
|
|
@@ -34350,25 +34323,25 @@ var MIGRATIONS2 = [
|
|
|
34350
34323
|
{
|
|
34351
34324
|
version: 91,
|
|
34352
34325
|
name: "embedding-index-generations",
|
|
34353
|
-
up:
|
|
34326
|
+
up: up962,
|
|
34354
34327
|
artifacts: { tables: ["embedding_index_state"] }
|
|
34355
34328
|
},
|
|
34356
34329
|
{
|
|
34357
34330
|
version: 92,
|
|
34358
34331
|
name: "embedding-staging-store",
|
|
34359
|
-
up:
|
|
34332
|
+
up: up972,
|
|
34360
34333
|
artifacts: { tables: ["embeddings_staging"] }
|
|
34361
34334
|
},
|
|
34362
34335
|
{
|
|
34363
34336
|
version: 93,
|
|
34364
34337
|
name: "dreaming-evidence-cursor",
|
|
34365
|
-
up:
|
|
34338
|
+
up: up982,
|
|
34366
34339
|
artifacts: { columns: [{ table: "dreaming_state", column: "evidence_cursor" }] }
|
|
34367
34340
|
},
|
|
34368
34341
|
{
|
|
34369
34342
|
version: 94,
|
|
34370
34343
|
name: "memory-kind",
|
|
34371
|
-
up:
|
|
34344
|
+
up: up992,
|
|
34372
34345
|
artifacts: {
|
|
34373
34346
|
columns: [
|
|
34374
34347
|
{ table: "memories", column: "memory_kind" },
|
|
@@ -34379,35 +34352,35 @@ var MIGRATIONS2 = [
|
|
|
34379
34352
|
{
|
|
34380
34353
|
version: 95,
|
|
34381
34354
|
name: "compaction-recall-projections",
|
|
34382
|
-
up:
|
|
34355
|
+
up: up1002
|
|
34383
34356
|
},
|
|
34384
34357
|
{
|
|
34385
34358
|
version: 96,
|
|
34386
34359
|
name: "retire-legacy-ingestion",
|
|
34387
|
-
up:
|
|
34360
|
+
up: up1012
|
|
34388
34361
|
},
|
|
34389
34362
|
{
|
|
34390
34363
|
version: 97,
|
|
34391
34364
|
name: "dreaming-failure-backoff",
|
|
34392
|
-
up:
|
|
34365
|
+
up: up1022,
|
|
34393
34366
|
artifacts: { columns: [{ table: "dreaming_state", column: "last_failure_at" }] }
|
|
34394
34367
|
},
|
|
34395
34368
|
{
|
|
34396
34369
|
version: 98,
|
|
34397
34370
|
name: "dreaming-evidence-exclusions",
|
|
34398
|
-
up:
|
|
34371
|
+
up: up1032,
|
|
34399
34372
|
artifacts: { tables: ["dreaming_evidence_exclusions"] }
|
|
34400
34373
|
},
|
|
34401
34374
|
{
|
|
34402
34375
|
version: 99,
|
|
34403
34376
|
name: "dreaming-tool-calls",
|
|
34404
|
-
up:
|
|
34377
|
+
up: up1042,
|
|
34405
34378
|
artifacts: { tables: ["dreaming_tool_calls"] }
|
|
34406
34379
|
},
|
|
34407
34380
|
{
|
|
34408
34381
|
version: 100,
|
|
34409
34382
|
name: "dreaming-runbook",
|
|
34410
|
-
up:
|
|
34383
|
+
up: up1052,
|
|
34411
34384
|
artifacts: {
|
|
34412
34385
|
columns: [
|
|
34413
34386
|
{ table: "dreaming_passes", column: "evidence_window_json" },
|
|
@@ -34418,23 +34391,23 @@ var MIGRATIONS2 = [
|
|
|
34418
34391
|
{
|
|
34419
34392
|
version: 101,
|
|
34420
34393
|
name: "dreaming-attention",
|
|
34421
|
-
up:
|
|
34394
|
+
up: up1062,
|
|
34422
34395
|
artifacts: { tables: ["dreaming_attention"] }
|
|
34423
34396
|
},
|
|
34424
34397
|
{
|
|
34425
34398
|
version: 102,
|
|
34426
34399
|
name: "attribute-semantic-memories",
|
|
34427
|
-
up:
|
|
34400
|
+
up: up1072
|
|
34428
34401
|
},
|
|
34429
34402
|
{
|
|
34430
34403
|
version: 103,
|
|
34431
34404
|
name: "semantic-memory-kind",
|
|
34432
|
-
up:
|
|
34405
|
+
up: up1082
|
|
34433
34406
|
},
|
|
34434
34407
|
{
|
|
34435
34408
|
version: 104,
|
|
34436
34409
|
name: "derived-memory-provenance",
|
|
34437
|
-
up:
|
|
34410
|
+
up: up1092,
|
|
34438
34411
|
artifacts: {
|
|
34439
34412
|
tables: ["derived_memory_sources"],
|
|
34440
34413
|
columns: [{ table: "memories", column: "stale_at" }]
|
|
@@ -34443,12 +34416,12 @@ var MIGRATIONS2 = [
|
|
|
34443
34416
|
{
|
|
34444
34417
|
version: 105,
|
|
34445
34418
|
name: "agent-scoped-entity-name",
|
|
34446
|
-
up:
|
|
34419
|
+
up: up1102
|
|
34447
34420
|
},
|
|
34448
34421
|
{
|
|
34449
34422
|
version: 106,
|
|
34450
34423
|
name: "memory-review-after",
|
|
34451
|
-
up:
|
|
34424
|
+
up: up1112,
|
|
34452
34425
|
artifacts: {
|
|
34453
34426
|
columns: [{ table: "memories", column: "review_after" }]
|
|
34454
34427
|
}
|
|
@@ -34456,7 +34429,7 @@ var MIGRATIONS2 = [
|
|
|
34456
34429
|
{
|
|
34457
34430
|
version: 107,
|
|
34458
34431
|
name: "dreaming-pass-usage",
|
|
34459
|
-
up:
|
|
34432
|
+
up: up1122,
|
|
34460
34433
|
artifacts: {
|
|
34461
34434
|
columns: [
|
|
34462
34435
|
{ table: "dreaming_passes", column: "tokens_input" },
|
|
@@ -34470,7 +34443,7 @@ var MIGRATIONS2 = [
|
|
|
34470
34443
|
{
|
|
34471
34444
|
version: 108,
|
|
34472
34445
|
name: "embedding-usage",
|
|
34473
|
-
up:
|
|
34446
|
+
up: up1132,
|
|
34474
34447
|
artifacts: {
|
|
34475
34448
|
tables: ["embedding_usage"]
|
|
34476
34449
|
}
|
|
@@ -34478,7 +34451,7 @@ var MIGRATIONS2 = [
|
|
|
34478
34451
|
{
|
|
34479
34452
|
version: 109,
|
|
34480
34453
|
name: "telemetry-install",
|
|
34481
|
-
up:
|
|
34454
|
+
up: up1142,
|
|
34482
34455
|
artifacts: {
|
|
34483
34456
|
tables: ["telemetry_install"]
|
|
34484
34457
|
}
|
|
@@ -34486,12 +34459,12 @@ var MIGRATIONS2 = [
|
|
|
34486
34459
|
{
|
|
34487
34460
|
version: 110,
|
|
34488
34461
|
name: "memory-mention-join-index",
|
|
34489
|
-
up:
|
|
34462
|
+
up: up1152
|
|
34490
34463
|
},
|
|
34491
34464
|
{
|
|
34492
34465
|
version: 111,
|
|
34493
34466
|
name: "telemetry-first-use",
|
|
34494
|
-
up:
|
|
34467
|
+
up: up1162,
|
|
34495
34468
|
artifacts: {
|
|
34496
34469
|
columns: [
|
|
34497
34470
|
{ table: "telemetry_install", column: "first_remember_at" },
|
|
@@ -34502,7 +34475,7 @@ var MIGRATIONS2 = [
|
|
|
34502
34475
|
{
|
|
34503
34476
|
version: 112,
|
|
34504
34477
|
name: "telemetry-queue-ownership",
|
|
34505
|
-
up:
|
|
34478
|
+
up: up1172,
|
|
34506
34479
|
artifacts: {
|
|
34507
34480
|
columns: [
|
|
34508
34481
|
{ table: "telemetry_events", column: "source" },
|
|
@@ -34514,7 +34487,7 @@ var MIGRATIONS2 = [
|
|
|
34514
34487
|
{
|
|
34515
34488
|
version: 113,
|
|
34516
34489
|
name: "session-claims",
|
|
34517
|
-
up:
|
|
34490
|
+
up: up1182,
|
|
34518
34491
|
artifacts: {
|
|
34519
34492
|
tables: ["session_claims"],
|
|
34520
34493
|
columns: [
|
|
@@ -34528,12 +34501,12 @@ var MIGRATIONS2 = [
|
|
|
34528
34501
|
{
|
|
34529
34502
|
version: 114,
|
|
34530
34503
|
name: "memory-traversal-hydration-index",
|
|
34531
|
-
up:
|
|
34504
|
+
up: up1192
|
|
34532
34505
|
},
|
|
34533
34506
|
{
|
|
34534
34507
|
version: 115,
|
|
34535
34508
|
name: "cross-agent-message-notifications",
|
|
34536
|
-
up:
|
|
34509
|
+
up: up1202,
|
|
34537
34510
|
artifacts: {
|
|
34538
34511
|
tables: ["cross_agent_messages", "cross_agent_message_receipts"]
|
|
34539
34512
|
}
|
|
@@ -34541,7 +34514,7 @@ var MIGRATIONS2 = [
|
|
|
34541
34514
|
{
|
|
34542
34515
|
version: 116,
|
|
34543
34516
|
name: "acp-delivery-reconciliation",
|
|
34544
|
-
up:
|
|
34517
|
+
up: up1212,
|
|
34545
34518
|
artifacts: {
|
|
34546
34519
|
columns: [
|
|
34547
34520
|
{ table: "cross_agent_messages", column: "delivery_state" },
|
|
@@ -34555,7 +34528,7 @@ var MIGRATIONS2 = [
|
|
|
34555
34528
|
{
|
|
34556
34529
|
version: 117,
|
|
34557
34530
|
name: "retire-summary-worker",
|
|
34558
|
-
up:
|
|
34531
|
+
up: up1222,
|
|
34559
34532
|
artifacts: {
|
|
34560
34533
|
columns: [
|
|
34561
34534
|
{ table: "session_transcripts", column: "completed_at" },
|
|
@@ -34566,24 +34539,24 @@ var MIGRATIONS2 = [
|
|
|
34566
34539
|
{
|
|
34567
34540
|
version: 118,
|
|
34568
34541
|
name: "queue-pressure-indices",
|
|
34569
|
-
up:
|
|
34542
|
+
up: up1232
|
|
34570
34543
|
},
|
|
34571
34544
|
{
|
|
34572
34545
|
version: 119,
|
|
34573
34546
|
name: "telemetry-version-observation",
|
|
34574
|
-
up:
|
|
34547
|
+
up: up1242,
|
|
34575
34548
|
artifacts: { columns: [{ table: "telemetry_install", column: "last_seen_version" }] }
|
|
34576
34549
|
},
|
|
34577
34550
|
{
|
|
34578
34551
|
version: 120,
|
|
34579
34552
|
name: "source-lifecycle-telemetry",
|
|
34580
|
-
up:
|
|
34553
|
+
up: up1252,
|
|
34581
34554
|
artifacts: { tables: ["source_lifecycle_state"] }
|
|
34582
34555
|
},
|
|
34583
34556
|
{
|
|
34584
34557
|
version: 121,
|
|
34585
34558
|
name: "telemetry-delivery-health",
|
|
34586
|
-
up:
|
|
34559
|
+
up: up1262,
|
|
34587
34560
|
artifacts: {
|
|
34588
34561
|
tables: ["telemetry_delivery_state"],
|
|
34589
34562
|
columns: [
|
|
@@ -34597,7 +34570,7 @@ var MIGRATIONS2 = [
|
|
|
34597
34570
|
{
|
|
34598
34571
|
version: 122,
|
|
34599
34572
|
name: "dreaming-evidence-retry",
|
|
34600
|
-
up:
|
|
34573
|
+
up: up1272,
|
|
34601
34574
|
artifacts: {
|
|
34602
34575
|
columns: [
|
|
34603
34576
|
{ table: "dreaming_evidence_exclusions", column: "failure_class" },
|
|
@@ -34610,13 +34583,13 @@ var MIGRATIONS2 = [
|
|
|
34610
34583
|
{
|
|
34611
34584
|
version: 123,
|
|
34612
34585
|
name: "embedding-index-failures",
|
|
34613
|
-
up:
|
|
34586
|
+
up: up1282,
|
|
34614
34587
|
artifacts: { tables: ["embedding_index_failures"] }
|
|
34615
34588
|
},
|
|
34616
34589
|
{
|
|
34617
34590
|
version: 124,
|
|
34618
34591
|
name: "import-derived-lifecycle",
|
|
34619
|
-
up:
|
|
34592
|
+
up: up1292,
|
|
34620
34593
|
artifacts: {
|
|
34621
34594
|
tables: ["imported_source_lifecycle"]
|
|
34622
34595
|
}
|
|
@@ -34624,77 +34597,77 @@ var MIGRATIONS2 = [
|
|
|
34624
34597
|
{
|
|
34625
34598
|
version: 125,
|
|
34626
34599
|
name: "memory-content-safety",
|
|
34627
|
-
up:
|
|
34600
|
+
up: up1302,
|
|
34628
34601
|
artifacts: { tables: ["memory_content_safety"] }
|
|
34629
34602
|
},
|
|
34630
34603
|
{
|
|
34631
34604
|
version: 126,
|
|
34632
34605
|
name: "dreaming-surprisal-attention",
|
|
34633
|
-
up:
|
|
34606
|
+
up: up1312,
|
|
34634
34607
|
artifacts: { tables: ["dreaming_attention"] }
|
|
34635
34608
|
},
|
|
34636
34609
|
{
|
|
34637
34610
|
version: 127,
|
|
34638
34611
|
name: "ontology-contradictions",
|
|
34639
|
-
up:
|
|
34612
|
+
up: up1322,
|
|
34640
34613
|
artifacts: { tables: ["ontology_contradictions"] }
|
|
34641
34614
|
},
|
|
34642
34615
|
{
|
|
34643
34616
|
version: 128,
|
|
34644
34617
|
name: "bounded-queue-diagnostics",
|
|
34645
|
-
up:
|
|
34618
|
+
up: up1332
|
|
34646
34619
|
},
|
|
34647
34620
|
{
|
|
34648
34621
|
version: 129,
|
|
34649
34622
|
name: "retire-structural-jobs",
|
|
34650
|
-
up:
|
|
34623
|
+
up: up1342
|
|
34651
34624
|
},
|
|
34652
34625
|
{
|
|
34653
34626
|
version: 130,
|
|
34654
34627
|
name: "embedding-repair-state",
|
|
34655
|
-
up:
|
|
34628
|
+
up: up1352,
|
|
34656
34629
|
artifacts: { tables: ["embedding_repair_budget", "embedding_repair_backoff"] }
|
|
34657
34630
|
},
|
|
34658
34631
|
{
|
|
34659
34632
|
version: 131,
|
|
34660
34633
|
name: "dreaming-evidence-consumption",
|
|
34661
|
-
up:
|
|
34634
|
+
up: up1362,
|
|
34662
34635
|
artifacts: { tables: ["dreaming_evidence_consumption"] }
|
|
34663
34636
|
},
|
|
34664
34637
|
{
|
|
34665
34638
|
version: 132,
|
|
34666
34639
|
name: "observer-scoped-epistemic-assertions",
|
|
34667
|
-
up:
|
|
34640
|
+
up: up1372,
|
|
34668
34641
|
artifacts: { tables: ["epistemic_assertions"] }
|
|
34669
34642
|
},
|
|
34670
34643
|
{
|
|
34671
34644
|
version: 133,
|
|
34672
34645
|
name: "dreaming-memory-head",
|
|
34673
|
-
up:
|
|
34646
|
+
up: up1382,
|
|
34674
34647
|
artifacts: { tables: ["memory_head_revisions", "memory_head_entries", "memory_head_revision_entries"] }
|
|
34675
34648
|
},
|
|
34676
34649
|
{
|
|
34677
34650
|
version: 134,
|
|
34678
34651
|
name: "scope-memory-head-entries",
|
|
34679
|
-
up:
|
|
34652
|
+
up: up1392,
|
|
34680
34653
|
artifacts: { tables: ["memory_head_entries"] }
|
|
34681
34654
|
},
|
|
34682
34655
|
{
|
|
34683
34656
|
version: 135,
|
|
34684
34657
|
name: "memory-head-publication",
|
|
34685
|
-
up:
|
|
34658
|
+
up: up1402,
|
|
34686
34659
|
artifacts: { tables: ["memory_head_publications"] }
|
|
34687
34660
|
},
|
|
34688
34661
|
{
|
|
34689
34662
|
version: 136,
|
|
34690
34663
|
name: "memory-head-revisions",
|
|
34691
|
-
up:
|
|
34664
|
+
up: up1412,
|
|
34692
34665
|
artifacts: { tables: ["memory_head_revisions"] }
|
|
34693
34666
|
},
|
|
34694
34667
|
{
|
|
34695
34668
|
version: 137,
|
|
34696
34669
|
name: "dreaming-head-manifest",
|
|
34697
|
-
up:
|
|
34670
|
+
up: up1422,
|
|
34698
34671
|
artifacts: {
|
|
34699
34672
|
columns: [
|
|
34700
34673
|
{ table: "dreaming_passes", column: "head_revision" },
|
|
@@ -34705,7 +34678,7 @@ var MIGRATIONS2 = [
|
|
|
34705
34678
|
{
|
|
34706
34679
|
version: 138,
|
|
34707
34680
|
name: "bounded-status-projections",
|
|
34708
|
-
up:
|
|
34681
|
+
up: up1432,
|
|
34709
34682
|
artifacts: {
|
|
34710
34683
|
tables: ["transcript_capture_status", "memories_duplicate_hash_counts", "memories_diagnostics_state"]
|
|
34711
34684
|
}
|
|
@@ -34713,31 +34686,31 @@ var MIGRATIONS2 = [
|
|
|
34713
34686
|
{
|
|
34714
34687
|
version: 139,
|
|
34715
34688
|
name: "native-source-sync-state",
|
|
34716
|
-
up:
|
|
34689
|
+
up: up1442,
|
|
34717
34690
|
artifacts: { tables: ["native_source_sync_state"] }
|
|
34718
34691
|
},
|
|
34719
34692
|
{
|
|
34720
34693
|
version: 140,
|
|
34721
34694
|
name: "transcript-recovery-frontier",
|
|
34722
|
-
up:
|
|
34695
|
+
up: up1452,
|
|
34723
34696
|
artifacts: { tables: ["transcript_recovery_frontiers"] }
|
|
34724
34697
|
},
|
|
34725
34698
|
{
|
|
34726
34699
|
version: 141,
|
|
34727
34700
|
name: "source-sync-checkpoints",
|
|
34728
|
-
up:
|
|
34701
|
+
up: up1462,
|
|
34729
34702
|
artifacts: { tables: ["source_sync_checkpoints"] }
|
|
34730
34703
|
},
|
|
34731
34704
|
{
|
|
34732
34705
|
version: 142,
|
|
34733
34706
|
name: "source-sync-frontier",
|
|
34734
|
-
up:
|
|
34707
|
+
up: up1472,
|
|
34735
34708
|
artifacts: { columns: [{ table: "source_sync_checkpoints", column: "frontier" }] }
|
|
34736
34709
|
},
|
|
34737
34710
|
{
|
|
34738
34711
|
version: 143,
|
|
34739
34712
|
name: "embedding-index-progress",
|
|
34740
|
-
up:
|
|
34713
|
+
up: up1482,
|
|
34741
34714
|
artifacts: {
|
|
34742
34715
|
columns: [
|
|
34743
34716
|
{ table: "embedding_index_state", column: "migration_phase" },
|
|
@@ -34753,19 +34726,19 @@ var MIGRATIONS2 = [
|
|
|
34753
34726
|
{
|
|
34754
34727
|
version: 144,
|
|
34755
34728
|
name: "memory-job-lease-token",
|
|
34756
|
-
up:
|
|
34729
|
+
up: up1492,
|
|
34757
34730
|
artifacts: { columns: [{ table: "memory_jobs", column: "lease_token" }] }
|
|
34758
34731
|
},
|
|
34759
34732
|
{
|
|
34760
34733
|
version: 145,
|
|
34761
34734
|
name: "dreaming-evidence-reviews",
|
|
34762
|
-
up:
|
|
34735
|
+
up: up1502,
|
|
34763
34736
|
artifacts: { tables: ["dreaming_evidence_reviews"] }
|
|
34764
34737
|
},
|
|
34765
34738
|
{
|
|
34766
34739
|
version: 146,
|
|
34767
34740
|
name: "source-transcript-import",
|
|
34768
|
-
up:
|
|
34741
|
+
up: up1512,
|
|
34769
34742
|
artifacts: {
|
|
34770
34743
|
tables: [
|
|
34771
34744
|
"source_import_jobs",
|
|
@@ -34784,19 +34757,19 @@ var MIGRATIONS2 = [
|
|
|
34784
34757
|
{
|
|
34785
34758
|
version: 147,
|
|
34786
34759
|
name: "source-import-replay-file-slots",
|
|
34787
|
-
up:
|
|
34760
|
+
up: up1522,
|
|
34788
34761
|
artifacts: { tables: ["source_import_files"] }
|
|
34789
34762
|
},
|
|
34790
34763
|
{
|
|
34791
34764
|
version: 148,
|
|
34792
34765
|
name: "source-import-attempt-provenance",
|
|
34793
|
-
up:
|
|
34766
|
+
up: up1532,
|
|
34794
34767
|
artifacts: { columns: [{ table: "source_import_record_attempts", column: "source_id" }] }
|
|
34795
34768
|
},
|
|
34796
34769
|
{
|
|
34797
34770
|
version: 149,
|
|
34798
34771
|
name: "transcript-import-state-machine",
|
|
34799
|
-
up:
|
|
34772
|
+
up: up1542,
|
|
34800
34773
|
artifacts: {
|
|
34801
34774
|
columns: [
|
|
34802
34775
|
{ table: "source_import_jobs", column: "duplicate_mode" },
|
|
@@ -34808,7 +34781,7 @@ var MIGRATIONS2 = [
|
|
|
34808
34781
|
{
|
|
34809
34782
|
version: 150,
|
|
34810
34783
|
name: "memory-head-freshness",
|
|
34811
|
-
up:
|
|
34784
|
+
up: up1552,
|
|
34812
34785
|
artifacts: {
|
|
34813
34786
|
columns: [
|
|
34814
34787
|
{ table: "memory_md_heads", column: "is_current" },
|
|
@@ -34819,7 +34792,7 @@ var MIGRATIONS2 = [
|
|
|
34819
34792
|
{
|
|
34820
34793
|
version: 151,
|
|
34821
34794
|
name: "transcript-import-bytes",
|
|
34822
|
-
up:
|
|
34795
|
+
up: up160,
|
|
34823
34796
|
artifacts: {
|
|
34824
34797
|
tables: [
|
|
34825
34798
|
"source_import_chunks",
|
|
@@ -34854,7 +34827,7 @@ var MIGRATIONS2 = [
|
|
|
34854
34827
|
{
|
|
34855
34828
|
version: 153,
|
|
34856
34829
|
name: "vector-repair-checkpoints",
|
|
34857
|
-
up:
|
|
34830
|
+
up: up1562,
|
|
34858
34831
|
artifacts: { tables: ["vector_repair_checkpoints"] }
|
|
34859
34832
|
},
|
|
34860
34833
|
{
|
|
@@ -34881,13 +34854,13 @@ var MIGRATIONS2 = [
|
|
|
34881
34854
|
{
|
|
34882
34855
|
version: 156,
|
|
34883
34856
|
name: "embedding-repair-checkpoints",
|
|
34884
|
-
up:
|
|
34857
|
+
up: up1572,
|
|
34885
34858
|
artifacts: { tables: ["embedding_repair_checkpoints"] }
|
|
34886
34859
|
},
|
|
34887
34860
|
{
|
|
34888
34861
|
version: 157,
|
|
34889
34862
|
name: "embedding-repair-progress",
|
|
34890
|
-
up:
|
|
34863
|
+
up: up1582,
|
|
34891
34864
|
artifacts: {
|
|
34892
34865
|
tables: ["embedding_repair_progress"],
|
|
34893
34866
|
columns: [{ table: "embedding_repair_checkpoints", column: "profile_fingerprint" }]
|
|
@@ -34896,8 +34869,13 @@ var MIGRATIONS2 = [
|
|
|
34896
34869
|
{
|
|
34897
34870
|
version: 158,
|
|
34898
34871
|
name: "dreaming-candidate-scan-index",
|
|
34899
|
-
up:
|
|
34872
|
+
up: up1592,
|
|
34900
34873
|
artifacts: { indexes: ["idx_memories_agent_kind"] }
|
|
34874
|
+
},
|
|
34875
|
+
{
|
|
34876
|
+
version: 159,
|
|
34877
|
+
name: "retire-obsolete-invocation-ledger",
|
|
34878
|
+
up: up510
|
|
34901
34879
|
}
|
|
34902
34880
|
];
|
|
34903
34881
|
var LATEST_SCHEMA_VERSION2 = MIGRATIONS2[MIGRATIONS2.length - 1]?.version ?? 0;
|