@signetai/connector-forge 0.226.25 → 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;
|
|
@@ -28427,7 +28416,7 @@ var DAEMON_DERIVED_MEMORY_SOURCE_TYPES2 = [
|
|
|
28427
28416
|
"checkpoint",
|
|
28428
28417
|
"dreaming"
|
|
28429
28418
|
];
|
|
28430
|
-
function
|
|
28419
|
+
function up160(db) {
|
|
28431
28420
|
const hasColumn26 = (table, column) => {
|
|
28432
28421
|
const statement = db.prepare(`SELECT 1 FROM pragma_table_info('${table}') WHERE name = ?`);
|
|
28433
28422
|
try {
|
|
@@ -28539,6 +28528,9 @@ function up410(db) {
|
|
|
28539
28528
|
WHERE resolved_at IS NULL;
|
|
28540
28529
|
`);
|
|
28541
28530
|
}
|
|
28531
|
+
function up510(db) {
|
|
28532
|
+
db.exec("DROP TABLE IF EXISTS mcp_invocations");
|
|
28533
|
+
}
|
|
28542
28534
|
var MEMORIES_FTS_TOKENIZER2 = "unicode61";
|
|
28543
28535
|
var FTS_STATE_TABLE2 = "memories_fts_state";
|
|
28544
28536
|
function normalizeSql2(sql) {
|
|
@@ -28654,7 +28646,7 @@ function memoriesFtsNeedsTokenizerRepair2(sql) {
|
|
|
28654
28646
|
return true;
|
|
28655
28647
|
return !normalized.includes(`tokenize='${MEMORIES_FTS_TOKENIZER2}'`);
|
|
28656
28648
|
}
|
|
28657
|
-
function
|
|
28649
|
+
function up610(db) {
|
|
28658
28650
|
db.exec(`
|
|
28659
28651
|
CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
28660
28652
|
version INTEGER PRIMARY KEY,
|
|
@@ -28752,7 +28744,7 @@ function addColumnIfMissing210(db, table, column, definition) {
|
|
|
28752
28744
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
28753
28745
|
}
|
|
28754
28746
|
}
|
|
28755
|
-
function
|
|
28747
|
+
function up710(db) {
|
|
28756
28748
|
addColumnIfMissing210(db, "memories", "content_hash", "TEXT");
|
|
28757
28749
|
addColumnIfMissing210(db, "memories", "normalized_content", "TEXT");
|
|
28758
28750
|
addColumnIfMissing210(db, "memories", "is_deleted", "INTEGER DEFAULT 0");
|
|
@@ -28870,7 +28862,7 @@ function addColumnIfMissing32(db, table, column, definition) {
|
|
|
28870
28862
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
28871
28863
|
return true;
|
|
28872
28864
|
}
|
|
28873
|
-
function
|
|
28865
|
+
function up810(db) {
|
|
28874
28866
|
addColumnIfMissing32(db, "memories", "why", "TEXT");
|
|
28875
28867
|
addColumnIfMissing32(db, "memories", "project", "TEXT");
|
|
28876
28868
|
db.exec(`DROP INDEX IF EXISTS idx_memories_content_hash`);
|
|
@@ -28907,7 +28899,7 @@ function addColumnIfMissing42(db, table, column, definition) {
|
|
|
28907
28899
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
28908
28900
|
}
|
|
28909
28901
|
}
|
|
28910
|
-
function
|
|
28902
|
+
function up910(db) {
|
|
28911
28903
|
addColumnIfMissing42(db, "memory_history", "actor_type", "TEXT");
|
|
28912
28904
|
addColumnIfMissing42(db, "memory_history", "session_id", "TEXT");
|
|
28913
28905
|
addColumnIfMissing42(db, "memory_history", "request_id", "TEXT");
|
|
@@ -28940,7 +28932,7 @@ function addColumnIfMissing52(db, table, column, definition) {
|
|
|
28940
28932
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
28941
28933
|
}
|
|
28942
28934
|
}
|
|
28943
|
-
function
|
|
28935
|
+
function up1010(db) {
|
|
28944
28936
|
addColumnIfMissing52(db, "entities", "canonical_name", "TEXT");
|
|
28945
28937
|
addColumnIfMissing52(db, "entities", "mentions", "INTEGER DEFAULT 0");
|
|
28946
28938
|
addColumnIfMissing52(db, "entities", "embedding", "BLOB");
|
|
@@ -28957,7 +28949,7 @@ function hasColumn42(db, table, column) {
|
|
|
28957
28949
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
28958
28950
|
return rows.some((r3) => r3.name === column);
|
|
28959
28951
|
}
|
|
28960
|
-
function
|
|
28952
|
+
function up1110(db) {
|
|
28961
28953
|
if (!hasColumn42(db, "memories", "idempotency_key")) {
|
|
28962
28954
|
db.exec("ALTER TABLE memories ADD COLUMN idempotency_key TEXT");
|
|
28963
28955
|
}
|
|
@@ -28972,7 +28964,7 @@ function hasColumn52(db, table, column) {
|
|
|
28972
28964
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
28973
28965
|
return rows.some((r3) => r3.name === column);
|
|
28974
28966
|
}
|
|
28975
|
-
function
|
|
28967
|
+
function up1210(db) {
|
|
28976
28968
|
db.exec(`
|
|
28977
28969
|
CREATE TABLE IF NOT EXISTS documents (
|
|
28978
28970
|
id TEXT PRIMARY KEY,
|
|
@@ -29029,7 +29021,7 @@ function up1110(db) {
|
|
|
29029
29021
|
db.exec("ALTER TABLE memory_jobs ADD COLUMN document_id TEXT");
|
|
29030
29022
|
}
|
|
29031
29023
|
}
|
|
29032
|
-
function
|
|
29024
|
+
function up1310(db) {
|
|
29033
29025
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='embeddings'").all();
|
|
29034
29026
|
if (tables.length === 0)
|
|
29035
29027
|
return;
|
|
@@ -29046,7 +29038,7 @@ function up1210(db) {
|
|
|
29046
29038
|
ON embeddings(content_hash)
|
|
29047
29039
|
`);
|
|
29048
29040
|
}
|
|
29049
|
-
function
|
|
29041
|
+
function up1410(db) {
|
|
29050
29042
|
db.exec(`
|
|
29051
29043
|
CREATE TABLE IF NOT EXISTS summary_jobs (
|
|
29052
29044
|
id TEXT PRIMARY KEY,
|
|
@@ -29066,7 +29058,7 @@ function up1310(db) {
|
|
|
29066
29058
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_summary_jobs_status
|
|
29067
29059
|
ON summary_jobs(status)`);
|
|
29068
29060
|
}
|
|
29069
|
-
function
|
|
29061
|
+
function up1510(db) {
|
|
29070
29062
|
db.exec(`
|
|
29071
29063
|
CREATE TABLE IF NOT EXISTS umap_cache (
|
|
29072
29064
|
id INTEGER PRIMARY KEY,
|
|
@@ -29077,7 +29069,7 @@ function up1410(db) {
|
|
|
29077
29069
|
)
|
|
29078
29070
|
`);
|
|
29079
29071
|
}
|
|
29080
|
-
function
|
|
29072
|
+
function up162(db) {
|
|
29081
29073
|
db.exec(`
|
|
29082
29074
|
CREATE TABLE IF NOT EXISTS session_scores (
|
|
29083
29075
|
id TEXT PRIMARY KEY,
|
|
@@ -29097,7 +29089,7 @@ function up1510(db) {
|
|
|
29097
29089
|
ON session_scores(session_key);
|
|
29098
29090
|
`);
|
|
29099
29091
|
}
|
|
29100
|
-
function
|
|
29092
|
+
function up172(db) {
|
|
29101
29093
|
db.exec(`
|
|
29102
29094
|
CREATE TABLE IF NOT EXISTS scheduled_tasks (
|
|
29103
29095
|
id TEXT PRIMARY KEY,
|
|
@@ -29138,7 +29130,7 @@ function addColumnIfMissing62(db, table, column, definition) {
|
|
|
29138
29130
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
29139
29131
|
}
|
|
29140
29132
|
}
|
|
29141
|
-
function
|
|
29133
|
+
function up182(db) {
|
|
29142
29134
|
db.exec(`
|
|
29143
29135
|
CREATE TABLE IF NOT EXISTS ingestion_jobs (
|
|
29144
29136
|
id TEXT PRIMARY KEY,
|
|
@@ -29164,7 +29156,7 @@ function up172(db) {
|
|
|
29164
29156
|
addColumnIfMissing62(db, "memories", "source_path", "TEXT");
|
|
29165
29157
|
addColumnIfMissing62(db, "memories", "source_section", "TEXT");
|
|
29166
29158
|
}
|
|
29167
|
-
function
|
|
29159
|
+
function up192(db) {
|
|
29168
29160
|
db.exec(`
|
|
29169
29161
|
CREATE TABLE IF NOT EXISTS telemetry_events (
|
|
29170
29162
|
id TEXT PRIMARY KEY,
|
|
@@ -29189,7 +29181,7 @@ function addColumnIfMissing72(db, table, column, definition) {
|
|
|
29189
29181
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
29190
29182
|
}
|
|
29191
29183
|
}
|
|
29192
|
-
function
|
|
29184
|
+
function up202(db) {
|
|
29193
29185
|
db.exec(`
|
|
29194
29186
|
CREATE TABLE IF NOT EXISTS session_memories (
|
|
29195
29187
|
id TEXT PRIMARY KEY,
|
|
@@ -29216,7 +29208,7 @@ function up192(db) {
|
|
|
29216
29208
|
addColumnIfMissing72(db, "session_scores", "confidence", "REAL");
|
|
29217
29209
|
addColumnIfMissing72(db, "session_scores", "continuity_reasoning", "TEXT");
|
|
29218
29210
|
}
|
|
29219
|
-
function
|
|
29211
|
+
function up212(db) {
|
|
29220
29212
|
db.exec(`
|
|
29221
29213
|
CREATE TABLE IF NOT EXISTS session_checkpoints (
|
|
29222
29214
|
id TEXT PRIMARY KEY,
|
|
@@ -29238,7 +29230,7 @@ function up202(db) {
|
|
|
29238
29230
|
ON session_checkpoints(project_normalized, created_at DESC);
|
|
29239
29231
|
`);
|
|
29240
29232
|
}
|
|
29241
|
-
function
|
|
29233
|
+
function up222(db) {
|
|
29242
29234
|
const cols = db.prepare("PRAGMA table_info(scheduled_tasks)").all();
|
|
29243
29235
|
const colNames = new Set(cols.flatMap((c3) => typeof c3.name === "string" ? [c3.name] : []));
|
|
29244
29236
|
if (!colNames.has("skill_name")) {
|
|
@@ -29249,7 +29241,7 @@ function up212(db) {
|
|
|
29249
29241
|
CHECK (skill_mode IN ('inject', 'slash') OR skill_mode IS NULL)`);
|
|
29250
29242
|
}
|
|
29251
29243
|
}
|
|
29252
|
-
function
|
|
29244
|
+
function up232(db) {
|
|
29253
29245
|
const existing = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='skill_meta'").get();
|
|
29254
29246
|
if (existing)
|
|
29255
29247
|
return;
|
|
@@ -29281,7 +29273,7 @@ function up222(db) {
|
|
|
29281
29273
|
CREATE INDEX idx_skill_meta_source ON skill_meta(source);
|
|
29282
29274
|
`);
|
|
29283
29275
|
}
|
|
29284
|
-
function
|
|
29276
|
+
function up242(db) {
|
|
29285
29277
|
const entityCols = db.prepare("PRAGMA table_info(entities)").all();
|
|
29286
29278
|
const entityColNames = new Set(entityCols.flatMap((c3) => typeof c3.name === "string" ? [c3.name] : []));
|
|
29287
29279
|
if (!entityColNames.has("agent_id")) {
|
|
@@ -29366,13 +29358,13 @@ function addColumnIfMissing82(db, table, column, definition) {
|
|
|
29366
29358
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
29367
29359
|
}
|
|
29368
29360
|
}
|
|
29369
|
-
function
|
|
29361
|
+
function up252(db) {
|
|
29370
29362
|
addColumnIfMissing82(db, "session_memories", "entity_slot", "INTEGER");
|
|
29371
29363
|
addColumnIfMissing82(db, "session_memories", "aspect_slot", "INTEGER");
|
|
29372
29364
|
addColumnIfMissing82(db, "session_memories", "is_constraint", "INTEGER NOT NULL DEFAULT 0");
|
|
29373
29365
|
addColumnIfMissing82(db, "session_memories", "structural_density", "INTEGER");
|
|
29374
29366
|
}
|
|
29375
|
-
function
|
|
29367
|
+
function up262(db) {
|
|
29376
29368
|
const columns = db.prepare("PRAGMA table_info(session_checkpoints)").all();
|
|
29377
29369
|
const columnNames = new Set(columns.flatMap((column) => typeof column.name === "string" ? [column.name] : []));
|
|
29378
29370
|
if (!columnNames.has("focal_entity_ids")) {
|
|
@@ -29397,25 +29389,25 @@ function addColumnIfMissing92(db, table, column, definition) {
|
|
|
29397
29389
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
29398
29390
|
}
|
|
29399
29391
|
}
|
|
29400
|
-
function
|
|
29392
|
+
function up272(db) {
|
|
29401
29393
|
addColumnIfMissing92(db, "entities", "pinned", "INTEGER NOT NULL DEFAULT 0");
|
|
29402
29394
|
addColumnIfMissing92(db, "entities", "pinned_at", "TEXT");
|
|
29403
29395
|
db.exec("CREATE INDEX IF NOT EXISTS idx_entities_pinned ON entities(agent_id, pinned, pinned_at DESC)");
|
|
29404
29396
|
}
|
|
29405
|
-
function up272(_db) {}
|
|
29406
29397
|
function up282(_db) {}
|
|
29398
|
+
function up292(_db) {}
|
|
29407
29399
|
function addColumnIfMissing102(db, table, column, definition) {
|
|
29408
29400
|
const cols = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
29409
29401
|
if (!cols.some((c3) => c3.name === column)) {
|
|
29410
29402
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
29411
29403
|
}
|
|
29412
29404
|
}
|
|
29413
|
-
function
|
|
29405
|
+
function up302(db) {
|
|
29414
29406
|
addColumnIfMissing102(db, "session_memories", "agent_relevance_score", "REAL");
|
|
29415
29407
|
addColumnIfMissing102(db, "session_memories", "agent_feedback_count", "INTEGER DEFAULT 0");
|
|
29416
29408
|
}
|
|
29417
|
-
function
|
|
29418
|
-
function
|
|
29409
|
+
function up312(_db) {}
|
|
29410
|
+
function up322(db) {
|
|
29419
29411
|
db.exec(`
|
|
29420
29412
|
UPDATE entities
|
|
29421
29413
|
SET canonical_name = REPLACE(REPLACE(REPLACE(
|
|
@@ -29424,7 +29416,7 @@ function up312(db) {
|
|
|
29424
29416
|
WHERE canonical_name IS NULL
|
|
29425
29417
|
`);
|
|
29426
29418
|
}
|
|
29427
|
-
function
|
|
29419
|
+
function up332(db) {
|
|
29428
29420
|
db.exec(`
|
|
29429
29421
|
CREATE TABLE IF NOT EXISTS memories_cold (
|
|
29430
29422
|
archive_id TEXT PRIMARY KEY,
|
|
@@ -29461,7 +29453,7 @@ function up322(db) {
|
|
|
29461
29453
|
CREATE INDEX IF NOT EXISTS idx_cold_source ON memories_cold(cold_source_id);
|
|
29462
29454
|
`);
|
|
29463
29455
|
}
|
|
29464
|
-
function
|
|
29456
|
+
function up342(db) {
|
|
29465
29457
|
db.exec(`
|
|
29466
29458
|
CREATE TABLE IF NOT EXISTS session_summaries (
|
|
29467
29459
|
id TEXT PRIMARY KEY,
|
|
@@ -29506,7 +29498,7 @@ function up332(db) {
|
|
|
29506
29498
|
WHERE session_key IS NOT NULL;
|
|
29507
29499
|
`);
|
|
29508
29500
|
}
|
|
29509
|
-
function
|
|
29501
|
+
function up352(db) {
|
|
29510
29502
|
db.exec(`
|
|
29511
29503
|
CREATE TABLE IF NOT EXISTS memory_jobs_new (
|
|
29512
29504
|
id TEXT PRIMARY KEY,
|
|
@@ -29551,7 +29543,7 @@ function up342(db) {
|
|
|
29551
29543
|
ON memory_jobs(failed_at);
|
|
29552
29544
|
`);
|
|
29553
29545
|
}
|
|
29554
|
-
function
|
|
29546
|
+
function up362(db) {
|
|
29555
29547
|
const depCols = db.prepare("PRAGMA table_info(entity_dependencies)").all();
|
|
29556
29548
|
if (!depCols.some((c3) => c3.name === "reason")) {
|
|
29557
29549
|
db.exec("ALTER TABLE entity_dependencies ADD COLUMN reason TEXT");
|
|
@@ -29561,7 +29553,7 @@ function up352(db) {
|
|
|
29561
29553
|
db.exec("ALTER TABLE entities ADD COLUMN last_synthesized_at TEXT");
|
|
29562
29554
|
}
|
|
29563
29555
|
}
|
|
29564
|
-
function
|
|
29556
|
+
function up372(db) {
|
|
29565
29557
|
const cols = db.prepare("PRAGMA table_info(embeddings)").all();
|
|
29566
29558
|
if (cols.length === 0)
|
|
29567
29559
|
return;
|
|
@@ -29569,14 +29561,14 @@ function up362(db) {
|
|
|
29569
29561
|
db.exec("ALTER TABLE embeddings ADD COLUMN vector BLOB");
|
|
29570
29562
|
}
|
|
29571
29563
|
}
|
|
29572
|
-
function
|
|
29564
|
+
function up382(db) {
|
|
29573
29565
|
const cols = db.prepare("PRAGMA table_info(memories)").all();
|
|
29574
29566
|
if (!cols.some((c3) => c3.name === "scope")) {
|
|
29575
29567
|
db.exec("ALTER TABLE memories ADD COLUMN scope TEXT DEFAULT NULL");
|
|
29576
29568
|
}
|
|
29577
29569
|
db.exec("CREATE INDEX IF NOT EXISTS idx_memories_scope ON memories(scope) WHERE scope IS NOT NULL");
|
|
29578
29570
|
}
|
|
29579
|
-
function
|
|
29571
|
+
function up392(db) {
|
|
29580
29572
|
db.exec("DROP INDEX IF EXISTS idx_memories_content_hash_unique");
|
|
29581
29573
|
db.exec(`
|
|
29582
29574
|
CREATE UNIQUE INDEX idx_memories_content_hash_unique
|
|
@@ -29584,7 +29576,7 @@ function up382(db) {
|
|
|
29584
29576
|
WHERE content_hash IS NOT NULL AND is_deleted = 0
|
|
29585
29577
|
`);
|
|
29586
29578
|
}
|
|
29587
|
-
function
|
|
29579
|
+
function up402(db) {
|
|
29588
29580
|
db.exec(`
|
|
29589
29581
|
CREATE VIRTUAL TABLE IF NOT EXISTS entities_fts USING fts5(
|
|
29590
29582
|
name, canonical_name,
|
|
@@ -29616,13 +29608,13 @@ function up392(db) {
|
|
|
29616
29608
|
END
|
|
29617
29609
|
`);
|
|
29618
29610
|
}
|
|
29619
|
-
function
|
|
29611
|
+
function up412(db) {
|
|
29620
29612
|
const cols = db.prepare("PRAGMA table_info(entity_dependencies)").all();
|
|
29621
29613
|
if (!cols.some((c3) => c3.name === "confidence")) {
|
|
29622
29614
|
db.exec("ALTER TABLE entity_dependencies ADD COLUMN confidence REAL DEFAULT 0.7");
|
|
29623
29615
|
}
|
|
29624
29616
|
}
|
|
29625
|
-
function
|
|
29617
|
+
function up422(db) {
|
|
29626
29618
|
db.exec(`
|
|
29627
29619
|
CREATE TABLE IF NOT EXISTS entity_communities (
|
|
29628
29620
|
id TEXT PRIMARY KEY,
|
|
@@ -29640,7 +29632,7 @@ function up412(db) {
|
|
|
29640
29632
|
db.exec("ALTER TABLE entities ADD COLUMN community_id TEXT REFERENCES entity_communities(id)");
|
|
29641
29633
|
}
|
|
29642
29634
|
}
|
|
29643
|
-
function
|
|
29635
|
+
function up432(db) {
|
|
29644
29636
|
db.exec(`
|
|
29645
29637
|
CREATE TABLE IF NOT EXISTS memory_hints (
|
|
29646
29638
|
id TEXT PRIMARY KEY,
|
|
@@ -29680,7 +29672,7 @@ function up422(db) {
|
|
|
29680
29672
|
END
|
|
29681
29673
|
`);
|
|
29682
29674
|
}
|
|
29683
|
-
function
|
|
29675
|
+
function up442(db) {
|
|
29684
29676
|
db.exec(`
|
|
29685
29677
|
DELETE FROM entity_dependencies
|
|
29686
29678
|
WHERE id NOT IN (
|
|
@@ -29698,7 +29690,7 @@ function up432(db) {
|
|
|
29698
29690
|
)
|
|
29699
29691
|
`);
|
|
29700
29692
|
}
|
|
29701
|
-
function
|
|
29693
|
+
function up452(db) {
|
|
29702
29694
|
db.exec(`
|
|
29703
29695
|
CREATE TABLE IF NOT EXISTS session_transcripts (
|
|
29704
29696
|
session_key TEXT PRIMARY KEY,
|
|
@@ -29721,7 +29713,7 @@ function addColumnIfMissing112(db, table, column, definition) {
|
|
|
29721
29713
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
29722
29714
|
}
|
|
29723
29715
|
}
|
|
29724
|
-
function
|
|
29716
|
+
function up462(db) {
|
|
29725
29717
|
addColumnIfMissing112(db, "session_memories", "path_json", "TEXT");
|
|
29726
29718
|
db.exec(`
|
|
29727
29719
|
CREATE TABLE IF NOT EXISTS path_feedback_events (
|
|
@@ -29796,7 +29788,7 @@ function addColumnIfMissing122(db, table, column, definition) {
|
|
|
29796
29788
|
return;
|
|
29797
29789
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
29798
29790
|
}
|
|
29799
|
-
function
|
|
29791
|
+
function up472(db) {
|
|
29800
29792
|
addColumnIfMissing122(db, "session_memories", "entity_slot", "INTEGER");
|
|
29801
29793
|
addColumnIfMissing122(db, "session_memories", "aspect_slot", "INTEGER");
|
|
29802
29794
|
addColumnIfMissing122(db, "session_memories", "is_constraint", "INTEGER NOT NULL DEFAULT 0");
|
|
@@ -29884,7 +29876,7 @@ function addColumnIfMissing132(db, table, column, definition) {
|
|
|
29884
29876
|
return;
|
|
29885
29877
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
29886
29878
|
}
|
|
29887
|
-
function
|
|
29879
|
+
function up482(db) {
|
|
29888
29880
|
db.exec(`
|
|
29889
29881
|
CREATE TABLE IF NOT EXISTS agents (
|
|
29890
29882
|
id TEXT PRIMARY KEY,
|
|
@@ -29913,7 +29905,7 @@ function addColumnIfMissing142(db, table, column, definition) {
|
|
|
29913
29905
|
return;
|
|
29914
29906
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
29915
29907
|
}
|
|
29916
|
-
function
|
|
29908
|
+
function up492(db) {
|
|
29917
29909
|
addColumnIfMissing142(db, "session_summaries", "source_type", "TEXT");
|
|
29918
29910
|
addColumnIfMissing142(db, "session_summaries", "source_ref", "TEXT");
|
|
29919
29911
|
addColumnIfMissing142(db, "session_summaries", "meta_json", "TEXT");
|
|
@@ -29939,7 +29931,7 @@ function addColumnIfMissing152(db, table, column, definition) {
|
|
|
29939
29931
|
return;
|
|
29940
29932
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
29941
29933
|
}
|
|
29942
|
-
function
|
|
29934
|
+
function up502(db) {
|
|
29943
29935
|
addColumnIfMissing152(db, "session_transcripts", "updated_at", "TEXT");
|
|
29944
29936
|
addColumnIfMissing152(db, "summary_jobs", "agent_id", "TEXT NOT NULL DEFAULT 'default'");
|
|
29945
29937
|
addColumnIfMissing152(db, "session_scores", "agent_id", "TEXT NOT NULL DEFAULT 'default'");
|
|
@@ -30010,7 +30002,7 @@ function up492(db) {
|
|
|
30010
30002
|
ON memory_md_heads(lease_expires_at);
|
|
30011
30003
|
`);
|
|
30012
30004
|
}
|
|
30013
|
-
function
|
|
30005
|
+
function up512(db) {
|
|
30014
30006
|
db.exec(`
|
|
30015
30007
|
DROP INDEX IF EXISTS idx_summaries_session_depth;
|
|
30016
30008
|
|
|
@@ -30071,7 +30063,7 @@ function up502(db) {
|
|
|
30071
30063
|
AND COALESCE(source_type, 'summary') = 'summary';
|
|
30072
30064
|
`);
|
|
30073
30065
|
}
|
|
30074
|
-
function
|
|
30066
|
+
function up522(db) {
|
|
30075
30067
|
db.exec(`
|
|
30076
30068
|
DROP TRIGGER IF EXISTS session_transcripts_fts_ai;
|
|
30077
30069
|
DROP TRIGGER IF EXISTS session_transcripts_fts_ad;
|
|
@@ -30169,7 +30161,7 @@ function up512(db) {
|
|
|
30169
30161
|
AND COALESCE(source_type, 'summary') = 'summary';
|
|
30170
30162
|
`);
|
|
30171
30163
|
}
|
|
30172
|
-
function
|
|
30164
|
+
function up532(db) {
|
|
30173
30165
|
db.exec(`
|
|
30174
30166
|
CREATE TABLE IF NOT EXISTS memory_thread_heads (
|
|
30175
30167
|
agent_id TEXT NOT NULL DEFAULT 'default',
|
|
@@ -30287,7 +30279,7 @@ function up522(db) {
|
|
|
30287
30279
|
WHERE excluded.latest_at >= memory_thread_heads.latest_at;
|
|
30288
30280
|
`);
|
|
30289
30281
|
}
|
|
30290
|
-
function
|
|
30282
|
+
function up542(db) {
|
|
30291
30283
|
db.exec(`
|
|
30292
30284
|
CREATE TABLE IF NOT EXISTS session_extract_cursors (
|
|
30293
30285
|
session_key TEXT NOT NULL,
|
|
@@ -30304,7 +30296,7 @@ function hasTable5(db, name) {
|
|
|
30304
30296
|
WHERE type = 'table' AND name = ?
|
|
30305
30297
|
LIMIT 1`).get(name) !== undefined;
|
|
30306
30298
|
}
|
|
30307
|
-
function
|
|
30299
|
+
function up552(db) {
|
|
30308
30300
|
db.exec(`
|
|
30309
30301
|
CREATE TABLE IF NOT EXISTS entity_dependency_history (
|
|
30310
30302
|
id TEXT PRIMARY KEY,
|
|
@@ -30474,7 +30466,7 @@ function addColumnIfMissing162(db, table, column, definition) {
|
|
|
30474
30466
|
return;
|
|
30475
30467
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
30476
30468
|
}
|
|
30477
|
-
function
|
|
30469
|
+
function up562(db) {
|
|
30478
30470
|
addColumnIfMissing162(db, "summary_jobs", "session_id", "TEXT");
|
|
30479
30471
|
addColumnIfMissing162(db, "summary_jobs", "trigger", "TEXT NOT NULL DEFAULT 'session_end'");
|
|
30480
30472
|
addColumnIfMissing162(db, "summary_jobs", "captured_at", "TEXT");
|
|
@@ -30566,24 +30558,8 @@ function up552(db) {
|
|
|
30566
30558
|
VALUES ('rebuild');
|
|
30567
30559
|
`);
|
|
30568
30560
|
}
|
|
30569
|
-
function
|
|
30570
|
-
|
|
30571
|
-
CREATE TABLE IF NOT EXISTS mcp_invocations (
|
|
30572
|
-
id TEXT PRIMARY KEY,
|
|
30573
|
-
server_id TEXT NOT NULL,
|
|
30574
|
-
tool_name TEXT NOT NULL,
|
|
30575
|
-
agent_id TEXT NOT NULL DEFAULT 'default',
|
|
30576
|
-
source TEXT NOT NULL CHECK(source IN ('cli','agent','mcp','dashboard')),
|
|
30577
|
-
latency_ms INTEGER NOT NULL,
|
|
30578
|
-
success INTEGER NOT NULL DEFAULT 1,
|
|
30579
|
-
error_text TEXT,
|
|
30580
|
-
created_at TEXT NOT NULL DEFAULT (datetime('now'))
|
|
30581
|
-
);
|
|
30582
|
-
CREATE INDEX IF NOT EXISTS idx_mcp_inv_server ON mcp_invocations(server_id, created_at);
|
|
30583
|
-
CREATE INDEX IF NOT EXISTS idx_mcp_inv_agent ON mcp_invocations(agent_id, created_at);
|
|
30584
|
-
`);
|
|
30585
|
-
}
|
|
30586
|
-
function up572(db) {
|
|
30561
|
+
function up572(_db) {}
|
|
30562
|
+
function up582(db) {
|
|
30587
30563
|
db.exec(`
|
|
30588
30564
|
CREATE TABLE IF NOT EXISTS skill_invocations (
|
|
30589
30565
|
id TEXT PRIMARY KEY,
|
|
@@ -30599,7 +30575,7 @@ function up572(db) {
|
|
|
30599
30575
|
CREATE INDEX IF NOT EXISTS idx_skill_inv_agent ON skill_invocations(agent_id, created_at);
|
|
30600
30576
|
`);
|
|
30601
30577
|
}
|
|
30602
|
-
function
|
|
30578
|
+
function up592(db) {
|
|
30603
30579
|
db.exec(`
|
|
30604
30580
|
CREATE TABLE IF NOT EXISTS task_scope_hints (
|
|
30605
30581
|
task_id TEXT PRIMARY KEY REFERENCES scheduled_tasks(id) ON DELETE CASCADE,
|
|
@@ -30630,7 +30606,7 @@ function up582(db) {
|
|
|
30630
30606
|
ON task_scope_hints(agent_id, updated_at);
|
|
30631
30607
|
`);
|
|
30632
30608
|
}
|
|
30633
|
-
function
|
|
30609
|
+
function up602(db) {
|
|
30634
30610
|
db.exec(`
|
|
30635
30611
|
CREATE TABLE IF NOT EXISTS dreaming_state (
|
|
30636
30612
|
agent_id TEXT PRIMARY KEY NOT NULL,
|
|
@@ -30673,7 +30649,7 @@ function ensureMemoriesScopeColumns3(db) {
|
|
|
30673
30649
|
if (!names.has("scope"))
|
|
30674
30650
|
db.exec("ALTER TABLE memories ADD COLUMN scope TEXT");
|
|
30675
30651
|
}
|
|
30676
|
-
function
|
|
30652
|
+
function up612(db) {
|
|
30677
30653
|
ensureMemoriesScopeColumns3(db);
|
|
30678
30654
|
db.exec("DROP INDEX IF EXISTS idx_memories_content_hash_unique");
|
|
30679
30655
|
db.exec(`
|
|
@@ -30686,20 +30662,20 @@ function up602(db) {
|
|
|
30686
30662
|
WHERE content_hash IS NOT NULL AND is_deleted = 0
|
|
30687
30663
|
`);
|
|
30688
30664
|
}
|
|
30689
|
-
function
|
|
30665
|
+
function up622(db) {
|
|
30690
30666
|
const sql = readMemoriesFtsSql2(db);
|
|
30691
30667
|
if (sql !== null && !memoriesFtsNeedsTokenizerRepair2(sql))
|
|
30692
30668
|
return;
|
|
30693
30669
|
recreateMemoriesFts2(db);
|
|
30694
30670
|
}
|
|
30695
|
-
function
|
|
30671
|
+
function up632(db) {
|
|
30696
30672
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_entities_order
|
|
30697
30673
|
ON entities(agent_id, pinned DESC, pinned_at DESC, mentions DESC, updated_at DESC, name)`);
|
|
30698
30674
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_entities_extracted_mentions
|
|
30699
30675
|
ON entities(entity_type, mentions)
|
|
30700
30676
|
WHERE entity_type = 'extracted'`);
|
|
30701
30677
|
}
|
|
30702
|
-
function
|
|
30678
|
+
function up642(db) {
|
|
30703
30679
|
const cols = db.prepare("PRAGMA table_info(entity_attributes)").all();
|
|
30704
30680
|
if (!cols.some((col) => col.name === "claim_key")) {
|
|
30705
30681
|
db.exec("ALTER TABLE entity_attributes ADD COLUMN claim_key TEXT");
|
|
@@ -30708,7 +30684,7 @@ function up632(db) {
|
|
|
30708
30684
|
ON entity_attributes(agent_id, aspect_id, claim_key, status)
|
|
30709
30685
|
WHERE claim_key IS NOT NULL`);
|
|
30710
30686
|
}
|
|
30711
|
-
function
|
|
30687
|
+
function up652(db) {
|
|
30712
30688
|
const cols = db.prepare("PRAGMA table_info(entity_attributes)").all();
|
|
30713
30689
|
if (!cols.some((col) => col.name === "group_key")) {
|
|
30714
30690
|
db.exec("ALTER TABLE entity_attributes ADD COLUMN group_key TEXT");
|
|
@@ -30720,13 +30696,13 @@ function up642(db) {
|
|
|
30720
30696
|
ON entity_attributes(agent_id, aspect_id, group_key, claim_key, status)
|
|
30721
30697
|
WHERE claim_key IS NOT NULL`);
|
|
30722
30698
|
}
|
|
30723
|
-
function
|
|
30699
|
+
function up662(db) {
|
|
30724
30700
|
const cols = db.prepare("PRAGMA table_info(memory_artifacts)").all();
|
|
30725
30701
|
if (cols.some((col) => col.name === "source_mtime_ms"))
|
|
30726
30702
|
return;
|
|
30727
30703
|
db.exec("ALTER TABLE memory_artifacts ADD COLUMN source_mtime_ms REAL");
|
|
30728
30704
|
}
|
|
30729
|
-
function
|
|
30705
|
+
function up672(db) {
|
|
30730
30706
|
const cols = db.prepare("PRAGMA table_info(memory_artifacts)").all();
|
|
30731
30707
|
const names = new Set(cols.map((col) => col.name));
|
|
30732
30708
|
if (!names.has("is_deleted")) {
|
|
@@ -30740,7 +30716,7 @@ function up662(db) {
|
|
|
30740
30716
|
ON memory_artifacts(agent_id, is_deleted, deleted_at)
|
|
30741
30717
|
`);
|
|
30742
30718
|
}
|
|
30743
|
-
function
|
|
30719
|
+
function up682(db) {
|
|
30744
30720
|
db.exec("DROP TRIGGER IF EXISTS memories_au");
|
|
30745
30721
|
db.exec(`
|
|
30746
30722
|
CREATE TRIGGER IF NOT EXISTS memories_au AFTER UPDATE OF content ON memories BEGIN
|
|
@@ -30758,7 +30734,7 @@ function addColumnIfMissing172(db, table, column, definition) {
|
|
|
30758
30734
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
30759
30735
|
}
|
|
30760
30736
|
}
|
|
30761
|
-
function
|
|
30737
|
+
function up692(db) {
|
|
30762
30738
|
for (const table of ["entities", "entity_communities", "entity_attributes", "entity_dependencies"]) {
|
|
30763
30739
|
addColumnIfMissing172(db, table, "source_id", "TEXT");
|
|
30764
30740
|
addColumnIfMissing172(db, table, "source_kind", "TEXT");
|
|
@@ -30778,7 +30754,7 @@ function hasColumn72(db, table, column) {
|
|
|
30778
30754
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
30779
30755
|
return rows.some((row) => row.name === column);
|
|
30780
30756
|
}
|
|
30781
|
-
function
|
|
30757
|
+
function up702(db) {
|
|
30782
30758
|
if (!hasTable22(db, "embeddings"))
|
|
30783
30759
|
return;
|
|
30784
30760
|
if (!hasColumn72(db, "embeddings", "agent_id")) {
|
|
@@ -30786,7 +30762,7 @@ function up692(db) {
|
|
|
30786
30762
|
}
|
|
30787
30763
|
db.exec("CREATE INDEX IF NOT EXISTS idx_embeddings_agent_source ON embeddings(agent_id, source_type, source_id)");
|
|
30788
30764
|
}
|
|
30789
|
-
function
|
|
30765
|
+
function up712(db) {
|
|
30790
30766
|
db.exec(`
|
|
30791
30767
|
CREATE TABLE IF NOT EXISTS memory_search_telemetry (
|
|
30792
30768
|
id TEXT PRIMARY KEY,
|
|
@@ -30827,7 +30803,7 @@ function addColumnIfMissing182(db, table, column, definition) {
|
|
|
30827
30803
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
30828
30804
|
}
|
|
30829
30805
|
}
|
|
30830
|
-
function
|
|
30806
|
+
function up722(db) {
|
|
30831
30807
|
db.exec(`
|
|
30832
30808
|
CREATE TABLE IF NOT EXISTS ontology_proposals (
|
|
30833
30809
|
id TEXT PRIMARY KEY,
|
|
@@ -30870,7 +30846,7 @@ function up712(db) {
|
|
|
30870
30846
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_${table}_proposal ON ${table}(agent_id, proposal_id)`);
|
|
30871
30847
|
}
|
|
30872
30848
|
}
|
|
30873
|
-
function
|
|
30849
|
+
function up732(db) {
|
|
30874
30850
|
db.exec(`
|
|
30875
30851
|
CREATE TABLE IF NOT EXISTS daily_reflections (
|
|
30876
30852
|
id TEXT PRIMARY KEY,
|
|
@@ -30897,7 +30873,7 @@ function up722(db) {
|
|
|
30897
30873
|
WHERE content_key IS NOT NULL;
|
|
30898
30874
|
`);
|
|
30899
30875
|
}
|
|
30900
|
-
function
|
|
30876
|
+
function up742(db) {
|
|
30901
30877
|
const cols = db.prepare("PRAGMA table_info(daily_reflections)").all();
|
|
30902
30878
|
const colNames = new Set(cols.flatMap((c3) => typeof c3.name === "string" ? [c3.name] : []));
|
|
30903
30879
|
if (!colNames.has("content_key")) {
|
|
@@ -30934,7 +30910,7 @@ function backfillVersionRoots2(db) {
|
|
|
30934
30910
|
WHERE version_root_id IS NULL
|
|
30935
30911
|
`);
|
|
30936
30912
|
}
|
|
30937
|
-
function
|
|
30913
|
+
function up752(db) {
|
|
30938
30914
|
for (const table of ["entities", "entity_aspects", "entity_dependencies"]) {
|
|
30939
30915
|
addColumnIfMissing192(db, table, "status", "TEXT NOT NULL DEFAULT 'active'");
|
|
30940
30916
|
addColumnIfMissing192(db, table, "archived_at", "TEXT");
|
|
@@ -30969,7 +30945,7 @@ function up742(db) {
|
|
|
30969
30945
|
ON entity_aspects(agent_id, proposal_id);
|
|
30970
30946
|
`);
|
|
30971
30947
|
}
|
|
30972
|
-
function
|
|
30948
|
+
function up762(db) {
|
|
30973
30949
|
db.exec(`
|
|
30974
30950
|
CREATE TABLE IF NOT EXISTS epistemic_assertions (
|
|
30975
30951
|
id TEXT PRIMARY KEY,
|
|
@@ -31025,7 +31001,7 @@ function ensureMemoriesScopeColumns22(db) {
|
|
|
31025
31001
|
if (!names.has("runtime_path"))
|
|
31026
31002
|
db.exec("ALTER TABLE memories ADD COLUMN runtime_path TEXT");
|
|
31027
31003
|
}
|
|
31028
|
-
function
|
|
31004
|
+
function up772(db) {
|
|
31029
31005
|
ensureMemoriesScopeColumns22(db);
|
|
31030
31006
|
db.exec("DROP INDEX IF EXISTS idx_memories_idempotency_key");
|
|
31031
31007
|
db.exec(`
|
|
@@ -31039,7 +31015,7 @@ function up762(db) {
|
|
|
31039
31015
|
WHERE idempotency_key IS NOT NULL AND is_deleted = 0
|
|
31040
31016
|
`);
|
|
31041
31017
|
}
|
|
31042
|
-
function
|
|
31018
|
+
function up782(db) {
|
|
31043
31019
|
db.exec(`
|
|
31044
31020
|
CREATE TABLE IF NOT EXISTS session_context_epochs (
|
|
31045
31021
|
session_key TEXT NOT NULL,
|
|
@@ -31074,7 +31050,7 @@ function up772(db) {
|
|
|
31074
31050
|
ON session_recall_events(item_kind, item_id, created_at DESC);
|
|
31075
31051
|
`);
|
|
31076
31052
|
}
|
|
31077
|
-
function
|
|
31053
|
+
function up792(db) {
|
|
31078
31054
|
db.exec(`
|
|
31079
31055
|
CREATE TABLE IF NOT EXISTS aggregate_memory_sources (
|
|
31080
31056
|
aggregate_memory_id TEXT NOT NULL,
|
|
@@ -31093,7 +31069,7 @@ function addColumnIfMissing202(db, table, column, definition) {
|
|
|
31093
31069
|
return;
|
|
31094
31070
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
31095
31071
|
}
|
|
31096
|
-
function
|
|
31072
|
+
function up802(db) {
|
|
31097
31073
|
addColumnIfMissing202(db, "memory_artifacts", "source_id", "TEXT");
|
|
31098
31074
|
addColumnIfMissing202(db, "memory_artifacts", "source_root", "TEXT");
|
|
31099
31075
|
addColumnIfMissing202(db, "memory_artifacts", "source_external_id", "TEXT");
|
|
@@ -31106,7 +31082,7 @@ function up792(db) {
|
|
|
31106
31082
|
ON memory_artifacts(agent_id, source_id, source_root);
|
|
31107
31083
|
`);
|
|
31108
31084
|
}
|
|
31109
|
-
function
|
|
31085
|
+
function up812(db) {
|
|
31110
31086
|
db.exec(`
|
|
31111
31087
|
CREATE TABLE IF NOT EXISTS temporal_edges (
|
|
31112
31088
|
id TEXT PRIMARY KEY,
|
|
@@ -31129,7 +31105,7 @@ function up802(db) {
|
|
|
31129
31105
|
ON temporal_edges(agent_id, subject_type, subject_id);
|
|
31130
31106
|
`);
|
|
31131
31107
|
}
|
|
31132
|
-
function
|
|
31108
|
+
function up822(db) {
|
|
31133
31109
|
db.exec(`
|
|
31134
31110
|
CREATE TABLE IF NOT EXISTS entity_aliases (
|
|
31135
31111
|
id TEXT PRIMARY KEY,
|
|
@@ -31153,7 +31129,7 @@ function up812(db) {
|
|
|
31153
31129
|
ON entity_aliases(agent_id, canonical_alias, status);
|
|
31154
31130
|
`);
|
|
31155
31131
|
}
|
|
31156
|
-
function
|
|
31132
|
+
function up832(db) {
|
|
31157
31133
|
db.exec(`
|
|
31158
31134
|
CREATE TABLE IF NOT EXISTS api_keys (
|
|
31159
31135
|
id TEXT PRIMARY KEY,
|
|
@@ -31181,7 +31157,7 @@ function up822(db) {
|
|
|
31181
31157
|
ON api_keys(connector, harness);
|
|
31182
31158
|
`);
|
|
31183
31159
|
}
|
|
31184
|
-
function
|
|
31160
|
+
function up842(db) {
|
|
31185
31161
|
db.exec(`
|
|
31186
31162
|
CREATE TABLE IF NOT EXISTS transcript_capture_jobs (
|
|
31187
31163
|
id TEXT PRIMARY KEY,
|
|
@@ -31216,7 +31192,7 @@ function hasColumn102(db, table, column) {
|
|
|
31216
31192
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
31217
31193
|
return rows.some((row) => row.name === column);
|
|
31218
31194
|
}
|
|
31219
|
-
function
|
|
31195
|
+
function up852(db) {
|
|
31220
31196
|
if (!hasColumn102(db, "documents", "agent_id")) {
|
|
31221
31197
|
db.exec("ALTER TABLE documents ADD COLUMN agent_id TEXT NOT NULL DEFAULT 'default'");
|
|
31222
31198
|
}
|
|
@@ -31302,7 +31278,7 @@ function up842(db) {
|
|
|
31302
31278
|
db.exec("CREATE INDEX IF NOT EXISTS idx_documents_agent_project ON documents(agent_id, project)");
|
|
31303
31279
|
db.exec("CREATE INDEX IF NOT EXISTS idx_documents_source_scope ON documents(source_url, agent_id, project)");
|
|
31304
31280
|
}
|
|
31305
|
-
function
|
|
31281
|
+
function up862(db) {
|
|
31306
31282
|
db.exec(`
|
|
31307
31283
|
CREATE TABLE IF NOT EXISTS aggregate_evidence_sources (
|
|
31308
31284
|
aggregate_memory_id TEXT NOT NULL,
|
|
@@ -31324,7 +31300,7 @@ function hasColumn112(db, table, column) {
|
|
|
31324
31300
|
return rows.some((row) => row.name === column);
|
|
31325
31301
|
}
|
|
31326
31302
|
var COLUMNS3 = ["harness", "session_id", "tool_use_id", "cwd", "origin", "args"];
|
|
31327
|
-
function
|
|
31303
|
+
function up872(db) {
|
|
31328
31304
|
for (const column of COLUMNS3) {
|
|
31329
31305
|
if (!hasColumn112(db, "skill_invocations", column)) {
|
|
31330
31306
|
db.exec(`ALTER TABLE skill_invocations ADD COLUMN ${column} TEXT`);
|
|
@@ -31405,7 +31381,7 @@ function documentScopeColumnsPreservingExisting2(db) {
|
|
|
31405
31381
|
`);
|
|
31406
31382
|
}
|
|
31407
31383
|
try {
|
|
31408
|
-
|
|
31384
|
+
up852(db);
|
|
31409
31385
|
if (preserveAgentId) {
|
|
31410
31386
|
db.exec(`
|
|
31411
31387
|
UPDATE documents
|
|
@@ -31425,12 +31401,12 @@ function documentScopeColumnsPreservingExisting2(db) {
|
|
|
31425
31401
|
db.exec("DROP TABLE IF EXISTS temp.__signet_doc_project_guard");
|
|
31426
31402
|
}
|
|
31427
31403
|
}
|
|
31428
|
-
function
|
|
31429
|
-
|
|
31404
|
+
function up882(db) {
|
|
31405
|
+
up842(db);
|
|
31430
31406
|
if (hasTable32(db, "documents")) {
|
|
31431
31407
|
documentScopeColumnsPreservingExisting2(db);
|
|
31432
31408
|
}
|
|
31433
|
-
|
|
31409
|
+
up862(db);
|
|
31434
31410
|
addColumnIfMissing212(db, "memories", "superseded_by", "TEXT");
|
|
31435
31411
|
addColumnIfMissing212(db, "memories", "superseded_at", "TEXT");
|
|
31436
31412
|
addColumnIfMissing212(db, "memories", "superseded_reason", "TEXT");
|
|
@@ -31487,7 +31463,7 @@ function up872(db) {
|
|
|
31487
31463
|
AND ${sourceAgentId} = ${targetAgentId}
|
|
31488
31464
|
`);
|
|
31489
31465
|
}
|
|
31490
|
-
function
|
|
31466
|
+
function up892(db) {
|
|
31491
31467
|
db.exec(`
|
|
31492
31468
|
CREATE TABLE IF NOT EXISTS legacy_markdown_imports (
|
|
31493
31469
|
path TEXT PRIMARY KEY,
|
|
@@ -31517,7 +31493,7 @@ function up882(db) {
|
|
|
31517
31493
|
ON legacy_markdown_chunks(memory_id);
|
|
31518
31494
|
`);
|
|
31519
31495
|
}
|
|
31520
|
-
function
|
|
31496
|
+
function up902(db) {
|
|
31521
31497
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name IN ('relations', 'entity_dependencies')").all();
|
|
31522
31498
|
const tableNames = new Set(tables.map((r3) => String(r3.name)));
|
|
31523
31499
|
if (!tableNames.has("relations") || !tableNames.has("entity_dependencies"))
|
|
@@ -31576,7 +31552,7 @@ function addColumnIfMissing222(db, table, column, definition) {
|
|
|
31576
31552
|
return;
|
|
31577
31553
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
31578
31554
|
}
|
|
31579
|
-
function
|
|
31555
|
+
function up912(db) {
|
|
31580
31556
|
addColumnIfMissing222(db, "summary_jobs", "content_hash", "TEXT");
|
|
31581
31557
|
db.exec(`
|
|
31582
31558
|
CREATE INDEX IF NOT EXISTS idx_summary_jobs_agent_session_content_hash
|
|
@@ -31589,14 +31565,14 @@ function addColumnIfMissing232(db, table, column, definition) {
|
|
|
31589
31565
|
return;
|
|
31590
31566
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
31591
31567
|
}
|
|
31592
|
-
function
|
|
31568
|
+
function up922(db) {
|
|
31593
31569
|
addColumnIfMissing232(db, "summary_jobs", "boundary_reason", "TEXT");
|
|
31594
31570
|
db.exec(`
|
|
31595
31571
|
CREATE INDEX IF NOT EXISTS idx_summary_jobs_boundary_reason
|
|
31596
31572
|
ON summary_jobs(agent_id, session_key, boundary_reason)
|
|
31597
31573
|
`);
|
|
31598
31574
|
}
|
|
31599
|
-
function
|
|
31575
|
+
function up932(db) {
|
|
31600
31576
|
db.exec(`
|
|
31601
31577
|
CREATE TABLE IF NOT EXISTS transcript_recovery_files (
|
|
31602
31578
|
agent_id TEXT NOT NULL,
|
|
@@ -31614,7 +31590,7 @@ function up922(db) {
|
|
|
31614
31590
|
ON transcript_capture_jobs(agent_id, session_id, status);
|
|
31615
31591
|
`);
|
|
31616
31592
|
}
|
|
31617
|
-
function
|
|
31593
|
+
function up942(db) {
|
|
31618
31594
|
db.exec(`
|
|
31619
31595
|
CREATE TABLE IF NOT EXISTS job_cancellations (
|
|
31620
31596
|
id TEXT PRIMARY KEY,
|
|
@@ -31642,7 +31618,7 @@ function indexExists3(db, table, indexName) {
|
|
|
31642
31618
|
const rows = db.prepare(`PRAGMA index_list(${table})`).all();
|
|
31643
31619
|
return rows.some((row) => row.name === indexName);
|
|
31644
31620
|
}
|
|
31645
|
-
function
|
|
31621
|
+
function up952(db) {
|
|
31646
31622
|
db.exec(`
|
|
31647
31623
|
CREATE TABLE IF NOT EXISTS job_archive (
|
|
31648
31624
|
id TEXT PRIMARY KEY,
|
|
@@ -31669,7 +31645,7 @@ function indexExists22(db, table, indexName) {
|
|
|
31669
31645
|
const rows = db.prepare(`PRAGMA index_list(${table})`).all();
|
|
31670
31646
|
return rows.some((row) => row.name === indexName);
|
|
31671
31647
|
}
|
|
31672
|
-
function
|
|
31648
|
+
function up962(db) {
|
|
31673
31649
|
db.exec(`
|
|
31674
31650
|
CREATE TABLE IF NOT EXISTS embedding_index_state (
|
|
31675
31651
|
id INTEGER PRIMARY KEY CHECK (id = 1),
|
|
@@ -31682,7 +31658,7 @@ function up952(db) {
|
|
|
31682
31658
|
)
|
|
31683
31659
|
`);
|
|
31684
31660
|
}
|
|
31685
|
-
function
|
|
31661
|
+
function up972(db) {
|
|
31686
31662
|
db.exec(`
|
|
31687
31663
|
CREATE TABLE IF NOT EXISTS embeddings_staging (
|
|
31688
31664
|
id TEXT PRIMARY KEY,
|
|
@@ -31701,7 +31677,7 @@ function up962(db) {
|
|
|
31701
31677
|
ON embeddings_staging(agent_id, source_type, source_id);
|
|
31702
31678
|
`);
|
|
31703
31679
|
}
|
|
31704
|
-
function
|
|
31680
|
+
function up982(db) {
|
|
31705
31681
|
const columns = db.prepare("PRAGMA table_info(dreaming_state)").all();
|
|
31706
31682
|
if (!columns.some((column) => column.name === "evidence_cursor")) {
|
|
31707
31683
|
db.exec("ALTER TABLE dreaming_state ADD COLUMN evidence_cursor TEXT");
|
|
@@ -31712,7 +31688,7 @@ function hasColumn132(db, table, column) {
|
|
|
31712
31688
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
31713
31689
|
return rows.some((r3) => r3.name === column);
|
|
31714
31690
|
}
|
|
31715
|
-
function
|
|
31691
|
+
function up992(db) {
|
|
31716
31692
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name = 'memories'").all();
|
|
31717
31693
|
if (tables.length === 0)
|
|
31718
31694
|
return;
|
|
@@ -31737,23 +31713,23 @@ function up982(db) {
|
|
|
31737
31713
|
function hasColumn142(db, table, column) {
|
|
31738
31714
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
31739
31715
|
}
|
|
31740
|
-
function
|
|
31716
|
+
function up1002(db) {
|
|
31741
31717
|
const hasMemories = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'memories'").get();
|
|
31742
31718
|
if (!hasMemories || !hasColumn142(db, "memories", "memory_kind") || !hasColumn142(db, "memories", "type"))
|
|
31743
31719
|
return;
|
|
31744
31720
|
db.exec("UPDATE memories SET memory_kind = NULL WHERE type = 'session_summary'");
|
|
31745
31721
|
}
|
|
31746
|
-
function
|
|
31722
|
+
function up1012(db) {
|
|
31747
31723
|
db.exec("DROP TABLE IF EXISTS ingestion_jobs");
|
|
31748
31724
|
}
|
|
31749
|
-
function
|
|
31725
|
+
function up1022(db) {
|
|
31750
31726
|
const columns = db.prepare("PRAGMA table_info(dreaming_state)").all();
|
|
31751
31727
|
if (!columns.some((column) => column.name === "last_failure_at")) {
|
|
31752
31728
|
db.exec("ALTER TABLE dreaming_state ADD COLUMN last_failure_at TEXT");
|
|
31753
31729
|
}
|
|
31754
31730
|
db.exec("UPDATE dreaming_state SET last_failure_at = updated_at WHERE consecutive_failures > 0 AND last_failure_at IS NULL");
|
|
31755
31731
|
}
|
|
31756
|
-
function
|
|
31732
|
+
function up1032(db) {
|
|
31757
31733
|
db.exec(`
|
|
31758
31734
|
CREATE TABLE IF NOT EXISTS dreaming_evidence_exclusions (
|
|
31759
31735
|
agent_id TEXT NOT NULL,
|
|
@@ -31770,7 +31746,7 @@ function up1022(db) {
|
|
|
31770
31746
|
ON dreaming_evidence_exclusions (agent_id, resolved_at, requeue_requested_at, excluded_at DESC);
|
|
31771
31747
|
`);
|
|
31772
31748
|
}
|
|
31773
|
-
function
|
|
31749
|
+
function up1042(db) {
|
|
31774
31750
|
db.exec(`
|
|
31775
31751
|
CREATE TABLE IF NOT EXISTS dreaming_tool_calls (
|
|
31776
31752
|
id TEXT PRIMARY KEY,
|
|
@@ -31790,7 +31766,7 @@ function up1032(db) {
|
|
|
31790
31766
|
ON dreaming_tool_calls (agent_id, pass_id, sequence ASC);
|
|
31791
31767
|
`);
|
|
31792
31768
|
}
|
|
31793
|
-
function
|
|
31769
|
+
function up1052(db) {
|
|
31794
31770
|
const columns = db.prepare("PRAGMA table_info(dreaming_passes)").all();
|
|
31795
31771
|
if (!columns.some((column) => column.name === "evidence_window_json")) {
|
|
31796
31772
|
db.exec("ALTER TABLE dreaming_passes ADD COLUMN evidence_window_json TEXT");
|
|
@@ -31799,7 +31775,7 @@ function up1042(db) {
|
|
|
31799
31775
|
db.exec("ALTER TABLE dreaming_passes ADD COLUMN runbook_json TEXT");
|
|
31800
31776
|
}
|
|
31801
31777
|
}
|
|
31802
|
-
function
|
|
31778
|
+
function up1062(db) {
|
|
31803
31779
|
db.exec(`
|
|
31804
31780
|
CREATE TABLE IF NOT EXISTS dreaming_attention (
|
|
31805
31781
|
id TEXT PRIMARY KEY,
|
|
@@ -31821,7 +31797,7 @@ function up1052(db) {
|
|
|
31821
31797
|
function hasColumn152(db, table, column) {
|
|
31822
31798
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
31823
31799
|
}
|
|
31824
|
-
function
|
|
31800
|
+
function up1072(db) {
|
|
31825
31801
|
const requiredMemoryColumns = [
|
|
31826
31802
|
"content_hash",
|
|
31827
31803
|
"normalized_content",
|
|
@@ -31872,7 +31848,7 @@ function up1062(db) {
|
|
|
31872
31848
|
WHERE EXISTS (SELECT 1 FROM memory_entity_mentions WHERE entity_id = entities.id)
|
|
31873
31849
|
`);
|
|
31874
31850
|
}
|
|
31875
|
-
function
|
|
31851
|
+
function up1082(db) {
|
|
31876
31852
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name IN ('memories', 'entity_attributes')").all();
|
|
31877
31853
|
if (tables.length !== 2)
|
|
31878
31854
|
return;
|
|
@@ -31895,7 +31871,7 @@ function tableExists4(db, table) {
|
|
|
31895
31871
|
function hasColumn162(db, table, column) {
|
|
31896
31872
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
31897
31873
|
}
|
|
31898
|
-
function
|
|
31874
|
+
function up1092(db) {
|
|
31899
31875
|
db.exec(`
|
|
31900
31876
|
CREATE TABLE IF NOT EXISTS derived_memory_sources (
|
|
31901
31877
|
derived_memory_id TEXT NOT NULL,
|
|
@@ -31938,7 +31914,7 @@ function up1082(db) {
|
|
|
31938
31914
|
`);
|
|
31939
31915
|
}
|
|
31940
31916
|
}
|
|
31941
|
-
function
|
|
31917
|
+
function up1102(db) {
|
|
31942
31918
|
db.exec(`
|
|
31943
31919
|
DROP TRIGGER IF EXISTS entities_fts_ai;
|
|
31944
31920
|
DROP TRIGGER IF EXISTS entities_fts_ad;
|
|
@@ -32027,7 +32003,7 @@ function up1092(db) {
|
|
|
32027
32003
|
function hasColumn172(db, table, column) {
|
|
32028
32004
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
32029
32005
|
}
|
|
32030
|
-
function
|
|
32006
|
+
function up1112(db) {
|
|
32031
32007
|
if (!hasColumn172(db, "memories", "review_after")) {
|
|
32032
32008
|
db.exec("ALTER TABLE memories ADD COLUMN review_after TEXT;");
|
|
32033
32009
|
}
|
|
@@ -32043,14 +32019,14 @@ var TOKEN_COLUMNS2 = [
|
|
|
32043
32019
|
["tokens_cache_write", "INTEGER"],
|
|
32044
32020
|
["tokens_cost", "REAL"]
|
|
32045
32021
|
];
|
|
32046
|
-
function
|
|
32022
|
+
function up1122(db) {
|
|
32047
32023
|
for (const [column, type] of TOKEN_COLUMNS2) {
|
|
32048
32024
|
if (!hasColumn182(db, "dreaming_passes", column)) {
|
|
32049
32025
|
db.exec(`ALTER TABLE dreaming_passes ADD COLUMN ${column} ${type};`);
|
|
32050
32026
|
}
|
|
32051
32027
|
}
|
|
32052
32028
|
}
|
|
32053
|
-
function
|
|
32029
|
+
function up1132(db) {
|
|
32054
32030
|
db.exec(`
|
|
32055
32031
|
CREATE TABLE IF NOT EXISTS embedding_usage (
|
|
32056
32032
|
day TEXT NOT NULL,
|
|
@@ -32063,7 +32039,7 @@ function up1122(db) {
|
|
|
32063
32039
|
);
|
|
32064
32040
|
`);
|
|
32065
32041
|
}
|
|
32066
|
-
function
|
|
32042
|
+
function up1142(db) {
|
|
32067
32043
|
db.exec(`
|
|
32068
32044
|
CREATE TABLE IF NOT EXISTS telemetry_install (
|
|
32069
32045
|
id TEXT PRIMARY KEY,
|
|
@@ -32071,7 +32047,7 @@ function up1132(db) {
|
|
|
32071
32047
|
);
|
|
32072
32048
|
`);
|
|
32073
32049
|
}
|
|
32074
|
-
function
|
|
32050
|
+
function up1152(db) {
|
|
32075
32051
|
db.exec(`
|
|
32076
32052
|
CREATE INDEX IF NOT EXISTS idx_memory_entity_mentions_entity_memory
|
|
32077
32053
|
ON memory_entity_mentions(entity_id, memory_id);
|
|
@@ -32082,7 +32058,7 @@ function hasColumn192(db, table, column) {
|
|
|
32082
32058
|
return rows.some((row) => row.name === column);
|
|
32083
32059
|
}
|
|
32084
32060
|
var COLUMNS22 = ["first_remember_at", "first_recall_at"];
|
|
32085
|
-
function
|
|
32061
|
+
function up1162(db) {
|
|
32086
32062
|
for (const column of COLUMNS22) {
|
|
32087
32063
|
if (!hasColumn192(db, "telemetry_install", column)) {
|
|
32088
32064
|
db.exec(`ALTER TABLE telemetry_install ADD COLUMN ${column} TEXT`);
|
|
@@ -32098,7 +32074,7 @@ function addColumnIfMissing242(db, column, definition) {
|
|
|
32098
32074
|
db.exec(`ALTER TABLE telemetry_events ADD COLUMN ${column} ${definition}`);
|
|
32099
32075
|
}
|
|
32100
32076
|
}
|
|
32101
|
-
function
|
|
32077
|
+
function up1172(db) {
|
|
32102
32078
|
addColumnIfMissing242(db, "source", "TEXT NOT NULL DEFAULT 'daemon'");
|
|
32103
32079
|
addColumnIfMissing242(db, "claim_token", "TEXT");
|
|
32104
32080
|
addColumnIfMissing242(db, "claimed_at", "TEXT");
|
|
@@ -32107,7 +32083,7 @@ function up1162(db) {
|
|
|
32107
32083
|
ON telemetry_events(source, sent_to_posthog, claimed_at, timestamp);
|
|
32108
32084
|
`);
|
|
32109
32085
|
}
|
|
32110
|
-
function
|
|
32086
|
+
function up1182(db) {
|
|
32111
32087
|
db.exec(`
|
|
32112
32088
|
CREATE TABLE IF NOT EXISTS session_claims (
|
|
32113
32089
|
session_key TEXT NOT NULL,
|
|
@@ -32128,7 +32104,7 @@ function up1172(db) {
|
|
|
32128
32104
|
ON session_claims(agent_id, state, expires_at);
|
|
32129
32105
|
`);
|
|
32130
32106
|
}
|
|
32131
|
-
function
|
|
32107
|
+
function up1192(db) {
|
|
32132
32108
|
const table = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'entity_attributes'").get();
|
|
32133
32109
|
if (table == null)
|
|
32134
32110
|
return;
|
|
@@ -32137,7 +32113,7 @@ function up1182(db) {
|
|
|
32137
32113
|
ON entity_attributes(memory_id, agent_id, status, importance);
|
|
32138
32114
|
`);
|
|
32139
32115
|
}
|
|
32140
|
-
function
|
|
32116
|
+
function up1202(db) {
|
|
32141
32117
|
db.exec(`
|
|
32142
32118
|
CREATE TABLE IF NOT EXISTS cross_agent_messages (
|
|
32143
32119
|
id TEXT PRIMARY KEY,
|
|
@@ -32194,7 +32170,7 @@ function addColumnIfMissing252(db, column, definition) {
|
|
|
32194
32170
|
db.exec(`ALTER TABLE cross_agent_messages ADD COLUMN ${column} ${definition}`);
|
|
32195
32171
|
}
|
|
32196
32172
|
}
|
|
32197
|
-
function
|
|
32173
|
+
function up1212(db) {
|
|
32198
32174
|
const table = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'cross_agent_messages'").get();
|
|
32199
32175
|
if (table == null)
|
|
32200
32176
|
return;
|
|
@@ -32395,7 +32371,7 @@ function backfillTranscriptsFromSummaryJobs2(db) {
|
|
|
32395
32371
|
insert.run(...values);
|
|
32396
32372
|
}
|
|
32397
32373
|
}
|
|
32398
|
-
function
|
|
32374
|
+
function up1222(db) {
|
|
32399
32375
|
if (!hasTable42(db, "session_transcripts"))
|
|
32400
32376
|
return;
|
|
32401
32377
|
addColumnIfMissing262(db, "session_transcripts", "completed_at", "TEXT");
|
|
@@ -32448,7 +32424,7 @@ function up1212(db) {
|
|
|
32448
32424
|
ON session_transcripts(agent_id, content_hash);
|
|
32449
32425
|
`);
|
|
32450
32426
|
}
|
|
32451
|
-
function
|
|
32427
|
+
function up1232(db) {
|
|
32452
32428
|
db.exec(`
|
|
32453
32429
|
CREATE INDEX IF NOT EXISTS idx_memory_jobs_pressure_status
|
|
32454
32430
|
ON memory_jobs(status)
|
|
@@ -32467,12 +32443,12 @@ function up1222(db) {
|
|
|
32467
32443
|
function hasColumn222(db, table, column) {
|
|
32468
32444
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
32469
32445
|
}
|
|
32470
|
-
function
|
|
32446
|
+
function up1242(db) {
|
|
32471
32447
|
if (!hasColumn222(db, "telemetry_install", "last_seen_version")) {
|
|
32472
32448
|
db.exec("ALTER TABLE telemetry_install ADD COLUMN last_seen_version TEXT");
|
|
32473
32449
|
}
|
|
32474
32450
|
}
|
|
32475
|
-
function
|
|
32451
|
+
function up1252(db) {
|
|
32476
32452
|
db.exec(`
|
|
32477
32453
|
CREATE TABLE IF NOT EXISTS source_lifecycle_state (
|
|
32478
32454
|
agent_id TEXT NOT NULL,
|
|
@@ -32501,7 +32477,7 @@ function addColumnIfMissing272(db, column, definition) {
|
|
|
32501
32477
|
db.exec(`ALTER TABLE telemetry_events ADD COLUMN ${column} ${definition}`);
|
|
32502
32478
|
}
|
|
32503
32479
|
}
|
|
32504
|
-
function
|
|
32480
|
+
function up1262(db) {
|
|
32505
32481
|
addColumnIfMissing272(db, "delivery_attempts", "INTEGER NOT NULL DEFAULT 0");
|
|
32506
32482
|
addColumnIfMissing272(db, "last_attempt_at", "TEXT");
|
|
32507
32483
|
addColumnIfMissing272(db, "sent_at", "TEXT");
|
|
@@ -32522,7 +32498,7 @@ function up1252(db) {
|
|
|
32522
32498
|
VALUES (1, CURRENT_TIMESTAMP);
|
|
32523
32499
|
`);
|
|
32524
32500
|
}
|
|
32525
|
-
function
|
|
32501
|
+
function up1272(db) {
|
|
32526
32502
|
const columns = db.prepare("PRAGMA table_info(dreaming_evidence_exclusions)").all();
|
|
32527
32503
|
const names = new Set(columns.map((column) => column.name));
|
|
32528
32504
|
if (!names.has("failure_class")) {
|
|
@@ -32539,7 +32515,7 @@ function up1262(db) {
|
|
|
32539
32515
|
}
|
|
32540
32516
|
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)");
|
|
32541
32517
|
}
|
|
32542
|
-
function
|
|
32518
|
+
function up1282(db) {
|
|
32543
32519
|
db.exec(`
|
|
32544
32520
|
CREATE TABLE IF NOT EXISTS embedding_index_failures (
|
|
32545
32521
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
@@ -32563,7 +32539,7 @@ function up1272(db) {
|
|
|
32563
32539
|
ON embedding_index_failures(source_type, source_id);
|
|
32564
32540
|
`);
|
|
32565
32541
|
}
|
|
32566
|
-
function
|
|
32542
|
+
function up1292(db) {
|
|
32567
32543
|
db.exec(`
|
|
32568
32544
|
CREATE TABLE IF NOT EXISTS imported_source_lifecycle (
|
|
32569
32545
|
id TEXT PRIMARY KEY,
|
|
@@ -32613,7 +32589,7 @@ function backfillTable2(db, params) {
|
|
|
32613
32589
|
FROM ${params.table}${params.where ? ` WHERE ${params.where}` : ""}`).all();
|
|
32614
32590
|
backfill2(db, rows, params.sourceKind, params.scannedAt);
|
|
32615
32591
|
}
|
|
32616
|
-
function
|
|
32592
|
+
function up1302(db) {
|
|
32617
32593
|
db.exec(`
|
|
32618
32594
|
CREATE TABLE IF NOT EXISTS memory_content_safety (
|
|
32619
32595
|
agent_id TEXT NOT NULL,
|
|
@@ -32670,7 +32646,7 @@ function up1292(db) {
|
|
|
32670
32646
|
scannedAt
|
|
32671
32647
|
});
|
|
32672
32648
|
}
|
|
32673
|
-
function
|
|
32649
|
+
function up1312(db) {
|
|
32674
32650
|
const table = db.prepare("SELECT sql FROM sqlite_master WHERE type = 'table' AND name = 'dreaming_attention'").get();
|
|
32675
32651
|
if (!table)
|
|
32676
32652
|
return;
|
|
@@ -32704,7 +32680,7 @@ function up1302(db) {
|
|
|
32704
32680
|
ON dreaming_attention (agent_id, resolved_at, priority DESC, created_at ASC);
|
|
32705
32681
|
`);
|
|
32706
32682
|
}
|
|
32707
|
-
function
|
|
32683
|
+
function up1322(db) {
|
|
32708
32684
|
db.exec(`
|
|
32709
32685
|
CREATE TABLE IF NOT EXISTS ontology_contradictions (
|
|
32710
32686
|
id TEXT PRIMARY KEY,
|
|
@@ -32760,7 +32736,7 @@ function up1312(db) {
|
|
|
32760
32736
|
ON ontology_contradictions(agent_id, left_source_id, right_source_id);
|
|
32761
32737
|
`);
|
|
32762
32738
|
}
|
|
32763
|
-
function
|
|
32739
|
+
function up1332(db) {
|
|
32764
32740
|
db.exec(`
|
|
32765
32741
|
CREATE INDEX IF NOT EXISTS idx_memory_jobs_diagnostics_status_created_at
|
|
32766
32742
|
ON memory_jobs(status, created_at)
|
|
@@ -32775,7 +32751,7 @@ function up1322(db) {
|
|
|
32775
32751
|
function tableExists32(db, table) {
|
|
32776
32752
|
return db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = ?").get(table) != null;
|
|
32777
32753
|
}
|
|
32778
|
-
function
|
|
32754
|
+
function up1342(db) {
|
|
32779
32755
|
if (!tableExists32(db, "memory_jobs"))
|
|
32780
32756
|
return;
|
|
32781
32757
|
if (!tableExists32(db, "job_cancellations")) {
|
|
@@ -32824,7 +32800,7 @@ function up1332(db) {
|
|
|
32824
32800
|
AND status IN ('pending', 'leased');
|
|
32825
32801
|
`);
|
|
32826
32802
|
}
|
|
32827
|
-
function
|
|
32803
|
+
function up1352(db) {
|
|
32828
32804
|
db.exec(`
|
|
32829
32805
|
CREATE TABLE IF NOT EXISTS embedding_repair_budget (
|
|
32830
32806
|
id INTEGER PRIMARY KEY CHECK (id = 1),
|
|
@@ -32864,7 +32840,7 @@ function up1342(db) {
|
|
|
32864
32840
|
END;
|
|
32865
32841
|
`);
|
|
32866
32842
|
}
|
|
32867
|
-
function
|
|
32843
|
+
function up1362(db) {
|
|
32868
32844
|
db.exec(`
|
|
32869
32845
|
CREATE TABLE IF NOT EXISTS dreaming_evidence_consumption (
|
|
32870
32846
|
agent_id TEXT NOT NULL,
|
|
@@ -32887,13 +32863,13 @@ function up1352(db) {
|
|
|
32887
32863
|
ON dreaming_evidence_consumption(agent_id, pass_id, delivered_offset, source_length);
|
|
32888
32864
|
`);
|
|
32889
32865
|
}
|
|
32890
|
-
function
|
|
32866
|
+
function up1372(db) {
|
|
32891
32867
|
db.exec(`
|
|
32892
32868
|
CREATE INDEX IF NOT EXISTS idx_epistemic_assertions_observer_entity
|
|
32893
32869
|
ON epistemic_assertions(agent_id, subject_entity_id, status, asserted_at DESC, created_at DESC);
|
|
32894
32870
|
`);
|
|
32895
32871
|
}
|
|
32896
|
-
function
|
|
32872
|
+
function up1382(db) {
|
|
32897
32873
|
db.exec(`
|
|
32898
32874
|
CREATE TABLE IF NOT EXISTS memory_head_revisions (
|
|
32899
32875
|
id TEXT PRIMARY KEY,
|
|
@@ -32945,7 +32921,7 @@ function up1372(db) {
|
|
|
32945
32921
|
if (!names.has("format_version"))
|
|
32946
32922
|
db.exec("ALTER TABLE memory_md_heads ADD COLUMN format_version INTEGER NOT NULL DEFAULT 1");
|
|
32947
32923
|
}
|
|
32948
|
-
function
|
|
32924
|
+
function up1392(db) {
|
|
32949
32925
|
db.exec(`
|
|
32950
32926
|
CREATE TABLE memory_head_entries_v134 (
|
|
32951
32927
|
entry_id TEXT NOT NULL, agent_id TEXT NOT NULL, canonical_text TEXT NOT NULL,
|
|
@@ -32963,7 +32939,7 @@ function up1382(db) {
|
|
|
32963
32939
|
ON memory_head_entries(agent_id, entry_id, last_revision DESC);
|
|
32964
32940
|
`);
|
|
32965
32941
|
}
|
|
32966
|
-
function
|
|
32942
|
+
function up1402(db) {
|
|
32967
32943
|
db.exec(`
|
|
32968
32944
|
CREATE TABLE IF NOT EXISTS memory_head_publications (
|
|
32969
32945
|
agent_id TEXT NOT NULL,
|
|
@@ -32979,7 +32955,7 @@ function up1392(db) {
|
|
|
32979
32955
|
ON memory_head_publications(agent_id, status, revision DESC);
|
|
32980
32956
|
`);
|
|
32981
32957
|
}
|
|
32982
|
-
function
|
|
32958
|
+
function up1412(db) {
|
|
32983
32959
|
const cols = new Set(db.prepare("PRAGMA table_info(memory_head_revisions)").all().map((r3) => r3.name));
|
|
32984
32960
|
for (const [name, type] of [
|
|
32985
32961
|
["entry_id", "TEXT"],
|
|
@@ -32993,7 +32969,7 @@ function up1402(db) {
|
|
|
32993
32969
|
}
|
|
32994
32970
|
db.exec("CREATE UNIQUE INDEX IF NOT EXISTS idx_memory_head_revisions_entry ON memory_head_revisions(agent_id, revision, entry_id)");
|
|
32995
32971
|
}
|
|
32996
|
-
function
|
|
32972
|
+
function up1422(db) {
|
|
32997
32973
|
const cols = new Set(db.prepare("PRAGMA table_info(dreaming_passes)").all().map((r3) => r3.name));
|
|
32998
32974
|
for (const [name, type] of [
|
|
32999
32975
|
["head_revision", "INTEGER"],
|
|
@@ -33015,7 +32991,7 @@ function addColumnIfMissing282(db, table, column, definition) {
|
|
|
33015
32991
|
if (!hasColumn252(db, table, column))
|
|
33016
32992
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
33017
32993
|
}
|
|
33018
|
-
function
|
|
32994
|
+
function up1432(db) {
|
|
33019
32995
|
addColumnIfMissing282(db, "memories", "manual_override", "INTEGER DEFAULT 0");
|
|
33020
32996
|
db.exec(`
|
|
33021
32997
|
CREATE TABLE IF NOT EXISTS transcript_capture_status (
|
|
@@ -33320,7 +33296,7 @@ function up1422(db) {
|
|
|
33320
33296
|
GROUP BY j.agent_id;
|
|
33321
33297
|
`);
|
|
33322
33298
|
}
|
|
33323
|
-
function
|
|
33299
|
+
function up1442(db) {
|
|
33324
33300
|
db.exec(`
|
|
33325
33301
|
CREATE TABLE IF NOT EXISTS native_source_sync_state (
|
|
33326
33302
|
agent_id TEXT NOT NULL,
|
|
@@ -33336,7 +33312,7 @@ function up1432(db) {
|
|
|
33336
33312
|
ON native_source_sync_state(agent_id, status);
|
|
33337
33313
|
`);
|
|
33338
33314
|
}
|
|
33339
|
-
function
|
|
33315
|
+
function up1452(db) {
|
|
33340
33316
|
db.exec(`
|
|
33341
33317
|
CREATE TABLE IF NOT EXISTS transcript_recovery_frontiers (
|
|
33342
33318
|
agent_id TEXT NOT NULL,
|
|
@@ -33348,7 +33324,7 @@ function up1442(db) {
|
|
|
33348
33324
|
);
|
|
33349
33325
|
`);
|
|
33350
33326
|
}
|
|
33351
|
-
function
|
|
33327
|
+
function up1462(db) {
|
|
33352
33328
|
db.exec(`
|
|
33353
33329
|
CREATE TABLE IF NOT EXISTS source_sync_checkpoints (
|
|
33354
33330
|
agent_id TEXT NOT NULL,
|
|
@@ -33362,13 +33338,13 @@ function up1452(db) {
|
|
|
33362
33338
|
);
|
|
33363
33339
|
`);
|
|
33364
33340
|
}
|
|
33365
|
-
function
|
|
33341
|
+
function up1472(db) {
|
|
33366
33342
|
const columns = db.prepare("PRAGMA table_info(source_sync_checkpoints)").all();
|
|
33367
33343
|
if (!columns.some((column) => column.name === "frontier")) {
|
|
33368
33344
|
db.exec("ALTER TABLE source_sync_checkpoints ADD COLUMN frontier TEXT");
|
|
33369
33345
|
}
|
|
33370
33346
|
}
|
|
33371
|
-
function
|
|
33347
|
+
function up1482(db) {
|
|
33372
33348
|
const columns = new Set(db.prepare("PRAGMA table_info(embedding_index_state)").all().map((row) => row.name).filter((name) => typeof name === "string"));
|
|
33373
33349
|
const additions = [
|
|
33374
33350
|
["migration_phase", "TEXT"],
|
|
@@ -33403,13 +33379,13 @@ function up1472(db) {
|
|
|
33403
33379
|
`);
|
|
33404
33380
|
}
|
|
33405
33381
|
}
|
|
33406
|
-
function
|
|
33382
|
+
function up1492(db) {
|
|
33407
33383
|
const columns = new Set(db.prepare("PRAGMA table_info(memory_jobs)").all().map((row) => row.name).filter((name) => typeof name === "string"));
|
|
33408
33384
|
if (!columns.has("lease_token")) {
|
|
33409
33385
|
db.exec("ALTER TABLE memory_jobs ADD COLUMN lease_token TEXT");
|
|
33410
33386
|
}
|
|
33411
33387
|
}
|
|
33412
|
-
function
|
|
33388
|
+
function up1502(db) {
|
|
33413
33389
|
db.exec(`
|
|
33414
33390
|
CREATE TABLE IF NOT EXISTS dreaming_evidence_reviews (
|
|
33415
33391
|
agent_id TEXT NOT NULL,
|
|
@@ -33427,7 +33403,7 @@ function up1492(db) {
|
|
|
33427
33403
|
ON dreaming_evidence_reviews (agent_id, reviewed_at DESC);
|
|
33428
33404
|
`);
|
|
33429
33405
|
}
|
|
33430
|
-
function
|
|
33406
|
+
function up1512(db) {
|
|
33431
33407
|
db.exec(`
|
|
33432
33408
|
CREATE TABLE IF NOT EXISTS source_import_jobs (
|
|
33433
33409
|
id TEXT PRIMARY KEY, kind TEXT NOT NULL CHECK (kind = 'import'), agent_id TEXT NOT NULL,
|
|
@@ -33494,16 +33470,16 @@ function up1502(db) {
|
|
|
33494
33470
|
}
|
|
33495
33471
|
db.exec("CREATE INDEX IF NOT EXISTS idx_session_transcripts_agent_source ON session_transcripts(agent_id, source_id)");
|
|
33496
33472
|
}
|
|
33497
|
-
function
|
|
33473
|
+
function up1522(db) {
|
|
33498
33474
|
db.exec("CREATE INDEX IF NOT EXISTS idx_source_import_files_job_state ON source_import_files(job_id, state)");
|
|
33499
33475
|
}
|
|
33500
|
-
function
|
|
33476
|
+
function up1532(db) {
|
|
33501
33477
|
const columns = db.prepare("PRAGMA table_info(source_import_record_attempts)").all();
|
|
33502
33478
|
if (!columns.some((column) => column.name === "source_id")) {
|
|
33503
33479
|
db.exec("ALTER TABLE source_import_record_attempts ADD COLUMN source_id TEXT");
|
|
33504
33480
|
}
|
|
33505
33481
|
}
|
|
33506
|
-
function
|
|
33482
|
+
function up1542(db) {
|
|
33507
33483
|
const addColumn = (table, column, definition) => {
|
|
33508
33484
|
const statement = db.prepare("SELECT 1 AS found FROM pragma_table_info(?) WHERE name = ?");
|
|
33509
33485
|
let exists;
|
|
@@ -33524,7 +33500,7 @@ function addColumnIfMissing292(db, table, column, definition) {
|
|
|
33524
33500
|
if (!columns.some((row) => row.name === column))
|
|
33525
33501
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
33526
33502
|
}
|
|
33527
|
-
function
|
|
33503
|
+
function up1552(db) {
|
|
33528
33504
|
addColumnIfMissing292(db, "memory_md_heads", "is_current", "INTEGER NOT NULL DEFAULT 0");
|
|
33529
33505
|
addColumnIfMissing292(db, "dreaming_passes", "head_base_revision", "INTEGER");
|
|
33530
33506
|
db.exec("CREATE INDEX IF NOT EXISTS idx_memory_head_revisions_content_hash ON memory_head_revisions(content_hash)");
|
|
@@ -33674,7 +33650,7 @@ function up1542(db) {
|
|
|
33674
33650
|
`);
|
|
33675
33651
|
}
|
|
33676
33652
|
}
|
|
33677
|
-
function
|
|
33653
|
+
function up1562(db) {
|
|
33678
33654
|
db.exec(`
|
|
33679
33655
|
CREATE TABLE IF NOT EXISTS vector_repair_checkpoints (
|
|
33680
33656
|
operation TEXT NOT NULL CHECK (operation IN ('resync', 'clean-orphans')),
|
|
@@ -33699,7 +33675,7 @@ function up1552(db) {
|
|
|
33699
33675
|
ON vector_repair_checkpoints(status, updated_at);
|
|
33700
33676
|
`);
|
|
33701
33677
|
}
|
|
33702
|
-
function
|
|
33678
|
+
function up1572(db) {
|
|
33703
33679
|
db.exec(`
|
|
33704
33680
|
CREATE TABLE IF NOT EXISTS embedding_repair_checkpoints (
|
|
33705
33681
|
checkpoint_id TEXT PRIMARY KEY,
|
|
@@ -33720,7 +33696,7 @@ function up1562(db) {
|
|
|
33720
33696
|
ON embedding_repair_checkpoints(status, updated_at);
|
|
33721
33697
|
`);
|
|
33722
33698
|
}
|
|
33723
|
-
function
|
|
33699
|
+
function up1582(db) {
|
|
33724
33700
|
const columns = new Set(db.prepare("PRAGMA table_info(embedding_repair_checkpoints)").all().map((row) => row.name));
|
|
33725
33701
|
if (!columns.has("profile_fingerprint")) {
|
|
33726
33702
|
db.exec("ALTER TABLE embedding_repair_checkpoints ADD COLUMN profile_fingerprint TEXT");
|
|
@@ -33735,7 +33711,7 @@ function up1572(db) {
|
|
|
33735
33711
|
);
|
|
33736
33712
|
`);
|
|
33737
33713
|
}
|
|
33738
|
-
function
|
|
33714
|
+
function up1592(db) {
|
|
33739
33715
|
db.exec(`
|
|
33740
33716
|
CREATE INDEX IF NOT EXISTS idx_memories_agent_kind
|
|
33741
33717
|
ON memories(agent_id, memory_kind);
|
|
@@ -33745,13 +33721,13 @@ var MIGRATIONS2 = [
|
|
|
33745
33721
|
{
|
|
33746
33722
|
version: 1,
|
|
33747
33723
|
name: "baseline",
|
|
33748
|
-
up:
|
|
33724
|
+
up: up610,
|
|
33749
33725
|
artifacts: { tables: ["memories", "conversations", "embeddings"] }
|
|
33750
33726
|
},
|
|
33751
33727
|
{
|
|
33752
33728
|
version: 2,
|
|
33753
33729
|
name: "pipeline-v2",
|
|
33754
|
-
up:
|
|
33730
|
+
up: up710,
|
|
33755
33731
|
artifacts: {
|
|
33756
33732
|
tables: ["memory_history", "memory_jobs", "entities", "relations", "memory_entity_mentions"]
|
|
33757
33733
|
}
|
|
@@ -33759,12 +33735,12 @@ var MIGRATIONS2 = [
|
|
|
33759
33735
|
{
|
|
33760
33736
|
version: 3,
|
|
33761
33737
|
name: "unique-content-hash",
|
|
33762
|
-
up:
|
|
33738
|
+
up: up810
|
|
33763
33739
|
},
|
|
33764
33740
|
{
|
|
33765
33741
|
version: 4,
|
|
33766
33742
|
name: "history-actor-and-retention",
|
|
33767
|
-
up:
|
|
33743
|
+
up: up910,
|
|
33768
33744
|
artifacts: {
|
|
33769
33745
|
columns: [{ table: "memory_history", column: "actor_type" }]
|
|
33770
33746
|
}
|
|
@@ -33772,7 +33748,7 @@ var MIGRATIONS2 = [
|
|
|
33772
33748
|
{
|
|
33773
33749
|
version: 5,
|
|
33774
33750
|
name: "graph-extended",
|
|
33775
|
-
up:
|
|
33751
|
+
up: up1010,
|
|
33776
33752
|
artifacts: {
|
|
33777
33753
|
columns: [{ table: "entities", column: "canonical_name" }]
|
|
33778
33754
|
}
|
|
@@ -33780,7 +33756,7 @@ var MIGRATIONS2 = [
|
|
|
33780
33756
|
{
|
|
33781
33757
|
version: 6,
|
|
33782
33758
|
name: "idempotency-key",
|
|
33783
|
-
up:
|
|
33759
|
+
up: up1110,
|
|
33784
33760
|
artifacts: {
|
|
33785
33761
|
columns: [{ table: "memories", column: "idempotency_key" }]
|
|
33786
33762
|
}
|
|
@@ -33788,42 +33764,42 @@ var MIGRATIONS2 = [
|
|
|
33788
33764
|
{
|
|
33789
33765
|
version: 7,
|
|
33790
33766
|
name: "documents-and-connectors",
|
|
33791
|
-
up:
|
|
33767
|
+
up: up1210,
|
|
33792
33768
|
artifacts: { tables: ["documents", "document_memories", "connectors"] }
|
|
33793
33769
|
},
|
|
33794
33770
|
{
|
|
33795
33771
|
version: 8,
|
|
33796
33772
|
name: "embeddings-unique-hash",
|
|
33797
|
-
up:
|
|
33773
|
+
up: up1310
|
|
33798
33774
|
},
|
|
33799
33775
|
{
|
|
33800
33776
|
version: 9,
|
|
33801
33777
|
name: "summary-jobs",
|
|
33802
|
-
up:
|
|
33778
|
+
up: up1410,
|
|
33803
33779
|
artifacts: { tables: ["summary_jobs"] }
|
|
33804
33780
|
},
|
|
33805
33781
|
{
|
|
33806
33782
|
version: 10,
|
|
33807
33783
|
name: "umap-cache",
|
|
33808
|
-
up:
|
|
33784
|
+
up: up1510,
|
|
33809
33785
|
artifacts: { tables: ["umap_cache"] }
|
|
33810
33786
|
},
|
|
33811
33787
|
{
|
|
33812
33788
|
version: 11,
|
|
33813
33789
|
name: "session-scores",
|
|
33814
|
-
up:
|
|
33790
|
+
up: up162,
|
|
33815
33791
|
artifacts: { tables: ["session_scores"] }
|
|
33816
33792
|
},
|
|
33817
33793
|
{
|
|
33818
33794
|
version: 12,
|
|
33819
33795
|
name: "scheduled-tasks",
|
|
33820
|
-
up:
|
|
33796
|
+
up: up172,
|
|
33821
33797
|
artifacts: { tables: ["scheduled_tasks", "task_runs"] }
|
|
33822
33798
|
},
|
|
33823
33799
|
{
|
|
33824
33800
|
version: 13,
|
|
33825
33801
|
name: "ingestion-tracking",
|
|
33826
|
-
up:
|
|
33802
|
+
up: up182,
|
|
33827
33803
|
artifacts: {
|
|
33828
33804
|
columns: [
|
|
33829
33805
|
{ table: "memories", column: "source_path" },
|
|
@@ -33834,13 +33810,13 @@ var MIGRATIONS2 = [
|
|
|
33834
33810
|
{
|
|
33835
33811
|
version: 14,
|
|
33836
33812
|
name: "telemetry",
|
|
33837
|
-
up:
|
|
33813
|
+
up: up192,
|
|
33838
33814
|
artifacts: { tables: ["telemetry_events"] }
|
|
33839
33815
|
},
|
|
33840
33816
|
{
|
|
33841
33817
|
version: 15,
|
|
33842
33818
|
name: "session-memories",
|
|
33843
|
-
up:
|
|
33819
|
+
up: up202,
|
|
33844
33820
|
artifacts: {
|
|
33845
33821
|
tables: ["session_memories"],
|
|
33846
33822
|
columns: [
|
|
@@ -33852,13 +33828,13 @@ var MIGRATIONS2 = [
|
|
|
33852
33828
|
{
|
|
33853
33829
|
version: 16,
|
|
33854
33830
|
name: "session-checkpoints",
|
|
33855
|
-
up:
|
|
33831
|
+
up: up212,
|
|
33856
33832
|
artifacts: { tables: ["session_checkpoints"] }
|
|
33857
33833
|
},
|
|
33858
33834
|
{
|
|
33859
33835
|
version: 17,
|
|
33860
33836
|
name: "task-skills",
|
|
33861
|
-
up:
|
|
33837
|
+
up: up222,
|
|
33862
33838
|
artifacts: {
|
|
33863
33839
|
columns: [{ table: "scheduled_tasks", column: "skill_name" }]
|
|
33864
33840
|
}
|
|
@@ -33866,13 +33842,13 @@ var MIGRATIONS2 = [
|
|
|
33866
33842
|
{
|
|
33867
33843
|
version: 18,
|
|
33868
33844
|
name: "skill-meta",
|
|
33869
|
-
up:
|
|
33845
|
+
up: up232,
|
|
33870
33846
|
artifacts: { tables: ["skill_meta"] }
|
|
33871
33847
|
},
|
|
33872
33848
|
{
|
|
33873
33849
|
version: 19,
|
|
33874
33850
|
name: "knowledge-structure",
|
|
33875
|
-
up:
|
|
33851
|
+
up: up242,
|
|
33876
33852
|
artifacts: {
|
|
33877
33853
|
tables: ["entity_aspects", "entity_attributes", "entity_dependencies", "task_meta"],
|
|
33878
33854
|
columns: [{ table: "entities", column: "agent_id" }]
|
|
@@ -33881,7 +33857,7 @@ var MIGRATIONS2 = [
|
|
|
33881
33857
|
{
|
|
33882
33858
|
version: 20,
|
|
33883
33859
|
name: "session-structural-columns",
|
|
33884
|
-
up:
|
|
33860
|
+
up: up252,
|
|
33885
33861
|
artifacts: {
|
|
33886
33862
|
columns: [
|
|
33887
33863
|
{ table: "session_memories", column: "entity_slot" },
|
|
@@ -33894,7 +33870,7 @@ var MIGRATIONS2 = [
|
|
|
33894
33870
|
{
|
|
33895
33871
|
version: 21,
|
|
33896
33872
|
name: "checkpoint-structural",
|
|
33897
|
-
up:
|
|
33873
|
+
up: up262,
|
|
33898
33874
|
artifacts: {
|
|
33899
33875
|
columns: [{ table: "session_checkpoints", column: "focal_entity_ids" }]
|
|
33900
33876
|
}
|
|
@@ -33902,7 +33878,7 @@ var MIGRATIONS2 = [
|
|
|
33902
33878
|
{
|
|
33903
33879
|
version: 22,
|
|
33904
33880
|
name: "entity-pinning",
|
|
33905
|
-
up:
|
|
33881
|
+
up: up272,
|
|
33906
33882
|
artifacts: {
|
|
33907
33883
|
columns: [
|
|
33908
33884
|
{ table: "entities", column: "pinned" },
|
|
@@ -33913,17 +33889,17 @@ var MIGRATIONS2 = [
|
|
|
33913
33889
|
{
|
|
33914
33890
|
version: 23,
|
|
33915
33891
|
name: "retired-scorer-gap",
|
|
33916
|
-
up:
|
|
33892
|
+
up: up282
|
|
33917
33893
|
},
|
|
33918
33894
|
{
|
|
33919
33895
|
version: 24,
|
|
33920
33896
|
name: "retired-scorer-gap",
|
|
33921
|
-
up:
|
|
33897
|
+
up: up292
|
|
33922
33898
|
},
|
|
33923
33899
|
{
|
|
33924
33900
|
version: 25,
|
|
33925
33901
|
name: "agent-feedback",
|
|
33926
|
-
up:
|
|
33902
|
+
up: up302,
|
|
33927
33903
|
artifacts: {
|
|
33928
33904
|
columns: [{ table: "session_memories", column: "agent_relevance_score" }]
|
|
33929
33905
|
}
|
|
@@ -33931,32 +33907,32 @@ var MIGRATIONS2 = [
|
|
|
33931
33907
|
{
|
|
33932
33908
|
version: 26,
|
|
33933
33909
|
name: "retired-scorer-gap",
|
|
33934
|
-
up:
|
|
33910
|
+
up: up312
|
|
33935
33911
|
},
|
|
33936
33912
|
{
|
|
33937
33913
|
version: 27,
|
|
33938
33914
|
name: "backfill-canonical-names",
|
|
33939
|
-
up:
|
|
33915
|
+
up: up322
|
|
33940
33916
|
},
|
|
33941
33917
|
{
|
|
33942
33918
|
version: 28,
|
|
33943
33919
|
name: "lossless-retention",
|
|
33944
|
-
up:
|
|
33920
|
+
up: up332
|
|
33945
33921
|
},
|
|
33946
33922
|
{
|
|
33947
33923
|
version: 29,
|
|
33948
33924
|
name: "session-summary-dag",
|
|
33949
|
-
up:
|
|
33925
|
+
up: up342
|
|
33950
33926
|
},
|
|
33951
33927
|
{
|
|
33952
33928
|
version: 30,
|
|
33953
33929
|
name: "nullable-memory-job-memory-id",
|
|
33954
|
-
up:
|
|
33930
|
+
up: up352
|
|
33955
33931
|
},
|
|
33956
33932
|
{
|
|
33957
33933
|
version: 31,
|
|
33958
33934
|
name: "dependency-reason",
|
|
33959
|
-
up:
|
|
33935
|
+
up: up362,
|
|
33960
33936
|
artifacts: {
|
|
33961
33937
|
columns: [
|
|
33962
33938
|
{ table: "entity_dependencies", column: "reason" },
|
|
@@ -33967,7 +33943,7 @@ var MIGRATIONS2 = [
|
|
|
33967
33943
|
{
|
|
33968
33944
|
version: 32,
|
|
33969
33945
|
name: "embeddings-vector-column",
|
|
33970
|
-
up:
|
|
33946
|
+
up: up372,
|
|
33971
33947
|
artifacts: {
|
|
33972
33948
|
columns: [{ table: "embeddings", column: "vector", optional: true }]
|
|
33973
33949
|
}
|
|
@@ -33975,7 +33951,7 @@ var MIGRATIONS2 = [
|
|
|
33975
33951
|
{
|
|
33976
33952
|
version: 33,
|
|
33977
33953
|
name: "scope",
|
|
33978
|
-
up:
|
|
33954
|
+
up: up382,
|
|
33979
33955
|
artifacts: {
|
|
33980
33956
|
columns: [{ table: "memories", column: "scope" }]
|
|
33981
33957
|
}
|
|
@@ -33983,17 +33959,17 @@ var MIGRATIONS2 = [
|
|
|
33983
33959
|
{
|
|
33984
33960
|
version: 34,
|
|
33985
33961
|
name: "scope-aware-dedup",
|
|
33986
|
-
up:
|
|
33962
|
+
up: up392
|
|
33987
33963
|
},
|
|
33988
33964
|
{
|
|
33989
33965
|
version: 35,
|
|
33990
33966
|
name: "entity-fts",
|
|
33991
|
-
up:
|
|
33967
|
+
up: up402
|
|
33992
33968
|
},
|
|
33993
33969
|
{
|
|
33994
33970
|
version: 36,
|
|
33995
33971
|
name: "dependency-confidence",
|
|
33996
|
-
up:
|
|
33972
|
+
up: up412,
|
|
33997
33973
|
artifacts: {
|
|
33998
33974
|
columns: [{ table: "entity_dependencies", column: "confidence" }]
|
|
33999
33975
|
}
|
|
@@ -34001,7 +33977,7 @@ var MIGRATIONS2 = [
|
|
|
34001
33977
|
{
|
|
34002
33978
|
version: 37,
|
|
34003
33979
|
name: "entity-communities",
|
|
34004
|
-
up:
|
|
33980
|
+
up: up422,
|
|
34005
33981
|
artifacts: {
|
|
34006
33982
|
tables: ["entity_communities"],
|
|
34007
33983
|
columns: [{ table: "entities", column: "community_id" }]
|
|
@@ -34010,24 +33986,24 @@ var MIGRATIONS2 = [
|
|
|
34010
33986
|
{
|
|
34011
33987
|
version: 38,
|
|
34012
33988
|
name: "memory-hints",
|
|
34013
|
-
up:
|
|
33989
|
+
up: up432,
|
|
34014
33990
|
artifacts: { tables: ["memory_hints"] }
|
|
34015
33991
|
},
|
|
34016
33992
|
{
|
|
34017
33993
|
version: 39,
|
|
34018
33994
|
name: "dedup-entity-dependencies",
|
|
34019
|
-
up:
|
|
33995
|
+
up: up442
|
|
34020
33996
|
},
|
|
34021
33997
|
{
|
|
34022
33998
|
version: 40,
|
|
34023
33999
|
name: "session-transcripts",
|
|
34024
|
-
up:
|
|
34000
|
+
up: up452,
|
|
34025
34001
|
artifacts: { tables: ["session_transcripts"] }
|
|
34026
34002
|
},
|
|
34027
34003
|
{
|
|
34028
34004
|
version: 41,
|
|
34029
34005
|
name: "path-feedback",
|
|
34030
|
-
up:
|
|
34006
|
+
up: up462,
|
|
34031
34007
|
artifacts: {
|
|
34032
34008
|
tables: [
|
|
34033
34009
|
"path_feedback_events",
|
|
@@ -34042,7 +34018,7 @@ var MIGRATIONS2 = [
|
|
|
34042
34018
|
{
|
|
34043
34019
|
version: 42,
|
|
34044
34020
|
name: "session-memories-agent-id",
|
|
34045
|
-
up:
|
|
34021
|
+
up: up472,
|
|
34046
34022
|
artifacts: {
|
|
34047
34023
|
columns: [{ table: "session_memories", column: "agent_id" }]
|
|
34048
34024
|
}
|
|
@@ -34050,7 +34026,7 @@ var MIGRATIONS2 = [
|
|
|
34050
34026
|
{
|
|
34051
34027
|
version: 43,
|
|
34052
34028
|
name: "agents-table",
|
|
34053
|
-
up:
|
|
34029
|
+
up: up482,
|
|
34054
34030
|
artifacts: {
|
|
34055
34031
|
tables: ["agents"],
|
|
34056
34032
|
columns: [
|
|
@@ -34062,7 +34038,7 @@ var MIGRATIONS2 = [
|
|
|
34062
34038
|
{
|
|
34063
34039
|
version: 44,
|
|
34064
34040
|
name: "memory-md-temporal-head",
|
|
34065
|
-
up:
|
|
34041
|
+
up: up492,
|
|
34066
34042
|
artifacts: {
|
|
34067
34043
|
columns: [
|
|
34068
34044
|
{ table: "session_summaries", column: "source_type" },
|
|
@@ -34074,7 +34050,7 @@ var MIGRATIONS2 = [
|
|
|
34074
34050
|
{
|
|
34075
34051
|
version: 45,
|
|
34076
34052
|
name: "lossless-working-memory-hardening",
|
|
34077
|
-
up:
|
|
34053
|
+
up: up502,
|
|
34078
34054
|
artifacts: {
|
|
34079
34055
|
tables: ["session_transcripts_fts", "memory_md_heads"],
|
|
34080
34056
|
columns: [
|
|
@@ -34087,17 +34063,17 @@ var MIGRATIONS2 = [
|
|
|
34087
34063
|
{
|
|
34088
34064
|
version: 46,
|
|
34089
34065
|
name: "session-summary-uniqueness",
|
|
34090
|
-
up:
|
|
34066
|
+
up: up512
|
|
34091
34067
|
},
|
|
34092
34068
|
{
|
|
34093
34069
|
version: 47,
|
|
34094
34070
|
name: "agent-scoped-temporal-uniqueness",
|
|
34095
|
-
up:
|
|
34071
|
+
up: up522
|
|
34096
34072
|
},
|
|
34097
34073
|
{
|
|
34098
34074
|
version: 48,
|
|
34099
34075
|
name: "thread-heads",
|
|
34100
|
-
up:
|
|
34076
|
+
up: up532,
|
|
34101
34077
|
artifacts: {
|
|
34102
34078
|
tables: ["memory_thread_heads"]
|
|
34103
34079
|
}
|
|
@@ -34105,7 +34081,7 @@ var MIGRATIONS2 = [
|
|
|
34105
34081
|
{
|
|
34106
34082
|
version: 49,
|
|
34107
34083
|
name: "session-extract-cursors",
|
|
34108
|
-
up:
|
|
34084
|
+
up: up542,
|
|
34109
34085
|
artifacts: {
|
|
34110
34086
|
tables: ["session_extract_cursors"]
|
|
34111
34087
|
}
|
|
@@ -34113,7 +34089,7 @@ var MIGRATIONS2 = [
|
|
|
34113
34089
|
{
|
|
34114
34090
|
version: 50,
|
|
34115
34091
|
name: "related-to-audit",
|
|
34116
|
-
up:
|
|
34092
|
+
up: up552,
|
|
34117
34093
|
artifacts: {
|
|
34118
34094
|
tables: ["entity_dependency_history"]
|
|
34119
34095
|
}
|
|
@@ -34121,7 +34097,7 @@ var MIGRATIONS2 = [
|
|
|
34121
34097
|
{
|
|
34122
34098
|
version: 51,
|
|
34123
34099
|
name: "memory-md-rolling-window-lineage",
|
|
34124
|
-
up:
|
|
34100
|
+
up: up562,
|
|
34125
34101
|
artifacts: {
|
|
34126
34102
|
tables: ["memory_artifacts", "memory_artifact_tombstones", "memory_artifacts_fts"],
|
|
34127
34103
|
columns: [
|
|
@@ -34136,15 +34112,12 @@ var MIGRATIONS2 = [
|
|
|
34136
34112
|
{
|
|
34137
34113
|
version: 52,
|
|
34138
34114
|
name: "mcp-invocations",
|
|
34139
|
-
up:
|
|
34140
|
-
artifacts: {
|
|
34141
|
-
tables: ["mcp_invocations"]
|
|
34142
|
-
}
|
|
34115
|
+
up: up572
|
|
34143
34116
|
},
|
|
34144
34117
|
{
|
|
34145
34118
|
version: 53,
|
|
34146
34119
|
name: "skill-invocations",
|
|
34147
|
-
up:
|
|
34120
|
+
up: up582,
|
|
34148
34121
|
artifacts: {
|
|
34149
34122
|
tables: ["skill_invocations"]
|
|
34150
34123
|
}
|
|
@@ -34152,7 +34125,7 @@ var MIGRATIONS2 = [
|
|
|
34152
34125
|
{
|
|
34153
34126
|
version: 54,
|
|
34154
34127
|
name: "task-agent-scope",
|
|
34155
|
-
up:
|
|
34128
|
+
up: up592,
|
|
34156
34129
|
artifacts: {
|
|
34157
34130
|
tables: ["task_scope_hints"]
|
|
34158
34131
|
}
|
|
@@ -34160,7 +34133,7 @@ var MIGRATIONS2 = [
|
|
|
34160
34133
|
{
|
|
34161
34134
|
version: 55,
|
|
34162
34135
|
name: "dreaming-state",
|
|
34163
|
-
up:
|
|
34136
|
+
up: up602,
|
|
34164
34137
|
artifacts: {
|
|
34165
34138
|
tables: ["dreaming_state", "dreaming_passes"]
|
|
34166
34139
|
}
|
|
@@ -34168,22 +34141,22 @@ var MIGRATIONS2 = [
|
|
|
34168
34141
|
{
|
|
34169
34142
|
version: 56,
|
|
34170
34143
|
name: "agent-scoped-content-hash",
|
|
34171
|
-
up:
|
|
34144
|
+
up: up612
|
|
34172
34145
|
},
|
|
34173
34146
|
{
|
|
34174
34147
|
version: 57,
|
|
34175
34148
|
name: "memories-fts-tokenizer-repair",
|
|
34176
|
-
up:
|
|
34149
|
+
up: up622
|
|
34177
34150
|
},
|
|
34178
34151
|
{
|
|
34179
34152
|
version: 58,
|
|
34180
34153
|
name: "knowledge-graph-indices",
|
|
34181
|
-
up:
|
|
34154
|
+
up: up632
|
|
34182
34155
|
},
|
|
34183
34156
|
{
|
|
34184
34157
|
version: 59,
|
|
34185
34158
|
name: "entity-attribute-claim-key",
|
|
34186
|
-
up:
|
|
34159
|
+
up: up642,
|
|
34187
34160
|
artifacts: {
|
|
34188
34161
|
columns: [{ table: "entity_attributes", column: "claim_key" }]
|
|
34189
34162
|
}
|
|
@@ -34191,7 +34164,7 @@ var MIGRATIONS2 = [
|
|
|
34191
34164
|
{
|
|
34192
34165
|
version: 60,
|
|
34193
34166
|
name: "entity-attribute-group-key",
|
|
34194
|
-
up:
|
|
34167
|
+
up: up652,
|
|
34195
34168
|
artifacts: {
|
|
34196
34169
|
columns: [{ table: "entity_attributes", column: "group_key" }]
|
|
34197
34170
|
}
|
|
@@ -34199,7 +34172,7 @@ var MIGRATIONS2 = [
|
|
|
34199
34172
|
{
|
|
34200
34173
|
version: 61,
|
|
34201
34174
|
name: "memory-artifact-source-mtime",
|
|
34202
|
-
up:
|
|
34175
|
+
up: up662,
|
|
34203
34176
|
artifacts: {
|
|
34204
34177
|
columns: [{ table: "memory_artifacts", column: "source_mtime_ms" }]
|
|
34205
34178
|
}
|
|
@@ -34207,7 +34180,7 @@ var MIGRATIONS2 = [
|
|
|
34207
34180
|
{
|
|
34208
34181
|
version: 62,
|
|
34209
34182
|
name: "memory-artifact-soft-delete",
|
|
34210
|
-
up:
|
|
34183
|
+
up: up672,
|
|
34211
34184
|
artifacts: {
|
|
34212
34185
|
columns: [
|
|
34213
34186
|
{ table: "memory_artifacts", column: "is_deleted" },
|
|
@@ -34218,12 +34191,12 @@ var MIGRATIONS2 = [
|
|
|
34218
34191
|
{
|
|
34219
34192
|
version: 63,
|
|
34220
34193
|
name: "content-only-memories-fts-update",
|
|
34221
|
-
up:
|
|
34194
|
+
up: up682
|
|
34222
34195
|
},
|
|
34223
34196
|
{
|
|
34224
34197
|
version: 64,
|
|
34225
34198
|
name: "source-graph-provenance",
|
|
34226
|
-
up:
|
|
34199
|
+
up: up692,
|
|
34227
34200
|
artifacts: {
|
|
34228
34201
|
columns: [
|
|
34229
34202
|
{ table: "entities", column: "source_path" },
|
|
@@ -34236,7 +34209,7 @@ var MIGRATIONS2 = [
|
|
|
34236
34209
|
{
|
|
34237
34210
|
version: 65,
|
|
34238
34211
|
name: "source-embedding-agent-scope",
|
|
34239
|
-
up:
|
|
34212
|
+
up: up702,
|
|
34240
34213
|
artifacts: {
|
|
34241
34214
|
columns: [{ table: "embeddings", column: "agent_id", optional: true }]
|
|
34242
34215
|
}
|
|
@@ -34244,7 +34217,7 @@ var MIGRATIONS2 = [
|
|
|
34244
34217
|
{
|
|
34245
34218
|
version: 66,
|
|
34246
34219
|
name: "memory-search-telemetry",
|
|
34247
|
-
up:
|
|
34220
|
+
up: up712,
|
|
34248
34221
|
artifacts: {
|
|
34249
34222
|
tables: ["memory_search_telemetry"]
|
|
34250
34223
|
}
|
|
@@ -34252,7 +34225,7 @@ var MIGRATIONS2 = [
|
|
|
34252
34225
|
{
|
|
34253
34226
|
version: 67,
|
|
34254
34227
|
name: "ontology-proposals",
|
|
34255
|
-
up:
|
|
34228
|
+
up: up722,
|
|
34256
34229
|
artifacts: {
|
|
34257
34230
|
tables: ["ontology_proposals"],
|
|
34258
34231
|
columns: [
|
|
@@ -34266,7 +34239,7 @@ var MIGRATIONS2 = [
|
|
|
34266
34239
|
{
|
|
34267
34240
|
version: 68,
|
|
34268
34241
|
name: "daily-reflections",
|
|
34269
|
-
up:
|
|
34242
|
+
up: up732,
|
|
34270
34243
|
artifacts: {
|
|
34271
34244
|
tables: ["daily_reflections"]
|
|
34272
34245
|
}
|
|
@@ -34274,7 +34247,7 @@ var MIGRATIONS2 = [
|
|
|
34274
34247
|
{
|
|
34275
34248
|
version: 69,
|
|
34276
34249
|
name: "daily-reflections-multiple-insights",
|
|
34277
|
-
up:
|
|
34250
|
+
up: up742,
|
|
34278
34251
|
artifacts: {
|
|
34279
34252
|
tables: ["daily_reflections"]
|
|
34280
34253
|
}
|
|
@@ -34282,7 +34255,7 @@ var MIGRATIONS2 = [
|
|
|
34282
34255
|
{
|
|
34283
34256
|
version: 70,
|
|
34284
34257
|
name: "ontology-control-plane-state",
|
|
34285
|
-
up:
|
|
34258
|
+
up: up752,
|
|
34286
34259
|
artifacts: {
|
|
34287
34260
|
columns: [
|
|
34288
34261
|
{ table: "entities", column: "status" },
|
|
@@ -34297,7 +34270,7 @@ var MIGRATIONS2 = [
|
|
|
34297
34270
|
{
|
|
34298
34271
|
version: 71,
|
|
34299
34272
|
name: "epistemic-assertions",
|
|
34300
|
-
up:
|
|
34273
|
+
up: up762,
|
|
34301
34274
|
artifacts: {
|
|
34302
34275
|
tables: ["epistemic_assertions"]
|
|
34303
34276
|
}
|
|
@@ -34305,7 +34278,7 @@ var MIGRATIONS2 = [
|
|
|
34305
34278
|
{
|
|
34306
34279
|
version: 72,
|
|
34307
34280
|
name: "agent-scoped-idempotency-key",
|
|
34308
|
-
up:
|
|
34281
|
+
up: up772,
|
|
34309
34282
|
artifacts: {
|
|
34310
34283
|
columns: [
|
|
34311
34284
|
{ table: "memories", column: "idempotency_key" },
|
|
@@ -34316,7 +34289,7 @@ var MIGRATIONS2 = [
|
|
|
34316
34289
|
{
|
|
34317
34290
|
version: 73,
|
|
34318
34291
|
name: "recall-context-dedupe",
|
|
34319
|
-
up:
|
|
34292
|
+
up: up782,
|
|
34320
34293
|
artifacts: {
|
|
34321
34294
|
tables: ["session_context_epochs", "session_recall_events"]
|
|
34322
34295
|
}
|
|
@@ -34324,7 +34297,7 @@ var MIGRATIONS2 = [
|
|
|
34324
34297
|
{
|
|
34325
34298
|
version: 74,
|
|
34326
34299
|
name: "aggregate-memory-links",
|
|
34327
|
-
up:
|
|
34300
|
+
up: up792,
|
|
34328
34301
|
artifacts: {
|
|
34329
34302
|
tables: ["aggregate_memory_sources"]
|
|
34330
34303
|
}
|
|
@@ -34332,7 +34305,7 @@ var MIGRATIONS2 = [
|
|
|
34332
34305
|
{
|
|
34333
34306
|
version: 75,
|
|
34334
34307
|
name: "memory-artifact-source-provenance",
|
|
34335
|
-
up:
|
|
34308
|
+
up: up802,
|
|
34336
34309
|
artifacts: {
|
|
34337
34310
|
columns: [
|
|
34338
34311
|
{ table: "memory_artifacts", column: "source_id" },
|
|
@@ -34346,7 +34319,7 @@ var MIGRATIONS2 = [
|
|
|
34346
34319
|
{
|
|
34347
34320
|
version: 76,
|
|
34348
34321
|
name: "temporal-edges",
|
|
34349
|
-
up:
|
|
34322
|
+
up: up812,
|
|
34350
34323
|
artifacts: {
|
|
34351
34324
|
tables: ["temporal_edges"]
|
|
34352
34325
|
}
|
|
@@ -34354,7 +34327,7 @@ var MIGRATIONS2 = [
|
|
|
34354
34327
|
{
|
|
34355
34328
|
version: 77,
|
|
34356
34329
|
name: "entity-aliases",
|
|
34357
|
-
up:
|
|
34330
|
+
up: up822,
|
|
34358
34331
|
artifacts: {
|
|
34359
34332
|
tables: ["entity_aliases"]
|
|
34360
34333
|
}
|
|
@@ -34362,7 +34335,7 @@ var MIGRATIONS2 = [
|
|
|
34362
34335
|
{
|
|
34363
34336
|
version: 78,
|
|
34364
34337
|
name: "api-keys",
|
|
34365
|
-
up:
|
|
34338
|
+
up: up832,
|
|
34366
34339
|
artifacts: {
|
|
34367
34340
|
tables: ["api_keys"]
|
|
34368
34341
|
}
|
|
@@ -34370,7 +34343,7 @@ var MIGRATIONS2 = [
|
|
|
34370
34343
|
{
|
|
34371
34344
|
version: 79,
|
|
34372
34345
|
name: "transcript-capture-jobs",
|
|
34373
|
-
up:
|
|
34346
|
+
up: up842,
|
|
34374
34347
|
artifacts: {
|
|
34375
34348
|
tables: ["transcript_capture_jobs"]
|
|
34376
34349
|
}
|
|
@@ -34378,7 +34351,7 @@ var MIGRATIONS2 = [
|
|
|
34378
34351
|
{
|
|
34379
34352
|
version: 80,
|
|
34380
34353
|
name: "document-scope-columns",
|
|
34381
|
-
up:
|
|
34354
|
+
up: up852,
|
|
34382
34355
|
artifacts: {
|
|
34383
34356
|
columns: [
|
|
34384
34357
|
{ table: "documents", column: "agent_id" },
|
|
@@ -34389,7 +34362,7 @@ var MIGRATIONS2 = [
|
|
|
34389
34362
|
{
|
|
34390
34363
|
version: 81,
|
|
34391
34364
|
name: "aggregate-evidence-sources",
|
|
34392
|
-
up:
|
|
34365
|
+
up: up862,
|
|
34393
34366
|
artifacts: {
|
|
34394
34367
|
tables: ["aggregate_evidence_sources"]
|
|
34395
34368
|
}
|
|
@@ -34397,7 +34370,7 @@ var MIGRATIONS2 = [
|
|
|
34397
34370
|
{
|
|
34398
34371
|
version: 82,
|
|
34399
34372
|
name: "skill-invocations-harness",
|
|
34400
|
-
up:
|
|
34373
|
+
up: up872,
|
|
34401
34374
|
artifacts: {
|
|
34402
34375
|
columns: [
|
|
34403
34376
|
{ table: "skill_invocations", column: "harness" },
|
|
@@ -34408,7 +34381,7 @@ var MIGRATIONS2 = [
|
|
|
34408
34381
|
{
|
|
34409
34382
|
version: 83,
|
|
34410
34383
|
name: "memory-lifecycle-repair",
|
|
34411
|
-
up:
|
|
34384
|
+
up: up882,
|
|
34412
34385
|
artifacts: {
|
|
34413
34386
|
tables: ["transcript_capture_jobs", "aggregate_evidence_sources", "entity_dependencies"],
|
|
34414
34387
|
columns: [
|
|
@@ -34423,7 +34396,7 @@ var MIGRATIONS2 = [
|
|
|
34423
34396
|
{
|
|
34424
34397
|
version: 84,
|
|
34425
34398
|
name: "legacy-markdown-import-state",
|
|
34426
|
-
up:
|
|
34399
|
+
up: up892,
|
|
34427
34400
|
artifacts: {
|
|
34428
34401
|
tables: ["legacy_markdown_imports", "legacy_markdown_chunks"]
|
|
34429
34402
|
}
|
|
@@ -34431,7 +34404,7 @@ var MIGRATIONS2 = [
|
|
|
34431
34404
|
{
|
|
34432
34405
|
version: 85,
|
|
34433
34406
|
name: "backfill-relations-to-dependencies",
|
|
34434
|
-
up:
|
|
34407
|
+
up: up902,
|
|
34435
34408
|
artifacts: {
|
|
34436
34409
|
tables: ["entity_dependencies"]
|
|
34437
34410
|
}
|
|
@@ -34439,7 +34412,7 @@ var MIGRATIONS2 = [
|
|
|
34439
34412
|
{
|
|
34440
34413
|
version: 86,
|
|
34441
34414
|
name: "summary-jobs-content-hash",
|
|
34442
|
-
up:
|
|
34415
|
+
up: up912,
|
|
34443
34416
|
artifacts: {
|
|
34444
34417
|
columns: [{ table: "summary_jobs", column: "content_hash" }]
|
|
34445
34418
|
}
|
|
@@ -34447,7 +34420,7 @@ var MIGRATIONS2 = [
|
|
|
34447
34420
|
{
|
|
34448
34421
|
version: 87,
|
|
34449
34422
|
name: "summary-jobs-boundary-reason",
|
|
34450
|
-
up:
|
|
34423
|
+
up: up922,
|
|
34451
34424
|
artifacts: {
|
|
34452
34425
|
columns: [{ table: "summary_jobs", column: "boundary_reason" }]
|
|
34453
34426
|
}
|
|
@@ -34455,7 +34428,7 @@ var MIGRATIONS2 = [
|
|
|
34455
34428
|
{
|
|
34456
34429
|
version: 88,
|
|
34457
34430
|
name: "transcript-recovery-files",
|
|
34458
|
-
up:
|
|
34431
|
+
up: up932,
|
|
34459
34432
|
artifacts: {
|
|
34460
34433
|
tables: ["transcript_recovery_files"]
|
|
34461
34434
|
}
|
|
@@ -34463,7 +34436,7 @@ var MIGRATIONS2 = [
|
|
|
34463
34436
|
{
|
|
34464
34437
|
version: 89,
|
|
34465
34438
|
name: "job-cancellations",
|
|
34466
|
-
up:
|
|
34439
|
+
up: up942,
|
|
34467
34440
|
artifacts: {
|
|
34468
34441
|
tables: ["job_cancellations"]
|
|
34469
34442
|
}
|
|
@@ -34471,7 +34444,7 @@ var MIGRATIONS2 = [
|
|
|
34471
34444
|
{
|
|
34472
34445
|
version: 90,
|
|
34473
34446
|
name: "job-archive",
|
|
34474
|
-
up:
|
|
34447
|
+
up: up952,
|
|
34475
34448
|
artifacts: {
|
|
34476
34449
|
tables: ["job_archive"]
|
|
34477
34450
|
}
|
|
@@ -34479,25 +34452,25 @@ var MIGRATIONS2 = [
|
|
|
34479
34452
|
{
|
|
34480
34453
|
version: 91,
|
|
34481
34454
|
name: "embedding-index-generations",
|
|
34482
|
-
up:
|
|
34455
|
+
up: up962,
|
|
34483
34456
|
artifacts: { tables: ["embedding_index_state"] }
|
|
34484
34457
|
},
|
|
34485
34458
|
{
|
|
34486
34459
|
version: 92,
|
|
34487
34460
|
name: "embedding-staging-store",
|
|
34488
|
-
up:
|
|
34461
|
+
up: up972,
|
|
34489
34462
|
artifacts: { tables: ["embeddings_staging"] }
|
|
34490
34463
|
},
|
|
34491
34464
|
{
|
|
34492
34465
|
version: 93,
|
|
34493
34466
|
name: "dreaming-evidence-cursor",
|
|
34494
|
-
up:
|
|
34467
|
+
up: up982,
|
|
34495
34468
|
artifacts: { columns: [{ table: "dreaming_state", column: "evidence_cursor" }] }
|
|
34496
34469
|
},
|
|
34497
34470
|
{
|
|
34498
34471
|
version: 94,
|
|
34499
34472
|
name: "memory-kind",
|
|
34500
|
-
up:
|
|
34473
|
+
up: up992,
|
|
34501
34474
|
artifacts: {
|
|
34502
34475
|
columns: [
|
|
34503
34476
|
{ table: "memories", column: "memory_kind" },
|
|
@@ -34508,35 +34481,35 @@ var MIGRATIONS2 = [
|
|
|
34508
34481
|
{
|
|
34509
34482
|
version: 95,
|
|
34510
34483
|
name: "compaction-recall-projections",
|
|
34511
|
-
up:
|
|
34484
|
+
up: up1002
|
|
34512
34485
|
},
|
|
34513
34486
|
{
|
|
34514
34487
|
version: 96,
|
|
34515
34488
|
name: "retire-legacy-ingestion",
|
|
34516
|
-
up:
|
|
34489
|
+
up: up1012
|
|
34517
34490
|
},
|
|
34518
34491
|
{
|
|
34519
34492
|
version: 97,
|
|
34520
34493
|
name: "dreaming-failure-backoff",
|
|
34521
|
-
up:
|
|
34494
|
+
up: up1022,
|
|
34522
34495
|
artifacts: { columns: [{ table: "dreaming_state", column: "last_failure_at" }] }
|
|
34523
34496
|
},
|
|
34524
34497
|
{
|
|
34525
34498
|
version: 98,
|
|
34526
34499
|
name: "dreaming-evidence-exclusions",
|
|
34527
|
-
up:
|
|
34500
|
+
up: up1032,
|
|
34528
34501
|
artifacts: { tables: ["dreaming_evidence_exclusions"] }
|
|
34529
34502
|
},
|
|
34530
34503
|
{
|
|
34531
34504
|
version: 99,
|
|
34532
34505
|
name: "dreaming-tool-calls",
|
|
34533
|
-
up:
|
|
34506
|
+
up: up1042,
|
|
34534
34507
|
artifacts: { tables: ["dreaming_tool_calls"] }
|
|
34535
34508
|
},
|
|
34536
34509
|
{
|
|
34537
34510
|
version: 100,
|
|
34538
34511
|
name: "dreaming-runbook",
|
|
34539
|
-
up:
|
|
34512
|
+
up: up1052,
|
|
34540
34513
|
artifacts: {
|
|
34541
34514
|
columns: [
|
|
34542
34515
|
{ table: "dreaming_passes", column: "evidence_window_json" },
|
|
@@ -34547,23 +34520,23 @@ var MIGRATIONS2 = [
|
|
|
34547
34520
|
{
|
|
34548
34521
|
version: 101,
|
|
34549
34522
|
name: "dreaming-attention",
|
|
34550
|
-
up:
|
|
34523
|
+
up: up1062,
|
|
34551
34524
|
artifacts: { tables: ["dreaming_attention"] }
|
|
34552
34525
|
},
|
|
34553
34526
|
{
|
|
34554
34527
|
version: 102,
|
|
34555
34528
|
name: "attribute-semantic-memories",
|
|
34556
|
-
up:
|
|
34529
|
+
up: up1072
|
|
34557
34530
|
},
|
|
34558
34531
|
{
|
|
34559
34532
|
version: 103,
|
|
34560
34533
|
name: "semantic-memory-kind",
|
|
34561
|
-
up:
|
|
34534
|
+
up: up1082
|
|
34562
34535
|
},
|
|
34563
34536
|
{
|
|
34564
34537
|
version: 104,
|
|
34565
34538
|
name: "derived-memory-provenance",
|
|
34566
|
-
up:
|
|
34539
|
+
up: up1092,
|
|
34567
34540
|
artifacts: {
|
|
34568
34541
|
tables: ["derived_memory_sources"],
|
|
34569
34542
|
columns: [{ table: "memories", column: "stale_at" }]
|
|
@@ -34572,12 +34545,12 @@ var MIGRATIONS2 = [
|
|
|
34572
34545
|
{
|
|
34573
34546
|
version: 105,
|
|
34574
34547
|
name: "agent-scoped-entity-name",
|
|
34575
|
-
up:
|
|
34548
|
+
up: up1102
|
|
34576
34549
|
},
|
|
34577
34550
|
{
|
|
34578
34551
|
version: 106,
|
|
34579
34552
|
name: "memory-review-after",
|
|
34580
|
-
up:
|
|
34553
|
+
up: up1112,
|
|
34581
34554
|
artifacts: {
|
|
34582
34555
|
columns: [{ table: "memories", column: "review_after" }]
|
|
34583
34556
|
}
|
|
@@ -34585,7 +34558,7 @@ var MIGRATIONS2 = [
|
|
|
34585
34558
|
{
|
|
34586
34559
|
version: 107,
|
|
34587
34560
|
name: "dreaming-pass-usage",
|
|
34588
|
-
up:
|
|
34561
|
+
up: up1122,
|
|
34589
34562
|
artifacts: {
|
|
34590
34563
|
columns: [
|
|
34591
34564
|
{ table: "dreaming_passes", column: "tokens_input" },
|
|
@@ -34599,7 +34572,7 @@ var MIGRATIONS2 = [
|
|
|
34599
34572
|
{
|
|
34600
34573
|
version: 108,
|
|
34601
34574
|
name: "embedding-usage",
|
|
34602
|
-
up:
|
|
34575
|
+
up: up1132,
|
|
34603
34576
|
artifacts: {
|
|
34604
34577
|
tables: ["embedding_usage"]
|
|
34605
34578
|
}
|
|
@@ -34607,7 +34580,7 @@ var MIGRATIONS2 = [
|
|
|
34607
34580
|
{
|
|
34608
34581
|
version: 109,
|
|
34609
34582
|
name: "telemetry-install",
|
|
34610
|
-
up:
|
|
34583
|
+
up: up1142,
|
|
34611
34584
|
artifacts: {
|
|
34612
34585
|
tables: ["telemetry_install"]
|
|
34613
34586
|
}
|
|
@@ -34615,12 +34588,12 @@ var MIGRATIONS2 = [
|
|
|
34615
34588
|
{
|
|
34616
34589
|
version: 110,
|
|
34617
34590
|
name: "memory-mention-join-index",
|
|
34618
|
-
up:
|
|
34591
|
+
up: up1152
|
|
34619
34592
|
},
|
|
34620
34593
|
{
|
|
34621
34594
|
version: 111,
|
|
34622
34595
|
name: "telemetry-first-use",
|
|
34623
|
-
up:
|
|
34596
|
+
up: up1162,
|
|
34624
34597
|
artifacts: {
|
|
34625
34598
|
columns: [
|
|
34626
34599
|
{ table: "telemetry_install", column: "first_remember_at" },
|
|
@@ -34631,7 +34604,7 @@ var MIGRATIONS2 = [
|
|
|
34631
34604
|
{
|
|
34632
34605
|
version: 112,
|
|
34633
34606
|
name: "telemetry-queue-ownership",
|
|
34634
|
-
up:
|
|
34607
|
+
up: up1172,
|
|
34635
34608
|
artifacts: {
|
|
34636
34609
|
columns: [
|
|
34637
34610
|
{ table: "telemetry_events", column: "source" },
|
|
@@ -34643,7 +34616,7 @@ var MIGRATIONS2 = [
|
|
|
34643
34616
|
{
|
|
34644
34617
|
version: 113,
|
|
34645
34618
|
name: "session-claims",
|
|
34646
|
-
up:
|
|
34619
|
+
up: up1182,
|
|
34647
34620
|
artifacts: {
|
|
34648
34621
|
tables: ["session_claims"],
|
|
34649
34622
|
columns: [
|
|
@@ -34657,12 +34630,12 @@ var MIGRATIONS2 = [
|
|
|
34657
34630
|
{
|
|
34658
34631
|
version: 114,
|
|
34659
34632
|
name: "memory-traversal-hydration-index",
|
|
34660
|
-
up:
|
|
34633
|
+
up: up1192
|
|
34661
34634
|
},
|
|
34662
34635
|
{
|
|
34663
34636
|
version: 115,
|
|
34664
34637
|
name: "cross-agent-message-notifications",
|
|
34665
|
-
up:
|
|
34638
|
+
up: up1202,
|
|
34666
34639
|
artifacts: {
|
|
34667
34640
|
tables: ["cross_agent_messages", "cross_agent_message_receipts"]
|
|
34668
34641
|
}
|
|
@@ -34670,7 +34643,7 @@ var MIGRATIONS2 = [
|
|
|
34670
34643
|
{
|
|
34671
34644
|
version: 116,
|
|
34672
34645
|
name: "acp-delivery-reconciliation",
|
|
34673
|
-
up:
|
|
34646
|
+
up: up1212,
|
|
34674
34647
|
artifacts: {
|
|
34675
34648
|
columns: [
|
|
34676
34649
|
{ table: "cross_agent_messages", column: "delivery_state" },
|
|
@@ -34684,7 +34657,7 @@ var MIGRATIONS2 = [
|
|
|
34684
34657
|
{
|
|
34685
34658
|
version: 117,
|
|
34686
34659
|
name: "retire-summary-worker",
|
|
34687
|
-
up:
|
|
34660
|
+
up: up1222,
|
|
34688
34661
|
artifacts: {
|
|
34689
34662
|
columns: [
|
|
34690
34663
|
{ table: "session_transcripts", column: "completed_at" },
|
|
@@ -34695,24 +34668,24 @@ var MIGRATIONS2 = [
|
|
|
34695
34668
|
{
|
|
34696
34669
|
version: 118,
|
|
34697
34670
|
name: "queue-pressure-indices",
|
|
34698
|
-
up:
|
|
34671
|
+
up: up1232
|
|
34699
34672
|
},
|
|
34700
34673
|
{
|
|
34701
34674
|
version: 119,
|
|
34702
34675
|
name: "telemetry-version-observation",
|
|
34703
|
-
up:
|
|
34676
|
+
up: up1242,
|
|
34704
34677
|
artifacts: { columns: [{ table: "telemetry_install", column: "last_seen_version" }] }
|
|
34705
34678
|
},
|
|
34706
34679
|
{
|
|
34707
34680
|
version: 120,
|
|
34708
34681
|
name: "source-lifecycle-telemetry",
|
|
34709
|
-
up:
|
|
34682
|
+
up: up1252,
|
|
34710
34683
|
artifacts: { tables: ["source_lifecycle_state"] }
|
|
34711
34684
|
},
|
|
34712
34685
|
{
|
|
34713
34686
|
version: 121,
|
|
34714
34687
|
name: "telemetry-delivery-health",
|
|
34715
|
-
up:
|
|
34688
|
+
up: up1262,
|
|
34716
34689
|
artifacts: {
|
|
34717
34690
|
tables: ["telemetry_delivery_state"],
|
|
34718
34691
|
columns: [
|
|
@@ -34726,7 +34699,7 @@ var MIGRATIONS2 = [
|
|
|
34726
34699
|
{
|
|
34727
34700
|
version: 122,
|
|
34728
34701
|
name: "dreaming-evidence-retry",
|
|
34729
|
-
up:
|
|
34702
|
+
up: up1272,
|
|
34730
34703
|
artifacts: {
|
|
34731
34704
|
columns: [
|
|
34732
34705
|
{ table: "dreaming_evidence_exclusions", column: "failure_class" },
|
|
@@ -34739,13 +34712,13 @@ var MIGRATIONS2 = [
|
|
|
34739
34712
|
{
|
|
34740
34713
|
version: 123,
|
|
34741
34714
|
name: "embedding-index-failures",
|
|
34742
|
-
up:
|
|
34715
|
+
up: up1282,
|
|
34743
34716
|
artifacts: { tables: ["embedding_index_failures"] }
|
|
34744
34717
|
},
|
|
34745
34718
|
{
|
|
34746
34719
|
version: 124,
|
|
34747
34720
|
name: "import-derived-lifecycle",
|
|
34748
|
-
up:
|
|
34721
|
+
up: up1292,
|
|
34749
34722
|
artifacts: {
|
|
34750
34723
|
tables: ["imported_source_lifecycle"]
|
|
34751
34724
|
}
|
|
@@ -34753,77 +34726,77 @@ var MIGRATIONS2 = [
|
|
|
34753
34726
|
{
|
|
34754
34727
|
version: 125,
|
|
34755
34728
|
name: "memory-content-safety",
|
|
34756
|
-
up:
|
|
34729
|
+
up: up1302,
|
|
34757
34730
|
artifacts: { tables: ["memory_content_safety"] }
|
|
34758
34731
|
},
|
|
34759
34732
|
{
|
|
34760
34733
|
version: 126,
|
|
34761
34734
|
name: "dreaming-surprisal-attention",
|
|
34762
|
-
up:
|
|
34735
|
+
up: up1312,
|
|
34763
34736
|
artifacts: { tables: ["dreaming_attention"] }
|
|
34764
34737
|
},
|
|
34765
34738
|
{
|
|
34766
34739
|
version: 127,
|
|
34767
34740
|
name: "ontology-contradictions",
|
|
34768
|
-
up:
|
|
34741
|
+
up: up1322,
|
|
34769
34742
|
artifacts: { tables: ["ontology_contradictions"] }
|
|
34770
34743
|
},
|
|
34771
34744
|
{
|
|
34772
34745
|
version: 128,
|
|
34773
34746
|
name: "bounded-queue-diagnostics",
|
|
34774
|
-
up:
|
|
34747
|
+
up: up1332
|
|
34775
34748
|
},
|
|
34776
34749
|
{
|
|
34777
34750
|
version: 129,
|
|
34778
34751
|
name: "retire-structural-jobs",
|
|
34779
|
-
up:
|
|
34752
|
+
up: up1342
|
|
34780
34753
|
},
|
|
34781
34754
|
{
|
|
34782
34755
|
version: 130,
|
|
34783
34756
|
name: "embedding-repair-state",
|
|
34784
|
-
up:
|
|
34757
|
+
up: up1352,
|
|
34785
34758
|
artifacts: { tables: ["embedding_repair_budget", "embedding_repair_backoff"] }
|
|
34786
34759
|
},
|
|
34787
34760
|
{
|
|
34788
34761
|
version: 131,
|
|
34789
34762
|
name: "dreaming-evidence-consumption",
|
|
34790
|
-
up:
|
|
34763
|
+
up: up1362,
|
|
34791
34764
|
artifacts: { tables: ["dreaming_evidence_consumption"] }
|
|
34792
34765
|
},
|
|
34793
34766
|
{
|
|
34794
34767
|
version: 132,
|
|
34795
34768
|
name: "observer-scoped-epistemic-assertions",
|
|
34796
|
-
up:
|
|
34769
|
+
up: up1372,
|
|
34797
34770
|
artifacts: { tables: ["epistemic_assertions"] }
|
|
34798
34771
|
},
|
|
34799
34772
|
{
|
|
34800
34773
|
version: 133,
|
|
34801
34774
|
name: "dreaming-memory-head",
|
|
34802
|
-
up:
|
|
34775
|
+
up: up1382,
|
|
34803
34776
|
artifacts: { tables: ["memory_head_revisions", "memory_head_entries", "memory_head_revision_entries"] }
|
|
34804
34777
|
},
|
|
34805
34778
|
{
|
|
34806
34779
|
version: 134,
|
|
34807
34780
|
name: "scope-memory-head-entries",
|
|
34808
|
-
up:
|
|
34781
|
+
up: up1392,
|
|
34809
34782
|
artifacts: { tables: ["memory_head_entries"] }
|
|
34810
34783
|
},
|
|
34811
34784
|
{
|
|
34812
34785
|
version: 135,
|
|
34813
34786
|
name: "memory-head-publication",
|
|
34814
|
-
up:
|
|
34787
|
+
up: up1402,
|
|
34815
34788
|
artifacts: { tables: ["memory_head_publications"] }
|
|
34816
34789
|
},
|
|
34817
34790
|
{
|
|
34818
34791
|
version: 136,
|
|
34819
34792
|
name: "memory-head-revisions",
|
|
34820
|
-
up:
|
|
34793
|
+
up: up1412,
|
|
34821
34794
|
artifacts: { tables: ["memory_head_revisions"] }
|
|
34822
34795
|
},
|
|
34823
34796
|
{
|
|
34824
34797
|
version: 137,
|
|
34825
34798
|
name: "dreaming-head-manifest",
|
|
34826
|
-
up:
|
|
34799
|
+
up: up1422,
|
|
34827
34800
|
artifacts: {
|
|
34828
34801
|
columns: [
|
|
34829
34802
|
{ table: "dreaming_passes", column: "head_revision" },
|
|
@@ -34834,7 +34807,7 @@ var MIGRATIONS2 = [
|
|
|
34834
34807
|
{
|
|
34835
34808
|
version: 138,
|
|
34836
34809
|
name: "bounded-status-projections",
|
|
34837
|
-
up:
|
|
34810
|
+
up: up1432,
|
|
34838
34811
|
artifacts: {
|
|
34839
34812
|
tables: ["transcript_capture_status", "memories_duplicate_hash_counts", "memories_diagnostics_state"]
|
|
34840
34813
|
}
|
|
@@ -34842,31 +34815,31 @@ var MIGRATIONS2 = [
|
|
|
34842
34815
|
{
|
|
34843
34816
|
version: 139,
|
|
34844
34817
|
name: "native-source-sync-state",
|
|
34845
|
-
up:
|
|
34818
|
+
up: up1442,
|
|
34846
34819
|
artifacts: { tables: ["native_source_sync_state"] }
|
|
34847
34820
|
},
|
|
34848
34821
|
{
|
|
34849
34822
|
version: 140,
|
|
34850
34823
|
name: "transcript-recovery-frontier",
|
|
34851
|
-
up:
|
|
34824
|
+
up: up1452,
|
|
34852
34825
|
artifacts: { tables: ["transcript_recovery_frontiers"] }
|
|
34853
34826
|
},
|
|
34854
34827
|
{
|
|
34855
34828
|
version: 141,
|
|
34856
34829
|
name: "source-sync-checkpoints",
|
|
34857
|
-
up:
|
|
34830
|
+
up: up1462,
|
|
34858
34831
|
artifacts: { tables: ["source_sync_checkpoints"] }
|
|
34859
34832
|
},
|
|
34860
34833
|
{
|
|
34861
34834
|
version: 142,
|
|
34862
34835
|
name: "source-sync-frontier",
|
|
34863
|
-
up:
|
|
34836
|
+
up: up1472,
|
|
34864
34837
|
artifacts: { columns: [{ table: "source_sync_checkpoints", column: "frontier" }] }
|
|
34865
34838
|
},
|
|
34866
34839
|
{
|
|
34867
34840
|
version: 143,
|
|
34868
34841
|
name: "embedding-index-progress",
|
|
34869
|
-
up:
|
|
34842
|
+
up: up1482,
|
|
34870
34843
|
artifacts: {
|
|
34871
34844
|
columns: [
|
|
34872
34845
|
{ table: "embedding_index_state", column: "migration_phase" },
|
|
@@ -34882,19 +34855,19 @@ var MIGRATIONS2 = [
|
|
|
34882
34855
|
{
|
|
34883
34856
|
version: 144,
|
|
34884
34857
|
name: "memory-job-lease-token",
|
|
34885
|
-
up:
|
|
34858
|
+
up: up1492,
|
|
34886
34859
|
artifacts: { columns: [{ table: "memory_jobs", column: "lease_token" }] }
|
|
34887
34860
|
},
|
|
34888
34861
|
{
|
|
34889
34862
|
version: 145,
|
|
34890
34863
|
name: "dreaming-evidence-reviews",
|
|
34891
|
-
up:
|
|
34864
|
+
up: up1502,
|
|
34892
34865
|
artifacts: { tables: ["dreaming_evidence_reviews"] }
|
|
34893
34866
|
},
|
|
34894
34867
|
{
|
|
34895
34868
|
version: 146,
|
|
34896
34869
|
name: "source-transcript-import",
|
|
34897
|
-
up:
|
|
34870
|
+
up: up1512,
|
|
34898
34871
|
artifacts: {
|
|
34899
34872
|
tables: [
|
|
34900
34873
|
"source_import_jobs",
|
|
@@ -34913,19 +34886,19 @@ var MIGRATIONS2 = [
|
|
|
34913
34886
|
{
|
|
34914
34887
|
version: 147,
|
|
34915
34888
|
name: "source-import-replay-file-slots",
|
|
34916
|
-
up:
|
|
34889
|
+
up: up1522,
|
|
34917
34890
|
artifacts: { tables: ["source_import_files"] }
|
|
34918
34891
|
},
|
|
34919
34892
|
{
|
|
34920
34893
|
version: 148,
|
|
34921
34894
|
name: "source-import-attempt-provenance",
|
|
34922
|
-
up:
|
|
34895
|
+
up: up1532,
|
|
34923
34896
|
artifacts: { columns: [{ table: "source_import_record_attempts", column: "source_id" }] }
|
|
34924
34897
|
},
|
|
34925
34898
|
{
|
|
34926
34899
|
version: 149,
|
|
34927
34900
|
name: "transcript-import-state-machine",
|
|
34928
|
-
up:
|
|
34901
|
+
up: up1542,
|
|
34929
34902
|
artifacts: {
|
|
34930
34903
|
columns: [
|
|
34931
34904
|
{ table: "source_import_jobs", column: "duplicate_mode" },
|
|
@@ -34937,7 +34910,7 @@ var MIGRATIONS2 = [
|
|
|
34937
34910
|
{
|
|
34938
34911
|
version: 150,
|
|
34939
34912
|
name: "memory-head-freshness",
|
|
34940
|
-
up:
|
|
34913
|
+
up: up1552,
|
|
34941
34914
|
artifacts: {
|
|
34942
34915
|
columns: [
|
|
34943
34916
|
{ table: "memory_md_heads", column: "is_current" },
|
|
@@ -34948,7 +34921,7 @@ var MIGRATIONS2 = [
|
|
|
34948
34921
|
{
|
|
34949
34922
|
version: 151,
|
|
34950
34923
|
name: "transcript-import-bytes",
|
|
34951
|
-
up:
|
|
34924
|
+
up: up160,
|
|
34952
34925
|
artifacts: {
|
|
34953
34926
|
tables: [
|
|
34954
34927
|
"source_import_chunks",
|
|
@@ -34983,7 +34956,7 @@ var MIGRATIONS2 = [
|
|
|
34983
34956
|
{
|
|
34984
34957
|
version: 153,
|
|
34985
34958
|
name: "vector-repair-checkpoints",
|
|
34986
|
-
up:
|
|
34959
|
+
up: up1562,
|
|
34987
34960
|
artifacts: { tables: ["vector_repair_checkpoints"] }
|
|
34988
34961
|
},
|
|
34989
34962
|
{
|
|
@@ -35010,13 +34983,13 @@ var MIGRATIONS2 = [
|
|
|
35010
34983
|
{
|
|
35011
34984
|
version: 156,
|
|
35012
34985
|
name: "embedding-repair-checkpoints",
|
|
35013
|
-
up:
|
|
34986
|
+
up: up1572,
|
|
35014
34987
|
artifacts: { tables: ["embedding_repair_checkpoints"] }
|
|
35015
34988
|
},
|
|
35016
34989
|
{
|
|
35017
34990
|
version: 157,
|
|
35018
34991
|
name: "embedding-repair-progress",
|
|
35019
|
-
up:
|
|
34992
|
+
up: up1582,
|
|
35020
34993
|
artifacts: {
|
|
35021
34994
|
tables: ["embedding_repair_progress"],
|
|
35022
34995
|
columns: [{ table: "embedding_repair_checkpoints", column: "profile_fingerprint" }]
|
|
@@ -35025,8 +34998,13 @@ var MIGRATIONS2 = [
|
|
|
35025
34998
|
{
|
|
35026
34999
|
version: 158,
|
|
35027
35000
|
name: "dreaming-candidate-scan-index",
|
|
35028
|
-
up:
|
|
35001
|
+
up: up1592,
|
|
35029
35002
|
artifacts: { indexes: ["idx_memories_agent_kind"] }
|
|
35003
|
+
},
|
|
35004
|
+
{
|
|
35005
|
+
version: 159,
|
|
35006
|
+
name: "retire-obsolete-invocation-ledger",
|
|
35007
|
+
up: up510
|
|
35030
35008
|
}
|
|
35031
35009
|
];
|
|
35032
35010
|
var LATEST_SCHEMA_VERSION2 = MIGRATIONS2[MIGRATIONS2.length - 1]?.version ?? 0;
|