@signetai/connector-kimi 0.226.26 → 0.227.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +638 -660
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -10704,6 +10704,9 @@ function up4(db) {
|
|
|
10704
10704
|
WHERE resolved_at IS NULL;
|
|
10705
10705
|
`);
|
|
10706
10706
|
}
|
|
10707
|
+
function up5(db) {
|
|
10708
|
+
db.exec("DROP TABLE IF EXISTS mcp_invocations");
|
|
10709
|
+
}
|
|
10707
10710
|
var MEMORIES_FTS_TOKENIZER = "unicode61";
|
|
10708
10711
|
var FTS_STATE_TABLE = "memories_fts_state";
|
|
10709
10712
|
function normalizeSql(sql) {
|
|
@@ -10819,7 +10822,7 @@ function memoriesFtsNeedsTokenizerRepair(sql) {
|
|
|
10819
10822
|
return true;
|
|
10820
10823
|
return !normalized.includes(`tokenize='${MEMORIES_FTS_TOKENIZER}'`);
|
|
10821
10824
|
}
|
|
10822
|
-
function
|
|
10825
|
+
function up6(db) {
|
|
10823
10826
|
db.exec(`
|
|
10824
10827
|
CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
10825
10828
|
version INTEGER PRIMARY KEY,
|
|
@@ -10917,7 +10920,7 @@ function addColumnIfMissing2(db, table, column, definition) {
|
|
|
10917
10920
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
10918
10921
|
}
|
|
10919
10922
|
}
|
|
10920
|
-
function
|
|
10923
|
+
function up7(db) {
|
|
10921
10924
|
addColumnIfMissing2(db, "memories", "content_hash", "TEXT");
|
|
10922
10925
|
addColumnIfMissing2(db, "memories", "normalized_content", "TEXT");
|
|
10923
10926
|
addColumnIfMissing2(db, "memories", "is_deleted", "INTEGER DEFAULT 0");
|
|
@@ -11035,7 +11038,7 @@ function addColumnIfMissing3(db, table, column, definition) {
|
|
|
11035
11038
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11036
11039
|
return true;
|
|
11037
11040
|
}
|
|
11038
|
-
function
|
|
11041
|
+
function up8(db) {
|
|
11039
11042
|
addColumnIfMissing3(db, "memories", "why", "TEXT");
|
|
11040
11043
|
addColumnIfMissing3(db, "memories", "project", "TEXT");
|
|
11041
11044
|
db.exec(`DROP INDEX IF EXISTS idx_memories_content_hash`);
|
|
@@ -11072,7 +11075,7 @@ function addColumnIfMissing4(db, table, column, definition) {
|
|
|
11072
11075
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11073
11076
|
}
|
|
11074
11077
|
}
|
|
11075
|
-
function
|
|
11078
|
+
function up9(db) {
|
|
11076
11079
|
addColumnIfMissing4(db, "memory_history", "actor_type", "TEXT");
|
|
11077
11080
|
addColumnIfMissing4(db, "memory_history", "session_id", "TEXT");
|
|
11078
11081
|
addColumnIfMissing4(db, "memory_history", "request_id", "TEXT");
|
|
@@ -11105,7 +11108,7 @@ function addColumnIfMissing5(db, table, column, definition) {
|
|
|
11105
11108
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11106
11109
|
}
|
|
11107
11110
|
}
|
|
11108
|
-
function
|
|
11111
|
+
function up10(db) {
|
|
11109
11112
|
addColumnIfMissing5(db, "entities", "canonical_name", "TEXT");
|
|
11110
11113
|
addColumnIfMissing5(db, "entities", "mentions", "INTEGER DEFAULT 0");
|
|
11111
11114
|
addColumnIfMissing5(db, "entities", "embedding", "BLOB");
|
|
@@ -11122,7 +11125,7 @@ function hasColumn4(db, table, column) {
|
|
|
11122
11125
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
11123
11126
|
return rows.some((r2) => r2.name === column);
|
|
11124
11127
|
}
|
|
11125
|
-
function
|
|
11128
|
+
function up11(db) {
|
|
11126
11129
|
if (!hasColumn4(db, "memories", "idempotency_key")) {
|
|
11127
11130
|
db.exec("ALTER TABLE memories ADD COLUMN idempotency_key TEXT");
|
|
11128
11131
|
}
|
|
@@ -11137,7 +11140,7 @@ function hasColumn5(db, table, column) {
|
|
|
11137
11140
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
11138
11141
|
return rows.some((r2) => r2.name === column);
|
|
11139
11142
|
}
|
|
11140
|
-
function
|
|
11143
|
+
function up12(db) {
|
|
11141
11144
|
db.exec(`
|
|
11142
11145
|
CREATE TABLE IF NOT EXISTS documents (
|
|
11143
11146
|
id TEXT PRIMARY KEY,
|
|
@@ -11194,7 +11197,7 @@ function up11(db) {
|
|
|
11194
11197
|
db.exec("ALTER TABLE memory_jobs ADD COLUMN document_id TEXT");
|
|
11195
11198
|
}
|
|
11196
11199
|
}
|
|
11197
|
-
function
|
|
11200
|
+
function up13(db) {
|
|
11198
11201
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='embeddings'").all();
|
|
11199
11202
|
if (tables.length === 0)
|
|
11200
11203
|
return;
|
|
@@ -11211,7 +11214,7 @@ function up12(db) {
|
|
|
11211
11214
|
ON embeddings(content_hash)
|
|
11212
11215
|
`);
|
|
11213
11216
|
}
|
|
11214
|
-
function
|
|
11217
|
+
function up14(db) {
|
|
11215
11218
|
db.exec(`
|
|
11216
11219
|
CREATE TABLE IF NOT EXISTS summary_jobs (
|
|
11217
11220
|
id TEXT PRIMARY KEY,
|
|
@@ -11231,7 +11234,7 @@ function up13(db) {
|
|
|
11231
11234
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_summary_jobs_status
|
|
11232
11235
|
ON summary_jobs(status)`);
|
|
11233
11236
|
}
|
|
11234
|
-
function
|
|
11237
|
+
function up15(db) {
|
|
11235
11238
|
db.exec(`
|
|
11236
11239
|
CREATE TABLE IF NOT EXISTS umap_cache (
|
|
11237
11240
|
id INTEGER PRIMARY KEY,
|
|
@@ -11242,7 +11245,7 @@ function up14(db) {
|
|
|
11242
11245
|
)
|
|
11243
11246
|
`);
|
|
11244
11247
|
}
|
|
11245
|
-
function
|
|
11248
|
+
function up16(db) {
|
|
11246
11249
|
db.exec(`
|
|
11247
11250
|
CREATE TABLE IF NOT EXISTS session_scores (
|
|
11248
11251
|
id TEXT PRIMARY KEY,
|
|
@@ -11262,7 +11265,7 @@ function up15(db) {
|
|
|
11262
11265
|
ON session_scores(session_key);
|
|
11263
11266
|
`);
|
|
11264
11267
|
}
|
|
11265
|
-
function
|
|
11268
|
+
function up17(db) {
|
|
11266
11269
|
db.exec(`
|
|
11267
11270
|
CREATE TABLE IF NOT EXISTS scheduled_tasks (
|
|
11268
11271
|
id TEXT PRIMARY KEY,
|
|
@@ -11303,7 +11306,7 @@ function addColumnIfMissing6(db, table, column, definition) {
|
|
|
11303
11306
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11304
11307
|
}
|
|
11305
11308
|
}
|
|
11306
|
-
function
|
|
11309
|
+
function up18(db) {
|
|
11307
11310
|
db.exec(`
|
|
11308
11311
|
CREATE TABLE IF NOT EXISTS ingestion_jobs (
|
|
11309
11312
|
id TEXT PRIMARY KEY,
|
|
@@ -11329,7 +11332,7 @@ function up17(db) {
|
|
|
11329
11332
|
addColumnIfMissing6(db, "memories", "source_path", "TEXT");
|
|
11330
11333
|
addColumnIfMissing6(db, "memories", "source_section", "TEXT");
|
|
11331
11334
|
}
|
|
11332
|
-
function
|
|
11335
|
+
function up19(db) {
|
|
11333
11336
|
db.exec(`
|
|
11334
11337
|
CREATE TABLE IF NOT EXISTS telemetry_events (
|
|
11335
11338
|
id TEXT PRIMARY KEY,
|
|
@@ -11354,7 +11357,7 @@ function addColumnIfMissing7(db, table, column, definition) {
|
|
|
11354
11357
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11355
11358
|
}
|
|
11356
11359
|
}
|
|
11357
|
-
function
|
|
11360
|
+
function up20(db) {
|
|
11358
11361
|
db.exec(`
|
|
11359
11362
|
CREATE TABLE IF NOT EXISTS session_memories (
|
|
11360
11363
|
id TEXT PRIMARY KEY,
|
|
@@ -11381,7 +11384,7 @@ function up19(db) {
|
|
|
11381
11384
|
addColumnIfMissing7(db, "session_scores", "confidence", "REAL");
|
|
11382
11385
|
addColumnIfMissing7(db, "session_scores", "continuity_reasoning", "TEXT");
|
|
11383
11386
|
}
|
|
11384
|
-
function
|
|
11387
|
+
function up21(db) {
|
|
11385
11388
|
db.exec(`
|
|
11386
11389
|
CREATE TABLE IF NOT EXISTS session_checkpoints (
|
|
11387
11390
|
id TEXT PRIMARY KEY,
|
|
@@ -11403,7 +11406,7 @@ function up20(db) {
|
|
|
11403
11406
|
ON session_checkpoints(project_normalized, created_at DESC);
|
|
11404
11407
|
`);
|
|
11405
11408
|
}
|
|
11406
|
-
function
|
|
11409
|
+
function up22(db) {
|
|
11407
11410
|
const cols = db.prepare("PRAGMA table_info(scheduled_tasks)").all();
|
|
11408
11411
|
const colNames = new Set(cols.flatMap((c2) => typeof c2.name === "string" ? [c2.name] : []));
|
|
11409
11412
|
if (!colNames.has("skill_name")) {
|
|
@@ -11414,7 +11417,7 @@ function up21(db) {
|
|
|
11414
11417
|
CHECK (skill_mode IN ('inject', 'slash') OR skill_mode IS NULL)`);
|
|
11415
11418
|
}
|
|
11416
11419
|
}
|
|
11417
|
-
function
|
|
11420
|
+
function up23(db) {
|
|
11418
11421
|
const existing = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='skill_meta'").get();
|
|
11419
11422
|
if (existing)
|
|
11420
11423
|
return;
|
|
@@ -11446,7 +11449,7 @@ function up22(db) {
|
|
|
11446
11449
|
CREATE INDEX idx_skill_meta_source ON skill_meta(source);
|
|
11447
11450
|
`);
|
|
11448
11451
|
}
|
|
11449
|
-
function
|
|
11452
|
+
function up24(db) {
|
|
11450
11453
|
const entityCols = db.prepare("PRAGMA table_info(entities)").all();
|
|
11451
11454
|
const entityColNames = new Set(entityCols.flatMap((c2) => typeof c2.name === "string" ? [c2.name] : []));
|
|
11452
11455
|
if (!entityColNames.has("agent_id")) {
|
|
@@ -11531,13 +11534,13 @@ function addColumnIfMissing8(db, table, column, definition) {
|
|
|
11531
11534
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11532
11535
|
}
|
|
11533
11536
|
}
|
|
11534
|
-
function
|
|
11537
|
+
function up25(db) {
|
|
11535
11538
|
addColumnIfMissing8(db, "session_memories", "entity_slot", "INTEGER");
|
|
11536
11539
|
addColumnIfMissing8(db, "session_memories", "aspect_slot", "INTEGER");
|
|
11537
11540
|
addColumnIfMissing8(db, "session_memories", "is_constraint", "INTEGER NOT NULL DEFAULT 0");
|
|
11538
11541
|
addColumnIfMissing8(db, "session_memories", "structural_density", "INTEGER");
|
|
11539
11542
|
}
|
|
11540
|
-
function
|
|
11543
|
+
function up26(db) {
|
|
11541
11544
|
const columns = db.prepare("PRAGMA table_info(session_checkpoints)").all();
|
|
11542
11545
|
const columnNames = new Set(columns.flatMap((column) => typeof column.name === "string" ? [column.name] : []));
|
|
11543
11546
|
if (!columnNames.has("focal_entity_ids")) {
|
|
@@ -11562,25 +11565,25 @@ function addColumnIfMissing9(db, table, column, definition) {
|
|
|
11562
11565
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11563
11566
|
}
|
|
11564
11567
|
}
|
|
11565
|
-
function
|
|
11568
|
+
function up27(db) {
|
|
11566
11569
|
addColumnIfMissing9(db, "entities", "pinned", "INTEGER NOT NULL DEFAULT 0");
|
|
11567
11570
|
addColumnIfMissing9(db, "entities", "pinned_at", "TEXT");
|
|
11568
11571
|
db.exec("CREATE INDEX IF NOT EXISTS idx_entities_pinned ON entities(agent_id, pinned, pinned_at DESC)");
|
|
11569
11572
|
}
|
|
11570
|
-
function up27(_db) {}
|
|
11571
11573
|
function up28(_db) {}
|
|
11574
|
+
function up29(_db) {}
|
|
11572
11575
|
function addColumnIfMissing10(db, table, column, definition) {
|
|
11573
11576
|
const cols = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
11574
11577
|
if (!cols.some((c2) => c2.name === column)) {
|
|
11575
11578
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11576
11579
|
}
|
|
11577
11580
|
}
|
|
11578
|
-
function
|
|
11581
|
+
function up30(db) {
|
|
11579
11582
|
addColumnIfMissing10(db, "session_memories", "agent_relevance_score", "REAL");
|
|
11580
11583
|
addColumnIfMissing10(db, "session_memories", "agent_feedback_count", "INTEGER DEFAULT 0");
|
|
11581
11584
|
}
|
|
11582
|
-
function
|
|
11583
|
-
function
|
|
11585
|
+
function up31(_db) {}
|
|
11586
|
+
function up32(db) {
|
|
11584
11587
|
db.exec(`
|
|
11585
11588
|
UPDATE entities
|
|
11586
11589
|
SET canonical_name = REPLACE(REPLACE(REPLACE(
|
|
@@ -11589,7 +11592,7 @@ function up31(db) {
|
|
|
11589
11592
|
WHERE canonical_name IS NULL
|
|
11590
11593
|
`);
|
|
11591
11594
|
}
|
|
11592
|
-
function
|
|
11595
|
+
function up33(db) {
|
|
11593
11596
|
db.exec(`
|
|
11594
11597
|
CREATE TABLE IF NOT EXISTS memories_cold (
|
|
11595
11598
|
archive_id TEXT PRIMARY KEY,
|
|
@@ -11626,7 +11629,7 @@ function up32(db) {
|
|
|
11626
11629
|
CREATE INDEX IF NOT EXISTS idx_cold_source ON memories_cold(cold_source_id);
|
|
11627
11630
|
`);
|
|
11628
11631
|
}
|
|
11629
|
-
function
|
|
11632
|
+
function up34(db) {
|
|
11630
11633
|
db.exec(`
|
|
11631
11634
|
CREATE TABLE IF NOT EXISTS session_summaries (
|
|
11632
11635
|
id TEXT PRIMARY KEY,
|
|
@@ -11671,7 +11674,7 @@ function up33(db) {
|
|
|
11671
11674
|
WHERE session_key IS NOT NULL;
|
|
11672
11675
|
`);
|
|
11673
11676
|
}
|
|
11674
|
-
function
|
|
11677
|
+
function up35(db) {
|
|
11675
11678
|
db.exec(`
|
|
11676
11679
|
CREATE TABLE IF NOT EXISTS memory_jobs_new (
|
|
11677
11680
|
id TEXT PRIMARY KEY,
|
|
@@ -11716,7 +11719,7 @@ function up34(db) {
|
|
|
11716
11719
|
ON memory_jobs(failed_at);
|
|
11717
11720
|
`);
|
|
11718
11721
|
}
|
|
11719
|
-
function
|
|
11722
|
+
function up36(db) {
|
|
11720
11723
|
const depCols = db.prepare("PRAGMA table_info(entity_dependencies)").all();
|
|
11721
11724
|
if (!depCols.some((c2) => c2.name === "reason")) {
|
|
11722
11725
|
db.exec("ALTER TABLE entity_dependencies ADD COLUMN reason TEXT");
|
|
@@ -11726,7 +11729,7 @@ function up35(db) {
|
|
|
11726
11729
|
db.exec("ALTER TABLE entities ADD COLUMN last_synthesized_at TEXT");
|
|
11727
11730
|
}
|
|
11728
11731
|
}
|
|
11729
|
-
function
|
|
11732
|
+
function up37(db) {
|
|
11730
11733
|
const cols = db.prepare("PRAGMA table_info(embeddings)").all();
|
|
11731
11734
|
if (cols.length === 0)
|
|
11732
11735
|
return;
|
|
@@ -11734,14 +11737,14 @@ function up36(db) {
|
|
|
11734
11737
|
db.exec("ALTER TABLE embeddings ADD COLUMN vector BLOB");
|
|
11735
11738
|
}
|
|
11736
11739
|
}
|
|
11737
|
-
function
|
|
11740
|
+
function up38(db) {
|
|
11738
11741
|
const cols = db.prepare("PRAGMA table_info(memories)").all();
|
|
11739
11742
|
if (!cols.some((c2) => c2.name === "scope")) {
|
|
11740
11743
|
db.exec("ALTER TABLE memories ADD COLUMN scope TEXT DEFAULT NULL");
|
|
11741
11744
|
}
|
|
11742
11745
|
db.exec("CREATE INDEX IF NOT EXISTS idx_memories_scope ON memories(scope) WHERE scope IS NOT NULL");
|
|
11743
11746
|
}
|
|
11744
|
-
function
|
|
11747
|
+
function up39(db) {
|
|
11745
11748
|
db.exec("DROP INDEX IF EXISTS idx_memories_content_hash_unique");
|
|
11746
11749
|
db.exec(`
|
|
11747
11750
|
CREATE UNIQUE INDEX idx_memories_content_hash_unique
|
|
@@ -11749,7 +11752,7 @@ function up38(db) {
|
|
|
11749
11752
|
WHERE content_hash IS NOT NULL AND is_deleted = 0
|
|
11750
11753
|
`);
|
|
11751
11754
|
}
|
|
11752
|
-
function
|
|
11755
|
+
function up40(db) {
|
|
11753
11756
|
db.exec(`
|
|
11754
11757
|
CREATE VIRTUAL TABLE IF NOT EXISTS entities_fts USING fts5(
|
|
11755
11758
|
name, canonical_name,
|
|
@@ -11781,13 +11784,13 @@ function up39(db) {
|
|
|
11781
11784
|
END
|
|
11782
11785
|
`);
|
|
11783
11786
|
}
|
|
11784
|
-
function
|
|
11787
|
+
function up41(db) {
|
|
11785
11788
|
const cols = db.prepare("PRAGMA table_info(entity_dependencies)").all();
|
|
11786
11789
|
if (!cols.some((c2) => c2.name === "confidence")) {
|
|
11787
11790
|
db.exec("ALTER TABLE entity_dependencies ADD COLUMN confidence REAL DEFAULT 0.7");
|
|
11788
11791
|
}
|
|
11789
11792
|
}
|
|
11790
|
-
function
|
|
11793
|
+
function up42(db) {
|
|
11791
11794
|
db.exec(`
|
|
11792
11795
|
CREATE TABLE IF NOT EXISTS entity_communities (
|
|
11793
11796
|
id TEXT PRIMARY KEY,
|
|
@@ -11805,7 +11808,7 @@ function up41(db) {
|
|
|
11805
11808
|
db.exec("ALTER TABLE entities ADD COLUMN community_id TEXT REFERENCES entity_communities(id)");
|
|
11806
11809
|
}
|
|
11807
11810
|
}
|
|
11808
|
-
function
|
|
11811
|
+
function up43(db) {
|
|
11809
11812
|
db.exec(`
|
|
11810
11813
|
CREATE TABLE IF NOT EXISTS memory_hints (
|
|
11811
11814
|
id TEXT PRIMARY KEY,
|
|
@@ -11845,7 +11848,7 @@ function up42(db) {
|
|
|
11845
11848
|
END
|
|
11846
11849
|
`);
|
|
11847
11850
|
}
|
|
11848
|
-
function
|
|
11851
|
+
function up44(db) {
|
|
11849
11852
|
db.exec(`
|
|
11850
11853
|
DELETE FROM entity_dependencies
|
|
11851
11854
|
WHERE id NOT IN (
|
|
@@ -11863,7 +11866,7 @@ function up43(db) {
|
|
|
11863
11866
|
)
|
|
11864
11867
|
`);
|
|
11865
11868
|
}
|
|
11866
|
-
function
|
|
11869
|
+
function up45(db) {
|
|
11867
11870
|
db.exec(`
|
|
11868
11871
|
CREATE TABLE IF NOT EXISTS session_transcripts (
|
|
11869
11872
|
session_key TEXT PRIMARY KEY,
|
|
@@ -11886,7 +11889,7 @@ function addColumnIfMissing11(db, table, column, definition) {
|
|
|
11886
11889
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11887
11890
|
}
|
|
11888
11891
|
}
|
|
11889
|
-
function
|
|
11892
|
+
function up46(db) {
|
|
11890
11893
|
addColumnIfMissing11(db, "session_memories", "path_json", "TEXT");
|
|
11891
11894
|
db.exec(`
|
|
11892
11895
|
CREATE TABLE IF NOT EXISTS path_feedback_events (
|
|
@@ -11961,7 +11964,7 @@ function addColumnIfMissing12(db, table, column, definition) {
|
|
|
11961
11964
|
return;
|
|
11962
11965
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11963
11966
|
}
|
|
11964
|
-
function
|
|
11967
|
+
function up47(db) {
|
|
11965
11968
|
addColumnIfMissing12(db, "session_memories", "entity_slot", "INTEGER");
|
|
11966
11969
|
addColumnIfMissing12(db, "session_memories", "aspect_slot", "INTEGER");
|
|
11967
11970
|
addColumnIfMissing12(db, "session_memories", "is_constraint", "INTEGER NOT NULL DEFAULT 0");
|
|
@@ -12049,7 +12052,7 @@ function addColumnIfMissing13(db, table, column, definition) {
|
|
|
12049
12052
|
return;
|
|
12050
12053
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12051
12054
|
}
|
|
12052
|
-
function
|
|
12055
|
+
function up48(db) {
|
|
12053
12056
|
db.exec(`
|
|
12054
12057
|
CREATE TABLE IF NOT EXISTS agents (
|
|
12055
12058
|
id TEXT PRIMARY KEY,
|
|
@@ -12078,7 +12081,7 @@ function addColumnIfMissing14(db, table, column, definition) {
|
|
|
12078
12081
|
return;
|
|
12079
12082
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12080
12083
|
}
|
|
12081
|
-
function
|
|
12084
|
+
function up49(db) {
|
|
12082
12085
|
addColumnIfMissing14(db, "session_summaries", "source_type", "TEXT");
|
|
12083
12086
|
addColumnIfMissing14(db, "session_summaries", "source_ref", "TEXT");
|
|
12084
12087
|
addColumnIfMissing14(db, "session_summaries", "meta_json", "TEXT");
|
|
@@ -12104,7 +12107,7 @@ function addColumnIfMissing15(db, table, column, definition) {
|
|
|
12104
12107
|
return;
|
|
12105
12108
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12106
12109
|
}
|
|
12107
|
-
function
|
|
12110
|
+
function up50(db) {
|
|
12108
12111
|
addColumnIfMissing15(db, "session_transcripts", "updated_at", "TEXT");
|
|
12109
12112
|
addColumnIfMissing15(db, "summary_jobs", "agent_id", "TEXT NOT NULL DEFAULT 'default'");
|
|
12110
12113
|
addColumnIfMissing15(db, "session_scores", "agent_id", "TEXT NOT NULL DEFAULT 'default'");
|
|
@@ -12175,7 +12178,7 @@ function up49(db) {
|
|
|
12175
12178
|
ON memory_md_heads(lease_expires_at);
|
|
12176
12179
|
`);
|
|
12177
12180
|
}
|
|
12178
|
-
function
|
|
12181
|
+
function up51(db) {
|
|
12179
12182
|
db.exec(`
|
|
12180
12183
|
DROP INDEX IF EXISTS idx_summaries_session_depth;
|
|
12181
12184
|
|
|
@@ -12236,7 +12239,7 @@ function up50(db) {
|
|
|
12236
12239
|
AND COALESCE(source_type, 'summary') = 'summary';
|
|
12237
12240
|
`);
|
|
12238
12241
|
}
|
|
12239
|
-
function
|
|
12242
|
+
function up52(db) {
|
|
12240
12243
|
db.exec(`
|
|
12241
12244
|
DROP TRIGGER IF EXISTS session_transcripts_fts_ai;
|
|
12242
12245
|
DROP TRIGGER IF EXISTS session_transcripts_fts_ad;
|
|
@@ -12334,7 +12337,7 @@ function up51(db) {
|
|
|
12334
12337
|
AND COALESCE(source_type, 'summary') = 'summary';
|
|
12335
12338
|
`);
|
|
12336
12339
|
}
|
|
12337
|
-
function
|
|
12340
|
+
function up53(db) {
|
|
12338
12341
|
db.exec(`
|
|
12339
12342
|
CREATE TABLE IF NOT EXISTS memory_thread_heads (
|
|
12340
12343
|
agent_id TEXT NOT NULL DEFAULT 'default',
|
|
@@ -12452,7 +12455,7 @@ function up52(db) {
|
|
|
12452
12455
|
WHERE excluded.latest_at >= memory_thread_heads.latest_at;
|
|
12453
12456
|
`);
|
|
12454
12457
|
}
|
|
12455
|
-
function
|
|
12458
|
+
function up54(db) {
|
|
12456
12459
|
db.exec(`
|
|
12457
12460
|
CREATE TABLE IF NOT EXISTS session_extract_cursors (
|
|
12458
12461
|
session_key TEXT NOT NULL,
|
|
@@ -12469,7 +12472,7 @@ function hasTable(db, name) {
|
|
|
12469
12472
|
WHERE type = 'table' AND name = ?
|
|
12470
12473
|
LIMIT 1`).get(name) !== undefined;
|
|
12471
12474
|
}
|
|
12472
|
-
function
|
|
12475
|
+
function up55(db) {
|
|
12473
12476
|
db.exec(`
|
|
12474
12477
|
CREATE TABLE IF NOT EXISTS entity_dependency_history (
|
|
12475
12478
|
id TEXT PRIMARY KEY,
|
|
@@ -12639,7 +12642,7 @@ function addColumnIfMissing16(db, table, column, definition) {
|
|
|
12639
12642
|
return;
|
|
12640
12643
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12641
12644
|
}
|
|
12642
|
-
function
|
|
12645
|
+
function up56(db) {
|
|
12643
12646
|
addColumnIfMissing16(db, "summary_jobs", "session_id", "TEXT");
|
|
12644
12647
|
addColumnIfMissing16(db, "summary_jobs", "trigger", "TEXT NOT NULL DEFAULT 'session_end'");
|
|
12645
12648
|
addColumnIfMissing16(db, "summary_jobs", "captured_at", "TEXT");
|
|
@@ -12731,24 +12734,8 @@ function up55(db) {
|
|
|
12731
12734
|
VALUES ('rebuild');
|
|
12732
12735
|
`);
|
|
12733
12736
|
}
|
|
12734
|
-
function
|
|
12735
|
-
|
|
12736
|
-
CREATE TABLE IF NOT EXISTS mcp_invocations (
|
|
12737
|
-
id TEXT PRIMARY KEY,
|
|
12738
|
-
server_id TEXT NOT NULL,
|
|
12739
|
-
tool_name TEXT NOT NULL,
|
|
12740
|
-
agent_id TEXT NOT NULL DEFAULT 'default',
|
|
12741
|
-
source TEXT NOT NULL CHECK(source IN ('cli','agent','mcp','dashboard')),
|
|
12742
|
-
latency_ms INTEGER NOT NULL,
|
|
12743
|
-
success INTEGER NOT NULL DEFAULT 1,
|
|
12744
|
-
error_text TEXT,
|
|
12745
|
-
created_at TEXT NOT NULL DEFAULT (datetime('now'))
|
|
12746
|
-
);
|
|
12747
|
-
CREATE INDEX IF NOT EXISTS idx_mcp_inv_server ON mcp_invocations(server_id, created_at);
|
|
12748
|
-
CREATE INDEX IF NOT EXISTS idx_mcp_inv_agent ON mcp_invocations(agent_id, created_at);
|
|
12749
|
-
`);
|
|
12750
|
-
}
|
|
12751
|
-
function up57(db) {
|
|
12737
|
+
function up57(_db) {}
|
|
12738
|
+
function up58(db) {
|
|
12752
12739
|
db.exec(`
|
|
12753
12740
|
CREATE TABLE IF NOT EXISTS skill_invocations (
|
|
12754
12741
|
id TEXT PRIMARY KEY,
|
|
@@ -12764,7 +12751,7 @@ function up57(db) {
|
|
|
12764
12751
|
CREATE INDEX IF NOT EXISTS idx_skill_inv_agent ON skill_invocations(agent_id, created_at);
|
|
12765
12752
|
`);
|
|
12766
12753
|
}
|
|
12767
|
-
function
|
|
12754
|
+
function up59(db) {
|
|
12768
12755
|
db.exec(`
|
|
12769
12756
|
CREATE TABLE IF NOT EXISTS task_scope_hints (
|
|
12770
12757
|
task_id TEXT PRIMARY KEY REFERENCES scheduled_tasks(id) ON DELETE CASCADE,
|
|
@@ -12795,7 +12782,7 @@ function up58(db) {
|
|
|
12795
12782
|
ON task_scope_hints(agent_id, updated_at);
|
|
12796
12783
|
`);
|
|
12797
12784
|
}
|
|
12798
|
-
function
|
|
12785
|
+
function up60(db) {
|
|
12799
12786
|
db.exec(`
|
|
12800
12787
|
CREATE TABLE IF NOT EXISTS dreaming_state (
|
|
12801
12788
|
agent_id TEXT PRIMARY KEY NOT NULL,
|
|
@@ -12838,7 +12825,7 @@ function ensureMemoriesScopeColumns(db) {
|
|
|
12838
12825
|
if (!names.has("scope"))
|
|
12839
12826
|
db.exec("ALTER TABLE memories ADD COLUMN scope TEXT");
|
|
12840
12827
|
}
|
|
12841
|
-
function
|
|
12828
|
+
function up61(db) {
|
|
12842
12829
|
ensureMemoriesScopeColumns(db);
|
|
12843
12830
|
db.exec("DROP INDEX IF EXISTS idx_memories_content_hash_unique");
|
|
12844
12831
|
db.exec(`
|
|
@@ -12851,20 +12838,20 @@ function up60(db) {
|
|
|
12851
12838
|
WHERE content_hash IS NOT NULL AND is_deleted = 0
|
|
12852
12839
|
`);
|
|
12853
12840
|
}
|
|
12854
|
-
function
|
|
12841
|
+
function up62(db) {
|
|
12855
12842
|
const sql = readMemoriesFtsSql(db);
|
|
12856
12843
|
if (sql !== null && !memoriesFtsNeedsTokenizerRepair(sql))
|
|
12857
12844
|
return;
|
|
12858
12845
|
recreateMemoriesFts(db);
|
|
12859
12846
|
}
|
|
12860
|
-
function
|
|
12847
|
+
function up63(db) {
|
|
12861
12848
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_entities_order
|
|
12862
12849
|
ON entities(agent_id, pinned DESC, pinned_at DESC, mentions DESC, updated_at DESC, name)`);
|
|
12863
12850
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_entities_extracted_mentions
|
|
12864
12851
|
ON entities(entity_type, mentions)
|
|
12865
12852
|
WHERE entity_type = 'extracted'`);
|
|
12866
12853
|
}
|
|
12867
|
-
function
|
|
12854
|
+
function up64(db) {
|
|
12868
12855
|
const cols = db.prepare("PRAGMA table_info(entity_attributes)").all();
|
|
12869
12856
|
if (!cols.some((col) => col.name === "claim_key")) {
|
|
12870
12857
|
db.exec("ALTER TABLE entity_attributes ADD COLUMN claim_key TEXT");
|
|
@@ -12873,7 +12860,7 @@ function up63(db) {
|
|
|
12873
12860
|
ON entity_attributes(agent_id, aspect_id, claim_key, status)
|
|
12874
12861
|
WHERE claim_key IS NOT NULL`);
|
|
12875
12862
|
}
|
|
12876
|
-
function
|
|
12863
|
+
function up65(db) {
|
|
12877
12864
|
const cols = db.prepare("PRAGMA table_info(entity_attributes)").all();
|
|
12878
12865
|
if (!cols.some((col) => col.name === "group_key")) {
|
|
12879
12866
|
db.exec("ALTER TABLE entity_attributes ADD COLUMN group_key TEXT");
|
|
@@ -12885,13 +12872,13 @@ function up64(db) {
|
|
|
12885
12872
|
ON entity_attributes(agent_id, aspect_id, group_key, claim_key, status)
|
|
12886
12873
|
WHERE claim_key IS NOT NULL`);
|
|
12887
12874
|
}
|
|
12888
|
-
function
|
|
12875
|
+
function up66(db) {
|
|
12889
12876
|
const cols = db.prepare("PRAGMA table_info(memory_artifacts)").all();
|
|
12890
12877
|
if (cols.some((col) => col.name === "source_mtime_ms"))
|
|
12891
12878
|
return;
|
|
12892
12879
|
db.exec("ALTER TABLE memory_artifacts ADD COLUMN source_mtime_ms REAL");
|
|
12893
12880
|
}
|
|
12894
|
-
function
|
|
12881
|
+
function up67(db) {
|
|
12895
12882
|
const cols = db.prepare("PRAGMA table_info(memory_artifacts)").all();
|
|
12896
12883
|
const names = new Set(cols.map((col) => col.name));
|
|
12897
12884
|
if (!names.has("is_deleted")) {
|
|
@@ -12905,7 +12892,7 @@ function up66(db) {
|
|
|
12905
12892
|
ON memory_artifacts(agent_id, is_deleted, deleted_at)
|
|
12906
12893
|
`);
|
|
12907
12894
|
}
|
|
12908
|
-
function
|
|
12895
|
+
function up68(db) {
|
|
12909
12896
|
db.exec("DROP TRIGGER IF EXISTS memories_au");
|
|
12910
12897
|
db.exec(`
|
|
12911
12898
|
CREATE TRIGGER IF NOT EXISTS memories_au AFTER UPDATE OF content ON memories BEGIN
|
|
@@ -12923,7 +12910,7 @@ function addColumnIfMissing17(db, table, column, definition) {
|
|
|
12923
12910
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12924
12911
|
}
|
|
12925
12912
|
}
|
|
12926
|
-
function
|
|
12913
|
+
function up69(db) {
|
|
12927
12914
|
for (const table of ["entities", "entity_communities", "entity_attributes", "entity_dependencies"]) {
|
|
12928
12915
|
addColumnIfMissing17(db, table, "source_id", "TEXT");
|
|
12929
12916
|
addColumnIfMissing17(db, table, "source_kind", "TEXT");
|
|
@@ -12943,7 +12930,7 @@ function hasColumn7(db, table, column) {
|
|
|
12943
12930
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
12944
12931
|
return rows.some((row) => row.name === column);
|
|
12945
12932
|
}
|
|
12946
|
-
function
|
|
12933
|
+
function up70(db) {
|
|
12947
12934
|
if (!hasTable2(db, "embeddings"))
|
|
12948
12935
|
return;
|
|
12949
12936
|
if (!hasColumn7(db, "embeddings", "agent_id")) {
|
|
@@ -12951,7 +12938,7 @@ function up69(db) {
|
|
|
12951
12938
|
}
|
|
12952
12939
|
db.exec("CREATE INDEX IF NOT EXISTS idx_embeddings_agent_source ON embeddings(agent_id, source_type, source_id)");
|
|
12953
12940
|
}
|
|
12954
|
-
function
|
|
12941
|
+
function up71(db) {
|
|
12955
12942
|
db.exec(`
|
|
12956
12943
|
CREATE TABLE IF NOT EXISTS memory_search_telemetry (
|
|
12957
12944
|
id TEXT PRIMARY KEY,
|
|
@@ -12992,7 +12979,7 @@ function addColumnIfMissing18(db, table, column, definition) {
|
|
|
12992
12979
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12993
12980
|
}
|
|
12994
12981
|
}
|
|
12995
|
-
function
|
|
12982
|
+
function up72(db) {
|
|
12996
12983
|
db.exec(`
|
|
12997
12984
|
CREATE TABLE IF NOT EXISTS ontology_proposals (
|
|
12998
12985
|
id TEXT PRIMARY KEY,
|
|
@@ -13035,7 +13022,7 @@ function up71(db) {
|
|
|
13035
13022
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_${table}_proposal ON ${table}(agent_id, proposal_id)`);
|
|
13036
13023
|
}
|
|
13037
13024
|
}
|
|
13038
|
-
function
|
|
13025
|
+
function up73(db) {
|
|
13039
13026
|
db.exec(`
|
|
13040
13027
|
CREATE TABLE IF NOT EXISTS daily_reflections (
|
|
13041
13028
|
id TEXT PRIMARY KEY,
|
|
@@ -13062,7 +13049,7 @@ function up72(db) {
|
|
|
13062
13049
|
WHERE content_key IS NOT NULL;
|
|
13063
13050
|
`);
|
|
13064
13051
|
}
|
|
13065
|
-
function
|
|
13052
|
+
function up74(db) {
|
|
13066
13053
|
const cols = db.prepare("PRAGMA table_info(daily_reflections)").all();
|
|
13067
13054
|
const colNames = new Set(cols.flatMap((c2) => typeof c2.name === "string" ? [c2.name] : []));
|
|
13068
13055
|
if (!colNames.has("content_key")) {
|
|
@@ -13099,7 +13086,7 @@ function backfillVersionRoots(db) {
|
|
|
13099
13086
|
WHERE version_root_id IS NULL
|
|
13100
13087
|
`);
|
|
13101
13088
|
}
|
|
13102
|
-
function
|
|
13089
|
+
function up75(db) {
|
|
13103
13090
|
for (const table of ["entities", "entity_aspects", "entity_dependencies"]) {
|
|
13104
13091
|
addColumnIfMissing19(db, table, "status", "TEXT NOT NULL DEFAULT 'active'");
|
|
13105
13092
|
addColumnIfMissing19(db, table, "archived_at", "TEXT");
|
|
@@ -13134,7 +13121,7 @@ function up74(db) {
|
|
|
13134
13121
|
ON entity_aspects(agent_id, proposal_id);
|
|
13135
13122
|
`);
|
|
13136
13123
|
}
|
|
13137
|
-
function
|
|
13124
|
+
function up76(db) {
|
|
13138
13125
|
db.exec(`
|
|
13139
13126
|
CREATE TABLE IF NOT EXISTS epistemic_assertions (
|
|
13140
13127
|
id TEXT PRIMARY KEY,
|
|
@@ -13190,7 +13177,7 @@ function ensureMemoriesScopeColumns2(db) {
|
|
|
13190
13177
|
if (!names.has("runtime_path"))
|
|
13191
13178
|
db.exec("ALTER TABLE memories ADD COLUMN runtime_path TEXT");
|
|
13192
13179
|
}
|
|
13193
|
-
function
|
|
13180
|
+
function up77(db) {
|
|
13194
13181
|
ensureMemoriesScopeColumns2(db);
|
|
13195
13182
|
db.exec("DROP INDEX IF EXISTS idx_memories_idempotency_key");
|
|
13196
13183
|
db.exec(`
|
|
@@ -13204,7 +13191,7 @@ function up76(db) {
|
|
|
13204
13191
|
WHERE idempotency_key IS NOT NULL AND is_deleted = 0
|
|
13205
13192
|
`);
|
|
13206
13193
|
}
|
|
13207
|
-
function
|
|
13194
|
+
function up78(db) {
|
|
13208
13195
|
db.exec(`
|
|
13209
13196
|
CREATE TABLE IF NOT EXISTS session_context_epochs (
|
|
13210
13197
|
session_key TEXT NOT NULL,
|
|
@@ -13239,7 +13226,7 @@ function up77(db) {
|
|
|
13239
13226
|
ON session_recall_events(item_kind, item_id, created_at DESC);
|
|
13240
13227
|
`);
|
|
13241
13228
|
}
|
|
13242
|
-
function
|
|
13229
|
+
function up79(db) {
|
|
13243
13230
|
db.exec(`
|
|
13244
13231
|
CREATE TABLE IF NOT EXISTS aggregate_memory_sources (
|
|
13245
13232
|
aggregate_memory_id TEXT NOT NULL,
|
|
@@ -13258,7 +13245,7 @@ function addColumnIfMissing20(db, table, column, definition) {
|
|
|
13258
13245
|
return;
|
|
13259
13246
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
13260
13247
|
}
|
|
13261
|
-
function
|
|
13248
|
+
function up80(db) {
|
|
13262
13249
|
addColumnIfMissing20(db, "memory_artifacts", "source_id", "TEXT");
|
|
13263
13250
|
addColumnIfMissing20(db, "memory_artifacts", "source_root", "TEXT");
|
|
13264
13251
|
addColumnIfMissing20(db, "memory_artifacts", "source_external_id", "TEXT");
|
|
@@ -13271,7 +13258,7 @@ function up79(db) {
|
|
|
13271
13258
|
ON memory_artifacts(agent_id, source_id, source_root);
|
|
13272
13259
|
`);
|
|
13273
13260
|
}
|
|
13274
|
-
function
|
|
13261
|
+
function up81(db) {
|
|
13275
13262
|
db.exec(`
|
|
13276
13263
|
CREATE TABLE IF NOT EXISTS temporal_edges (
|
|
13277
13264
|
id TEXT PRIMARY KEY,
|
|
@@ -13294,7 +13281,7 @@ function up80(db) {
|
|
|
13294
13281
|
ON temporal_edges(agent_id, subject_type, subject_id);
|
|
13295
13282
|
`);
|
|
13296
13283
|
}
|
|
13297
|
-
function
|
|
13284
|
+
function up82(db) {
|
|
13298
13285
|
db.exec(`
|
|
13299
13286
|
CREATE TABLE IF NOT EXISTS entity_aliases (
|
|
13300
13287
|
id TEXT PRIMARY KEY,
|
|
@@ -13318,7 +13305,7 @@ function up81(db) {
|
|
|
13318
13305
|
ON entity_aliases(agent_id, canonical_alias, status);
|
|
13319
13306
|
`);
|
|
13320
13307
|
}
|
|
13321
|
-
function
|
|
13308
|
+
function up83(db) {
|
|
13322
13309
|
db.exec(`
|
|
13323
13310
|
CREATE TABLE IF NOT EXISTS api_keys (
|
|
13324
13311
|
id TEXT PRIMARY KEY,
|
|
@@ -13346,7 +13333,7 @@ function up82(db) {
|
|
|
13346
13333
|
ON api_keys(connector, harness);
|
|
13347
13334
|
`);
|
|
13348
13335
|
}
|
|
13349
|
-
function
|
|
13336
|
+
function up84(db) {
|
|
13350
13337
|
db.exec(`
|
|
13351
13338
|
CREATE TABLE IF NOT EXISTS transcript_capture_jobs (
|
|
13352
13339
|
id TEXT PRIMARY KEY,
|
|
@@ -13381,7 +13368,7 @@ function hasColumn10(db, table, column) {
|
|
|
13381
13368
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
13382
13369
|
return rows.some((row) => row.name === column);
|
|
13383
13370
|
}
|
|
13384
|
-
function
|
|
13371
|
+
function up85(db) {
|
|
13385
13372
|
if (!hasColumn10(db, "documents", "agent_id")) {
|
|
13386
13373
|
db.exec("ALTER TABLE documents ADD COLUMN agent_id TEXT NOT NULL DEFAULT 'default'");
|
|
13387
13374
|
}
|
|
@@ -13467,7 +13454,7 @@ function up84(db) {
|
|
|
13467
13454
|
db.exec("CREATE INDEX IF NOT EXISTS idx_documents_agent_project ON documents(agent_id, project)");
|
|
13468
13455
|
db.exec("CREATE INDEX IF NOT EXISTS idx_documents_source_scope ON documents(source_url, agent_id, project)");
|
|
13469
13456
|
}
|
|
13470
|
-
function
|
|
13457
|
+
function up86(db) {
|
|
13471
13458
|
db.exec(`
|
|
13472
13459
|
CREATE TABLE IF NOT EXISTS aggregate_evidence_sources (
|
|
13473
13460
|
aggregate_memory_id TEXT NOT NULL,
|
|
@@ -13489,7 +13476,7 @@ function hasColumn11(db, table, column) {
|
|
|
13489
13476
|
return rows.some((row) => row.name === column);
|
|
13490
13477
|
}
|
|
13491
13478
|
var COLUMNS = ["harness", "session_id", "tool_use_id", "cwd", "origin", "args"];
|
|
13492
|
-
function
|
|
13479
|
+
function up87(db) {
|
|
13493
13480
|
for (const column of COLUMNS) {
|
|
13494
13481
|
if (!hasColumn11(db, "skill_invocations", column)) {
|
|
13495
13482
|
db.exec(`ALTER TABLE skill_invocations ADD COLUMN ${column} TEXT`);
|
|
@@ -13570,7 +13557,7 @@ function documentScopeColumnsPreservingExisting(db) {
|
|
|
13570
13557
|
`);
|
|
13571
13558
|
}
|
|
13572
13559
|
try {
|
|
13573
|
-
|
|
13560
|
+
up85(db);
|
|
13574
13561
|
if (preserveAgentId) {
|
|
13575
13562
|
db.exec(`
|
|
13576
13563
|
UPDATE documents
|
|
@@ -13590,12 +13577,12 @@ function documentScopeColumnsPreservingExisting(db) {
|
|
|
13590
13577
|
db.exec("DROP TABLE IF EXISTS temp.__signet_doc_project_guard");
|
|
13591
13578
|
}
|
|
13592
13579
|
}
|
|
13593
|
-
function
|
|
13594
|
-
|
|
13580
|
+
function up88(db) {
|
|
13581
|
+
up84(db);
|
|
13595
13582
|
if (hasTable3(db, "documents")) {
|
|
13596
13583
|
documentScopeColumnsPreservingExisting(db);
|
|
13597
13584
|
}
|
|
13598
|
-
|
|
13585
|
+
up86(db);
|
|
13599
13586
|
addColumnIfMissing21(db, "memories", "superseded_by", "TEXT");
|
|
13600
13587
|
addColumnIfMissing21(db, "memories", "superseded_at", "TEXT");
|
|
13601
13588
|
addColumnIfMissing21(db, "memories", "superseded_reason", "TEXT");
|
|
@@ -13652,7 +13639,7 @@ function up87(db) {
|
|
|
13652
13639
|
AND ${sourceAgentId} = ${targetAgentId}
|
|
13653
13640
|
`);
|
|
13654
13641
|
}
|
|
13655
|
-
function
|
|
13642
|
+
function up89(db) {
|
|
13656
13643
|
db.exec(`
|
|
13657
13644
|
CREATE TABLE IF NOT EXISTS legacy_markdown_imports (
|
|
13658
13645
|
path TEXT PRIMARY KEY,
|
|
@@ -13682,7 +13669,7 @@ function up88(db) {
|
|
|
13682
13669
|
ON legacy_markdown_chunks(memory_id);
|
|
13683
13670
|
`);
|
|
13684
13671
|
}
|
|
13685
|
-
function
|
|
13672
|
+
function up90(db) {
|
|
13686
13673
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name IN ('relations', 'entity_dependencies')").all();
|
|
13687
13674
|
const tableNames = new Set(tables.map((r2) => String(r2.name)));
|
|
13688
13675
|
if (!tableNames.has("relations") || !tableNames.has("entity_dependencies"))
|
|
@@ -13741,7 +13728,7 @@ function addColumnIfMissing22(db, table, column, definition) {
|
|
|
13741
13728
|
return;
|
|
13742
13729
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
13743
13730
|
}
|
|
13744
|
-
function
|
|
13731
|
+
function up91(db) {
|
|
13745
13732
|
addColumnIfMissing22(db, "summary_jobs", "content_hash", "TEXT");
|
|
13746
13733
|
db.exec(`
|
|
13747
13734
|
CREATE INDEX IF NOT EXISTS idx_summary_jobs_agent_session_content_hash
|
|
@@ -13754,14 +13741,14 @@ function addColumnIfMissing23(db, table, column, definition) {
|
|
|
13754
13741
|
return;
|
|
13755
13742
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
13756
13743
|
}
|
|
13757
|
-
function
|
|
13744
|
+
function up92(db) {
|
|
13758
13745
|
addColumnIfMissing23(db, "summary_jobs", "boundary_reason", "TEXT");
|
|
13759
13746
|
db.exec(`
|
|
13760
13747
|
CREATE INDEX IF NOT EXISTS idx_summary_jobs_boundary_reason
|
|
13761
13748
|
ON summary_jobs(agent_id, session_key, boundary_reason)
|
|
13762
13749
|
`);
|
|
13763
13750
|
}
|
|
13764
|
-
function
|
|
13751
|
+
function up93(db) {
|
|
13765
13752
|
db.exec(`
|
|
13766
13753
|
CREATE TABLE IF NOT EXISTS transcript_recovery_files (
|
|
13767
13754
|
agent_id TEXT NOT NULL,
|
|
@@ -13779,7 +13766,7 @@ function up92(db) {
|
|
|
13779
13766
|
ON transcript_capture_jobs(agent_id, session_id, status);
|
|
13780
13767
|
`);
|
|
13781
13768
|
}
|
|
13782
|
-
function
|
|
13769
|
+
function up94(db) {
|
|
13783
13770
|
db.exec(`
|
|
13784
13771
|
CREATE TABLE IF NOT EXISTS job_cancellations (
|
|
13785
13772
|
id TEXT PRIMARY KEY,
|
|
@@ -13807,7 +13794,7 @@ function indexExists(db, table, indexName) {
|
|
|
13807
13794
|
const rows = db.prepare(`PRAGMA index_list(${table})`).all();
|
|
13808
13795
|
return rows.some((row) => row.name === indexName);
|
|
13809
13796
|
}
|
|
13810
|
-
function
|
|
13797
|
+
function up95(db) {
|
|
13811
13798
|
db.exec(`
|
|
13812
13799
|
CREATE TABLE IF NOT EXISTS job_archive (
|
|
13813
13800
|
id TEXT PRIMARY KEY,
|
|
@@ -13834,7 +13821,7 @@ function indexExists2(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 up96(db) {
|
|
13838
13825
|
db.exec(`
|
|
13839
13826
|
CREATE TABLE IF NOT EXISTS embedding_index_state (
|
|
13840
13827
|
id INTEGER PRIMARY KEY CHECK (id = 1),
|
|
@@ -13847,7 +13834,7 @@ function up95(db) {
|
|
|
13847
13834
|
)
|
|
13848
13835
|
`);
|
|
13849
13836
|
}
|
|
13850
|
-
function
|
|
13837
|
+
function up97(db) {
|
|
13851
13838
|
db.exec(`
|
|
13852
13839
|
CREATE TABLE IF NOT EXISTS embeddings_staging (
|
|
13853
13840
|
id TEXT PRIMARY KEY,
|
|
@@ -13866,7 +13853,7 @@ function up96(db) {
|
|
|
13866
13853
|
ON embeddings_staging(agent_id, source_type, source_id);
|
|
13867
13854
|
`);
|
|
13868
13855
|
}
|
|
13869
|
-
function
|
|
13856
|
+
function up98(db) {
|
|
13870
13857
|
const columns = db.prepare("PRAGMA table_info(dreaming_state)").all();
|
|
13871
13858
|
if (!columns.some((column) => column.name === "evidence_cursor")) {
|
|
13872
13859
|
db.exec("ALTER TABLE dreaming_state ADD COLUMN evidence_cursor TEXT");
|
|
@@ -13877,7 +13864,7 @@ function hasColumn13(db, table, column) {
|
|
|
13877
13864
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
13878
13865
|
return rows.some((r2) => r2.name === column);
|
|
13879
13866
|
}
|
|
13880
|
-
function
|
|
13867
|
+
function up99(db) {
|
|
13881
13868
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name = 'memories'").all();
|
|
13882
13869
|
if (tables.length === 0)
|
|
13883
13870
|
return;
|
|
@@ -13902,23 +13889,23 @@ function up98(db) {
|
|
|
13902
13889
|
function hasColumn14(db, table, column) {
|
|
13903
13890
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
13904
13891
|
}
|
|
13905
|
-
function
|
|
13892
|
+
function up100(db) {
|
|
13906
13893
|
const hasMemories = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'memories'").get();
|
|
13907
13894
|
if (!hasMemories || !hasColumn14(db, "memories", "memory_kind") || !hasColumn14(db, "memories", "type"))
|
|
13908
13895
|
return;
|
|
13909
13896
|
db.exec("UPDATE memories SET memory_kind = NULL WHERE type = 'session_summary'");
|
|
13910
13897
|
}
|
|
13911
|
-
function
|
|
13898
|
+
function up101(db) {
|
|
13912
13899
|
db.exec("DROP TABLE IF EXISTS ingestion_jobs");
|
|
13913
13900
|
}
|
|
13914
|
-
function
|
|
13901
|
+
function up102(db) {
|
|
13915
13902
|
const columns = db.prepare("PRAGMA table_info(dreaming_state)").all();
|
|
13916
13903
|
if (!columns.some((column) => column.name === "last_failure_at")) {
|
|
13917
13904
|
db.exec("ALTER TABLE dreaming_state ADD COLUMN last_failure_at TEXT");
|
|
13918
13905
|
}
|
|
13919
13906
|
db.exec("UPDATE dreaming_state SET last_failure_at = updated_at WHERE consecutive_failures > 0 AND last_failure_at IS NULL");
|
|
13920
13907
|
}
|
|
13921
|
-
function
|
|
13908
|
+
function up103(db) {
|
|
13922
13909
|
db.exec(`
|
|
13923
13910
|
CREATE TABLE IF NOT EXISTS dreaming_evidence_exclusions (
|
|
13924
13911
|
agent_id TEXT NOT NULL,
|
|
@@ -13935,7 +13922,7 @@ function up102(db) {
|
|
|
13935
13922
|
ON dreaming_evidence_exclusions (agent_id, resolved_at, requeue_requested_at, excluded_at DESC);
|
|
13936
13923
|
`);
|
|
13937
13924
|
}
|
|
13938
|
-
function
|
|
13925
|
+
function up104(db) {
|
|
13939
13926
|
db.exec(`
|
|
13940
13927
|
CREATE TABLE IF NOT EXISTS dreaming_tool_calls (
|
|
13941
13928
|
id TEXT PRIMARY KEY,
|
|
@@ -13955,7 +13942,7 @@ function up103(db) {
|
|
|
13955
13942
|
ON dreaming_tool_calls (agent_id, pass_id, sequence ASC);
|
|
13956
13943
|
`);
|
|
13957
13944
|
}
|
|
13958
|
-
function
|
|
13945
|
+
function up105(db) {
|
|
13959
13946
|
const columns = db.prepare("PRAGMA table_info(dreaming_passes)").all();
|
|
13960
13947
|
if (!columns.some((column) => column.name === "evidence_window_json")) {
|
|
13961
13948
|
db.exec("ALTER TABLE dreaming_passes ADD COLUMN evidence_window_json TEXT");
|
|
@@ -13964,7 +13951,7 @@ function up104(db) {
|
|
|
13964
13951
|
db.exec("ALTER TABLE dreaming_passes ADD COLUMN runbook_json TEXT");
|
|
13965
13952
|
}
|
|
13966
13953
|
}
|
|
13967
|
-
function
|
|
13954
|
+
function up106(db) {
|
|
13968
13955
|
db.exec(`
|
|
13969
13956
|
CREATE TABLE IF NOT EXISTS dreaming_attention (
|
|
13970
13957
|
id TEXT PRIMARY KEY,
|
|
@@ -13986,7 +13973,7 @@ function up105(db) {
|
|
|
13986
13973
|
function hasColumn15(db, table, column) {
|
|
13987
13974
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
13988
13975
|
}
|
|
13989
|
-
function
|
|
13976
|
+
function up107(db) {
|
|
13990
13977
|
const requiredMemoryColumns = [
|
|
13991
13978
|
"content_hash",
|
|
13992
13979
|
"normalized_content",
|
|
@@ -14037,7 +14024,7 @@ function up106(db) {
|
|
|
14037
14024
|
WHERE EXISTS (SELECT 1 FROM memory_entity_mentions WHERE entity_id = entities.id)
|
|
14038
14025
|
`);
|
|
14039
14026
|
}
|
|
14040
|
-
function
|
|
14027
|
+
function up108(db) {
|
|
14041
14028
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name IN ('memories', 'entity_attributes')").all();
|
|
14042
14029
|
if (tables.length !== 2)
|
|
14043
14030
|
return;
|
|
@@ -14060,7 +14047,7 @@ function tableExists(db, table) {
|
|
|
14060
14047
|
function hasColumn16(db, table, column) {
|
|
14061
14048
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
14062
14049
|
}
|
|
14063
|
-
function
|
|
14050
|
+
function up109(db) {
|
|
14064
14051
|
db.exec(`
|
|
14065
14052
|
CREATE TABLE IF NOT EXISTS derived_memory_sources (
|
|
14066
14053
|
derived_memory_id TEXT NOT NULL,
|
|
@@ -14103,7 +14090,7 @@ function up108(db) {
|
|
|
14103
14090
|
`);
|
|
14104
14091
|
}
|
|
14105
14092
|
}
|
|
14106
|
-
function
|
|
14093
|
+
function up110(db) {
|
|
14107
14094
|
db.exec(`
|
|
14108
14095
|
DROP TRIGGER IF EXISTS entities_fts_ai;
|
|
14109
14096
|
DROP TRIGGER IF EXISTS entities_fts_ad;
|
|
@@ -14192,7 +14179,7 @@ function up109(db) {
|
|
|
14192
14179
|
function hasColumn17(db, table, column) {
|
|
14193
14180
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
14194
14181
|
}
|
|
14195
|
-
function
|
|
14182
|
+
function up111(db) {
|
|
14196
14183
|
if (!hasColumn17(db, "memories", "review_after")) {
|
|
14197
14184
|
db.exec("ALTER TABLE memories ADD COLUMN review_after TEXT;");
|
|
14198
14185
|
}
|
|
@@ -14208,14 +14195,14 @@ var TOKEN_COLUMNS = [
|
|
|
14208
14195
|
["tokens_cache_write", "INTEGER"],
|
|
14209
14196
|
["tokens_cost", "REAL"]
|
|
14210
14197
|
];
|
|
14211
|
-
function
|
|
14198
|
+
function up112(db) {
|
|
14212
14199
|
for (const [column, type] of TOKEN_COLUMNS) {
|
|
14213
14200
|
if (!hasColumn18(db, "dreaming_passes", column)) {
|
|
14214
14201
|
db.exec(`ALTER TABLE dreaming_passes ADD COLUMN ${column} ${type};`);
|
|
14215
14202
|
}
|
|
14216
14203
|
}
|
|
14217
14204
|
}
|
|
14218
|
-
function
|
|
14205
|
+
function up113(db) {
|
|
14219
14206
|
db.exec(`
|
|
14220
14207
|
CREATE TABLE IF NOT EXISTS embedding_usage (
|
|
14221
14208
|
day TEXT NOT NULL,
|
|
@@ -14228,7 +14215,7 @@ function up112(db) {
|
|
|
14228
14215
|
);
|
|
14229
14216
|
`);
|
|
14230
14217
|
}
|
|
14231
|
-
function
|
|
14218
|
+
function up114(db) {
|
|
14232
14219
|
db.exec(`
|
|
14233
14220
|
CREATE TABLE IF NOT EXISTS telemetry_install (
|
|
14234
14221
|
id TEXT PRIMARY KEY,
|
|
@@ -14236,7 +14223,7 @@ function up113(db) {
|
|
|
14236
14223
|
);
|
|
14237
14224
|
`);
|
|
14238
14225
|
}
|
|
14239
|
-
function
|
|
14226
|
+
function up115(db) {
|
|
14240
14227
|
db.exec(`
|
|
14241
14228
|
CREATE INDEX IF NOT EXISTS idx_memory_entity_mentions_entity_memory
|
|
14242
14229
|
ON memory_entity_mentions(entity_id, memory_id);
|
|
@@ -14247,7 +14234,7 @@ function hasColumn19(db, table, column) {
|
|
|
14247
14234
|
return rows.some((row) => row.name === column);
|
|
14248
14235
|
}
|
|
14249
14236
|
var COLUMNS2 = ["first_remember_at", "first_recall_at"];
|
|
14250
|
-
function
|
|
14237
|
+
function up116(db) {
|
|
14251
14238
|
for (const column of COLUMNS2) {
|
|
14252
14239
|
if (!hasColumn19(db, "telemetry_install", column)) {
|
|
14253
14240
|
db.exec(`ALTER TABLE telemetry_install ADD COLUMN ${column} TEXT`);
|
|
@@ -14263,7 +14250,7 @@ function addColumnIfMissing24(db, column, definition) {
|
|
|
14263
14250
|
db.exec(`ALTER TABLE telemetry_events ADD COLUMN ${column} ${definition}`);
|
|
14264
14251
|
}
|
|
14265
14252
|
}
|
|
14266
|
-
function
|
|
14253
|
+
function up117(db) {
|
|
14267
14254
|
addColumnIfMissing24(db, "source", "TEXT NOT NULL DEFAULT 'daemon'");
|
|
14268
14255
|
addColumnIfMissing24(db, "claim_token", "TEXT");
|
|
14269
14256
|
addColumnIfMissing24(db, "claimed_at", "TEXT");
|
|
@@ -14272,7 +14259,7 @@ function up116(db) {
|
|
|
14272
14259
|
ON telemetry_events(source, sent_to_posthog, claimed_at, timestamp);
|
|
14273
14260
|
`);
|
|
14274
14261
|
}
|
|
14275
|
-
function
|
|
14262
|
+
function up118(db) {
|
|
14276
14263
|
db.exec(`
|
|
14277
14264
|
CREATE TABLE IF NOT EXISTS session_claims (
|
|
14278
14265
|
session_key TEXT NOT NULL,
|
|
@@ -14293,7 +14280,7 @@ function up117(db) {
|
|
|
14293
14280
|
ON session_claims(agent_id, state, expires_at);
|
|
14294
14281
|
`);
|
|
14295
14282
|
}
|
|
14296
|
-
function
|
|
14283
|
+
function up119(db) {
|
|
14297
14284
|
const table = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'entity_attributes'").get();
|
|
14298
14285
|
if (table == null)
|
|
14299
14286
|
return;
|
|
@@ -14302,7 +14289,7 @@ function up118(db) {
|
|
|
14302
14289
|
ON entity_attributes(memory_id, agent_id, status, importance);
|
|
14303
14290
|
`);
|
|
14304
14291
|
}
|
|
14305
|
-
function
|
|
14292
|
+
function up120(db) {
|
|
14306
14293
|
db.exec(`
|
|
14307
14294
|
CREATE TABLE IF NOT EXISTS cross_agent_messages (
|
|
14308
14295
|
id TEXT PRIMARY KEY,
|
|
@@ -14359,7 +14346,7 @@ function addColumnIfMissing25(db, column, definition) {
|
|
|
14359
14346
|
db.exec(`ALTER TABLE cross_agent_messages ADD COLUMN ${column} ${definition}`);
|
|
14360
14347
|
}
|
|
14361
14348
|
}
|
|
14362
|
-
function
|
|
14349
|
+
function up121(db) {
|
|
14363
14350
|
const table = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'cross_agent_messages'").get();
|
|
14364
14351
|
if (table == null)
|
|
14365
14352
|
return;
|
|
@@ -14560,7 +14547,7 @@ function backfillTranscriptsFromSummaryJobs(db) {
|
|
|
14560
14547
|
insert.run(...values);
|
|
14561
14548
|
}
|
|
14562
14549
|
}
|
|
14563
|
-
function
|
|
14550
|
+
function up122(db) {
|
|
14564
14551
|
if (!hasTable4(db, "session_transcripts"))
|
|
14565
14552
|
return;
|
|
14566
14553
|
addColumnIfMissing26(db, "session_transcripts", "completed_at", "TEXT");
|
|
@@ -14613,7 +14600,7 @@ function up121(db) {
|
|
|
14613
14600
|
ON session_transcripts(agent_id, content_hash);
|
|
14614
14601
|
`);
|
|
14615
14602
|
}
|
|
14616
|
-
function
|
|
14603
|
+
function up123(db) {
|
|
14617
14604
|
db.exec(`
|
|
14618
14605
|
CREATE INDEX IF NOT EXISTS idx_memory_jobs_pressure_status
|
|
14619
14606
|
ON memory_jobs(status)
|
|
@@ -14632,12 +14619,12 @@ function up122(db) {
|
|
|
14632
14619
|
function hasColumn22(db, table, column) {
|
|
14633
14620
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
14634
14621
|
}
|
|
14635
|
-
function
|
|
14622
|
+
function up124(db) {
|
|
14636
14623
|
if (!hasColumn22(db, "telemetry_install", "last_seen_version")) {
|
|
14637
14624
|
db.exec("ALTER TABLE telemetry_install ADD COLUMN last_seen_version TEXT");
|
|
14638
14625
|
}
|
|
14639
14626
|
}
|
|
14640
|
-
function
|
|
14627
|
+
function up125(db) {
|
|
14641
14628
|
db.exec(`
|
|
14642
14629
|
CREATE TABLE IF NOT EXISTS source_lifecycle_state (
|
|
14643
14630
|
agent_id TEXT NOT NULL,
|
|
@@ -14666,7 +14653,7 @@ function addColumnIfMissing27(db, column, definition) {
|
|
|
14666
14653
|
db.exec(`ALTER TABLE telemetry_events ADD COLUMN ${column} ${definition}`);
|
|
14667
14654
|
}
|
|
14668
14655
|
}
|
|
14669
|
-
function
|
|
14656
|
+
function up126(db) {
|
|
14670
14657
|
addColumnIfMissing27(db, "delivery_attempts", "INTEGER NOT NULL DEFAULT 0");
|
|
14671
14658
|
addColumnIfMissing27(db, "last_attempt_at", "TEXT");
|
|
14672
14659
|
addColumnIfMissing27(db, "sent_at", "TEXT");
|
|
@@ -14687,7 +14674,7 @@ function up125(db) {
|
|
|
14687
14674
|
VALUES (1, CURRENT_TIMESTAMP);
|
|
14688
14675
|
`);
|
|
14689
14676
|
}
|
|
14690
|
-
function
|
|
14677
|
+
function up127(db) {
|
|
14691
14678
|
const columns = db.prepare("PRAGMA table_info(dreaming_evidence_exclusions)").all();
|
|
14692
14679
|
const names = new Set(columns.map((column) => column.name));
|
|
14693
14680
|
if (!names.has("failure_class")) {
|
|
@@ -14704,7 +14691,7 @@ function up126(db) {
|
|
|
14704
14691
|
}
|
|
14705
14692
|
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)");
|
|
14706
14693
|
}
|
|
14707
|
-
function
|
|
14694
|
+
function up128(db) {
|
|
14708
14695
|
db.exec(`
|
|
14709
14696
|
CREATE TABLE IF NOT EXISTS embedding_index_failures (
|
|
14710
14697
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
@@ -14728,7 +14715,7 @@ function up127(db) {
|
|
|
14728
14715
|
ON embedding_index_failures(source_type, source_id);
|
|
14729
14716
|
`);
|
|
14730
14717
|
}
|
|
14731
|
-
function
|
|
14718
|
+
function up129(db) {
|
|
14732
14719
|
db.exec(`
|
|
14733
14720
|
CREATE TABLE IF NOT EXISTS imported_source_lifecycle (
|
|
14734
14721
|
id TEXT PRIMARY KEY,
|
|
@@ -14778,7 +14765,7 @@ function backfillTable(db, params) {
|
|
|
14778
14765
|
FROM ${params.table}${params.where ? ` WHERE ${params.where}` : ""}`).all();
|
|
14779
14766
|
backfill(db, rows, params.sourceKind, params.scannedAt);
|
|
14780
14767
|
}
|
|
14781
|
-
function
|
|
14768
|
+
function up130(db) {
|
|
14782
14769
|
db.exec(`
|
|
14783
14770
|
CREATE TABLE IF NOT EXISTS memory_content_safety (
|
|
14784
14771
|
agent_id TEXT NOT NULL,
|
|
@@ -14835,7 +14822,7 @@ function up129(db) {
|
|
|
14835
14822
|
scannedAt
|
|
14836
14823
|
});
|
|
14837
14824
|
}
|
|
14838
|
-
function
|
|
14825
|
+
function up131(db) {
|
|
14839
14826
|
const table = db.prepare("SELECT sql FROM sqlite_master WHERE type = 'table' AND name = 'dreaming_attention'").get();
|
|
14840
14827
|
if (!table)
|
|
14841
14828
|
return;
|
|
@@ -14869,7 +14856,7 @@ function up130(db) {
|
|
|
14869
14856
|
ON dreaming_attention (agent_id, resolved_at, priority DESC, created_at ASC);
|
|
14870
14857
|
`);
|
|
14871
14858
|
}
|
|
14872
|
-
function
|
|
14859
|
+
function up132(db) {
|
|
14873
14860
|
db.exec(`
|
|
14874
14861
|
CREATE TABLE IF NOT EXISTS ontology_contradictions (
|
|
14875
14862
|
id TEXT PRIMARY KEY,
|
|
@@ -14925,7 +14912,7 @@ function up131(db) {
|
|
|
14925
14912
|
ON ontology_contradictions(agent_id, left_source_id, right_source_id);
|
|
14926
14913
|
`);
|
|
14927
14914
|
}
|
|
14928
|
-
function
|
|
14915
|
+
function up133(db) {
|
|
14929
14916
|
db.exec(`
|
|
14930
14917
|
CREATE INDEX IF NOT EXISTS idx_memory_jobs_diagnostics_status_created_at
|
|
14931
14918
|
ON memory_jobs(status, created_at)
|
|
@@ -14940,7 +14927,7 @@ function up132(db) {
|
|
|
14940
14927
|
function tableExists3(db, table) {
|
|
14941
14928
|
return db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = ?").get(table) != null;
|
|
14942
14929
|
}
|
|
14943
|
-
function
|
|
14930
|
+
function up134(db) {
|
|
14944
14931
|
if (!tableExists3(db, "memory_jobs"))
|
|
14945
14932
|
return;
|
|
14946
14933
|
if (!tableExists3(db, "job_cancellations")) {
|
|
@@ -14989,7 +14976,7 @@ function up133(db) {
|
|
|
14989
14976
|
AND status IN ('pending', 'leased');
|
|
14990
14977
|
`);
|
|
14991
14978
|
}
|
|
14992
|
-
function
|
|
14979
|
+
function up135(db) {
|
|
14993
14980
|
db.exec(`
|
|
14994
14981
|
CREATE TABLE IF NOT EXISTS embedding_repair_budget (
|
|
14995
14982
|
id INTEGER PRIMARY KEY CHECK (id = 1),
|
|
@@ -15029,7 +15016,7 @@ function up134(db) {
|
|
|
15029
15016
|
END;
|
|
15030
15017
|
`);
|
|
15031
15018
|
}
|
|
15032
|
-
function
|
|
15019
|
+
function up136(db) {
|
|
15033
15020
|
db.exec(`
|
|
15034
15021
|
CREATE TABLE IF NOT EXISTS dreaming_evidence_consumption (
|
|
15035
15022
|
agent_id TEXT NOT NULL,
|
|
@@ -15052,13 +15039,13 @@ function up135(db) {
|
|
|
15052
15039
|
ON dreaming_evidence_consumption(agent_id, pass_id, delivered_offset, source_length);
|
|
15053
15040
|
`);
|
|
15054
15041
|
}
|
|
15055
|
-
function
|
|
15042
|
+
function up137(db) {
|
|
15056
15043
|
db.exec(`
|
|
15057
15044
|
CREATE INDEX IF NOT EXISTS idx_epistemic_assertions_observer_entity
|
|
15058
15045
|
ON epistemic_assertions(agent_id, subject_entity_id, status, asserted_at DESC, created_at DESC);
|
|
15059
15046
|
`);
|
|
15060
15047
|
}
|
|
15061
|
-
function
|
|
15048
|
+
function up138(db) {
|
|
15062
15049
|
db.exec(`
|
|
15063
15050
|
CREATE TABLE IF NOT EXISTS memory_head_revisions (
|
|
15064
15051
|
id TEXT PRIMARY KEY,
|
|
@@ -15110,7 +15097,7 @@ function up137(db) {
|
|
|
15110
15097
|
if (!names.has("format_version"))
|
|
15111
15098
|
db.exec("ALTER TABLE memory_md_heads ADD COLUMN format_version INTEGER NOT NULL DEFAULT 1");
|
|
15112
15099
|
}
|
|
15113
|
-
function
|
|
15100
|
+
function up139(db) {
|
|
15114
15101
|
db.exec(`
|
|
15115
15102
|
CREATE TABLE memory_head_entries_v134 (
|
|
15116
15103
|
entry_id TEXT NOT NULL, agent_id TEXT NOT NULL, canonical_text TEXT NOT NULL,
|
|
@@ -15128,7 +15115,7 @@ function up138(db) {
|
|
|
15128
15115
|
ON memory_head_entries(agent_id, entry_id, last_revision DESC);
|
|
15129
15116
|
`);
|
|
15130
15117
|
}
|
|
15131
|
-
function
|
|
15118
|
+
function up140(db) {
|
|
15132
15119
|
db.exec(`
|
|
15133
15120
|
CREATE TABLE IF NOT EXISTS memory_head_publications (
|
|
15134
15121
|
agent_id TEXT NOT NULL,
|
|
@@ -15144,7 +15131,7 @@ function up139(db) {
|
|
|
15144
15131
|
ON memory_head_publications(agent_id, status, revision DESC);
|
|
15145
15132
|
`);
|
|
15146
15133
|
}
|
|
15147
|
-
function
|
|
15134
|
+
function up141(db) {
|
|
15148
15135
|
const cols = new Set(db.prepare("PRAGMA table_info(memory_head_revisions)").all().map((r2) => r2.name));
|
|
15149
15136
|
for (const [name, type] of [
|
|
15150
15137
|
["entry_id", "TEXT"],
|
|
@@ -15158,7 +15145,7 @@ function up140(db) {
|
|
|
15158
15145
|
}
|
|
15159
15146
|
db.exec("CREATE UNIQUE INDEX IF NOT EXISTS idx_memory_head_revisions_entry ON memory_head_revisions(agent_id, revision, entry_id)");
|
|
15160
15147
|
}
|
|
15161
|
-
function
|
|
15148
|
+
function up142(db) {
|
|
15162
15149
|
const cols = new Set(db.prepare("PRAGMA table_info(dreaming_passes)").all().map((r2) => r2.name));
|
|
15163
15150
|
for (const [name, type] of [
|
|
15164
15151
|
["head_revision", "INTEGER"],
|
|
@@ -15180,7 +15167,7 @@ function addColumnIfMissing28(db, table, column, definition) {
|
|
|
15180
15167
|
if (!hasColumn25(db, table, column))
|
|
15181
15168
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
15182
15169
|
}
|
|
15183
|
-
function
|
|
15170
|
+
function up143(db) {
|
|
15184
15171
|
addColumnIfMissing28(db, "memories", "manual_override", "INTEGER DEFAULT 0");
|
|
15185
15172
|
db.exec(`
|
|
15186
15173
|
CREATE TABLE IF NOT EXISTS transcript_capture_status (
|
|
@@ -15485,7 +15472,7 @@ function up142(db) {
|
|
|
15485
15472
|
GROUP BY j.agent_id;
|
|
15486
15473
|
`);
|
|
15487
15474
|
}
|
|
15488
|
-
function
|
|
15475
|
+
function up144(db) {
|
|
15489
15476
|
db.exec(`
|
|
15490
15477
|
CREATE TABLE IF NOT EXISTS native_source_sync_state (
|
|
15491
15478
|
agent_id TEXT NOT NULL,
|
|
@@ -15501,7 +15488,7 @@ function up143(db) {
|
|
|
15501
15488
|
ON native_source_sync_state(agent_id, status);
|
|
15502
15489
|
`);
|
|
15503
15490
|
}
|
|
15504
|
-
function
|
|
15491
|
+
function up145(db) {
|
|
15505
15492
|
db.exec(`
|
|
15506
15493
|
CREATE TABLE IF NOT EXISTS transcript_recovery_frontiers (
|
|
15507
15494
|
agent_id TEXT NOT NULL,
|
|
@@ -15513,7 +15500,7 @@ function up144(db) {
|
|
|
15513
15500
|
);
|
|
15514
15501
|
`);
|
|
15515
15502
|
}
|
|
15516
|
-
function
|
|
15503
|
+
function up146(db) {
|
|
15517
15504
|
db.exec(`
|
|
15518
15505
|
CREATE TABLE IF NOT EXISTS source_sync_checkpoints (
|
|
15519
15506
|
agent_id TEXT NOT NULL,
|
|
@@ -15527,13 +15514,13 @@ function up145(db) {
|
|
|
15527
15514
|
);
|
|
15528
15515
|
`);
|
|
15529
15516
|
}
|
|
15530
|
-
function
|
|
15517
|
+
function up147(db) {
|
|
15531
15518
|
const columns = db.prepare("PRAGMA table_info(source_sync_checkpoints)").all();
|
|
15532
15519
|
if (!columns.some((column) => column.name === "frontier")) {
|
|
15533
15520
|
db.exec("ALTER TABLE source_sync_checkpoints ADD COLUMN frontier TEXT");
|
|
15534
15521
|
}
|
|
15535
15522
|
}
|
|
15536
|
-
function
|
|
15523
|
+
function up148(db) {
|
|
15537
15524
|
const columns = new Set(db.prepare("PRAGMA table_info(embedding_index_state)").all().map((row) => row.name).filter((name) => typeof name === "string"));
|
|
15538
15525
|
const additions = [
|
|
15539
15526
|
["migration_phase", "TEXT"],
|
|
@@ -15568,13 +15555,13 @@ function up147(db) {
|
|
|
15568
15555
|
`);
|
|
15569
15556
|
}
|
|
15570
15557
|
}
|
|
15571
|
-
function
|
|
15558
|
+
function up149(db) {
|
|
15572
15559
|
const columns = new Set(db.prepare("PRAGMA table_info(memory_jobs)").all().map((row) => row.name).filter((name) => typeof name === "string"));
|
|
15573
15560
|
if (!columns.has("lease_token")) {
|
|
15574
15561
|
db.exec("ALTER TABLE memory_jobs ADD COLUMN lease_token TEXT");
|
|
15575
15562
|
}
|
|
15576
15563
|
}
|
|
15577
|
-
function
|
|
15564
|
+
function up150(db) {
|
|
15578
15565
|
db.exec(`
|
|
15579
15566
|
CREATE TABLE IF NOT EXISTS dreaming_evidence_reviews (
|
|
15580
15567
|
agent_id TEXT NOT NULL,
|
|
@@ -15592,7 +15579,7 @@ function up149(db) {
|
|
|
15592
15579
|
ON dreaming_evidence_reviews (agent_id, reviewed_at DESC);
|
|
15593
15580
|
`);
|
|
15594
15581
|
}
|
|
15595
|
-
function
|
|
15582
|
+
function up151(db) {
|
|
15596
15583
|
db.exec(`
|
|
15597
15584
|
CREATE TABLE IF NOT EXISTS source_import_jobs (
|
|
15598
15585
|
id TEXT PRIMARY KEY, kind TEXT NOT NULL CHECK (kind = 'import'), agent_id TEXT NOT NULL,
|
|
@@ -15659,16 +15646,16 @@ function up150(db) {
|
|
|
15659
15646
|
}
|
|
15660
15647
|
db.exec("CREATE INDEX IF NOT EXISTS idx_session_transcripts_agent_source ON session_transcripts(agent_id, source_id)");
|
|
15661
15648
|
}
|
|
15662
|
-
function
|
|
15649
|
+
function up152(db) {
|
|
15663
15650
|
db.exec("CREATE INDEX IF NOT EXISTS idx_source_import_files_job_state ON source_import_files(job_id, state)");
|
|
15664
15651
|
}
|
|
15665
|
-
function
|
|
15652
|
+
function up153(db) {
|
|
15666
15653
|
const columns = db.prepare("PRAGMA table_info(source_import_record_attempts)").all();
|
|
15667
15654
|
if (!columns.some((column) => column.name === "source_id")) {
|
|
15668
15655
|
db.exec("ALTER TABLE source_import_record_attempts ADD COLUMN source_id TEXT");
|
|
15669
15656
|
}
|
|
15670
15657
|
}
|
|
15671
|
-
function
|
|
15658
|
+
function up154(db) {
|
|
15672
15659
|
const addColumn = (table, column, definition) => {
|
|
15673
15660
|
const statement = db.prepare("SELECT 1 AS found FROM pragma_table_info(?) WHERE name = ?");
|
|
15674
15661
|
let exists;
|
|
@@ -15689,7 +15676,7 @@ function addColumnIfMissing29(db, table, column, definition) {
|
|
|
15689
15676
|
if (!columns.some((row) => row.name === column))
|
|
15690
15677
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
15691
15678
|
}
|
|
15692
|
-
function
|
|
15679
|
+
function up155(db) {
|
|
15693
15680
|
addColumnIfMissing29(db, "memory_md_heads", "is_current", "INTEGER NOT NULL DEFAULT 0");
|
|
15694
15681
|
addColumnIfMissing29(db, "dreaming_passes", "head_base_revision", "INTEGER");
|
|
15695
15682
|
db.exec("CREATE INDEX IF NOT EXISTS idx_memory_head_revisions_content_hash ON memory_head_revisions(content_hash)");
|
|
@@ -15839,7 +15826,7 @@ function up154(db) {
|
|
|
15839
15826
|
`);
|
|
15840
15827
|
}
|
|
15841
15828
|
}
|
|
15842
|
-
function
|
|
15829
|
+
function up156(db) {
|
|
15843
15830
|
db.exec(`
|
|
15844
15831
|
CREATE TABLE IF NOT EXISTS vector_repair_checkpoints (
|
|
15845
15832
|
operation TEXT NOT NULL CHECK (operation IN ('resync', 'clean-orphans')),
|
|
@@ -15864,7 +15851,7 @@ function up155(db) {
|
|
|
15864
15851
|
ON vector_repair_checkpoints(status, updated_at);
|
|
15865
15852
|
`);
|
|
15866
15853
|
}
|
|
15867
|
-
function
|
|
15854
|
+
function up157(db) {
|
|
15868
15855
|
db.exec(`
|
|
15869
15856
|
CREATE TABLE IF NOT EXISTS embedding_repair_checkpoints (
|
|
15870
15857
|
checkpoint_id TEXT PRIMARY KEY,
|
|
@@ -15885,7 +15872,7 @@ function up156(db) {
|
|
|
15885
15872
|
ON embedding_repair_checkpoints(status, updated_at);
|
|
15886
15873
|
`);
|
|
15887
15874
|
}
|
|
15888
|
-
function
|
|
15875
|
+
function up158(db) {
|
|
15889
15876
|
const columns = new Set(db.prepare("PRAGMA table_info(embedding_repair_checkpoints)").all().map((row) => row.name));
|
|
15890
15877
|
if (!columns.has("profile_fingerprint")) {
|
|
15891
15878
|
db.exec("ALTER TABLE embedding_repair_checkpoints ADD COLUMN profile_fingerprint TEXT");
|
|
@@ -15900,7 +15887,7 @@ function up157(db) {
|
|
|
15900
15887
|
);
|
|
15901
15888
|
`);
|
|
15902
15889
|
}
|
|
15903
|
-
function
|
|
15890
|
+
function up159(db) {
|
|
15904
15891
|
db.exec(`
|
|
15905
15892
|
CREATE INDEX IF NOT EXISTS idx_memories_agent_kind
|
|
15906
15893
|
ON memories(agent_id, memory_kind);
|
|
@@ -15910,13 +15897,13 @@ var MIGRATIONS = [
|
|
|
15910
15897
|
{
|
|
15911
15898
|
version: 1,
|
|
15912
15899
|
name: "baseline",
|
|
15913
|
-
up:
|
|
15900
|
+
up: up6,
|
|
15914
15901
|
artifacts: { tables: ["memories", "conversations", "embeddings"] }
|
|
15915
15902
|
},
|
|
15916
15903
|
{
|
|
15917
15904
|
version: 2,
|
|
15918
15905
|
name: "pipeline-v2",
|
|
15919
|
-
up:
|
|
15906
|
+
up: up7,
|
|
15920
15907
|
artifacts: {
|
|
15921
15908
|
tables: ["memory_history", "memory_jobs", "entities", "relations", "memory_entity_mentions"]
|
|
15922
15909
|
}
|
|
@@ -15924,12 +15911,12 @@ var MIGRATIONS = [
|
|
|
15924
15911
|
{
|
|
15925
15912
|
version: 3,
|
|
15926
15913
|
name: "unique-content-hash",
|
|
15927
|
-
up:
|
|
15914
|
+
up: up8
|
|
15928
15915
|
},
|
|
15929
15916
|
{
|
|
15930
15917
|
version: 4,
|
|
15931
15918
|
name: "history-actor-and-retention",
|
|
15932
|
-
up:
|
|
15919
|
+
up: up9,
|
|
15933
15920
|
artifacts: {
|
|
15934
15921
|
columns: [{ table: "memory_history", column: "actor_type" }]
|
|
15935
15922
|
}
|
|
@@ -15937,7 +15924,7 @@ var MIGRATIONS = [
|
|
|
15937
15924
|
{
|
|
15938
15925
|
version: 5,
|
|
15939
15926
|
name: "graph-extended",
|
|
15940
|
-
up:
|
|
15927
|
+
up: up10,
|
|
15941
15928
|
artifacts: {
|
|
15942
15929
|
columns: [{ table: "entities", column: "canonical_name" }]
|
|
15943
15930
|
}
|
|
@@ -15945,7 +15932,7 @@ var MIGRATIONS = [
|
|
|
15945
15932
|
{
|
|
15946
15933
|
version: 6,
|
|
15947
15934
|
name: "idempotency-key",
|
|
15948
|
-
up:
|
|
15935
|
+
up: up11,
|
|
15949
15936
|
artifacts: {
|
|
15950
15937
|
columns: [{ table: "memories", column: "idempotency_key" }]
|
|
15951
15938
|
}
|
|
@@ -15953,42 +15940,42 @@ var MIGRATIONS = [
|
|
|
15953
15940
|
{
|
|
15954
15941
|
version: 7,
|
|
15955
15942
|
name: "documents-and-connectors",
|
|
15956
|
-
up:
|
|
15943
|
+
up: up12,
|
|
15957
15944
|
artifacts: { tables: ["documents", "document_memories", "connectors"] }
|
|
15958
15945
|
},
|
|
15959
15946
|
{
|
|
15960
15947
|
version: 8,
|
|
15961
15948
|
name: "embeddings-unique-hash",
|
|
15962
|
-
up:
|
|
15949
|
+
up: up13
|
|
15963
15950
|
},
|
|
15964
15951
|
{
|
|
15965
15952
|
version: 9,
|
|
15966
15953
|
name: "summary-jobs",
|
|
15967
|
-
up:
|
|
15954
|
+
up: up14,
|
|
15968
15955
|
artifacts: { tables: ["summary_jobs"] }
|
|
15969
15956
|
},
|
|
15970
15957
|
{
|
|
15971
15958
|
version: 10,
|
|
15972
15959
|
name: "umap-cache",
|
|
15973
|
-
up:
|
|
15960
|
+
up: up15,
|
|
15974
15961
|
artifacts: { tables: ["umap_cache"] }
|
|
15975
15962
|
},
|
|
15976
15963
|
{
|
|
15977
15964
|
version: 11,
|
|
15978
15965
|
name: "session-scores",
|
|
15979
|
-
up:
|
|
15966
|
+
up: up16,
|
|
15980
15967
|
artifacts: { tables: ["session_scores"] }
|
|
15981
15968
|
},
|
|
15982
15969
|
{
|
|
15983
15970
|
version: 12,
|
|
15984
15971
|
name: "scheduled-tasks",
|
|
15985
|
-
up:
|
|
15972
|
+
up: up17,
|
|
15986
15973
|
artifacts: { tables: ["scheduled_tasks", "task_runs"] }
|
|
15987
15974
|
},
|
|
15988
15975
|
{
|
|
15989
15976
|
version: 13,
|
|
15990
15977
|
name: "ingestion-tracking",
|
|
15991
|
-
up:
|
|
15978
|
+
up: up18,
|
|
15992
15979
|
artifacts: {
|
|
15993
15980
|
columns: [
|
|
15994
15981
|
{ table: "memories", column: "source_path" },
|
|
@@ -15999,13 +15986,13 @@ var MIGRATIONS = [
|
|
|
15999
15986
|
{
|
|
16000
15987
|
version: 14,
|
|
16001
15988
|
name: "telemetry",
|
|
16002
|
-
up:
|
|
15989
|
+
up: up19,
|
|
16003
15990
|
artifacts: { tables: ["telemetry_events"] }
|
|
16004
15991
|
},
|
|
16005
15992
|
{
|
|
16006
15993
|
version: 15,
|
|
16007
15994
|
name: "session-memories",
|
|
16008
|
-
up:
|
|
15995
|
+
up: up20,
|
|
16009
15996
|
artifacts: {
|
|
16010
15997
|
tables: ["session_memories"],
|
|
16011
15998
|
columns: [
|
|
@@ -16017,13 +16004,13 @@ var MIGRATIONS = [
|
|
|
16017
16004
|
{
|
|
16018
16005
|
version: 16,
|
|
16019
16006
|
name: "session-checkpoints",
|
|
16020
|
-
up:
|
|
16007
|
+
up: up21,
|
|
16021
16008
|
artifacts: { tables: ["session_checkpoints"] }
|
|
16022
16009
|
},
|
|
16023
16010
|
{
|
|
16024
16011
|
version: 17,
|
|
16025
16012
|
name: "task-skills",
|
|
16026
|
-
up:
|
|
16013
|
+
up: up22,
|
|
16027
16014
|
artifacts: {
|
|
16028
16015
|
columns: [{ table: "scheduled_tasks", column: "skill_name" }]
|
|
16029
16016
|
}
|
|
@@ -16031,13 +16018,13 @@ var MIGRATIONS = [
|
|
|
16031
16018
|
{
|
|
16032
16019
|
version: 18,
|
|
16033
16020
|
name: "skill-meta",
|
|
16034
|
-
up:
|
|
16021
|
+
up: up23,
|
|
16035
16022
|
artifacts: { tables: ["skill_meta"] }
|
|
16036
16023
|
},
|
|
16037
16024
|
{
|
|
16038
16025
|
version: 19,
|
|
16039
16026
|
name: "knowledge-structure",
|
|
16040
|
-
up:
|
|
16027
|
+
up: up24,
|
|
16041
16028
|
artifacts: {
|
|
16042
16029
|
tables: ["entity_aspects", "entity_attributes", "entity_dependencies", "task_meta"],
|
|
16043
16030
|
columns: [{ table: "entities", column: "agent_id" }]
|
|
@@ -16046,7 +16033,7 @@ var MIGRATIONS = [
|
|
|
16046
16033
|
{
|
|
16047
16034
|
version: 20,
|
|
16048
16035
|
name: "session-structural-columns",
|
|
16049
|
-
up:
|
|
16036
|
+
up: up25,
|
|
16050
16037
|
artifacts: {
|
|
16051
16038
|
columns: [
|
|
16052
16039
|
{ table: "session_memories", column: "entity_slot" },
|
|
@@ -16059,7 +16046,7 @@ var MIGRATIONS = [
|
|
|
16059
16046
|
{
|
|
16060
16047
|
version: 21,
|
|
16061
16048
|
name: "checkpoint-structural",
|
|
16062
|
-
up:
|
|
16049
|
+
up: up26,
|
|
16063
16050
|
artifacts: {
|
|
16064
16051
|
columns: [{ table: "session_checkpoints", column: "focal_entity_ids" }]
|
|
16065
16052
|
}
|
|
@@ -16067,7 +16054,7 @@ var MIGRATIONS = [
|
|
|
16067
16054
|
{
|
|
16068
16055
|
version: 22,
|
|
16069
16056
|
name: "entity-pinning",
|
|
16070
|
-
up:
|
|
16057
|
+
up: up27,
|
|
16071
16058
|
artifacts: {
|
|
16072
16059
|
columns: [
|
|
16073
16060
|
{ table: "entities", column: "pinned" },
|
|
@@ -16078,17 +16065,17 @@ var MIGRATIONS = [
|
|
|
16078
16065
|
{
|
|
16079
16066
|
version: 23,
|
|
16080
16067
|
name: "retired-scorer-gap",
|
|
16081
|
-
up:
|
|
16068
|
+
up: up28
|
|
16082
16069
|
},
|
|
16083
16070
|
{
|
|
16084
16071
|
version: 24,
|
|
16085
16072
|
name: "retired-scorer-gap",
|
|
16086
|
-
up:
|
|
16073
|
+
up: up29
|
|
16087
16074
|
},
|
|
16088
16075
|
{
|
|
16089
16076
|
version: 25,
|
|
16090
16077
|
name: "agent-feedback",
|
|
16091
|
-
up:
|
|
16078
|
+
up: up30,
|
|
16092
16079
|
artifacts: {
|
|
16093
16080
|
columns: [{ table: "session_memories", column: "agent_relevance_score" }]
|
|
16094
16081
|
}
|
|
@@ -16096,32 +16083,32 @@ var MIGRATIONS = [
|
|
|
16096
16083
|
{
|
|
16097
16084
|
version: 26,
|
|
16098
16085
|
name: "retired-scorer-gap",
|
|
16099
|
-
up:
|
|
16086
|
+
up: up31
|
|
16100
16087
|
},
|
|
16101
16088
|
{
|
|
16102
16089
|
version: 27,
|
|
16103
16090
|
name: "backfill-canonical-names",
|
|
16104
|
-
up:
|
|
16091
|
+
up: up32
|
|
16105
16092
|
},
|
|
16106
16093
|
{
|
|
16107
16094
|
version: 28,
|
|
16108
16095
|
name: "lossless-retention",
|
|
16109
|
-
up:
|
|
16096
|
+
up: up33
|
|
16110
16097
|
},
|
|
16111
16098
|
{
|
|
16112
16099
|
version: 29,
|
|
16113
16100
|
name: "session-summary-dag",
|
|
16114
|
-
up:
|
|
16101
|
+
up: up34
|
|
16115
16102
|
},
|
|
16116
16103
|
{
|
|
16117
16104
|
version: 30,
|
|
16118
16105
|
name: "nullable-memory-job-memory-id",
|
|
16119
|
-
up:
|
|
16106
|
+
up: up35
|
|
16120
16107
|
},
|
|
16121
16108
|
{
|
|
16122
16109
|
version: 31,
|
|
16123
16110
|
name: "dependency-reason",
|
|
16124
|
-
up:
|
|
16111
|
+
up: up36,
|
|
16125
16112
|
artifacts: {
|
|
16126
16113
|
columns: [
|
|
16127
16114
|
{ table: "entity_dependencies", column: "reason" },
|
|
@@ -16132,7 +16119,7 @@ var MIGRATIONS = [
|
|
|
16132
16119
|
{
|
|
16133
16120
|
version: 32,
|
|
16134
16121
|
name: "embeddings-vector-column",
|
|
16135
|
-
up:
|
|
16122
|
+
up: up37,
|
|
16136
16123
|
artifacts: {
|
|
16137
16124
|
columns: [{ table: "embeddings", column: "vector", optional: true }]
|
|
16138
16125
|
}
|
|
@@ -16140,7 +16127,7 @@ var MIGRATIONS = [
|
|
|
16140
16127
|
{
|
|
16141
16128
|
version: 33,
|
|
16142
16129
|
name: "scope",
|
|
16143
|
-
up:
|
|
16130
|
+
up: up38,
|
|
16144
16131
|
artifacts: {
|
|
16145
16132
|
columns: [{ table: "memories", column: "scope" }]
|
|
16146
16133
|
}
|
|
@@ -16148,17 +16135,17 @@ var MIGRATIONS = [
|
|
|
16148
16135
|
{
|
|
16149
16136
|
version: 34,
|
|
16150
16137
|
name: "scope-aware-dedup",
|
|
16151
|
-
up:
|
|
16138
|
+
up: up39
|
|
16152
16139
|
},
|
|
16153
16140
|
{
|
|
16154
16141
|
version: 35,
|
|
16155
16142
|
name: "entity-fts",
|
|
16156
|
-
up:
|
|
16143
|
+
up: up40
|
|
16157
16144
|
},
|
|
16158
16145
|
{
|
|
16159
16146
|
version: 36,
|
|
16160
16147
|
name: "dependency-confidence",
|
|
16161
|
-
up:
|
|
16148
|
+
up: up41,
|
|
16162
16149
|
artifacts: {
|
|
16163
16150
|
columns: [{ table: "entity_dependencies", column: "confidence" }]
|
|
16164
16151
|
}
|
|
@@ -16166,7 +16153,7 @@ var MIGRATIONS = [
|
|
|
16166
16153
|
{
|
|
16167
16154
|
version: 37,
|
|
16168
16155
|
name: "entity-communities",
|
|
16169
|
-
up:
|
|
16156
|
+
up: up42,
|
|
16170
16157
|
artifacts: {
|
|
16171
16158
|
tables: ["entity_communities"],
|
|
16172
16159
|
columns: [{ table: "entities", column: "community_id" }]
|
|
@@ -16175,24 +16162,24 @@ var MIGRATIONS = [
|
|
|
16175
16162
|
{
|
|
16176
16163
|
version: 38,
|
|
16177
16164
|
name: "memory-hints",
|
|
16178
|
-
up:
|
|
16165
|
+
up: up43,
|
|
16179
16166
|
artifacts: { tables: ["memory_hints"] }
|
|
16180
16167
|
},
|
|
16181
16168
|
{
|
|
16182
16169
|
version: 39,
|
|
16183
16170
|
name: "dedup-entity-dependencies",
|
|
16184
|
-
up:
|
|
16171
|
+
up: up44
|
|
16185
16172
|
},
|
|
16186
16173
|
{
|
|
16187
16174
|
version: 40,
|
|
16188
16175
|
name: "session-transcripts",
|
|
16189
|
-
up:
|
|
16176
|
+
up: up45,
|
|
16190
16177
|
artifacts: { tables: ["session_transcripts"] }
|
|
16191
16178
|
},
|
|
16192
16179
|
{
|
|
16193
16180
|
version: 41,
|
|
16194
16181
|
name: "path-feedback",
|
|
16195
|
-
up:
|
|
16182
|
+
up: up46,
|
|
16196
16183
|
artifacts: {
|
|
16197
16184
|
tables: [
|
|
16198
16185
|
"path_feedback_events",
|
|
@@ -16207,7 +16194,7 @@ var MIGRATIONS = [
|
|
|
16207
16194
|
{
|
|
16208
16195
|
version: 42,
|
|
16209
16196
|
name: "session-memories-agent-id",
|
|
16210
|
-
up:
|
|
16197
|
+
up: up47,
|
|
16211
16198
|
artifacts: {
|
|
16212
16199
|
columns: [{ table: "session_memories", column: "agent_id" }]
|
|
16213
16200
|
}
|
|
@@ -16215,7 +16202,7 @@ var MIGRATIONS = [
|
|
|
16215
16202
|
{
|
|
16216
16203
|
version: 43,
|
|
16217
16204
|
name: "agents-table",
|
|
16218
|
-
up:
|
|
16205
|
+
up: up48,
|
|
16219
16206
|
artifacts: {
|
|
16220
16207
|
tables: ["agents"],
|
|
16221
16208
|
columns: [
|
|
@@ -16227,7 +16214,7 @@ var MIGRATIONS = [
|
|
|
16227
16214
|
{
|
|
16228
16215
|
version: 44,
|
|
16229
16216
|
name: "memory-md-temporal-head",
|
|
16230
|
-
up:
|
|
16217
|
+
up: up49,
|
|
16231
16218
|
artifacts: {
|
|
16232
16219
|
columns: [
|
|
16233
16220
|
{ table: "session_summaries", column: "source_type" },
|
|
@@ -16239,7 +16226,7 @@ var MIGRATIONS = [
|
|
|
16239
16226
|
{
|
|
16240
16227
|
version: 45,
|
|
16241
16228
|
name: "lossless-working-memory-hardening",
|
|
16242
|
-
up:
|
|
16229
|
+
up: up50,
|
|
16243
16230
|
artifacts: {
|
|
16244
16231
|
tables: ["session_transcripts_fts", "memory_md_heads"],
|
|
16245
16232
|
columns: [
|
|
@@ -16252,17 +16239,17 @@ var MIGRATIONS = [
|
|
|
16252
16239
|
{
|
|
16253
16240
|
version: 46,
|
|
16254
16241
|
name: "session-summary-uniqueness",
|
|
16255
|
-
up:
|
|
16242
|
+
up: up51
|
|
16256
16243
|
},
|
|
16257
16244
|
{
|
|
16258
16245
|
version: 47,
|
|
16259
16246
|
name: "agent-scoped-temporal-uniqueness",
|
|
16260
|
-
up:
|
|
16247
|
+
up: up52
|
|
16261
16248
|
},
|
|
16262
16249
|
{
|
|
16263
16250
|
version: 48,
|
|
16264
16251
|
name: "thread-heads",
|
|
16265
|
-
up:
|
|
16252
|
+
up: up53,
|
|
16266
16253
|
artifacts: {
|
|
16267
16254
|
tables: ["memory_thread_heads"]
|
|
16268
16255
|
}
|
|
@@ -16270,7 +16257,7 @@ var MIGRATIONS = [
|
|
|
16270
16257
|
{
|
|
16271
16258
|
version: 49,
|
|
16272
16259
|
name: "session-extract-cursors",
|
|
16273
|
-
up:
|
|
16260
|
+
up: up54,
|
|
16274
16261
|
artifacts: {
|
|
16275
16262
|
tables: ["session_extract_cursors"]
|
|
16276
16263
|
}
|
|
@@ -16278,7 +16265,7 @@ var MIGRATIONS = [
|
|
|
16278
16265
|
{
|
|
16279
16266
|
version: 50,
|
|
16280
16267
|
name: "related-to-audit",
|
|
16281
|
-
up:
|
|
16268
|
+
up: up55,
|
|
16282
16269
|
artifacts: {
|
|
16283
16270
|
tables: ["entity_dependency_history"]
|
|
16284
16271
|
}
|
|
@@ -16286,7 +16273,7 @@ var MIGRATIONS = [
|
|
|
16286
16273
|
{
|
|
16287
16274
|
version: 51,
|
|
16288
16275
|
name: "memory-md-rolling-window-lineage",
|
|
16289
|
-
up:
|
|
16276
|
+
up: up56,
|
|
16290
16277
|
artifacts: {
|
|
16291
16278
|
tables: ["memory_artifacts", "memory_artifact_tombstones", "memory_artifacts_fts"],
|
|
16292
16279
|
columns: [
|
|
@@ -16301,15 +16288,12 @@ var MIGRATIONS = [
|
|
|
16301
16288
|
{
|
|
16302
16289
|
version: 52,
|
|
16303
16290
|
name: "mcp-invocations",
|
|
16304
|
-
up:
|
|
16305
|
-
artifacts: {
|
|
16306
|
-
tables: ["mcp_invocations"]
|
|
16307
|
-
}
|
|
16291
|
+
up: up57
|
|
16308
16292
|
},
|
|
16309
16293
|
{
|
|
16310
16294
|
version: 53,
|
|
16311
16295
|
name: "skill-invocations",
|
|
16312
|
-
up:
|
|
16296
|
+
up: up58,
|
|
16313
16297
|
artifacts: {
|
|
16314
16298
|
tables: ["skill_invocations"]
|
|
16315
16299
|
}
|
|
@@ -16317,7 +16301,7 @@ var MIGRATIONS = [
|
|
|
16317
16301
|
{
|
|
16318
16302
|
version: 54,
|
|
16319
16303
|
name: "task-agent-scope",
|
|
16320
|
-
up:
|
|
16304
|
+
up: up59,
|
|
16321
16305
|
artifacts: {
|
|
16322
16306
|
tables: ["task_scope_hints"]
|
|
16323
16307
|
}
|
|
@@ -16325,7 +16309,7 @@ var MIGRATIONS = [
|
|
|
16325
16309
|
{
|
|
16326
16310
|
version: 55,
|
|
16327
16311
|
name: "dreaming-state",
|
|
16328
|
-
up:
|
|
16312
|
+
up: up60,
|
|
16329
16313
|
artifacts: {
|
|
16330
16314
|
tables: ["dreaming_state", "dreaming_passes"]
|
|
16331
16315
|
}
|
|
@@ -16333,22 +16317,22 @@ var MIGRATIONS = [
|
|
|
16333
16317
|
{
|
|
16334
16318
|
version: 56,
|
|
16335
16319
|
name: "agent-scoped-content-hash",
|
|
16336
|
-
up:
|
|
16320
|
+
up: up61
|
|
16337
16321
|
},
|
|
16338
16322
|
{
|
|
16339
16323
|
version: 57,
|
|
16340
16324
|
name: "memories-fts-tokenizer-repair",
|
|
16341
|
-
up:
|
|
16325
|
+
up: up62
|
|
16342
16326
|
},
|
|
16343
16327
|
{
|
|
16344
16328
|
version: 58,
|
|
16345
16329
|
name: "knowledge-graph-indices",
|
|
16346
|
-
up:
|
|
16330
|
+
up: up63
|
|
16347
16331
|
},
|
|
16348
16332
|
{
|
|
16349
16333
|
version: 59,
|
|
16350
16334
|
name: "entity-attribute-claim-key",
|
|
16351
|
-
up:
|
|
16335
|
+
up: up64,
|
|
16352
16336
|
artifacts: {
|
|
16353
16337
|
columns: [{ table: "entity_attributes", column: "claim_key" }]
|
|
16354
16338
|
}
|
|
@@ -16356,7 +16340,7 @@ var MIGRATIONS = [
|
|
|
16356
16340
|
{
|
|
16357
16341
|
version: 60,
|
|
16358
16342
|
name: "entity-attribute-group-key",
|
|
16359
|
-
up:
|
|
16343
|
+
up: up65,
|
|
16360
16344
|
artifacts: {
|
|
16361
16345
|
columns: [{ table: "entity_attributes", column: "group_key" }]
|
|
16362
16346
|
}
|
|
@@ -16364,7 +16348,7 @@ var MIGRATIONS = [
|
|
|
16364
16348
|
{
|
|
16365
16349
|
version: 61,
|
|
16366
16350
|
name: "memory-artifact-source-mtime",
|
|
16367
|
-
up:
|
|
16351
|
+
up: up66,
|
|
16368
16352
|
artifacts: {
|
|
16369
16353
|
columns: [{ table: "memory_artifacts", column: "source_mtime_ms" }]
|
|
16370
16354
|
}
|
|
@@ -16372,7 +16356,7 @@ var MIGRATIONS = [
|
|
|
16372
16356
|
{
|
|
16373
16357
|
version: 62,
|
|
16374
16358
|
name: "memory-artifact-soft-delete",
|
|
16375
|
-
up:
|
|
16359
|
+
up: up67,
|
|
16376
16360
|
artifacts: {
|
|
16377
16361
|
columns: [
|
|
16378
16362
|
{ table: "memory_artifacts", column: "is_deleted" },
|
|
@@ -16383,12 +16367,12 @@ var MIGRATIONS = [
|
|
|
16383
16367
|
{
|
|
16384
16368
|
version: 63,
|
|
16385
16369
|
name: "content-only-memories-fts-update",
|
|
16386
|
-
up:
|
|
16370
|
+
up: up68
|
|
16387
16371
|
},
|
|
16388
16372
|
{
|
|
16389
16373
|
version: 64,
|
|
16390
16374
|
name: "source-graph-provenance",
|
|
16391
|
-
up:
|
|
16375
|
+
up: up69,
|
|
16392
16376
|
artifacts: {
|
|
16393
16377
|
columns: [
|
|
16394
16378
|
{ table: "entities", column: "source_path" },
|
|
@@ -16401,7 +16385,7 @@ var MIGRATIONS = [
|
|
|
16401
16385
|
{
|
|
16402
16386
|
version: 65,
|
|
16403
16387
|
name: "source-embedding-agent-scope",
|
|
16404
|
-
up:
|
|
16388
|
+
up: up70,
|
|
16405
16389
|
artifacts: {
|
|
16406
16390
|
columns: [{ table: "embeddings", column: "agent_id", optional: true }]
|
|
16407
16391
|
}
|
|
@@ -16409,7 +16393,7 @@ var MIGRATIONS = [
|
|
|
16409
16393
|
{
|
|
16410
16394
|
version: 66,
|
|
16411
16395
|
name: "memory-search-telemetry",
|
|
16412
|
-
up:
|
|
16396
|
+
up: up71,
|
|
16413
16397
|
artifacts: {
|
|
16414
16398
|
tables: ["memory_search_telemetry"]
|
|
16415
16399
|
}
|
|
@@ -16417,7 +16401,7 @@ var MIGRATIONS = [
|
|
|
16417
16401
|
{
|
|
16418
16402
|
version: 67,
|
|
16419
16403
|
name: "ontology-proposals",
|
|
16420
|
-
up:
|
|
16404
|
+
up: up72,
|
|
16421
16405
|
artifacts: {
|
|
16422
16406
|
tables: ["ontology_proposals"],
|
|
16423
16407
|
columns: [
|
|
@@ -16431,7 +16415,7 @@ var MIGRATIONS = [
|
|
|
16431
16415
|
{
|
|
16432
16416
|
version: 68,
|
|
16433
16417
|
name: "daily-reflections",
|
|
16434
|
-
up:
|
|
16418
|
+
up: up73,
|
|
16435
16419
|
artifacts: {
|
|
16436
16420
|
tables: ["daily_reflections"]
|
|
16437
16421
|
}
|
|
@@ -16439,7 +16423,7 @@ var MIGRATIONS = [
|
|
|
16439
16423
|
{
|
|
16440
16424
|
version: 69,
|
|
16441
16425
|
name: "daily-reflections-multiple-insights",
|
|
16442
|
-
up:
|
|
16426
|
+
up: up74,
|
|
16443
16427
|
artifacts: {
|
|
16444
16428
|
tables: ["daily_reflections"]
|
|
16445
16429
|
}
|
|
@@ -16447,7 +16431,7 @@ var MIGRATIONS = [
|
|
|
16447
16431
|
{
|
|
16448
16432
|
version: 70,
|
|
16449
16433
|
name: "ontology-control-plane-state",
|
|
16450
|
-
up:
|
|
16434
|
+
up: up75,
|
|
16451
16435
|
artifacts: {
|
|
16452
16436
|
columns: [
|
|
16453
16437
|
{ table: "entities", column: "status" },
|
|
@@ -16462,7 +16446,7 @@ var MIGRATIONS = [
|
|
|
16462
16446
|
{
|
|
16463
16447
|
version: 71,
|
|
16464
16448
|
name: "epistemic-assertions",
|
|
16465
|
-
up:
|
|
16449
|
+
up: up76,
|
|
16466
16450
|
artifacts: {
|
|
16467
16451
|
tables: ["epistemic_assertions"]
|
|
16468
16452
|
}
|
|
@@ -16470,7 +16454,7 @@ var MIGRATIONS = [
|
|
|
16470
16454
|
{
|
|
16471
16455
|
version: 72,
|
|
16472
16456
|
name: "agent-scoped-idempotency-key",
|
|
16473
|
-
up:
|
|
16457
|
+
up: up77,
|
|
16474
16458
|
artifacts: {
|
|
16475
16459
|
columns: [
|
|
16476
16460
|
{ table: "memories", column: "idempotency_key" },
|
|
@@ -16481,7 +16465,7 @@ var MIGRATIONS = [
|
|
|
16481
16465
|
{
|
|
16482
16466
|
version: 73,
|
|
16483
16467
|
name: "recall-context-dedupe",
|
|
16484
|
-
up:
|
|
16468
|
+
up: up78,
|
|
16485
16469
|
artifacts: {
|
|
16486
16470
|
tables: ["session_context_epochs", "session_recall_events"]
|
|
16487
16471
|
}
|
|
@@ -16489,7 +16473,7 @@ var MIGRATIONS = [
|
|
|
16489
16473
|
{
|
|
16490
16474
|
version: 74,
|
|
16491
16475
|
name: "aggregate-memory-links",
|
|
16492
|
-
up:
|
|
16476
|
+
up: up79,
|
|
16493
16477
|
artifacts: {
|
|
16494
16478
|
tables: ["aggregate_memory_sources"]
|
|
16495
16479
|
}
|
|
@@ -16497,7 +16481,7 @@ var MIGRATIONS = [
|
|
|
16497
16481
|
{
|
|
16498
16482
|
version: 75,
|
|
16499
16483
|
name: "memory-artifact-source-provenance",
|
|
16500
|
-
up:
|
|
16484
|
+
up: up80,
|
|
16501
16485
|
artifacts: {
|
|
16502
16486
|
columns: [
|
|
16503
16487
|
{ table: "memory_artifacts", column: "source_id" },
|
|
@@ -16511,7 +16495,7 @@ var MIGRATIONS = [
|
|
|
16511
16495
|
{
|
|
16512
16496
|
version: 76,
|
|
16513
16497
|
name: "temporal-edges",
|
|
16514
|
-
up:
|
|
16498
|
+
up: up81,
|
|
16515
16499
|
artifacts: {
|
|
16516
16500
|
tables: ["temporal_edges"]
|
|
16517
16501
|
}
|
|
@@ -16519,7 +16503,7 @@ var MIGRATIONS = [
|
|
|
16519
16503
|
{
|
|
16520
16504
|
version: 77,
|
|
16521
16505
|
name: "entity-aliases",
|
|
16522
|
-
up:
|
|
16506
|
+
up: up82,
|
|
16523
16507
|
artifacts: {
|
|
16524
16508
|
tables: ["entity_aliases"]
|
|
16525
16509
|
}
|
|
@@ -16527,7 +16511,7 @@ var MIGRATIONS = [
|
|
|
16527
16511
|
{
|
|
16528
16512
|
version: 78,
|
|
16529
16513
|
name: "api-keys",
|
|
16530
|
-
up:
|
|
16514
|
+
up: up83,
|
|
16531
16515
|
artifacts: {
|
|
16532
16516
|
tables: ["api_keys"]
|
|
16533
16517
|
}
|
|
@@ -16535,7 +16519,7 @@ var MIGRATIONS = [
|
|
|
16535
16519
|
{
|
|
16536
16520
|
version: 79,
|
|
16537
16521
|
name: "transcript-capture-jobs",
|
|
16538
|
-
up:
|
|
16522
|
+
up: up84,
|
|
16539
16523
|
artifacts: {
|
|
16540
16524
|
tables: ["transcript_capture_jobs"]
|
|
16541
16525
|
}
|
|
@@ -16543,7 +16527,7 @@ var MIGRATIONS = [
|
|
|
16543
16527
|
{
|
|
16544
16528
|
version: 80,
|
|
16545
16529
|
name: "document-scope-columns",
|
|
16546
|
-
up:
|
|
16530
|
+
up: up85,
|
|
16547
16531
|
artifacts: {
|
|
16548
16532
|
columns: [
|
|
16549
16533
|
{ table: "documents", column: "agent_id" },
|
|
@@ -16554,7 +16538,7 @@ var MIGRATIONS = [
|
|
|
16554
16538
|
{
|
|
16555
16539
|
version: 81,
|
|
16556
16540
|
name: "aggregate-evidence-sources",
|
|
16557
|
-
up:
|
|
16541
|
+
up: up86,
|
|
16558
16542
|
artifacts: {
|
|
16559
16543
|
tables: ["aggregate_evidence_sources"]
|
|
16560
16544
|
}
|
|
@@ -16562,7 +16546,7 @@ var MIGRATIONS = [
|
|
|
16562
16546
|
{
|
|
16563
16547
|
version: 82,
|
|
16564
16548
|
name: "skill-invocations-harness",
|
|
16565
|
-
up:
|
|
16549
|
+
up: up87,
|
|
16566
16550
|
artifacts: {
|
|
16567
16551
|
columns: [
|
|
16568
16552
|
{ table: "skill_invocations", column: "harness" },
|
|
@@ -16573,7 +16557,7 @@ var MIGRATIONS = [
|
|
|
16573
16557
|
{
|
|
16574
16558
|
version: 83,
|
|
16575
16559
|
name: "memory-lifecycle-repair",
|
|
16576
|
-
up:
|
|
16560
|
+
up: up88,
|
|
16577
16561
|
artifacts: {
|
|
16578
16562
|
tables: ["transcript_capture_jobs", "aggregate_evidence_sources", "entity_dependencies"],
|
|
16579
16563
|
columns: [
|
|
@@ -16588,7 +16572,7 @@ var MIGRATIONS = [
|
|
|
16588
16572
|
{
|
|
16589
16573
|
version: 84,
|
|
16590
16574
|
name: "legacy-markdown-import-state",
|
|
16591
|
-
up:
|
|
16575
|
+
up: up89,
|
|
16592
16576
|
artifacts: {
|
|
16593
16577
|
tables: ["legacy_markdown_imports", "legacy_markdown_chunks"]
|
|
16594
16578
|
}
|
|
@@ -16596,7 +16580,7 @@ var MIGRATIONS = [
|
|
|
16596
16580
|
{
|
|
16597
16581
|
version: 85,
|
|
16598
16582
|
name: "backfill-relations-to-dependencies",
|
|
16599
|
-
up:
|
|
16583
|
+
up: up90,
|
|
16600
16584
|
artifacts: {
|
|
16601
16585
|
tables: ["entity_dependencies"]
|
|
16602
16586
|
}
|
|
@@ -16604,7 +16588,7 @@ var MIGRATIONS = [
|
|
|
16604
16588
|
{
|
|
16605
16589
|
version: 86,
|
|
16606
16590
|
name: "summary-jobs-content-hash",
|
|
16607
|
-
up:
|
|
16591
|
+
up: up91,
|
|
16608
16592
|
artifacts: {
|
|
16609
16593
|
columns: [{ table: "summary_jobs", column: "content_hash" }]
|
|
16610
16594
|
}
|
|
@@ -16612,7 +16596,7 @@ var MIGRATIONS = [
|
|
|
16612
16596
|
{
|
|
16613
16597
|
version: 87,
|
|
16614
16598
|
name: "summary-jobs-boundary-reason",
|
|
16615
|
-
up:
|
|
16599
|
+
up: up92,
|
|
16616
16600
|
artifacts: {
|
|
16617
16601
|
columns: [{ table: "summary_jobs", column: "boundary_reason" }]
|
|
16618
16602
|
}
|
|
@@ -16620,7 +16604,7 @@ var MIGRATIONS = [
|
|
|
16620
16604
|
{
|
|
16621
16605
|
version: 88,
|
|
16622
16606
|
name: "transcript-recovery-files",
|
|
16623
|
-
up:
|
|
16607
|
+
up: up93,
|
|
16624
16608
|
artifacts: {
|
|
16625
16609
|
tables: ["transcript_recovery_files"]
|
|
16626
16610
|
}
|
|
@@ -16628,7 +16612,7 @@ var MIGRATIONS = [
|
|
|
16628
16612
|
{
|
|
16629
16613
|
version: 89,
|
|
16630
16614
|
name: "job-cancellations",
|
|
16631
|
-
up:
|
|
16615
|
+
up: up94,
|
|
16632
16616
|
artifacts: {
|
|
16633
16617
|
tables: ["job_cancellations"]
|
|
16634
16618
|
}
|
|
@@ -16636,7 +16620,7 @@ var MIGRATIONS = [
|
|
|
16636
16620
|
{
|
|
16637
16621
|
version: 90,
|
|
16638
16622
|
name: "job-archive",
|
|
16639
|
-
up:
|
|
16623
|
+
up: up95,
|
|
16640
16624
|
artifacts: {
|
|
16641
16625
|
tables: ["job_archive"]
|
|
16642
16626
|
}
|
|
@@ -16644,25 +16628,25 @@ var MIGRATIONS = [
|
|
|
16644
16628
|
{
|
|
16645
16629
|
version: 91,
|
|
16646
16630
|
name: "embedding-index-generations",
|
|
16647
|
-
up:
|
|
16631
|
+
up: up96,
|
|
16648
16632
|
artifacts: { tables: ["embedding_index_state"] }
|
|
16649
16633
|
},
|
|
16650
16634
|
{
|
|
16651
16635
|
version: 92,
|
|
16652
16636
|
name: "embedding-staging-store",
|
|
16653
|
-
up:
|
|
16637
|
+
up: up97,
|
|
16654
16638
|
artifacts: { tables: ["embeddings_staging"] }
|
|
16655
16639
|
},
|
|
16656
16640
|
{
|
|
16657
16641
|
version: 93,
|
|
16658
16642
|
name: "dreaming-evidence-cursor",
|
|
16659
|
-
up:
|
|
16643
|
+
up: up98,
|
|
16660
16644
|
artifacts: { columns: [{ table: "dreaming_state", column: "evidence_cursor" }] }
|
|
16661
16645
|
},
|
|
16662
16646
|
{
|
|
16663
16647
|
version: 94,
|
|
16664
16648
|
name: "memory-kind",
|
|
16665
|
-
up:
|
|
16649
|
+
up: up99,
|
|
16666
16650
|
artifacts: {
|
|
16667
16651
|
columns: [
|
|
16668
16652
|
{ table: "memories", column: "memory_kind" },
|
|
@@ -16673,35 +16657,35 @@ var MIGRATIONS = [
|
|
|
16673
16657
|
{
|
|
16674
16658
|
version: 95,
|
|
16675
16659
|
name: "compaction-recall-projections",
|
|
16676
|
-
up:
|
|
16660
|
+
up: up100
|
|
16677
16661
|
},
|
|
16678
16662
|
{
|
|
16679
16663
|
version: 96,
|
|
16680
16664
|
name: "retire-legacy-ingestion",
|
|
16681
|
-
up:
|
|
16665
|
+
up: up101
|
|
16682
16666
|
},
|
|
16683
16667
|
{
|
|
16684
16668
|
version: 97,
|
|
16685
16669
|
name: "dreaming-failure-backoff",
|
|
16686
|
-
up:
|
|
16670
|
+
up: up102,
|
|
16687
16671
|
artifacts: { columns: [{ table: "dreaming_state", column: "last_failure_at" }] }
|
|
16688
16672
|
},
|
|
16689
16673
|
{
|
|
16690
16674
|
version: 98,
|
|
16691
16675
|
name: "dreaming-evidence-exclusions",
|
|
16692
|
-
up:
|
|
16676
|
+
up: up103,
|
|
16693
16677
|
artifacts: { tables: ["dreaming_evidence_exclusions"] }
|
|
16694
16678
|
},
|
|
16695
16679
|
{
|
|
16696
16680
|
version: 99,
|
|
16697
16681
|
name: "dreaming-tool-calls",
|
|
16698
|
-
up:
|
|
16682
|
+
up: up104,
|
|
16699
16683
|
artifacts: { tables: ["dreaming_tool_calls"] }
|
|
16700
16684
|
},
|
|
16701
16685
|
{
|
|
16702
16686
|
version: 100,
|
|
16703
16687
|
name: "dreaming-runbook",
|
|
16704
|
-
up:
|
|
16688
|
+
up: up105,
|
|
16705
16689
|
artifacts: {
|
|
16706
16690
|
columns: [
|
|
16707
16691
|
{ table: "dreaming_passes", column: "evidence_window_json" },
|
|
@@ -16712,23 +16696,23 @@ var MIGRATIONS = [
|
|
|
16712
16696
|
{
|
|
16713
16697
|
version: 101,
|
|
16714
16698
|
name: "dreaming-attention",
|
|
16715
|
-
up:
|
|
16699
|
+
up: up106,
|
|
16716
16700
|
artifacts: { tables: ["dreaming_attention"] }
|
|
16717
16701
|
},
|
|
16718
16702
|
{
|
|
16719
16703
|
version: 102,
|
|
16720
16704
|
name: "attribute-semantic-memories",
|
|
16721
|
-
up:
|
|
16705
|
+
up: up107
|
|
16722
16706
|
},
|
|
16723
16707
|
{
|
|
16724
16708
|
version: 103,
|
|
16725
16709
|
name: "semantic-memory-kind",
|
|
16726
|
-
up:
|
|
16710
|
+
up: up108
|
|
16727
16711
|
},
|
|
16728
16712
|
{
|
|
16729
16713
|
version: 104,
|
|
16730
16714
|
name: "derived-memory-provenance",
|
|
16731
|
-
up:
|
|
16715
|
+
up: up109,
|
|
16732
16716
|
artifacts: {
|
|
16733
16717
|
tables: ["derived_memory_sources"],
|
|
16734
16718
|
columns: [{ table: "memories", column: "stale_at" }]
|
|
@@ -16737,12 +16721,12 @@ var MIGRATIONS = [
|
|
|
16737
16721
|
{
|
|
16738
16722
|
version: 105,
|
|
16739
16723
|
name: "agent-scoped-entity-name",
|
|
16740
|
-
up:
|
|
16724
|
+
up: up110
|
|
16741
16725
|
},
|
|
16742
16726
|
{
|
|
16743
16727
|
version: 106,
|
|
16744
16728
|
name: "memory-review-after",
|
|
16745
|
-
up:
|
|
16729
|
+
up: up111,
|
|
16746
16730
|
artifacts: {
|
|
16747
16731
|
columns: [{ table: "memories", column: "review_after" }]
|
|
16748
16732
|
}
|
|
@@ -16750,7 +16734,7 @@ var MIGRATIONS = [
|
|
|
16750
16734
|
{
|
|
16751
16735
|
version: 107,
|
|
16752
16736
|
name: "dreaming-pass-usage",
|
|
16753
|
-
up:
|
|
16737
|
+
up: up112,
|
|
16754
16738
|
artifacts: {
|
|
16755
16739
|
columns: [
|
|
16756
16740
|
{ table: "dreaming_passes", column: "tokens_input" },
|
|
@@ -16764,7 +16748,7 @@ var MIGRATIONS = [
|
|
|
16764
16748
|
{
|
|
16765
16749
|
version: 108,
|
|
16766
16750
|
name: "embedding-usage",
|
|
16767
|
-
up:
|
|
16751
|
+
up: up113,
|
|
16768
16752
|
artifacts: {
|
|
16769
16753
|
tables: ["embedding_usage"]
|
|
16770
16754
|
}
|
|
@@ -16772,7 +16756,7 @@ var MIGRATIONS = [
|
|
|
16772
16756
|
{
|
|
16773
16757
|
version: 109,
|
|
16774
16758
|
name: "telemetry-install",
|
|
16775
|
-
up:
|
|
16759
|
+
up: up114,
|
|
16776
16760
|
artifacts: {
|
|
16777
16761
|
tables: ["telemetry_install"]
|
|
16778
16762
|
}
|
|
@@ -16780,12 +16764,12 @@ var MIGRATIONS = [
|
|
|
16780
16764
|
{
|
|
16781
16765
|
version: 110,
|
|
16782
16766
|
name: "memory-mention-join-index",
|
|
16783
|
-
up:
|
|
16767
|
+
up: up115
|
|
16784
16768
|
},
|
|
16785
16769
|
{
|
|
16786
16770
|
version: 111,
|
|
16787
16771
|
name: "telemetry-first-use",
|
|
16788
|
-
up:
|
|
16772
|
+
up: up116,
|
|
16789
16773
|
artifacts: {
|
|
16790
16774
|
columns: [
|
|
16791
16775
|
{ table: "telemetry_install", column: "first_remember_at" },
|
|
@@ -16796,7 +16780,7 @@ var MIGRATIONS = [
|
|
|
16796
16780
|
{
|
|
16797
16781
|
version: 112,
|
|
16798
16782
|
name: "telemetry-queue-ownership",
|
|
16799
|
-
up:
|
|
16783
|
+
up: up117,
|
|
16800
16784
|
artifacts: {
|
|
16801
16785
|
columns: [
|
|
16802
16786
|
{ table: "telemetry_events", column: "source" },
|
|
@@ -16808,7 +16792,7 @@ var MIGRATIONS = [
|
|
|
16808
16792
|
{
|
|
16809
16793
|
version: 113,
|
|
16810
16794
|
name: "session-claims",
|
|
16811
|
-
up:
|
|
16795
|
+
up: up118,
|
|
16812
16796
|
artifacts: {
|
|
16813
16797
|
tables: ["session_claims"],
|
|
16814
16798
|
columns: [
|
|
@@ -16822,12 +16806,12 @@ var MIGRATIONS = [
|
|
|
16822
16806
|
{
|
|
16823
16807
|
version: 114,
|
|
16824
16808
|
name: "memory-traversal-hydration-index",
|
|
16825
|
-
up:
|
|
16809
|
+
up: up119
|
|
16826
16810
|
},
|
|
16827
16811
|
{
|
|
16828
16812
|
version: 115,
|
|
16829
16813
|
name: "cross-agent-message-notifications",
|
|
16830
|
-
up:
|
|
16814
|
+
up: up120,
|
|
16831
16815
|
artifacts: {
|
|
16832
16816
|
tables: ["cross_agent_messages", "cross_agent_message_receipts"]
|
|
16833
16817
|
}
|
|
@@ -16835,7 +16819,7 @@ var MIGRATIONS = [
|
|
|
16835
16819
|
{
|
|
16836
16820
|
version: 116,
|
|
16837
16821
|
name: "acp-delivery-reconciliation",
|
|
16838
|
-
up:
|
|
16822
|
+
up: up121,
|
|
16839
16823
|
artifacts: {
|
|
16840
16824
|
columns: [
|
|
16841
16825
|
{ table: "cross_agent_messages", column: "delivery_state" },
|
|
@@ -16849,7 +16833,7 @@ var MIGRATIONS = [
|
|
|
16849
16833
|
{
|
|
16850
16834
|
version: 117,
|
|
16851
16835
|
name: "retire-summary-worker",
|
|
16852
|
-
up:
|
|
16836
|
+
up: up122,
|
|
16853
16837
|
artifacts: {
|
|
16854
16838
|
columns: [
|
|
16855
16839
|
{ table: "session_transcripts", column: "completed_at" },
|
|
@@ -16860,24 +16844,24 @@ var MIGRATIONS = [
|
|
|
16860
16844
|
{
|
|
16861
16845
|
version: 118,
|
|
16862
16846
|
name: "queue-pressure-indices",
|
|
16863
|
-
up:
|
|
16847
|
+
up: up123
|
|
16864
16848
|
},
|
|
16865
16849
|
{
|
|
16866
16850
|
version: 119,
|
|
16867
16851
|
name: "telemetry-version-observation",
|
|
16868
|
-
up:
|
|
16852
|
+
up: up124,
|
|
16869
16853
|
artifacts: { columns: [{ table: "telemetry_install", column: "last_seen_version" }] }
|
|
16870
16854
|
},
|
|
16871
16855
|
{
|
|
16872
16856
|
version: 120,
|
|
16873
16857
|
name: "source-lifecycle-telemetry",
|
|
16874
|
-
up:
|
|
16858
|
+
up: up125,
|
|
16875
16859
|
artifacts: { tables: ["source_lifecycle_state"] }
|
|
16876
16860
|
},
|
|
16877
16861
|
{
|
|
16878
16862
|
version: 121,
|
|
16879
16863
|
name: "telemetry-delivery-health",
|
|
16880
|
-
up:
|
|
16864
|
+
up: up126,
|
|
16881
16865
|
artifacts: {
|
|
16882
16866
|
tables: ["telemetry_delivery_state"],
|
|
16883
16867
|
columns: [
|
|
@@ -16891,7 +16875,7 @@ var MIGRATIONS = [
|
|
|
16891
16875
|
{
|
|
16892
16876
|
version: 122,
|
|
16893
16877
|
name: "dreaming-evidence-retry",
|
|
16894
|
-
up:
|
|
16878
|
+
up: up127,
|
|
16895
16879
|
artifacts: {
|
|
16896
16880
|
columns: [
|
|
16897
16881
|
{ table: "dreaming_evidence_exclusions", column: "failure_class" },
|
|
@@ -16904,13 +16888,13 @@ var MIGRATIONS = [
|
|
|
16904
16888
|
{
|
|
16905
16889
|
version: 123,
|
|
16906
16890
|
name: "embedding-index-failures",
|
|
16907
|
-
up:
|
|
16891
|
+
up: up128,
|
|
16908
16892
|
artifacts: { tables: ["embedding_index_failures"] }
|
|
16909
16893
|
},
|
|
16910
16894
|
{
|
|
16911
16895
|
version: 124,
|
|
16912
16896
|
name: "import-derived-lifecycle",
|
|
16913
|
-
up:
|
|
16897
|
+
up: up129,
|
|
16914
16898
|
artifacts: {
|
|
16915
16899
|
tables: ["imported_source_lifecycle"]
|
|
16916
16900
|
}
|
|
@@ -16918,77 +16902,77 @@ var MIGRATIONS = [
|
|
|
16918
16902
|
{
|
|
16919
16903
|
version: 125,
|
|
16920
16904
|
name: "memory-content-safety",
|
|
16921
|
-
up:
|
|
16905
|
+
up: up130,
|
|
16922
16906
|
artifacts: { tables: ["memory_content_safety"] }
|
|
16923
16907
|
},
|
|
16924
16908
|
{
|
|
16925
16909
|
version: 126,
|
|
16926
16910
|
name: "dreaming-surprisal-attention",
|
|
16927
|
-
up:
|
|
16911
|
+
up: up131,
|
|
16928
16912
|
artifacts: { tables: ["dreaming_attention"] }
|
|
16929
16913
|
},
|
|
16930
16914
|
{
|
|
16931
16915
|
version: 127,
|
|
16932
16916
|
name: "ontology-contradictions",
|
|
16933
|
-
up:
|
|
16917
|
+
up: up132,
|
|
16934
16918
|
artifacts: { tables: ["ontology_contradictions"] }
|
|
16935
16919
|
},
|
|
16936
16920
|
{
|
|
16937
16921
|
version: 128,
|
|
16938
16922
|
name: "bounded-queue-diagnostics",
|
|
16939
|
-
up:
|
|
16923
|
+
up: up133
|
|
16940
16924
|
},
|
|
16941
16925
|
{
|
|
16942
16926
|
version: 129,
|
|
16943
16927
|
name: "retire-structural-jobs",
|
|
16944
|
-
up:
|
|
16928
|
+
up: up134
|
|
16945
16929
|
},
|
|
16946
16930
|
{
|
|
16947
16931
|
version: 130,
|
|
16948
16932
|
name: "embedding-repair-state",
|
|
16949
|
-
up:
|
|
16933
|
+
up: up135,
|
|
16950
16934
|
artifacts: { tables: ["embedding_repair_budget", "embedding_repair_backoff"] }
|
|
16951
16935
|
},
|
|
16952
16936
|
{
|
|
16953
16937
|
version: 131,
|
|
16954
16938
|
name: "dreaming-evidence-consumption",
|
|
16955
|
-
up:
|
|
16939
|
+
up: up136,
|
|
16956
16940
|
artifacts: { tables: ["dreaming_evidence_consumption"] }
|
|
16957
16941
|
},
|
|
16958
16942
|
{
|
|
16959
16943
|
version: 132,
|
|
16960
16944
|
name: "observer-scoped-epistemic-assertions",
|
|
16961
|
-
up:
|
|
16945
|
+
up: up137,
|
|
16962
16946
|
artifacts: { tables: ["epistemic_assertions"] }
|
|
16963
16947
|
},
|
|
16964
16948
|
{
|
|
16965
16949
|
version: 133,
|
|
16966
16950
|
name: "dreaming-memory-head",
|
|
16967
|
-
up:
|
|
16951
|
+
up: up138,
|
|
16968
16952
|
artifacts: { tables: ["memory_head_revisions", "memory_head_entries", "memory_head_revision_entries"] }
|
|
16969
16953
|
},
|
|
16970
16954
|
{
|
|
16971
16955
|
version: 134,
|
|
16972
16956
|
name: "scope-memory-head-entries",
|
|
16973
|
-
up:
|
|
16957
|
+
up: up139,
|
|
16974
16958
|
artifacts: { tables: ["memory_head_entries"] }
|
|
16975
16959
|
},
|
|
16976
16960
|
{
|
|
16977
16961
|
version: 135,
|
|
16978
16962
|
name: "memory-head-publication",
|
|
16979
|
-
up:
|
|
16963
|
+
up: up140,
|
|
16980
16964
|
artifacts: { tables: ["memory_head_publications"] }
|
|
16981
16965
|
},
|
|
16982
16966
|
{
|
|
16983
16967
|
version: 136,
|
|
16984
16968
|
name: "memory-head-revisions",
|
|
16985
|
-
up:
|
|
16969
|
+
up: up141,
|
|
16986
16970
|
artifacts: { tables: ["memory_head_revisions"] }
|
|
16987
16971
|
},
|
|
16988
16972
|
{
|
|
16989
16973
|
version: 137,
|
|
16990
16974
|
name: "dreaming-head-manifest",
|
|
16991
|
-
up:
|
|
16975
|
+
up: up142,
|
|
16992
16976
|
artifacts: {
|
|
16993
16977
|
columns: [
|
|
16994
16978
|
{ table: "dreaming_passes", column: "head_revision" },
|
|
@@ -16999,7 +16983,7 @@ var MIGRATIONS = [
|
|
|
16999
16983
|
{
|
|
17000
16984
|
version: 138,
|
|
17001
16985
|
name: "bounded-status-projections",
|
|
17002
|
-
up:
|
|
16986
|
+
up: up143,
|
|
17003
16987
|
artifacts: {
|
|
17004
16988
|
tables: ["transcript_capture_status", "memories_duplicate_hash_counts", "memories_diagnostics_state"]
|
|
17005
16989
|
}
|
|
@@ -17007,31 +16991,31 @@ var MIGRATIONS = [
|
|
|
17007
16991
|
{
|
|
17008
16992
|
version: 139,
|
|
17009
16993
|
name: "native-source-sync-state",
|
|
17010
|
-
up:
|
|
16994
|
+
up: up144,
|
|
17011
16995
|
artifacts: { tables: ["native_source_sync_state"] }
|
|
17012
16996
|
},
|
|
17013
16997
|
{
|
|
17014
16998
|
version: 140,
|
|
17015
16999
|
name: "transcript-recovery-frontier",
|
|
17016
|
-
up:
|
|
17000
|
+
up: up145,
|
|
17017
17001
|
artifacts: { tables: ["transcript_recovery_frontiers"] }
|
|
17018
17002
|
},
|
|
17019
17003
|
{
|
|
17020
17004
|
version: 141,
|
|
17021
17005
|
name: "source-sync-checkpoints",
|
|
17022
|
-
up:
|
|
17006
|
+
up: up146,
|
|
17023
17007
|
artifacts: { tables: ["source_sync_checkpoints"] }
|
|
17024
17008
|
},
|
|
17025
17009
|
{
|
|
17026
17010
|
version: 142,
|
|
17027
17011
|
name: "source-sync-frontier",
|
|
17028
|
-
up:
|
|
17012
|
+
up: up147,
|
|
17029
17013
|
artifacts: { columns: [{ table: "source_sync_checkpoints", column: "frontier" }] }
|
|
17030
17014
|
},
|
|
17031
17015
|
{
|
|
17032
17016
|
version: 143,
|
|
17033
17017
|
name: "embedding-index-progress",
|
|
17034
|
-
up:
|
|
17018
|
+
up: up148,
|
|
17035
17019
|
artifacts: {
|
|
17036
17020
|
columns: [
|
|
17037
17021
|
{ table: "embedding_index_state", column: "migration_phase" },
|
|
@@ -17047,19 +17031,19 @@ var MIGRATIONS = [
|
|
|
17047
17031
|
{
|
|
17048
17032
|
version: 144,
|
|
17049
17033
|
name: "memory-job-lease-token",
|
|
17050
|
-
up:
|
|
17034
|
+
up: up149,
|
|
17051
17035
|
artifacts: { columns: [{ table: "memory_jobs", column: "lease_token" }] }
|
|
17052
17036
|
},
|
|
17053
17037
|
{
|
|
17054
17038
|
version: 145,
|
|
17055
17039
|
name: "dreaming-evidence-reviews",
|
|
17056
|
-
up:
|
|
17040
|
+
up: up150,
|
|
17057
17041
|
artifacts: { tables: ["dreaming_evidence_reviews"] }
|
|
17058
17042
|
},
|
|
17059
17043
|
{
|
|
17060
17044
|
version: 146,
|
|
17061
17045
|
name: "source-transcript-import",
|
|
17062
|
-
up:
|
|
17046
|
+
up: up151,
|
|
17063
17047
|
artifacts: {
|
|
17064
17048
|
tables: [
|
|
17065
17049
|
"source_import_jobs",
|
|
@@ -17078,19 +17062,19 @@ var MIGRATIONS = [
|
|
|
17078
17062
|
{
|
|
17079
17063
|
version: 147,
|
|
17080
17064
|
name: "source-import-replay-file-slots",
|
|
17081
|
-
up:
|
|
17065
|
+
up: up152,
|
|
17082
17066
|
artifacts: { tables: ["source_import_files"] }
|
|
17083
17067
|
},
|
|
17084
17068
|
{
|
|
17085
17069
|
version: 148,
|
|
17086
17070
|
name: "source-import-attempt-provenance",
|
|
17087
|
-
up:
|
|
17071
|
+
up: up153,
|
|
17088
17072
|
artifacts: { columns: [{ table: "source_import_record_attempts", column: "source_id" }] }
|
|
17089
17073
|
},
|
|
17090
17074
|
{
|
|
17091
17075
|
version: 149,
|
|
17092
17076
|
name: "transcript-import-state-machine",
|
|
17093
|
-
up:
|
|
17077
|
+
up: up154,
|
|
17094
17078
|
artifacts: {
|
|
17095
17079
|
columns: [
|
|
17096
17080
|
{ table: "source_import_jobs", column: "duplicate_mode" },
|
|
@@ -17102,7 +17086,7 @@ var MIGRATIONS = [
|
|
|
17102
17086
|
{
|
|
17103
17087
|
version: 150,
|
|
17104
17088
|
name: "memory-head-freshness",
|
|
17105
|
-
up:
|
|
17089
|
+
up: up155,
|
|
17106
17090
|
artifacts: {
|
|
17107
17091
|
columns: [
|
|
17108
17092
|
{ table: "memory_md_heads", column: "is_current" },
|
|
@@ -17148,7 +17132,7 @@ var MIGRATIONS = [
|
|
|
17148
17132
|
{
|
|
17149
17133
|
version: 153,
|
|
17150
17134
|
name: "vector-repair-checkpoints",
|
|
17151
|
-
up:
|
|
17135
|
+
up: up156,
|
|
17152
17136
|
artifacts: { tables: ["vector_repair_checkpoints"] }
|
|
17153
17137
|
},
|
|
17154
17138
|
{
|
|
@@ -17175,13 +17159,13 @@ var MIGRATIONS = [
|
|
|
17175
17159
|
{
|
|
17176
17160
|
version: 156,
|
|
17177
17161
|
name: "embedding-repair-checkpoints",
|
|
17178
|
-
up:
|
|
17162
|
+
up: up157,
|
|
17179
17163
|
artifacts: { tables: ["embedding_repair_checkpoints"] }
|
|
17180
17164
|
},
|
|
17181
17165
|
{
|
|
17182
17166
|
version: 157,
|
|
17183
17167
|
name: "embedding-repair-progress",
|
|
17184
|
-
up:
|
|
17168
|
+
up: up158,
|
|
17185
17169
|
artifacts: {
|
|
17186
17170
|
tables: ["embedding_repair_progress"],
|
|
17187
17171
|
columns: [{ table: "embedding_repair_checkpoints", column: "profile_fingerprint" }]
|
|
@@ -17190,8 +17174,13 @@ var MIGRATIONS = [
|
|
|
17190
17174
|
{
|
|
17191
17175
|
version: 158,
|
|
17192
17176
|
name: "dreaming-candidate-scan-index",
|
|
17193
|
-
up:
|
|
17177
|
+
up: up159,
|
|
17194
17178
|
artifacts: { indexes: ["idx_memories_agent_kind"] }
|
|
17179
|
+
},
|
|
17180
|
+
{
|
|
17181
|
+
version: 159,
|
|
17182
|
+
name: "retire-obsolete-invocation-ledger",
|
|
17183
|
+
up: up5
|
|
17195
17184
|
}
|
|
17196
17185
|
];
|
|
17197
17186
|
var LATEST_SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1]?.version ?? 0;
|
|
@@ -28142,7 +28131,7 @@ var DAEMON_DERIVED_MEMORY_SOURCE_TYPES2 = [
|
|
|
28142
28131
|
"checkpoint",
|
|
28143
28132
|
"dreaming"
|
|
28144
28133
|
];
|
|
28145
|
-
function
|
|
28134
|
+
function up160(db) {
|
|
28146
28135
|
const hasColumn26 = (table, column) => {
|
|
28147
28136
|
const statement = db.prepare(`SELECT 1 FROM pragma_table_info('${table}') WHERE name = ?`);
|
|
28148
28137
|
try {
|
|
@@ -28254,6 +28243,9 @@ function up410(db) {
|
|
|
28254
28243
|
WHERE resolved_at IS NULL;
|
|
28255
28244
|
`);
|
|
28256
28245
|
}
|
|
28246
|
+
function up510(db) {
|
|
28247
|
+
db.exec("DROP TABLE IF EXISTS mcp_invocations");
|
|
28248
|
+
}
|
|
28257
28249
|
var MEMORIES_FTS_TOKENIZER2 = "unicode61";
|
|
28258
28250
|
var FTS_STATE_TABLE2 = "memories_fts_state";
|
|
28259
28251
|
function normalizeSql2(sql) {
|
|
@@ -28369,7 +28361,7 @@ function memoriesFtsNeedsTokenizerRepair2(sql) {
|
|
|
28369
28361
|
return true;
|
|
28370
28362
|
return !normalized.includes(`tokenize='${MEMORIES_FTS_TOKENIZER2}'`);
|
|
28371
28363
|
}
|
|
28372
|
-
function
|
|
28364
|
+
function up610(db) {
|
|
28373
28365
|
db.exec(`
|
|
28374
28366
|
CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
28375
28367
|
version INTEGER PRIMARY KEY,
|
|
@@ -28467,7 +28459,7 @@ function addColumnIfMissing210(db, table, column, definition) {
|
|
|
28467
28459
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
28468
28460
|
}
|
|
28469
28461
|
}
|
|
28470
|
-
function
|
|
28462
|
+
function up710(db) {
|
|
28471
28463
|
addColumnIfMissing210(db, "memories", "content_hash", "TEXT");
|
|
28472
28464
|
addColumnIfMissing210(db, "memories", "normalized_content", "TEXT");
|
|
28473
28465
|
addColumnIfMissing210(db, "memories", "is_deleted", "INTEGER DEFAULT 0");
|
|
@@ -28585,7 +28577,7 @@ function addColumnIfMissing32(db, table, column, definition) {
|
|
|
28585
28577
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
28586
28578
|
return true;
|
|
28587
28579
|
}
|
|
28588
|
-
function
|
|
28580
|
+
function up810(db) {
|
|
28589
28581
|
addColumnIfMissing32(db, "memories", "why", "TEXT");
|
|
28590
28582
|
addColumnIfMissing32(db, "memories", "project", "TEXT");
|
|
28591
28583
|
db.exec(`DROP INDEX IF EXISTS idx_memories_content_hash`);
|
|
@@ -28622,7 +28614,7 @@ function addColumnIfMissing42(db, table, column, definition) {
|
|
|
28622
28614
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
28623
28615
|
}
|
|
28624
28616
|
}
|
|
28625
|
-
function
|
|
28617
|
+
function up910(db) {
|
|
28626
28618
|
addColumnIfMissing42(db, "memory_history", "actor_type", "TEXT");
|
|
28627
28619
|
addColumnIfMissing42(db, "memory_history", "session_id", "TEXT");
|
|
28628
28620
|
addColumnIfMissing42(db, "memory_history", "request_id", "TEXT");
|
|
@@ -28655,7 +28647,7 @@ function addColumnIfMissing52(db, table, column, definition) {
|
|
|
28655
28647
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
28656
28648
|
}
|
|
28657
28649
|
}
|
|
28658
|
-
function
|
|
28650
|
+
function up1010(db) {
|
|
28659
28651
|
addColumnIfMissing52(db, "entities", "canonical_name", "TEXT");
|
|
28660
28652
|
addColumnIfMissing52(db, "entities", "mentions", "INTEGER DEFAULT 0");
|
|
28661
28653
|
addColumnIfMissing52(db, "entities", "embedding", "BLOB");
|
|
@@ -28672,7 +28664,7 @@ function hasColumn42(db, table, column) {
|
|
|
28672
28664
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
28673
28665
|
return rows.some((r3) => r3.name === column);
|
|
28674
28666
|
}
|
|
28675
|
-
function
|
|
28667
|
+
function up1110(db) {
|
|
28676
28668
|
if (!hasColumn42(db, "memories", "idempotency_key")) {
|
|
28677
28669
|
db.exec("ALTER TABLE memories ADD COLUMN idempotency_key TEXT");
|
|
28678
28670
|
}
|
|
@@ -28687,7 +28679,7 @@ function hasColumn52(db, table, column) {
|
|
|
28687
28679
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
28688
28680
|
return rows.some((r3) => r3.name === column);
|
|
28689
28681
|
}
|
|
28690
|
-
function
|
|
28682
|
+
function up1210(db) {
|
|
28691
28683
|
db.exec(`
|
|
28692
28684
|
CREATE TABLE IF NOT EXISTS documents (
|
|
28693
28685
|
id TEXT PRIMARY KEY,
|
|
@@ -28744,7 +28736,7 @@ function up1110(db) {
|
|
|
28744
28736
|
db.exec("ALTER TABLE memory_jobs ADD COLUMN document_id TEXT");
|
|
28745
28737
|
}
|
|
28746
28738
|
}
|
|
28747
|
-
function
|
|
28739
|
+
function up1310(db) {
|
|
28748
28740
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='embeddings'").all();
|
|
28749
28741
|
if (tables.length === 0)
|
|
28750
28742
|
return;
|
|
@@ -28761,7 +28753,7 @@ function up1210(db) {
|
|
|
28761
28753
|
ON embeddings(content_hash)
|
|
28762
28754
|
`);
|
|
28763
28755
|
}
|
|
28764
|
-
function
|
|
28756
|
+
function up1410(db) {
|
|
28765
28757
|
db.exec(`
|
|
28766
28758
|
CREATE TABLE IF NOT EXISTS summary_jobs (
|
|
28767
28759
|
id TEXT PRIMARY KEY,
|
|
@@ -28781,7 +28773,7 @@ function up1310(db) {
|
|
|
28781
28773
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_summary_jobs_status
|
|
28782
28774
|
ON summary_jobs(status)`);
|
|
28783
28775
|
}
|
|
28784
|
-
function
|
|
28776
|
+
function up1510(db) {
|
|
28785
28777
|
db.exec(`
|
|
28786
28778
|
CREATE TABLE IF NOT EXISTS umap_cache (
|
|
28787
28779
|
id INTEGER PRIMARY KEY,
|
|
@@ -28792,7 +28784,7 @@ function up1410(db) {
|
|
|
28792
28784
|
)
|
|
28793
28785
|
`);
|
|
28794
28786
|
}
|
|
28795
|
-
function
|
|
28787
|
+
function up162(db) {
|
|
28796
28788
|
db.exec(`
|
|
28797
28789
|
CREATE TABLE IF NOT EXISTS session_scores (
|
|
28798
28790
|
id TEXT PRIMARY KEY,
|
|
@@ -28812,7 +28804,7 @@ function up1510(db) {
|
|
|
28812
28804
|
ON session_scores(session_key);
|
|
28813
28805
|
`);
|
|
28814
28806
|
}
|
|
28815
|
-
function
|
|
28807
|
+
function up172(db) {
|
|
28816
28808
|
db.exec(`
|
|
28817
28809
|
CREATE TABLE IF NOT EXISTS scheduled_tasks (
|
|
28818
28810
|
id TEXT PRIMARY KEY,
|
|
@@ -28853,7 +28845,7 @@ function addColumnIfMissing62(db, table, column, definition) {
|
|
|
28853
28845
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
28854
28846
|
}
|
|
28855
28847
|
}
|
|
28856
|
-
function
|
|
28848
|
+
function up182(db) {
|
|
28857
28849
|
db.exec(`
|
|
28858
28850
|
CREATE TABLE IF NOT EXISTS ingestion_jobs (
|
|
28859
28851
|
id TEXT PRIMARY KEY,
|
|
@@ -28879,7 +28871,7 @@ function up172(db) {
|
|
|
28879
28871
|
addColumnIfMissing62(db, "memories", "source_path", "TEXT");
|
|
28880
28872
|
addColumnIfMissing62(db, "memories", "source_section", "TEXT");
|
|
28881
28873
|
}
|
|
28882
|
-
function
|
|
28874
|
+
function up192(db) {
|
|
28883
28875
|
db.exec(`
|
|
28884
28876
|
CREATE TABLE IF NOT EXISTS telemetry_events (
|
|
28885
28877
|
id TEXT PRIMARY KEY,
|
|
@@ -28904,7 +28896,7 @@ function addColumnIfMissing72(db, table, column, definition) {
|
|
|
28904
28896
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
28905
28897
|
}
|
|
28906
28898
|
}
|
|
28907
|
-
function
|
|
28899
|
+
function up202(db) {
|
|
28908
28900
|
db.exec(`
|
|
28909
28901
|
CREATE TABLE IF NOT EXISTS session_memories (
|
|
28910
28902
|
id TEXT PRIMARY KEY,
|
|
@@ -28931,7 +28923,7 @@ function up192(db) {
|
|
|
28931
28923
|
addColumnIfMissing72(db, "session_scores", "confidence", "REAL");
|
|
28932
28924
|
addColumnIfMissing72(db, "session_scores", "continuity_reasoning", "TEXT");
|
|
28933
28925
|
}
|
|
28934
|
-
function
|
|
28926
|
+
function up212(db) {
|
|
28935
28927
|
db.exec(`
|
|
28936
28928
|
CREATE TABLE IF NOT EXISTS session_checkpoints (
|
|
28937
28929
|
id TEXT PRIMARY KEY,
|
|
@@ -28953,7 +28945,7 @@ function up202(db) {
|
|
|
28953
28945
|
ON session_checkpoints(project_normalized, created_at DESC);
|
|
28954
28946
|
`);
|
|
28955
28947
|
}
|
|
28956
|
-
function
|
|
28948
|
+
function up222(db) {
|
|
28957
28949
|
const cols = db.prepare("PRAGMA table_info(scheduled_tasks)").all();
|
|
28958
28950
|
const colNames = new Set(cols.flatMap((c3) => typeof c3.name === "string" ? [c3.name] : []));
|
|
28959
28951
|
if (!colNames.has("skill_name")) {
|
|
@@ -28964,7 +28956,7 @@ function up212(db) {
|
|
|
28964
28956
|
CHECK (skill_mode IN ('inject', 'slash') OR skill_mode IS NULL)`);
|
|
28965
28957
|
}
|
|
28966
28958
|
}
|
|
28967
|
-
function
|
|
28959
|
+
function up232(db) {
|
|
28968
28960
|
const existing = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='skill_meta'").get();
|
|
28969
28961
|
if (existing)
|
|
28970
28962
|
return;
|
|
@@ -28996,7 +28988,7 @@ function up222(db) {
|
|
|
28996
28988
|
CREATE INDEX idx_skill_meta_source ON skill_meta(source);
|
|
28997
28989
|
`);
|
|
28998
28990
|
}
|
|
28999
|
-
function
|
|
28991
|
+
function up242(db) {
|
|
29000
28992
|
const entityCols = db.prepare("PRAGMA table_info(entities)").all();
|
|
29001
28993
|
const entityColNames = new Set(entityCols.flatMap((c3) => typeof c3.name === "string" ? [c3.name] : []));
|
|
29002
28994
|
if (!entityColNames.has("agent_id")) {
|
|
@@ -29081,13 +29073,13 @@ function addColumnIfMissing82(db, table, column, definition) {
|
|
|
29081
29073
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
29082
29074
|
}
|
|
29083
29075
|
}
|
|
29084
|
-
function
|
|
29076
|
+
function up252(db) {
|
|
29085
29077
|
addColumnIfMissing82(db, "session_memories", "entity_slot", "INTEGER");
|
|
29086
29078
|
addColumnIfMissing82(db, "session_memories", "aspect_slot", "INTEGER");
|
|
29087
29079
|
addColumnIfMissing82(db, "session_memories", "is_constraint", "INTEGER NOT NULL DEFAULT 0");
|
|
29088
29080
|
addColumnIfMissing82(db, "session_memories", "structural_density", "INTEGER");
|
|
29089
29081
|
}
|
|
29090
|
-
function
|
|
29082
|
+
function up262(db) {
|
|
29091
29083
|
const columns = db.prepare("PRAGMA table_info(session_checkpoints)").all();
|
|
29092
29084
|
const columnNames = new Set(columns.flatMap((column) => typeof column.name === "string" ? [column.name] : []));
|
|
29093
29085
|
if (!columnNames.has("focal_entity_ids")) {
|
|
@@ -29112,25 +29104,25 @@ function addColumnIfMissing92(db, table, column, definition) {
|
|
|
29112
29104
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
29113
29105
|
}
|
|
29114
29106
|
}
|
|
29115
|
-
function
|
|
29107
|
+
function up272(db) {
|
|
29116
29108
|
addColumnIfMissing92(db, "entities", "pinned", "INTEGER NOT NULL DEFAULT 0");
|
|
29117
29109
|
addColumnIfMissing92(db, "entities", "pinned_at", "TEXT");
|
|
29118
29110
|
db.exec("CREATE INDEX IF NOT EXISTS idx_entities_pinned ON entities(agent_id, pinned, pinned_at DESC)");
|
|
29119
29111
|
}
|
|
29120
|
-
function up272(_db) {}
|
|
29121
29112
|
function up282(_db) {}
|
|
29113
|
+
function up292(_db) {}
|
|
29122
29114
|
function addColumnIfMissing102(db, table, column, definition) {
|
|
29123
29115
|
const cols = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
29124
29116
|
if (!cols.some((c3) => c3.name === column)) {
|
|
29125
29117
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
29126
29118
|
}
|
|
29127
29119
|
}
|
|
29128
|
-
function
|
|
29120
|
+
function up302(db) {
|
|
29129
29121
|
addColumnIfMissing102(db, "session_memories", "agent_relevance_score", "REAL");
|
|
29130
29122
|
addColumnIfMissing102(db, "session_memories", "agent_feedback_count", "INTEGER DEFAULT 0");
|
|
29131
29123
|
}
|
|
29132
|
-
function
|
|
29133
|
-
function
|
|
29124
|
+
function up312(_db) {}
|
|
29125
|
+
function up322(db) {
|
|
29134
29126
|
db.exec(`
|
|
29135
29127
|
UPDATE entities
|
|
29136
29128
|
SET canonical_name = REPLACE(REPLACE(REPLACE(
|
|
@@ -29139,7 +29131,7 @@ function up312(db) {
|
|
|
29139
29131
|
WHERE canonical_name IS NULL
|
|
29140
29132
|
`);
|
|
29141
29133
|
}
|
|
29142
|
-
function
|
|
29134
|
+
function up332(db) {
|
|
29143
29135
|
db.exec(`
|
|
29144
29136
|
CREATE TABLE IF NOT EXISTS memories_cold (
|
|
29145
29137
|
archive_id TEXT PRIMARY KEY,
|
|
@@ -29176,7 +29168,7 @@ function up322(db) {
|
|
|
29176
29168
|
CREATE INDEX IF NOT EXISTS idx_cold_source ON memories_cold(cold_source_id);
|
|
29177
29169
|
`);
|
|
29178
29170
|
}
|
|
29179
|
-
function
|
|
29171
|
+
function up342(db) {
|
|
29180
29172
|
db.exec(`
|
|
29181
29173
|
CREATE TABLE IF NOT EXISTS session_summaries (
|
|
29182
29174
|
id TEXT PRIMARY KEY,
|
|
@@ -29221,7 +29213,7 @@ function up332(db) {
|
|
|
29221
29213
|
WHERE session_key IS NOT NULL;
|
|
29222
29214
|
`);
|
|
29223
29215
|
}
|
|
29224
|
-
function
|
|
29216
|
+
function up352(db) {
|
|
29225
29217
|
db.exec(`
|
|
29226
29218
|
CREATE TABLE IF NOT EXISTS memory_jobs_new (
|
|
29227
29219
|
id TEXT PRIMARY KEY,
|
|
@@ -29266,7 +29258,7 @@ function up342(db) {
|
|
|
29266
29258
|
ON memory_jobs(failed_at);
|
|
29267
29259
|
`);
|
|
29268
29260
|
}
|
|
29269
|
-
function
|
|
29261
|
+
function up362(db) {
|
|
29270
29262
|
const depCols = db.prepare("PRAGMA table_info(entity_dependencies)").all();
|
|
29271
29263
|
if (!depCols.some((c3) => c3.name === "reason")) {
|
|
29272
29264
|
db.exec("ALTER TABLE entity_dependencies ADD COLUMN reason TEXT");
|
|
@@ -29276,7 +29268,7 @@ function up352(db) {
|
|
|
29276
29268
|
db.exec("ALTER TABLE entities ADD COLUMN last_synthesized_at TEXT");
|
|
29277
29269
|
}
|
|
29278
29270
|
}
|
|
29279
|
-
function
|
|
29271
|
+
function up372(db) {
|
|
29280
29272
|
const cols = db.prepare("PRAGMA table_info(embeddings)").all();
|
|
29281
29273
|
if (cols.length === 0)
|
|
29282
29274
|
return;
|
|
@@ -29284,14 +29276,14 @@ function up362(db) {
|
|
|
29284
29276
|
db.exec("ALTER TABLE embeddings ADD COLUMN vector BLOB");
|
|
29285
29277
|
}
|
|
29286
29278
|
}
|
|
29287
|
-
function
|
|
29279
|
+
function up382(db) {
|
|
29288
29280
|
const cols = db.prepare("PRAGMA table_info(memories)").all();
|
|
29289
29281
|
if (!cols.some((c3) => c3.name === "scope")) {
|
|
29290
29282
|
db.exec("ALTER TABLE memories ADD COLUMN scope TEXT DEFAULT NULL");
|
|
29291
29283
|
}
|
|
29292
29284
|
db.exec("CREATE INDEX IF NOT EXISTS idx_memories_scope ON memories(scope) WHERE scope IS NOT NULL");
|
|
29293
29285
|
}
|
|
29294
|
-
function
|
|
29286
|
+
function up392(db) {
|
|
29295
29287
|
db.exec("DROP INDEX IF EXISTS idx_memories_content_hash_unique");
|
|
29296
29288
|
db.exec(`
|
|
29297
29289
|
CREATE UNIQUE INDEX idx_memories_content_hash_unique
|
|
@@ -29299,7 +29291,7 @@ function up382(db) {
|
|
|
29299
29291
|
WHERE content_hash IS NOT NULL AND is_deleted = 0
|
|
29300
29292
|
`);
|
|
29301
29293
|
}
|
|
29302
|
-
function
|
|
29294
|
+
function up402(db) {
|
|
29303
29295
|
db.exec(`
|
|
29304
29296
|
CREATE VIRTUAL TABLE IF NOT EXISTS entities_fts USING fts5(
|
|
29305
29297
|
name, canonical_name,
|
|
@@ -29331,13 +29323,13 @@ function up392(db) {
|
|
|
29331
29323
|
END
|
|
29332
29324
|
`);
|
|
29333
29325
|
}
|
|
29334
|
-
function
|
|
29326
|
+
function up412(db) {
|
|
29335
29327
|
const cols = db.prepare("PRAGMA table_info(entity_dependencies)").all();
|
|
29336
29328
|
if (!cols.some((c3) => c3.name === "confidence")) {
|
|
29337
29329
|
db.exec("ALTER TABLE entity_dependencies ADD COLUMN confidence REAL DEFAULT 0.7");
|
|
29338
29330
|
}
|
|
29339
29331
|
}
|
|
29340
|
-
function
|
|
29332
|
+
function up422(db) {
|
|
29341
29333
|
db.exec(`
|
|
29342
29334
|
CREATE TABLE IF NOT EXISTS entity_communities (
|
|
29343
29335
|
id TEXT PRIMARY KEY,
|
|
@@ -29355,7 +29347,7 @@ function up412(db) {
|
|
|
29355
29347
|
db.exec("ALTER TABLE entities ADD COLUMN community_id TEXT REFERENCES entity_communities(id)");
|
|
29356
29348
|
}
|
|
29357
29349
|
}
|
|
29358
|
-
function
|
|
29350
|
+
function up432(db) {
|
|
29359
29351
|
db.exec(`
|
|
29360
29352
|
CREATE TABLE IF NOT EXISTS memory_hints (
|
|
29361
29353
|
id TEXT PRIMARY KEY,
|
|
@@ -29395,7 +29387,7 @@ function up422(db) {
|
|
|
29395
29387
|
END
|
|
29396
29388
|
`);
|
|
29397
29389
|
}
|
|
29398
|
-
function
|
|
29390
|
+
function up442(db) {
|
|
29399
29391
|
db.exec(`
|
|
29400
29392
|
DELETE FROM entity_dependencies
|
|
29401
29393
|
WHERE id NOT IN (
|
|
@@ -29413,7 +29405,7 @@ function up432(db) {
|
|
|
29413
29405
|
)
|
|
29414
29406
|
`);
|
|
29415
29407
|
}
|
|
29416
|
-
function
|
|
29408
|
+
function up452(db) {
|
|
29417
29409
|
db.exec(`
|
|
29418
29410
|
CREATE TABLE IF NOT EXISTS session_transcripts (
|
|
29419
29411
|
session_key TEXT PRIMARY KEY,
|
|
@@ -29436,7 +29428,7 @@ function addColumnIfMissing112(db, table, column, definition) {
|
|
|
29436
29428
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
29437
29429
|
}
|
|
29438
29430
|
}
|
|
29439
|
-
function
|
|
29431
|
+
function up462(db) {
|
|
29440
29432
|
addColumnIfMissing112(db, "session_memories", "path_json", "TEXT");
|
|
29441
29433
|
db.exec(`
|
|
29442
29434
|
CREATE TABLE IF NOT EXISTS path_feedback_events (
|
|
@@ -29511,7 +29503,7 @@ function addColumnIfMissing122(db, table, column, definition) {
|
|
|
29511
29503
|
return;
|
|
29512
29504
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
29513
29505
|
}
|
|
29514
|
-
function
|
|
29506
|
+
function up472(db) {
|
|
29515
29507
|
addColumnIfMissing122(db, "session_memories", "entity_slot", "INTEGER");
|
|
29516
29508
|
addColumnIfMissing122(db, "session_memories", "aspect_slot", "INTEGER");
|
|
29517
29509
|
addColumnIfMissing122(db, "session_memories", "is_constraint", "INTEGER NOT NULL DEFAULT 0");
|
|
@@ -29599,7 +29591,7 @@ function addColumnIfMissing132(db, table, column, definition) {
|
|
|
29599
29591
|
return;
|
|
29600
29592
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
29601
29593
|
}
|
|
29602
|
-
function
|
|
29594
|
+
function up482(db) {
|
|
29603
29595
|
db.exec(`
|
|
29604
29596
|
CREATE TABLE IF NOT EXISTS agents (
|
|
29605
29597
|
id TEXT PRIMARY KEY,
|
|
@@ -29628,7 +29620,7 @@ function addColumnIfMissing142(db, table, column, definition) {
|
|
|
29628
29620
|
return;
|
|
29629
29621
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
29630
29622
|
}
|
|
29631
|
-
function
|
|
29623
|
+
function up492(db) {
|
|
29632
29624
|
addColumnIfMissing142(db, "session_summaries", "source_type", "TEXT");
|
|
29633
29625
|
addColumnIfMissing142(db, "session_summaries", "source_ref", "TEXT");
|
|
29634
29626
|
addColumnIfMissing142(db, "session_summaries", "meta_json", "TEXT");
|
|
@@ -29654,7 +29646,7 @@ function addColumnIfMissing152(db, table, column, definition) {
|
|
|
29654
29646
|
return;
|
|
29655
29647
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
29656
29648
|
}
|
|
29657
|
-
function
|
|
29649
|
+
function up502(db) {
|
|
29658
29650
|
addColumnIfMissing152(db, "session_transcripts", "updated_at", "TEXT");
|
|
29659
29651
|
addColumnIfMissing152(db, "summary_jobs", "agent_id", "TEXT NOT NULL DEFAULT 'default'");
|
|
29660
29652
|
addColumnIfMissing152(db, "session_scores", "agent_id", "TEXT NOT NULL DEFAULT 'default'");
|
|
@@ -29725,7 +29717,7 @@ function up492(db) {
|
|
|
29725
29717
|
ON memory_md_heads(lease_expires_at);
|
|
29726
29718
|
`);
|
|
29727
29719
|
}
|
|
29728
|
-
function
|
|
29720
|
+
function up512(db) {
|
|
29729
29721
|
db.exec(`
|
|
29730
29722
|
DROP INDEX IF EXISTS idx_summaries_session_depth;
|
|
29731
29723
|
|
|
@@ -29786,7 +29778,7 @@ function up502(db) {
|
|
|
29786
29778
|
AND COALESCE(source_type, 'summary') = 'summary';
|
|
29787
29779
|
`);
|
|
29788
29780
|
}
|
|
29789
|
-
function
|
|
29781
|
+
function up522(db) {
|
|
29790
29782
|
db.exec(`
|
|
29791
29783
|
DROP TRIGGER IF EXISTS session_transcripts_fts_ai;
|
|
29792
29784
|
DROP TRIGGER IF EXISTS session_transcripts_fts_ad;
|
|
@@ -29884,7 +29876,7 @@ function up512(db) {
|
|
|
29884
29876
|
AND COALESCE(source_type, 'summary') = 'summary';
|
|
29885
29877
|
`);
|
|
29886
29878
|
}
|
|
29887
|
-
function
|
|
29879
|
+
function up532(db) {
|
|
29888
29880
|
db.exec(`
|
|
29889
29881
|
CREATE TABLE IF NOT EXISTS memory_thread_heads (
|
|
29890
29882
|
agent_id TEXT NOT NULL DEFAULT 'default',
|
|
@@ -30002,7 +29994,7 @@ function up522(db) {
|
|
|
30002
29994
|
WHERE excluded.latest_at >= memory_thread_heads.latest_at;
|
|
30003
29995
|
`);
|
|
30004
29996
|
}
|
|
30005
|
-
function
|
|
29997
|
+
function up542(db) {
|
|
30006
29998
|
db.exec(`
|
|
30007
29999
|
CREATE TABLE IF NOT EXISTS session_extract_cursors (
|
|
30008
30000
|
session_key TEXT NOT NULL,
|
|
@@ -30019,7 +30011,7 @@ function hasTable5(db, name) {
|
|
|
30019
30011
|
WHERE type = 'table' AND name = ?
|
|
30020
30012
|
LIMIT 1`).get(name) !== undefined;
|
|
30021
30013
|
}
|
|
30022
|
-
function
|
|
30014
|
+
function up552(db) {
|
|
30023
30015
|
db.exec(`
|
|
30024
30016
|
CREATE TABLE IF NOT EXISTS entity_dependency_history (
|
|
30025
30017
|
id TEXT PRIMARY KEY,
|
|
@@ -30189,7 +30181,7 @@ function addColumnIfMissing162(db, table, column, definition) {
|
|
|
30189
30181
|
return;
|
|
30190
30182
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
30191
30183
|
}
|
|
30192
|
-
function
|
|
30184
|
+
function up562(db) {
|
|
30193
30185
|
addColumnIfMissing162(db, "summary_jobs", "session_id", "TEXT");
|
|
30194
30186
|
addColumnIfMissing162(db, "summary_jobs", "trigger", "TEXT NOT NULL DEFAULT 'session_end'");
|
|
30195
30187
|
addColumnIfMissing162(db, "summary_jobs", "captured_at", "TEXT");
|
|
@@ -30281,24 +30273,8 @@ function up552(db) {
|
|
|
30281
30273
|
VALUES ('rebuild');
|
|
30282
30274
|
`);
|
|
30283
30275
|
}
|
|
30284
|
-
function
|
|
30285
|
-
|
|
30286
|
-
CREATE TABLE IF NOT EXISTS mcp_invocations (
|
|
30287
|
-
id TEXT PRIMARY KEY,
|
|
30288
|
-
server_id TEXT NOT NULL,
|
|
30289
|
-
tool_name TEXT NOT NULL,
|
|
30290
|
-
agent_id TEXT NOT NULL DEFAULT 'default',
|
|
30291
|
-
source TEXT NOT NULL CHECK(source IN ('cli','agent','mcp','dashboard')),
|
|
30292
|
-
latency_ms INTEGER NOT NULL,
|
|
30293
|
-
success INTEGER NOT NULL DEFAULT 1,
|
|
30294
|
-
error_text TEXT,
|
|
30295
|
-
created_at TEXT NOT NULL DEFAULT (datetime('now'))
|
|
30296
|
-
);
|
|
30297
|
-
CREATE INDEX IF NOT EXISTS idx_mcp_inv_server ON mcp_invocations(server_id, created_at);
|
|
30298
|
-
CREATE INDEX IF NOT EXISTS idx_mcp_inv_agent ON mcp_invocations(agent_id, created_at);
|
|
30299
|
-
`);
|
|
30300
|
-
}
|
|
30301
|
-
function up572(db) {
|
|
30276
|
+
function up572(_db) {}
|
|
30277
|
+
function up582(db) {
|
|
30302
30278
|
db.exec(`
|
|
30303
30279
|
CREATE TABLE IF NOT EXISTS skill_invocations (
|
|
30304
30280
|
id TEXT PRIMARY KEY,
|
|
@@ -30314,7 +30290,7 @@ function up572(db) {
|
|
|
30314
30290
|
CREATE INDEX IF NOT EXISTS idx_skill_inv_agent ON skill_invocations(agent_id, created_at);
|
|
30315
30291
|
`);
|
|
30316
30292
|
}
|
|
30317
|
-
function
|
|
30293
|
+
function up592(db) {
|
|
30318
30294
|
db.exec(`
|
|
30319
30295
|
CREATE TABLE IF NOT EXISTS task_scope_hints (
|
|
30320
30296
|
task_id TEXT PRIMARY KEY REFERENCES scheduled_tasks(id) ON DELETE CASCADE,
|
|
@@ -30345,7 +30321,7 @@ function up582(db) {
|
|
|
30345
30321
|
ON task_scope_hints(agent_id, updated_at);
|
|
30346
30322
|
`);
|
|
30347
30323
|
}
|
|
30348
|
-
function
|
|
30324
|
+
function up602(db) {
|
|
30349
30325
|
db.exec(`
|
|
30350
30326
|
CREATE TABLE IF NOT EXISTS dreaming_state (
|
|
30351
30327
|
agent_id TEXT PRIMARY KEY NOT NULL,
|
|
@@ -30388,7 +30364,7 @@ function ensureMemoriesScopeColumns3(db) {
|
|
|
30388
30364
|
if (!names.has("scope"))
|
|
30389
30365
|
db.exec("ALTER TABLE memories ADD COLUMN scope TEXT");
|
|
30390
30366
|
}
|
|
30391
|
-
function
|
|
30367
|
+
function up612(db) {
|
|
30392
30368
|
ensureMemoriesScopeColumns3(db);
|
|
30393
30369
|
db.exec("DROP INDEX IF EXISTS idx_memories_content_hash_unique");
|
|
30394
30370
|
db.exec(`
|
|
@@ -30401,20 +30377,20 @@ function up602(db) {
|
|
|
30401
30377
|
WHERE content_hash IS NOT NULL AND is_deleted = 0
|
|
30402
30378
|
`);
|
|
30403
30379
|
}
|
|
30404
|
-
function
|
|
30380
|
+
function up622(db) {
|
|
30405
30381
|
const sql = readMemoriesFtsSql2(db);
|
|
30406
30382
|
if (sql !== null && !memoriesFtsNeedsTokenizerRepair2(sql))
|
|
30407
30383
|
return;
|
|
30408
30384
|
recreateMemoriesFts2(db);
|
|
30409
30385
|
}
|
|
30410
|
-
function
|
|
30386
|
+
function up632(db) {
|
|
30411
30387
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_entities_order
|
|
30412
30388
|
ON entities(agent_id, pinned DESC, pinned_at DESC, mentions DESC, updated_at DESC, name)`);
|
|
30413
30389
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_entities_extracted_mentions
|
|
30414
30390
|
ON entities(entity_type, mentions)
|
|
30415
30391
|
WHERE entity_type = 'extracted'`);
|
|
30416
30392
|
}
|
|
30417
|
-
function
|
|
30393
|
+
function up642(db) {
|
|
30418
30394
|
const cols = db.prepare("PRAGMA table_info(entity_attributes)").all();
|
|
30419
30395
|
if (!cols.some((col) => col.name === "claim_key")) {
|
|
30420
30396
|
db.exec("ALTER TABLE entity_attributes ADD COLUMN claim_key TEXT");
|
|
@@ -30423,7 +30399,7 @@ function up632(db) {
|
|
|
30423
30399
|
ON entity_attributes(agent_id, aspect_id, claim_key, status)
|
|
30424
30400
|
WHERE claim_key IS NOT NULL`);
|
|
30425
30401
|
}
|
|
30426
|
-
function
|
|
30402
|
+
function up652(db) {
|
|
30427
30403
|
const cols = db.prepare("PRAGMA table_info(entity_attributes)").all();
|
|
30428
30404
|
if (!cols.some((col) => col.name === "group_key")) {
|
|
30429
30405
|
db.exec("ALTER TABLE entity_attributes ADD COLUMN group_key TEXT");
|
|
@@ -30435,13 +30411,13 @@ function up642(db) {
|
|
|
30435
30411
|
ON entity_attributes(agent_id, aspect_id, group_key, claim_key, status)
|
|
30436
30412
|
WHERE claim_key IS NOT NULL`);
|
|
30437
30413
|
}
|
|
30438
|
-
function
|
|
30414
|
+
function up662(db) {
|
|
30439
30415
|
const cols = db.prepare("PRAGMA table_info(memory_artifacts)").all();
|
|
30440
30416
|
if (cols.some((col) => col.name === "source_mtime_ms"))
|
|
30441
30417
|
return;
|
|
30442
30418
|
db.exec("ALTER TABLE memory_artifacts ADD COLUMN source_mtime_ms REAL");
|
|
30443
30419
|
}
|
|
30444
|
-
function
|
|
30420
|
+
function up672(db) {
|
|
30445
30421
|
const cols = db.prepare("PRAGMA table_info(memory_artifacts)").all();
|
|
30446
30422
|
const names = new Set(cols.map((col) => col.name));
|
|
30447
30423
|
if (!names.has("is_deleted")) {
|
|
@@ -30455,7 +30431,7 @@ function up662(db) {
|
|
|
30455
30431
|
ON memory_artifacts(agent_id, is_deleted, deleted_at)
|
|
30456
30432
|
`);
|
|
30457
30433
|
}
|
|
30458
|
-
function
|
|
30434
|
+
function up682(db) {
|
|
30459
30435
|
db.exec("DROP TRIGGER IF EXISTS memories_au");
|
|
30460
30436
|
db.exec(`
|
|
30461
30437
|
CREATE TRIGGER IF NOT EXISTS memories_au AFTER UPDATE OF content ON memories BEGIN
|
|
@@ -30473,7 +30449,7 @@ function addColumnIfMissing172(db, table, column, definition) {
|
|
|
30473
30449
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
30474
30450
|
}
|
|
30475
30451
|
}
|
|
30476
|
-
function
|
|
30452
|
+
function up692(db) {
|
|
30477
30453
|
for (const table of ["entities", "entity_communities", "entity_attributes", "entity_dependencies"]) {
|
|
30478
30454
|
addColumnIfMissing172(db, table, "source_id", "TEXT");
|
|
30479
30455
|
addColumnIfMissing172(db, table, "source_kind", "TEXT");
|
|
@@ -30493,7 +30469,7 @@ function hasColumn72(db, table, column) {
|
|
|
30493
30469
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
30494
30470
|
return rows.some((row) => row.name === column);
|
|
30495
30471
|
}
|
|
30496
|
-
function
|
|
30472
|
+
function up702(db) {
|
|
30497
30473
|
if (!hasTable22(db, "embeddings"))
|
|
30498
30474
|
return;
|
|
30499
30475
|
if (!hasColumn72(db, "embeddings", "agent_id")) {
|
|
@@ -30501,7 +30477,7 @@ function up692(db) {
|
|
|
30501
30477
|
}
|
|
30502
30478
|
db.exec("CREATE INDEX IF NOT EXISTS idx_embeddings_agent_source ON embeddings(agent_id, source_type, source_id)");
|
|
30503
30479
|
}
|
|
30504
|
-
function
|
|
30480
|
+
function up712(db) {
|
|
30505
30481
|
db.exec(`
|
|
30506
30482
|
CREATE TABLE IF NOT EXISTS memory_search_telemetry (
|
|
30507
30483
|
id TEXT PRIMARY KEY,
|
|
@@ -30542,7 +30518,7 @@ function addColumnIfMissing182(db, table, column, definition) {
|
|
|
30542
30518
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
30543
30519
|
}
|
|
30544
30520
|
}
|
|
30545
|
-
function
|
|
30521
|
+
function up722(db) {
|
|
30546
30522
|
db.exec(`
|
|
30547
30523
|
CREATE TABLE IF NOT EXISTS ontology_proposals (
|
|
30548
30524
|
id TEXT PRIMARY KEY,
|
|
@@ -30585,7 +30561,7 @@ function up712(db) {
|
|
|
30585
30561
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_${table}_proposal ON ${table}(agent_id, proposal_id)`);
|
|
30586
30562
|
}
|
|
30587
30563
|
}
|
|
30588
|
-
function
|
|
30564
|
+
function up732(db) {
|
|
30589
30565
|
db.exec(`
|
|
30590
30566
|
CREATE TABLE IF NOT EXISTS daily_reflections (
|
|
30591
30567
|
id TEXT PRIMARY KEY,
|
|
@@ -30612,7 +30588,7 @@ function up722(db) {
|
|
|
30612
30588
|
WHERE content_key IS NOT NULL;
|
|
30613
30589
|
`);
|
|
30614
30590
|
}
|
|
30615
|
-
function
|
|
30591
|
+
function up742(db) {
|
|
30616
30592
|
const cols = db.prepare("PRAGMA table_info(daily_reflections)").all();
|
|
30617
30593
|
const colNames = new Set(cols.flatMap((c3) => typeof c3.name === "string" ? [c3.name] : []));
|
|
30618
30594
|
if (!colNames.has("content_key")) {
|
|
@@ -30649,7 +30625,7 @@ function backfillVersionRoots2(db) {
|
|
|
30649
30625
|
WHERE version_root_id IS NULL
|
|
30650
30626
|
`);
|
|
30651
30627
|
}
|
|
30652
|
-
function
|
|
30628
|
+
function up752(db) {
|
|
30653
30629
|
for (const table of ["entities", "entity_aspects", "entity_dependencies"]) {
|
|
30654
30630
|
addColumnIfMissing192(db, table, "status", "TEXT NOT NULL DEFAULT 'active'");
|
|
30655
30631
|
addColumnIfMissing192(db, table, "archived_at", "TEXT");
|
|
@@ -30684,7 +30660,7 @@ function up742(db) {
|
|
|
30684
30660
|
ON entity_aspects(agent_id, proposal_id);
|
|
30685
30661
|
`);
|
|
30686
30662
|
}
|
|
30687
|
-
function
|
|
30663
|
+
function up762(db) {
|
|
30688
30664
|
db.exec(`
|
|
30689
30665
|
CREATE TABLE IF NOT EXISTS epistemic_assertions (
|
|
30690
30666
|
id TEXT PRIMARY KEY,
|
|
@@ -30740,7 +30716,7 @@ function ensureMemoriesScopeColumns22(db) {
|
|
|
30740
30716
|
if (!names.has("runtime_path"))
|
|
30741
30717
|
db.exec("ALTER TABLE memories ADD COLUMN runtime_path TEXT");
|
|
30742
30718
|
}
|
|
30743
|
-
function
|
|
30719
|
+
function up772(db) {
|
|
30744
30720
|
ensureMemoriesScopeColumns22(db);
|
|
30745
30721
|
db.exec("DROP INDEX IF EXISTS idx_memories_idempotency_key");
|
|
30746
30722
|
db.exec(`
|
|
@@ -30754,7 +30730,7 @@ function up762(db) {
|
|
|
30754
30730
|
WHERE idempotency_key IS NOT NULL AND is_deleted = 0
|
|
30755
30731
|
`);
|
|
30756
30732
|
}
|
|
30757
|
-
function
|
|
30733
|
+
function up782(db) {
|
|
30758
30734
|
db.exec(`
|
|
30759
30735
|
CREATE TABLE IF NOT EXISTS session_context_epochs (
|
|
30760
30736
|
session_key TEXT NOT NULL,
|
|
@@ -30789,7 +30765,7 @@ function up772(db) {
|
|
|
30789
30765
|
ON session_recall_events(item_kind, item_id, created_at DESC);
|
|
30790
30766
|
`);
|
|
30791
30767
|
}
|
|
30792
|
-
function
|
|
30768
|
+
function up792(db) {
|
|
30793
30769
|
db.exec(`
|
|
30794
30770
|
CREATE TABLE IF NOT EXISTS aggregate_memory_sources (
|
|
30795
30771
|
aggregate_memory_id TEXT NOT NULL,
|
|
@@ -30808,7 +30784,7 @@ function addColumnIfMissing202(db, table, column, definition) {
|
|
|
30808
30784
|
return;
|
|
30809
30785
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
30810
30786
|
}
|
|
30811
|
-
function
|
|
30787
|
+
function up802(db) {
|
|
30812
30788
|
addColumnIfMissing202(db, "memory_artifacts", "source_id", "TEXT");
|
|
30813
30789
|
addColumnIfMissing202(db, "memory_artifacts", "source_root", "TEXT");
|
|
30814
30790
|
addColumnIfMissing202(db, "memory_artifacts", "source_external_id", "TEXT");
|
|
@@ -30821,7 +30797,7 @@ function up792(db) {
|
|
|
30821
30797
|
ON memory_artifacts(agent_id, source_id, source_root);
|
|
30822
30798
|
`);
|
|
30823
30799
|
}
|
|
30824
|
-
function
|
|
30800
|
+
function up812(db) {
|
|
30825
30801
|
db.exec(`
|
|
30826
30802
|
CREATE TABLE IF NOT EXISTS temporal_edges (
|
|
30827
30803
|
id TEXT PRIMARY KEY,
|
|
@@ -30844,7 +30820,7 @@ function up802(db) {
|
|
|
30844
30820
|
ON temporal_edges(agent_id, subject_type, subject_id);
|
|
30845
30821
|
`);
|
|
30846
30822
|
}
|
|
30847
|
-
function
|
|
30823
|
+
function up822(db) {
|
|
30848
30824
|
db.exec(`
|
|
30849
30825
|
CREATE TABLE IF NOT EXISTS entity_aliases (
|
|
30850
30826
|
id TEXT PRIMARY KEY,
|
|
@@ -30868,7 +30844,7 @@ function up812(db) {
|
|
|
30868
30844
|
ON entity_aliases(agent_id, canonical_alias, status);
|
|
30869
30845
|
`);
|
|
30870
30846
|
}
|
|
30871
|
-
function
|
|
30847
|
+
function up832(db) {
|
|
30872
30848
|
db.exec(`
|
|
30873
30849
|
CREATE TABLE IF NOT EXISTS api_keys (
|
|
30874
30850
|
id TEXT PRIMARY KEY,
|
|
@@ -30896,7 +30872,7 @@ function up822(db) {
|
|
|
30896
30872
|
ON api_keys(connector, harness);
|
|
30897
30873
|
`);
|
|
30898
30874
|
}
|
|
30899
|
-
function
|
|
30875
|
+
function up842(db) {
|
|
30900
30876
|
db.exec(`
|
|
30901
30877
|
CREATE TABLE IF NOT EXISTS transcript_capture_jobs (
|
|
30902
30878
|
id TEXT PRIMARY KEY,
|
|
@@ -30931,7 +30907,7 @@ function hasColumn102(db, table, column) {
|
|
|
30931
30907
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
30932
30908
|
return rows.some((row) => row.name === column);
|
|
30933
30909
|
}
|
|
30934
|
-
function
|
|
30910
|
+
function up852(db) {
|
|
30935
30911
|
if (!hasColumn102(db, "documents", "agent_id")) {
|
|
30936
30912
|
db.exec("ALTER TABLE documents ADD COLUMN agent_id TEXT NOT NULL DEFAULT 'default'");
|
|
30937
30913
|
}
|
|
@@ -31017,7 +30993,7 @@ function up842(db) {
|
|
|
31017
30993
|
db.exec("CREATE INDEX IF NOT EXISTS idx_documents_agent_project ON documents(agent_id, project)");
|
|
31018
30994
|
db.exec("CREATE INDEX IF NOT EXISTS idx_documents_source_scope ON documents(source_url, agent_id, project)");
|
|
31019
30995
|
}
|
|
31020
|
-
function
|
|
30996
|
+
function up862(db) {
|
|
31021
30997
|
db.exec(`
|
|
31022
30998
|
CREATE TABLE IF NOT EXISTS aggregate_evidence_sources (
|
|
31023
30999
|
aggregate_memory_id TEXT NOT NULL,
|
|
@@ -31039,7 +31015,7 @@ function hasColumn112(db, table, column) {
|
|
|
31039
31015
|
return rows.some((row) => row.name === column);
|
|
31040
31016
|
}
|
|
31041
31017
|
var COLUMNS3 = ["harness", "session_id", "tool_use_id", "cwd", "origin", "args"];
|
|
31042
|
-
function
|
|
31018
|
+
function up872(db) {
|
|
31043
31019
|
for (const column of COLUMNS3) {
|
|
31044
31020
|
if (!hasColumn112(db, "skill_invocations", column)) {
|
|
31045
31021
|
db.exec(`ALTER TABLE skill_invocations ADD COLUMN ${column} TEXT`);
|
|
@@ -31120,7 +31096,7 @@ function documentScopeColumnsPreservingExisting2(db) {
|
|
|
31120
31096
|
`);
|
|
31121
31097
|
}
|
|
31122
31098
|
try {
|
|
31123
|
-
|
|
31099
|
+
up852(db);
|
|
31124
31100
|
if (preserveAgentId) {
|
|
31125
31101
|
db.exec(`
|
|
31126
31102
|
UPDATE documents
|
|
@@ -31140,12 +31116,12 @@ function documentScopeColumnsPreservingExisting2(db) {
|
|
|
31140
31116
|
db.exec("DROP TABLE IF EXISTS temp.__signet_doc_project_guard");
|
|
31141
31117
|
}
|
|
31142
31118
|
}
|
|
31143
|
-
function
|
|
31144
|
-
|
|
31119
|
+
function up882(db) {
|
|
31120
|
+
up842(db);
|
|
31145
31121
|
if (hasTable32(db, "documents")) {
|
|
31146
31122
|
documentScopeColumnsPreservingExisting2(db);
|
|
31147
31123
|
}
|
|
31148
|
-
|
|
31124
|
+
up862(db);
|
|
31149
31125
|
addColumnIfMissing212(db, "memories", "superseded_by", "TEXT");
|
|
31150
31126
|
addColumnIfMissing212(db, "memories", "superseded_at", "TEXT");
|
|
31151
31127
|
addColumnIfMissing212(db, "memories", "superseded_reason", "TEXT");
|
|
@@ -31202,7 +31178,7 @@ function up872(db) {
|
|
|
31202
31178
|
AND ${sourceAgentId} = ${targetAgentId}
|
|
31203
31179
|
`);
|
|
31204
31180
|
}
|
|
31205
|
-
function
|
|
31181
|
+
function up892(db) {
|
|
31206
31182
|
db.exec(`
|
|
31207
31183
|
CREATE TABLE IF NOT EXISTS legacy_markdown_imports (
|
|
31208
31184
|
path TEXT PRIMARY KEY,
|
|
@@ -31232,7 +31208,7 @@ function up882(db) {
|
|
|
31232
31208
|
ON legacy_markdown_chunks(memory_id);
|
|
31233
31209
|
`);
|
|
31234
31210
|
}
|
|
31235
|
-
function
|
|
31211
|
+
function up902(db) {
|
|
31236
31212
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name IN ('relations', 'entity_dependencies')").all();
|
|
31237
31213
|
const tableNames = new Set(tables.map((r3) => String(r3.name)));
|
|
31238
31214
|
if (!tableNames.has("relations") || !tableNames.has("entity_dependencies"))
|
|
@@ -31291,7 +31267,7 @@ function addColumnIfMissing222(db, table, column, definition) {
|
|
|
31291
31267
|
return;
|
|
31292
31268
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
31293
31269
|
}
|
|
31294
|
-
function
|
|
31270
|
+
function up912(db) {
|
|
31295
31271
|
addColumnIfMissing222(db, "summary_jobs", "content_hash", "TEXT");
|
|
31296
31272
|
db.exec(`
|
|
31297
31273
|
CREATE INDEX IF NOT EXISTS idx_summary_jobs_agent_session_content_hash
|
|
@@ -31304,14 +31280,14 @@ function addColumnIfMissing232(db, table, column, definition) {
|
|
|
31304
31280
|
return;
|
|
31305
31281
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
31306
31282
|
}
|
|
31307
|
-
function
|
|
31283
|
+
function up922(db) {
|
|
31308
31284
|
addColumnIfMissing232(db, "summary_jobs", "boundary_reason", "TEXT");
|
|
31309
31285
|
db.exec(`
|
|
31310
31286
|
CREATE INDEX IF NOT EXISTS idx_summary_jobs_boundary_reason
|
|
31311
31287
|
ON summary_jobs(agent_id, session_key, boundary_reason)
|
|
31312
31288
|
`);
|
|
31313
31289
|
}
|
|
31314
|
-
function
|
|
31290
|
+
function up932(db) {
|
|
31315
31291
|
db.exec(`
|
|
31316
31292
|
CREATE TABLE IF NOT EXISTS transcript_recovery_files (
|
|
31317
31293
|
agent_id TEXT NOT NULL,
|
|
@@ -31329,7 +31305,7 @@ function up922(db) {
|
|
|
31329
31305
|
ON transcript_capture_jobs(agent_id, session_id, status);
|
|
31330
31306
|
`);
|
|
31331
31307
|
}
|
|
31332
|
-
function
|
|
31308
|
+
function up942(db) {
|
|
31333
31309
|
db.exec(`
|
|
31334
31310
|
CREATE TABLE IF NOT EXISTS job_cancellations (
|
|
31335
31311
|
id TEXT PRIMARY KEY,
|
|
@@ -31357,7 +31333,7 @@ function indexExists3(db, table, indexName) {
|
|
|
31357
31333
|
const rows = db.prepare(`PRAGMA index_list(${table})`).all();
|
|
31358
31334
|
return rows.some((row) => row.name === indexName);
|
|
31359
31335
|
}
|
|
31360
|
-
function
|
|
31336
|
+
function up952(db) {
|
|
31361
31337
|
db.exec(`
|
|
31362
31338
|
CREATE TABLE IF NOT EXISTS job_archive (
|
|
31363
31339
|
id TEXT PRIMARY KEY,
|
|
@@ -31384,7 +31360,7 @@ function indexExists22(db, table, indexName) {
|
|
|
31384
31360
|
const rows = db.prepare(`PRAGMA index_list(${table})`).all();
|
|
31385
31361
|
return rows.some((row) => row.name === indexName);
|
|
31386
31362
|
}
|
|
31387
|
-
function
|
|
31363
|
+
function up962(db) {
|
|
31388
31364
|
db.exec(`
|
|
31389
31365
|
CREATE TABLE IF NOT EXISTS embedding_index_state (
|
|
31390
31366
|
id INTEGER PRIMARY KEY CHECK (id = 1),
|
|
@@ -31397,7 +31373,7 @@ function up952(db) {
|
|
|
31397
31373
|
)
|
|
31398
31374
|
`);
|
|
31399
31375
|
}
|
|
31400
|
-
function
|
|
31376
|
+
function up972(db) {
|
|
31401
31377
|
db.exec(`
|
|
31402
31378
|
CREATE TABLE IF NOT EXISTS embeddings_staging (
|
|
31403
31379
|
id TEXT PRIMARY KEY,
|
|
@@ -31416,7 +31392,7 @@ function up962(db) {
|
|
|
31416
31392
|
ON embeddings_staging(agent_id, source_type, source_id);
|
|
31417
31393
|
`);
|
|
31418
31394
|
}
|
|
31419
|
-
function
|
|
31395
|
+
function up982(db) {
|
|
31420
31396
|
const columns = db.prepare("PRAGMA table_info(dreaming_state)").all();
|
|
31421
31397
|
if (!columns.some((column) => column.name === "evidence_cursor")) {
|
|
31422
31398
|
db.exec("ALTER TABLE dreaming_state ADD COLUMN evidence_cursor TEXT");
|
|
@@ -31427,7 +31403,7 @@ function hasColumn132(db, table, column) {
|
|
|
31427
31403
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
31428
31404
|
return rows.some((r3) => r3.name === column);
|
|
31429
31405
|
}
|
|
31430
|
-
function
|
|
31406
|
+
function up992(db) {
|
|
31431
31407
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name = 'memories'").all();
|
|
31432
31408
|
if (tables.length === 0)
|
|
31433
31409
|
return;
|
|
@@ -31452,23 +31428,23 @@ function up982(db) {
|
|
|
31452
31428
|
function hasColumn142(db, table, column) {
|
|
31453
31429
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
31454
31430
|
}
|
|
31455
|
-
function
|
|
31431
|
+
function up1002(db) {
|
|
31456
31432
|
const hasMemories = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'memories'").get();
|
|
31457
31433
|
if (!hasMemories || !hasColumn142(db, "memories", "memory_kind") || !hasColumn142(db, "memories", "type"))
|
|
31458
31434
|
return;
|
|
31459
31435
|
db.exec("UPDATE memories SET memory_kind = NULL WHERE type = 'session_summary'");
|
|
31460
31436
|
}
|
|
31461
|
-
function
|
|
31437
|
+
function up1012(db) {
|
|
31462
31438
|
db.exec("DROP TABLE IF EXISTS ingestion_jobs");
|
|
31463
31439
|
}
|
|
31464
|
-
function
|
|
31440
|
+
function up1022(db) {
|
|
31465
31441
|
const columns = db.prepare("PRAGMA table_info(dreaming_state)").all();
|
|
31466
31442
|
if (!columns.some((column) => column.name === "last_failure_at")) {
|
|
31467
31443
|
db.exec("ALTER TABLE dreaming_state ADD COLUMN last_failure_at TEXT");
|
|
31468
31444
|
}
|
|
31469
31445
|
db.exec("UPDATE dreaming_state SET last_failure_at = updated_at WHERE consecutive_failures > 0 AND last_failure_at IS NULL");
|
|
31470
31446
|
}
|
|
31471
|
-
function
|
|
31447
|
+
function up1032(db) {
|
|
31472
31448
|
db.exec(`
|
|
31473
31449
|
CREATE TABLE IF NOT EXISTS dreaming_evidence_exclusions (
|
|
31474
31450
|
agent_id TEXT NOT NULL,
|
|
@@ -31485,7 +31461,7 @@ function up1022(db) {
|
|
|
31485
31461
|
ON dreaming_evidence_exclusions (agent_id, resolved_at, requeue_requested_at, excluded_at DESC);
|
|
31486
31462
|
`);
|
|
31487
31463
|
}
|
|
31488
|
-
function
|
|
31464
|
+
function up1042(db) {
|
|
31489
31465
|
db.exec(`
|
|
31490
31466
|
CREATE TABLE IF NOT EXISTS dreaming_tool_calls (
|
|
31491
31467
|
id TEXT PRIMARY KEY,
|
|
@@ -31505,7 +31481,7 @@ function up1032(db) {
|
|
|
31505
31481
|
ON dreaming_tool_calls (agent_id, pass_id, sequence ASC);
|
|
31506
31482
|
`);
|
|
31507
31483
|
}
|
|
31508
|
-
function
|
|
31484
|
+
function up1052(db) {
|
|
31509
31485
|
const columns = db.prepare("PRAGMA table_info(dreaming_passes)").all();
|
|
31510
31486
|
if (!columns.some((column) => column.name === "evidence_window_json")) {
|
|
31511
31487
|
db.exec("ALTER TABLE dreaming_passes ADD COLUMN evidence_window_json TEXT");
|
|
@@ -31514,7 +31490,7 @@ function up1042(db) {
|
|
|
31514
31490
|
db.exec("ALTER TABLE dreaming_passes ADD COLUMN runbook_json TEXT");
|
|
31515
31491
|
}
|
|
31516
31492
|
}
|
|
31517
|
-
function
|
|
31493
|
+
function up1062(db) {
|
|
31518
31494
|
db.exec(`
|
|
31519
31495
|
CREATE TABLE IF NOT EXISTS dreaming_attention (
|
|
31520
31496
|
id TEXT PRIMARY KEY,
|
|
@@ -31536,7 +31512,7 @@ function up1052(db) {
|
|
|
31536
31512
|
function hasColumn152(db, table, column) {
|
|
31537
31513
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
31538
31514
|
}
|
|
31539
|
-
function
|
|
31515
|
+
function up1072(db) {
|
|
31540
31516
|
const requiredMemoryColumns = [
|
|
31541
31517
|
"content_hash",
|
|
31542
31518
|
"normalized_content",
|
|
@@ -31587,7 +31563,7 @@ function up1062(db) {
|
|
|
31587
31563
|
WHERE EXISTS (SELECT 1 FROM memory_entity_mentions WHERE entity_id = entities.id)
|
|
31588
31564
|
`);
|
|
31589
31565
|
}
|
|
31590
|
-
function
|
|
31566
|
+
function up1082(db) {
|
|
31591
31567
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name IN ('memories', 'entity_attributes')").all();
|
|
31592
31568
|
if (tables.length !== 2)
|
|
31593
31569
|
return;
|
|
@@ -31610,7 +31586,7 @@ function tableExists4(db, table) {
|
|
|
31610
31586
|
function hasColumn162(db, table, column) {
|
|
31611
31587
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
31612
31588
|
}
|
|
31613
|
-
function
|
|
31589
|
+
function up1092(db) {
|
|
31614
31590
|
db.exec(`
|
|
31615
31591
|
CREATE TABLE IF NOT EXISTS derived_memory_sources (
|
|
31616
31592
|
derived_memory_id TEXT NOT NULL,
|
|
@@ -31653,7 +31629,7 @@ function up1082(db) {
|
|
|
31653
31629
|
`);
|
|
31654
31630
|
}
|
|
31655
31631
|
}
|
|
31656
|
-
function
|
|
31632
|
+
function up1102(db) {
|
|
31657
31633
|
db.exec(`
|
|
31658
31634
|
DROP TRIGGER IF EXISTS entities_fts_ai;
|
|
31659
31635
|
DROP TRIGGER IF EXISTS entities_fts_ad;
|
|
@@ -31742,7 +31718,7 @@ function up1092(db) {
|
|
|
31742
31718
|
function hasColumn172(db, table, column) {
|
|
31743
31719
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
31744
31720
|
}
|
|
31745
|
-
function
|
|
31721
|
+
function up1112(db) {
|
|
31746
31722
|
if (!hasColumn172(db, "memories", "review_after")) {
|
|
31747
31723
|
db.exec("ALTER TABLE memories ADD COLUMN review_after TEXT;");
|
|
31748
31724
|
}
|
|
@@ -31758,14 +31734,14 @@ var TOKEN_COLUMNS2 = [
|
|
|
31758
31734
|
["tokens_cache_write", "INTEGER"],
|
|
31759
31735
|
["tokens_cost", "REAL"]
|
|
31760
31736
|
];
|
|
31761
|
-
function
|
|
31737
|
+
function up1122(db) {
|
|
31762
31738
|
for (const [column, type] of TOKEN_COLUMNS2) {
|
|
31763
31739
|
if (!hasColumn182(db, "dreaming_passes", column)) {
|
|
31764
31740
|
db.exec(`ALTER TABLE dreaming_passes ADD COLUMN ${column} ${type};`);
|
|
31765
31741
|
}
|
|
31766
31742
|
}
|
|
31767
31743
|
}
|
|
31768
|
-
function
|
|
31744
|
+
function up1132(db) {
|
|
31769
31745
|
db.exec(`
|
|
31770
31746
|
CREATE TABLE IF NOT EXISTS embedding_usage (
|
|
31771
31747
|
day TEXT NOT NULL,
|
|
@@ -31778,7 +31754,7 @@ function up1122(db) {
|
|
|
31778
31754
|
);
|
|
31779
31755
|
`);
|
|
31780
31756
|
}
|
|
31781
|
-
function
|
|
31757
|
+
function up1142(db) {
|
|
31782
31758
|
db.exec(`
|
|
31783
31759
|
CREATE TABLE IF NOT EXISTS telemetry_install (
|
|
31784
31760
|
id TEXT PRIMARY KEY,
|
|
@@ -31786,7 +31762,7 @@ function up1132(db) {
|
|
|
31786
31762
|
);
|
|
31787
31763
|
`);
|
|
31788
31764
|
}
|
|
31789
|
-
function
|
|
31765
|
+
function up1152(db) {
|
|
31790
31766
|
db.exec(`
|
|
31791
31767
|
CREATE INDEX IF NOT EXISTS idx_memory_entity_mentions_entity_memory
|
|
31792
31768
|
ON memory_entity_mentions(entity_id, memory_id);
|
|
@@ -31797,7 +31773,7 @@ function hasColumn192(db, table, column) {
|
|
|
31797
31773
|
return rows.some((row) => row.name === column);
|
|
31798
31774
|
}
|
|
31799
31775
|
var COLUMNS22 = ["first_remember_at", "first_recall_at"];
|
|
31800
|
-
function
|
|
31776
|
+
function up1162(db) {
|
|
31801
31777
|
for (const column of COLUMNS22) {
|
|
31802
31778
|
if (!hasColumn192(db, "telemetry_install", column)) {
|
|
31803
31779
|
db.exec(`ALTER TABLE telemetry_install ADD COLUMN ${column} TEXT`);
|
|
@@ -31813,7 +31789,7 @@ function addColumnIfMissing242(db, column, definition) {
|
|
|
31813
31789
|
db.exec(`ALTER TABLE telemetry_events ADD COLUMN ${column} ${definition}`);
|
|
31814
31790
|
}
|
|
31815
31791
|
}
|
|
31816
|
-
function
|
|
31792
|
+
function up1172(db) {
|
|
31817
31793
|
addColumnIfMissing242(db, "source", "TEXT NOT NULL DEFAULT 'daemon'");
|
|
31818
31794
|
addColumnIfMissing242(db, "claim_token", "TEXT");
|
|
31819
31795
|
addColumnIfMissing242(db, "claimed_at", "TEXT");
|
|
@@ -31822,7 +31798,7 @@ function up1162(db) {
|
|
|
31822
31798
|
ON telemetry_events(source, sent_to_posthog, claimed_at, timestamp);
|
|
31823
31799
|
`);
|
|
31824
31800
|
}
|
|
31825
|
-
function
|
|
31801
|
+
function up1182(db) {
|
|
31826
31802
|
db.exec(`
|
|
31827
31803
|
CREATE TABLE IF NOT EXISTS session_claims (
|
|
31828
31804
|
session_key TEXT NOT NULL,
|
|
@@ -31843,7 +31819,7 @@ function up1172(db) {
|
|
|
31843
31819
|
ON session_claims(agent_id, state, expires_at);
|
|
31844
31820
|
`);
|
|
31845
31821
|
}
|
|
31846
|
-
function
|
|
31822
|
+
function up1192(db) {
|
|
31847
31823
|
const table = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'entity_attributes'").get();
|
|
31848
31824
|
if (table == null)
|
|
31849
31825
|
return;
|
|
@@ -31852,7 +31828,7 @@ function up1182(db) {
|
|
|
31852
31828
|
ON entity_attributes(memory_id, agent_id, status, importance);
|
|
31853
31829
|
`);
|
|
31854
31830
|
}
|
|
31855
|
-
function
|
|
31831
|
+
function up1202(db) {
|
|
31856
31832
|
db.exec(`
|
|
31857
31833
|
CREATE TABLE IF NOT EXISTS cross_agent_messages (
|
|
31858
31834
|
id TEXT PRIMARY KEY,
|
|
@@ -31909,7 +31885,7 @@ function addColumnIfMissing252(db, column, definition) {
|
|
|
31909
31885
|
db.exec(`ALTER TABLE cross_agent_messages ADD COLUMN ${column} ${definition}`);
|
|
31910
31886
|
}
|
|
31911
31887
|
}
|
|
31912
|
-
function
|
|
31888
|
+
function up1212(db) {
|
|
31913
31889
|
const table = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'cross_agent_messages'").get();
|
|
31914
31890
|
if (table == null)
|
|
31915
31891
|
return;
|
|
@@ -32110,7 +32086,7 @@ function backfillTranscriptsFromSummaryJobs2(db) {
|
|
|
32110
32086
|
insert.run(...values);
|
|
32111
32087
|
}
|
|
32112
32088
|
}
|
|
32113
|
-
function
|
|
32089
|
+
function up1222(db) {
|
|
32114
32090
|
if (!hasTable42(db, "session_transcripts"))
|
|
32115
32091
|
return;
|
|
32116
32092
|
addColumnIfMissing262(db, "session_transcripts", "completed_at", "TEXT");
|
|
@@ -32163,7 +32139,7 @@ function up1212(db) {
|
|
|
32163
32139
|
ON session_transcripts(agent_id, content_hash);
|
|
32164
32140
|
`);
|
|
32165
32141
|
}
|
|
32166
|
-
function
|
|
32142
|
+
function up1232(db) {
|
|
32167
32143
|
db.exec(`
|
|
32168
32144
|
CREATE INDEX IF NOT EXISTS idx_memory_jobs_pressure_status
|
|
32169
32145
|
ON memory_jobs(status)
|
|
@@ -32182,12 +32158,12 @@ function up1222(db) {
|
|
|
32182
32158
|
function hasColumn222(db, table, column) {
|
|
32183
32159
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
32184
32160
|
}
|
|
32185
|
-
function
|
|
32161
|
+
function up1242(db) {
|
|
32186
32162
|
if (!hasColumn222(db, "telemetry_install", "last_seen_version")) {
|
|
32187
32163
|
db.exec("ALTER TABLE telemetry_install ADD COLUMN last_seen_version TEXT");
|
|
32188
32164
|
}
|
|
32189
32165
|
}
|
|
32190
|
-
function
|
|
32166
|
+
function up1252(db) {
|
|
32191
32167
|
db.exec(`
|
|
32192
32168
|
CREATE TABLE IF NOT EXISTS source_lifecycle_state (
|
|
32193
32169
|
agent_id TEXT NOT NULL,
|
|
@@ -32216,7 +32192,7 @@ function addColumnIfMissing272(db, column, definition) {
|
|
|
32216
32192
|
db.exec(`ALTER TABLE telemetry_events ADD COLUMN ${column} ${definition}`);
|
|
32217
32193
|
}
|
|
32218
32194
|
}
|
|
32219
|
-
function
|
|
32195
|
+
function up1262(db) {
|
|
32220
32196
|
addColumnIfMissing272(db, "delivery_attempts", "INTEGER NOT NULL DEFAULT 0");
|
|
32221
32197
|
addColumnIfMissing272(db, "last_attempt_at", "TEXT");
|
|
32222
32198
|
addColumnIfMissing272(db, "sent_at", "TEXT");
|
|
@@ -32237,7 +32213,7 @@ function up1252(db) {
|
|
|
32237
32213
|
VALUES (1, CURRENT_TIMESTAMP);
|
|
32238
32214
|
`);
|
|
32239
32215
|
}
|
|
32240
|
-
function
|
|
32216
|
+
function up1272(db) {
|
|
32241
32217
|
const columns = db.prepare("PRAGMA table_info(dreaming_evidence_exclusions)").all();
|
|
32242
32218
|
const names = new Set(columns.map((column) => column.name));
|
|
32243
32219
|
if (!names.has("failure_class")) {
|
|
@@ -32254,7 +32230,7 @@ function up1262(db) {
|
|
|
32254
32230
|
}
|
|
32255
32231
|
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)");
|
|
32256
32232
|
}
|
|
32257
|
-
function
|
|
32233
|
+
function up1282(db) {
|
|
32258
32234
|
db.exec(`
|
|
32259
32235
|
CREATE TABLE IF NOT EXISTS embedding_index_failures (
|
|
32260
32236
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
@@ -32278,7 +32254,7 @@ function up1272(db) {
|
|
|
32278
32254
|
ON embedding_index_failures(source_type, source_id);
|
|
32279
32255
|
`);
|
|
32280
32256
|
}
|
|
32281
|
-
function
|
|
32257
|
+
function up1292(db) {
|
|
32282
32258
|
db.exec(`
|
|
32283
32259
|
CREATE TABLE IF NOT EXISTS imported_source_lifecycle (
|
|
32284
32260
|
id TEXT PRIMARY KEY,
|
|
@@ -32328,7 +32304,7 @@ function backfillTable2(db, params) {
|
|
|
32328
32304
|
FROM ${params.table}${params.where ? ` WHERE ${params.where}` : ""}`).all();
|
|
32329
32305
|
backfill2(db, rows, params.sourceKind, params.scannedAt);
|
|
32330
32306
|
}
|
|
32331
|
-
function
|
|
32307
|
+
function up1302(db) {
|
|
32332
32308
|
db.exec(`
|
|
32333
32309
|
CREATE TABLE IF NOT EXISTS memory_content_safety (
|
|
32334
32310
|
agent_id TEXT NOT NULL,
|
|
@@ -32385,7 +32361,7 @@ function up1292(db) {
|
|
|
32385
32361
|
scannedAt
|
|
32386
32362
|
});
|
|
32387
32363
|
}
|
|
32388
|
-
function
|
|
32364
|
+
function up1312(db) {
|
|
32389
32365
|
const table = db.prepare("SELECT sql FROM sqlite_master WHERE type = 'table' AND name = 'dreaming_attention'").get();
|
|
32390
32366
|
if (!table)
|
|
32391
32367
|
return;
|
|
@@ -32419,7 +32395,7 @@ function up1302(db) {
|
|
|
32419
32395
|
ON dreaming_attention (agent_id, resolved_at, priority DESC, created_at ASC);
|
|
32420
32396
|
`);
|
|
32421
32397
|
}
|
|
32422
|
-
function
|
|
32398
|
+
function up1322(db) {
|
|
32423
32399
|
db.exec(`
|
|
32424
32400
|
CREATE TABLE IF NOT EXISTS ontology_contradictions (
|
|
32425
32401
|
id TEXT PRIMARY KEY,
|
|
@@ -32475,7 +32451,7 @@ function up1312(db) {
|
|
|
32475
32451
|
ON ontology_contradictions(agent_id, left_source_id, right_source_id);
|
|
32476
32452
|
`);
|
|
32477
32453
|
}
|
|
32478
|
-
function
|
|
32454
|
+
function up1332(db) {
|
|
32479
32455
|
db.exec(`
|
|
32480
32456
|
CREATE INDEX IF NOT EXISTS idx_memory_jobs_diagnostics_status_created_at
|
|
32481
32457
|
ON memory_jobs(status, created_at)
|
|
@@ -32490,7 +32466,7 @@ function up1322(db) {
|
|
|
32490
32466
|
function tableExists32(db, table) {
|
|
32491
32467
|
return db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = ?").get(table) != null;
|
|
32492
32468
|
}
|
|
32493
|
-
function
|
|
32469
|
+
function up1342(db) {
|
|
32494
32470
|
if (!tableExists32(db, "memory_jobs"))
|
|
32495
32471
|
return;
|
|
32496
32472
|
if (!tableExists32(db, "job_cancellations")) {
|
|
@@ -32539,7 +32515,7 @@ function up1332(db) {
|
|
|
32539
32515
|
AND status IN ('pending', 'leased');
|
|
32540
32516
|
`);
|
|
32541
32517
|
}
|
|
32542
|
-
function
|
|
32518
|
+
function up1352(db) {
|
|
32543
32519
|
db.exec(`
|
|
32544
32520
|
CREATE TABLE IF NOT EXISTS embedding_repair_budget (
|
|
32545
32521
|
id INTEGER PRIMARY KEY CHECK (id = 1),
|
|
@@ -32579,7 +32555,7 @@ function up1342(db) {
|
|
|
32579
32555
|
END;
|
|
32580
32556
|
`);
|
|
32581
32557
|
}
|
|
32582
|
-
function
|
|
32558
|
+
function up1362(db) {
|
|
32583
32559
|
db.exec(`
|
|
32584
32560
|
CREATE TABLE IF NOT EXISTS dreaming_evidence_consumption (
|
|
32585
32561
|
agent_id TEXT NOT NULL,
|
|
@@ -32602,13 +32578,13 @@ function up1352(db) {
|
|
|
32602
32578
|
ON dreaming_evidence_consumption(agent_id, pass_id, delivered_offset, source_length);
|
|
32603
32579
|
`);
|
|
32604
32580
|
}
|
|
32605
|
-
function
|
|
32581
|
+
function up1372(db) {
|
|
32606
32582
|
db.exec(`
|
|
32607
32583
|
CREATE INDEX IF NOT EXISTS idx_epistemic_assertions_observer_entity
|
|
32608
32584
|
ON epistemic_assertions(agent_id, subject_entity_id, status, asserted_at DESC, created_at DESC);
|
|
32609
32585
|
`);
|
|
32610
32586
|
}
|
|
32611
|
-
function
|
|
32587
|
+
function up1382(db) {
|
|
32612
32588
|
db.exec(`
|
|
32613
32589
|
CREATE TABLE IF NOT EXISTS memory_head_revisions (
|
|
32614
32590
|
id TEXT PRIMARY KEY,
|
|
@@ -32660,7 +32636,7 @@ function up1372(db) {
|
|
|
32660
32636
|
if (!names.has("format_version"))
|
|
32661
32637
|
db.exec("ALTER TABLE memory_md_heads ADD COLUMN format_version INTEGER NOT NULL DEFAULT 1");
|
|
32662
32638
|
}
|
|
32663
|
-
function
|
|
32639
|
+
function up1392(db) {
|
|
32664
32640
|
db.exec(`
|
|
32665
32641
|
CREATE TABLE memory_head_entries_v134 (
|
|
32666
32642
|
entry_id TEXT NOT NULL, agent_id TEXT NOT NULL, canonical_text TEXT NOT NULL,
|
|
@@ -32678,7 +32654,7 @@ function up1382(db) {
|
|
|
32678
32654
|
ON memory_head_entries(agent_id, entry_id, last_revision DESC);
|
|
32679
32655
|
`);
|
|
32680
32656
|
}
|
|
32681
|
-
function
|
|
32657
|
+
function up1402(db) {
|
|
32682
32658
|
db.exec(`
|
|
32683
32659
|
CREATE TABLE IF NOT EXISTS memory_head_publications (
|
|
32684
32660
|
agent_id TEXT NOT NULL,
|
|
@@ -32694,7 +32670,7 @@ function up1392(db) {
|
|
|
32694
32670
|
ON memory_head_publications(agent_id, status, revision DESC);
|
|
32695
32671
|
`);
|
|
32696
32672
|
}
|
|
32697
|
-
function
|
|
32673
|
+
function up1412(db) {
|
|
32698
32674
|
const cols = new Set(db.prepare("PRAGMA table_info(memory_head_revisions)").all().map((r3) => r3.name));
|
|
32699
32675
|
for (const [name, type] of [
|
|
32700
32676
|
["entry_id", "TEXT"],
|
|
@@ -32708,7 +32684,7 @@ function up1402(db) {
|
|
|
32708
32684
|
}
|
|
32709
32685
|
db.exec("CREATE UNIQUE INDEX IF NOT EXISTS idx_memory_head_revisions_entry ON memory_head_revisions(agent_id, revision, entry_id)");
|
|
32710
32686
|
}
|
|
32711
|
-
function
|
|
32687
|
+
function up1422(db) {
|
|
32712
32688
|
const cols = new Set(db.prepare("PRAGMA table_info(dreaming_passes)").all().map((r3) => r3.name));
|
|
32713
32689
|
for (const [name, type] of [
|
|
32714
32690
|
["head_revision", "INTEGER"],
|
|
@@ -32730,7 +32706,7 @@ function addColumnIfMissing282(db, table, column, definition) {
|
|
|
32730
32706
|
if (!hasColumn252(db, table, column))
|
|
32731
32707
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
32732
32708
|
}
|
|
32733
|
-
function
|
|
32709
|
+
function up1432(db) {
|
|
32734
32710
|
addColumnIfMissing282(db, "memories", "manual_override", "INTEGER DEFAULT 0");
|
|
32735
32711
|
db.exec(`
|
|
32736
32712
|
CREATE TABLE IF NOT EXISTS transcript_capture_status (
|
|
@@ -33035,7 +33011,7 @@ function up1422(db) {
|
|
|
33035
33011
|
GROUP BY j.agent_id;
|
|
33036
33012
|
`);
|
|
33037
33013
|
}
|
|
33038
|
-
function
|
|
33014
|
+
function up1442(db) {
|
|
33039
33015
|
db.exec(`
|
|
33040
33016
|
CREATE TABLE IF NOT EXISTS native_source_sync_state (
|
|
33041
33017
|
agent_id TEXT NOT NULL,
|
|
@@ -33051,7 +33027,7 @@ function up1432(db) {
|
|
|
33051
33027
|
ON native_source_sync_state(agent_id, status);
|
|
33052
33028
|
`);
|
|
33053
33029
|
}
|
|
33054
|
-
function
|
|
33030
|
+
function up1452(db) {
|
|
33055
33031
|
db.exec(`
|
|
33056
33032
|
CREATE TABLE IF NOT EXISTS transcript_recovery_frontiers (
|
|
33057
33033
|
agent_id TEXT NOT NULL,
|
|
@@ -33063,7 +33039,7 @@ function up1442(db) {
|
|
|
33063
33039
|
);
|
|
33064
33040
|
`);
|
|
33065
33041
|
}
|
|
33066
|
-
function
|
|
33042
|
+
function up1462(db) {
|
|
33067
33043
|
db.exec(`
|
|
33068
33044
|
CREATE TABLE IF NOT EXISTS source_sync_checkpoints (
|
|
33069
33045
|
agent_id TEXT NOT NULL,
|
|
@@ -33077,13 +33053,13 @@ function up1452(db) {
|
|
|
33077
33053
|
);
|
|
33078
33054
|
`);
|
|
33079
33055
|
}
|
|
33080
|
-
function
|
|
33056
|
+
function up1472(db) {
|
|
33081
33057
|
const columns = db.prepare("PRAGMA table_info(source_sync_checkpoints)").all();
|
|
33082
33058
|
if (!columns.some((column) => column.name === "frontier")) {
|
|
33083
33059
|
db.exec("ALTER TABLE source_sync_checkpoints ADD COLUMN frontier TEXT");
|
|
33084
33060
|
}
|
|
33085
33061
|
}
|
|
33086
|
-
function
|
|
33062
|
+
function up1482(db) {
|
|
33087
33063
|
const columns = new Set(db.prepare("PRAGMA table_info(embedding_index_state)").all().map((row) => row.name).filter((name) => typeof name === "string"));
|
|
33088
33064
|
const additions = [
|
|
33089
33065
|
["migration_phase", "TEXT"],
|
|
@@ -33118,13 +33094,13 @@ function up1472(db) {
|
|
|
33118
33094
|
`);
|
|
33119
33095
|
}
|
|
33120
33096
|
}
|
|
33121
|
-
function
|
|
33097
|
+
function up1492(db) {
|
|
33122
33098
|
const columns = new Set(db.prepare("PRAGMA table_info(memory_jobs)").all().map((row) => row.name).filter((name) => typeof name === "string"));
|
|
33123
33099
|
if (!columns.has("lease_token")) {
|
|
33124
33100
|
db.exec("ALTER TABLE memory_jobs ADD COLUMN lease_token TEXT");
|
|
33125
33101
|
}
|
|
33126
33102
|
}
|
|
33127
|
-
function
|
|
33103
|
+
function up1502(db) {
|
|
33128
33104
|
db.exec(`
|
|
33129
33105
|
CREATE TABLE IF NOT EXISTS dreaming_evidence_reviews (
|
|
33130
33106
|
agent_id TEXT NOT NULL,
|
|
@@ -33142,7 +33118,7 @@ function up1492(db) {
|
|
|
33142
33118
|
ON dreaming_evidence_reviews (agent_id, reviewed_at DESC);
|
|
33143
33119
|
`);
|
|
33144
33120
|
}
|
|
33145
|
-
function
|
|
33121
|
+
function up1512(db) {
|
|
33146
33122
|
db.exec(`
|
|
33147
33123
|
CREATE TABLE IF NOT EXISTS source_import_jobs (
|
|
33148
33124
|
id TEXT PRIMARY KEY, kind TEXT NOT NULL CHECK (kind = 'import'), agent_id TEXT NOT NULL,
|
|
@@ -33209,16 +33185,16 @@ function up1502(db) {
|
|
|
33209
33185
|
}
|
|
33210
33186
|
db.exec("CREATE INDEX IF NOT EXISTS idx_session_transcripts_agent_source ON session_transcripts(agent_id, source_id)");
|
|
33211
33187
|
}
|
|
33212
|
-
function
|
|
33188
|
+
function up1522(db) {
|
|
33213
33189
|
db.exec("CREATE INDEX IF NOT EXISTS idx_source_import_files_job_state ON source_import_files(job_id, state)");
|
|
33214
33190
|
}
|
|
33215
|
-
function
|
|
33191
|
+
function up1532(db) {
|
|
33216
33192
|
const columns = db.prepare("PRAGMA table_info(source_import_record_attempts)").all();
|
|
33217
33193
|
if (!columns.some((column) => column.name === "source_id")) {
|
|
33218
33194
|
db.exec("ALTER TABLE source_import_record_attempts ADD COLUMN source_id TEXT");
|
|
33219
33195
|
}
|
|
33220
33196
|
}
|
|
33221
|
-
function
|
|
33197
|
+
function up1542(db) {
|
|
33222
33198
|
const addColumn = (table, column, definition) => {
|
|
33223
33199
|
const statement = db.prepare("SELECT 1 AS found FROM pragma_table_info(?) WHERE name = ?");
|
|
33224
33200
|
let exists;
|
|
@@ -33239,7 +33215,7 @@ function addColumnIfMissing292(db, table, column, definition) {
|
|
|
33239
33215
|
if (!columns.some((row) => row.name === column))
|
|
33240
33216
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
33241
33217
|
}
|
|
33242
|
-
function
|
|
33218
|
+
function up1552(db) {
|
|
33243
33219
|
addColumnIfMissing292(db, "memory_md_heads", "is_current", "INTEGER NOT NULL DEFAULT 0");
|
|
33244
33220
|
addColumnIfMissing292(db, "dreaming_passes", "head_base_revision", "INTEGER");
|
|
33245
33221
|
db.exec("CREATE INDEX IF NOT EXISTS idx_memory_head_revisions_content_hash ON memory_head_revisions(content_hash)");
|
|
@@ -33389,7 +33365,7 @@ function up1542(db) {
|
|
|
33389
33365
|
`);
|
|
33390
33366
|
}
|
|
33391
33367
|
}
|
|
33392
|
-
function
|
|
33368
|
+
function up1562(db) {
|
|
33393
33369
|
db.exec(`
|
|
33394
33370
|
CREATE TABLE IF NOT EXISTS vector_repair_checkpoints (
|
|
33395
33371
|
operation TEXT NOT NULL CHECK (operation IN ('resync', 'clean-orphans')),
|
|
@@ -33414,7 +33390,7 @@ function up1552(db) {
|
|
|
33414
33390
|
ON vector_repair_checkpoints(status, updated_at);
|
|
33415
33391
|
`);
|
|
33416
33392
|
}
|
|
33417
|
-
function
|
|
33393
|
+
function up1572(db) {
|
|
33418
33394
|
db.exec(`
|
|
33419
33395
|
CREATE TABLE IF NOT EXISTS embedding_repair_checkpoints (
|
|
33420
33396
|
checkpoint_id TEXT PRIMARY KEY,
|
|
@@ -33435,7 +33411,7 @@ function up1562(db) {
|
|
|
33435
33411
|
ON embedding_repair_checkpoints(status, updated_at);
|
|
33436
33412
|
`);
|
|
33437
33413
|
}
|
|
33438
|
-
function
|
|
33414
|
+
function up1582(db) {
|
|
33439
33415
|
const columns = new Set(db.prepare("PRAGMA table_info(embedding_repair_checkpoints)").all().map((row) => row.name));
|
|
33440
33416
|
if (!columns.has("profile_fingerprint")) {
|
|
33441
33417
|
db.exec("ALTER TABLE embedding_repair_checkpoints ADD COLUMN profile_fingerprint TEXT");
|
|
@@ -33450,7 +33426,7 @@ function up1572(db) {
|
|
|
33450
33426
|
);
|
|
33451
33427
|
`);
|
|
33452
33428
|
}
|
|
33453
|
-
function
|
|
33429
|
+
function up1592(db) {
|
|
33454
33430
|
db.exec(`
|
|
33455
33431
|
CREATE INDEX IF NOT EXISTS idx_memories_agent_kind
|
|
33456
33432
|
ON memories(agent_id, memory_kind);
|
|
@@ -33460,13 +33436,13 @@ var MIGRATIONS2 = [
|
|
|
33460
33436
|
{
|
|
33461
33437
|
version: 1,
|
|
33462
33438
|
name: "baseline",
|
|
33463
|
-
up:
|
|
33439
|
+
up: up610,
|
|
33464
33440
|
artifacts: { tables: ["memories", "conversations", "embeddings"] }
|
|
33465
33441
|
},
|
|
33466
33442
|
{
|
|
33467
33443
|
version: 2,
|
|
33468
33444
|
name: "pipeline-v2",
|
|
33469
|
-
up:
|
|
33445
|
+
up: up710,
|
|
33470
33446
|
artifacts: {
|
|
33471
33447
|
tables: ["memory_history", "memory_jobs", "entities", "relations", "memory_entity_mentions"]
|
|
33472
33448
|
}
|
|
@@ -33474,12 +33450,12 @@ var MIGRATIONS2 = [
|
|
|
33474
33450
|
{
|
|
33475
33451
|
version: 3,
|
|
33476
33452
|
name: "unique-content-hash",
|
|
33477
|
-
up:
|
|
33453
|
+
up: up810
|
|
33478
33454
|
},
|
|
33479
33455
|
{
|
|
33480
33456
|
version: 4,
|
|
33481
33457
|
name: "history-actor-and-retention",
|
|
33482
|
-
up:
|
|
33458
|
+
up: up910,
|
|
33483
33459
|
artifacts: {
|
|
33484
33460
|
columns: [{ table: "memory_history", column: "actor_type" }]
|
|
33485
33461
|
}
|
|
@@ -33487,7 +33463,7 @@ var MIGRATIONS2 = [
|
|
|
33487
33463
|
{
|
|
33488
33464
|
version: 5,
|
|
33489
33465
|
name: "graph-extended",
|
|
33490
|
-
up:
|
|
33466
|
+
up: up1010,
|
|
33491
33467
|
artifacts: {
|
|
33492
33468
|
columns: [{ table: "entities", column: "canonical_name" }]
|
|
33493
33469
|
}
|
|
@@ -33495,7 +33471,7 @@ var MIGRATIONS2 = [
|
|
|
33495
33471
|
{
|
|
33496
33472
|
version: 6,
|
|
33497
33473
|
name: "idempotency-key",
|
|
33498
|
-
up:
|
|
33474
|
+
up: up1110,
|
|
33499
33475
|
artifacts: {
|
|
33500
33476
|
columns: [{ table: "memories", column: "idempotency_key" }]
|
|
33501
33477
|
}
|
|
@@ -33503,42 +33479,42 @@ var MIGRATIONS2 = [
|
|
|
33503
33479
|
{
|
|
33504
33480
|
version: 7,
|
|
33505
33481
|
name: "documents-and-connectors",
|
|
33506
|
-
up:
|
|
33482
|
+
up: up1210,
|
|
33507
33483
|
artifacts: { tables: ["documents", "document_memories", "connectors"] }
|
|
33508
33484
|
},
|
|
33509
33485
|
{
|
|
33510
33486
|
version: 8,
|
|
33511
33487
|
name: "embeddings-unique-hash",
|
|
33512
|
-
up:
|
|
33488
|
+
up: up1310
|
|
33513
33489
|
},
|
|
33514
33490
|
{
|
|
33515
33491
|
version: 9,
|
|
33516
33492
|
name: "summary-jobs",
|
|
33517
|
-
up:
|
|
33493
|
+
up: up1410,
|
|
33518
33494
|
artifacts: { tables: ["summary_jobs"] }
|
|
33519
33495
|
},
|
|
33520
33496
|
{
|
|
33521
33497
|
version: 10,
|
|
33522
33498
|
name: "umap-cache",
|
|
33523
|
-
up:
|
|
33499
|
+
up: up1510,
|
|
33524
33500
|
artifacts: { tables: ["umap_cache"] }
|
|
33525
33501
|
},
|
|
33526
33502
|
{
|
|
33527
33503
|
version: 11,
|
|
33528
33504
|
name: "session-scores",
|
|
33529
|
-
up:
|
|
33505
|
+
up: up162,
|
|
33530
33506
|
artifacts: { tables: ["session_scores"] }
|
|
33531
33507
|
},
|
|
33532
33508
|
{
|
|
33533
33509
|
version: 12,
|
|
33534
33510
|
name: "scheduled-tasks",
|
|
33535
|
-
up:
|
|
33511
|
+
up: up172,
|
|
33536
33512
|
artifacts: { tables: ["scheduled_tasks", "task_runs"] }
|
|
33537
33513
|
},
|
|
33538
33514
|
{
|
|
33539
33515
|
version: 13,
|
|
33540
33516
|
name: "ingestion-tracking",
|
|
33541
|
-
up:
|
|
33517
|
+
up: up182,
|
|
33542
33518
|
artifacts: {
|
|
33543
33519
|
columns: [
|
|
33544
33520
|
{ table: "memories", column: "source_path" },
|
|
@@ -33549,13 +33525,13 @@ var MIGRATIONS2 = [
|
|
|
33549
33525
|
{
|
|
33550
33526
|
version: 14,
|
|
33551
33527
|
name: "telemetry",
|
|
33552
|
-
up:
|
|
33528
|
+
up: up192,
|
|
33553
33529
|
artifacts: { tables: ["telemetry_events"] }
|
|
33554
33530
|
},
|
|
33555
33531
|
{
|
|
33556
33532
|
version: 15,
|
|
33557
33533
|
name: "session-memories",
|
|
33558
|
-
up:
|
|
33534
|
+
up: up202,
|
|
33559
33535
|
artifacts: {
|
|
33560
33536
|
tables: ["session_memories"],
|
|
33561
33537
|
columns: [
|
|
@@ -33567,13 +33543,13 @@ var MIGRATIONS2 = [
|
|
|
33567
33543
|
{
|
|
33568
33544
|
version: 16,
|
|
33569
33545
|
name: "session-checkpoints",
|
|
33570
|
-
up:
|
|
33546
|
+
up: up212,
|
|
33571
33547
|
artifacts: { tables: ["session_checkpoints"] }
|
|
33572
33548
|
},
|
|
33573
33549
|
{
|
|
33574
33550
|
version: 17,
|
|
33575
33551
|
name: "task-skills",
|
|
33576
|
-
up:
|
|
33552
|
+
up: up222,
|
|
33577
33553
|
artifacts: {
|
|
33578
33554
|
columns: [{ table: "scheduled_tasks", column: "skill_name" }]
|
|
33579
33555
|
}
|
|
@@ -33581,13 +33557,13 @@ var MIGRATIONS2 = [
|
|
|
33581
33557
|
{
|
|
33582
33558
|
version: 18,
|
|
33583
33559
|
name: "skill-meta",
|
|
33584
|
-
up:
|
|
33560
|
+
up: up232,
|
|
33585
33561
|
artifacts: { tables: ["skill_meta"] }
|
|
33586
33562
|
},
|
|
33587
33563
|
{
|
|
33588
33564
|
version: 19,
|
|
33589
33565
|
name: "knowledge-structure",
|
|
33590
|
-
up:
|
|
33566
|
+
up: up242,
|
|
33591
33567
|
artifacts: {
|
|
33592
33568
|
tables: ["entity_aspects", "entity_attributes", "entity_dependencies", "task_meta"],
|
|
33593
33569
|
columns: [{ table: "entities", column: "agent_id" }]
|
|
@@ -33596,7 +33572,7 @@ var MIGRATIONS2 = [
|
|
|
33596
33572
|
{
|
|
33597
33573
|
version: 20,
|
|
33598
33574
|
name: "session-structural-columns",
|
|
33599
|
-
up:
|
|
33575
|
+
up: up252,
|
|
33600
33576
|
artifacts: {
|
|
33601
33577
|
columns: [
|
|
33602
33578
|
{ table: "session_memories", column: "entity_slot" },
|
|
@@ -33609,7 +33585,7 @@ var MIGRATIONS2 = [
|
|
|
33609
33585
|
{
|
|
33610
33586
|
version: 21,
|
|
33611
33587
|
name: "checkpoint-structural",
|
|
33612
|
-
up:
|
|
33588
|
+
up: up262,
|
|
33613
33589
|
artifacts: {
|
|
33614
33590
|
columns: [{ table: "session_checkpoints", column: "focal_entity_ids" }]
|
|
33615
33591
|
}
|
|
@@ -33617,7 +33593,7 @@ var MIGRATIONS2 = [
|
|
|
33617
33593
|
{
|
|
33618
33594
|
version: 22,
|
|
33619
33595
|
name: "entity-pinning",
|
|
33620
|
-
up:
|
|
33596
|
+
up: up272,
|
|
33621
33597
|
artifacts: {
|
|
33622
33598
|
columns: [
|
|
33623
33599
|
{ table: "entities", column: "pinned" },
|
|
@@ -33628,17 +33604,17 @@ var MIGRATIONS2 = [
|
|
|
33628
33604
|
{
|
|
33629
33605
|
version: 23,
|
|
33630
33606
|
name: "retired-scorer-gap",
|
|
33631
|
-
up:
|
|
33607
|
+
up: up282
|
|
33632
33608
|
},
|
|
33633
33609
|
{
|
|
33634
33610
|
version: 24,
|
|
33635
33611
|
name: "retired-scorer-gap",
|
|
33636
|
-
up:
|
|
33612
|
+
up: up292
|
|
33637
33613
|
},
|
|
33638
33614
|
{
|
|
33639
33615
|
version: 25,
|
|
33640
33616
|
name: "agent-feedback",
|
|
33641
|
-
up:
|
|
33617
|
+
up: up302,
|
|
33642
33618
|
artifacts: {
|
|
33643
33619
|
columns: [{ table: "session_memories", column: "agent_relevance_score" }]
|
|
33644
33620
|
}
|
|
@@ -33646,32 +33622,32 @@ var MIGRATIONS2 = [
|
|
|
33646
33622
|
{
|
|
33647
33623
|
version: 26,
|
|
33648
33624
|
name: "retired-scorer-gap",
|
|
33649
|
-
up:
|
|
33625
|
+
up: up312
|
|
33650
33626
|
},
|
|
33651
33627
|
{
|
|
33652
33628
|
version: 27,
|
|
33653
33629
|
name: "backfill-canonical-names",
|
|
33654
|
-
up:
|
|
33630
|
+
up: up322
|
|
33655
33631
|
},
|
|
33656
33632
|
{
|
|
33657
33633
|
version: 28,
|
|
33658
33634
|
name: "lossless-retention",
|
|
33659
|
-
up:
|
|
33635
|
+
up: up332
|
|
33660
33636
|
},
|
|
33661
33637
|
{
|
|
33662
33638
|
version: 29,
|
|
33663
33639
|
name: "session-summary-dag",
|
|
33664
|
-
up:
|
|
33640
|
+
up: up342
|
|
33665
33641
|
},
|
|
33666
33642
|
{
|
|
33667
33643
|
version: 30,
|
|
33668
33644
|
name: "nullable-memory-job-memory-id",
|
|
33669
|
-
up:
|
|
33645
|
+
up: up352
|
|
33670
33646
|
},
|
|
33671
33647
|
{
|
|
33672
33648
|
version: 31,
|
|
33673
33649
|
name: "dependency-reason",
|
|
33674
|
-
up:
|
|
33650
|
+
up: up362,
|
|
33675
33651
|
artifacts: {
|
|
33676
33652
|
columns: [
|
|
33677
33653
|
{ table: "entity_dependencies", column: "reason" },
|
|
@@ -33682,7 +33658,7 @@ var MIGRATIONS2 = [
|
|
|
33682
33658
|
{
|
|
33683
33659
|
version: 32,
|
|
33684
33660
|
name: "embeddings-vector-column",
|
|
33685
|
-
up:
|
|
33661
|
+
up: up372,
|
|
33686
33662
|
artifacts: {
|
|
33687
33663
|
columns: [{ table: "embeddings", column: "vector", optional: true }]
|
|
33688
33664
|
}
|
|
@@ -33690,7 +33666,7 @@ var MIGRATIONS2 = [
|
|
|
33690
33666
|
{
|
|
33691
33667
|
version: 33,
|
|
33692
33668
|
name: "scope",
|
|
33693
|
-
up:
|
|
33669
|
+
up: up382,
|
|
33694
33670
|
artifacts: {
|
|
33695
33671
|
columns: [{ table: "memories", column: "scope" }]
|
|
33696
33672
|
}
|
|
@@ -33698,17 +33674,17 @@ var MIGRATIONS2 = [
|
|
|
33698
33674
|
{
|
|
33699
33675
|
version: 34,
|
|
33700
33676
|
name: "scope-aware-dedup",
|
|
33701
|
-
up:
|
|
33677
|
+
up: up392
|
|
33702
33678
|
},
|
|
33703
33679
|
{
|
|
33704
33680
|
version: 35,
|
|
33705
33681
|
name: "entity-fts",
|
|
33706
|
-
up:
|
|
33682
|
+
up: up402
|
|
33707
33683
|
},
|
|
33708
33684
|
{
|
|
33709
33685
|
version: 36,
|
|
33710
33686
|
name: "dependency-confidence",
|
|
33711
|
-
up:
|
|
33687
|
+
up: up412,
|
|
33712
33688
|
artifacts: {
|
|
33713
33689
|
columns: [{ table: "entity_dependencies", column: "confidence" }]
|
|
33714
33690
|
}
|
|
@@ -33716,7 +33692,7 @@ var MIGRATIONS2 = [
|
|
|
33716
33692
|
{
|
|
33717
33693
|
version: 37,
|
|
33718
33694
|
name: "entity-communities",
|
|
33719
|
-
up:
|
|
33695
|
+
up: up422,
|
|
33720
33696
|
artifacts: {
|
|
33721
33697
|
tables: ["entity_communities"],
|
|
33722
33698
|
columns: [{ table: "entities", column: "community_id" }]
|
|
@@ -33725,24 +33701,24 @@ var MIGRATIONS2 = [
|
|
|
33725
33701
|
{
|
|
33726
33702
|
version: 38,
|
|
33727
33703
|
name: "memory-hints",
|
|
33728
|
-
up:
|
|
33704
|
+
up: up432,
|
|
33729
33705
|
artifacts: { tables: ["memory_hints"] }
|
|
33730
33706
|
},
|
|
33731
33707
|
{
|
|
33732
33708
|
version: 39,
|
|
33733
33709
|
name: "dedup-entity-dependencies",
|
|
33734
|
-
up:
|
|
33710
|
+
up: up442
|
|
33735
33711
|
},
|
|
33736
33712
|
{
|
|
33737
33713
|
version: 40,
|
|
33738
33714
|
name: "session-transcripts",
|
|
33739
|
-
up:
|
|
33715
|
+
up: up452,
|
|
33740
33716
|
artifacts: { tables: ["session_transcripts"] }
|
|
33741
33717
|
},
|
|
33742
33718
|
{
|
|
33743
33719
|
version: 41,
|
|
33744
33720
|
name: "path-feedback",
|
|
33745
|
-
up:
|
|
33721
|
+
up: up462,
|
|
33746
33722
|
artifacts: {
|
|
33747
33723
|
tables: [
|
|
33748
33724
|
"path_feedback_events",
|
|
@@ -33757,7 +33733,7 @@ var MIGRATIONS2 = [
|
|
|
33757
33733
|
{
|
|
33758
33734
|
version: 42,
|
|
33759
33735
|
name: "session-memories-agent-id",
|
|
33760
|
-
up:
|
|
33736
|
+
up: up472,
|
|
33761
33737
|
artifacts: {
|
|
33762
33738
|
columns: [{ table: "session_memories", column: "agent_id" }]
|
|
33763
33739
|
}
|
|
@@ -33765,7 +33741,7 @@ var MIGRATIONS2 = [
|
|
|
33765
33741
|
{
|
|
33766
33742
|
version: 43,
|
|
33767
33743
|
name: "agents-table",
|
|
33768
|
-
up:
|
|
33744
|
+
up: up482,
|
|
33769
33745
|
artifacts: {
|
|
33770
33746
|
tables: ["agents"],
|
|
33771
33747
|
columns: [
|
|
@@ -33777,7 +33753,7 @@ var MIGRATIONS2 = [
|
|
|
33777
33753
|
{
|
|
33778
33754
|
version: 44,
|
|
33779
33755
|
name: "memory-md-temporal-head",
|
|
33780
|
-
up:
|
|
33756
|
+
up: up492,
|
|
33781
33757
|
artifacts: {
|
|
33782
33758
|
columns: [
|
|
33783
33759
|
{ table: "session_summaries", column: "source_type" },
|
|
@@ -33789,7 +33765,7 @@ var MIGRATIONS2 = [
|
|
|
33789
33765
|
{
|
|
33790
33766
|
version: 45,
|
|
33791
33767
|
name: "lossless-working-memory-hardening",
|
|
33792
|
-
up:
|
|
33768
|
+
up: up502,
|
|
33793
33769
|
artifacts: {
|
|
33794
33770
|
tables: ["session_transcripts_fts", "memory_md_heads"],
|
|
33795
33771
|
columns: [
|
|
@@ -33802,17 +33778,17 @@ var MIGRATIONS2 = [
|
|
|
33802
33778
|
{
|
|
33803
33779
|
version: 46,
|
|
33804
33780
|
name: "session-summary-uniqueness",
|
|
33805
|
-
up:
|
|
33781
|
+
up: up512
|
|
33806
33782
|
},
|
|
33807
33783
|
{
|
|
33808
33784
|
version: 47,
|
|
33809
33785
|
name: "agent-scoped-temporal-uniqueness",
|
|
33810
|
-
up:
|
|
33786
|
+
up: up522
|
|
33811
33787
|
},
|
|
33812
33788
|
{
|
|
33813
33789
|
version: 48,
|
|
33814
33790
|
name: "thread-heads",
|
|
33815
|
-
up:
|
|
33791
|
+
up: up532,
|
|
33816
33792
|
artifacts: {
|
|
33817
33793
|
tables: ["memory_thread_heads"]
|
|
33818
33794
|
}
|
|
@@ -33820,7 +33796,7 @@ var MIGRATIONS2 = [
|
|
|
33820
33796
|
{
|
|
33821
33797
|
version: 49,
|
|
33822
33798
|
name: "session-extract-cursors",
|
|
33823
|
-
up:
|
|
33799
|
+
up: up542,
|
|
33824
33800
|
artifacts: {
|
|
33825
33801
|
tables: ["session_extract_cursors"]
|
|
33826
33802
|
}
|
|
@@ -33828,7 +33804,7 @@ var MIGRATIONS2 = [
|
|
|
33828
33804
|
{
|
|
33829
33805
|
version: 50,
|
|
33830
33806
|
name: "related-to-audit",
|
|
33831
|
-
up:
|
|
33807
|
+
up: up552,
|
|
33832
33808
|
artifacts: {
|
|
33833
33809
|
tables: ["entity_dependency_history"]
|
|
33834
33810
|
}
|
|
@@ -33836,7 +33812,7 @@ var MIGRATIONS2 = [
|
|
|
33836
33812
|
{
|
|
33837
33813
|
version: 51,
|
|
33838
33814
|
name: "memory-md-rolling-window-lineage",
|
|
33839
|
-
up:
|
|
33815
|
+
up: up562,
|
|
33840
33816
|
artifacts: {
|
|
33841
33817
|
tables: ["memory_artifacts", "memory_artifact_tombstones", "memory_artifacts_fts"],
|
|
33842
33818
|
columns: [
|
|
@@ -33851,15 +33827,12 @@ var MIGRATIONS2 = [
|
|
|
33851
33827
|
{
|
|
33852
33828
|
version: 52,
|
|
33853
33829
|
name: "mcp-invocations",
|
|
33854
|
-
up:
|
|
33855
|
-
artifacts: {
|
|
33856
|
-
tables: ["mcp_invocations"]
|
|
33857
|
-
}
|
|
33830
|
+
up: up572
|
|
33858
33831
|
},
|
|
33859
33832
|
{
|
|
33860
33833
|
version: 53,
|
|
33861
33834
|
name: "skill-invocations",
|
|
33862
|
-
up:
|
|
33835
|
+
up: up582,
|
|
33863
33836
|
artifacts: {
|
|
33864
33837
|
tables: ["skill_invocations"]
|
|
33865
33838
|
}
|
|
@@ -33867,7 +33840,7 @@ var MIGRATIONS2 = [
|
|
|
33867
33840
|
{
|
|
33868
33841
|
version: 54,
|
|
33869
33842
|
name: "task-agent-scope",
|
|
33870
|
-
up:
|
|
33843
|
+
up: up592,
|
|
33871
33844
|
artifacts: {
|
|
33872
33845
|
tables: ["task_scope_hints"]
|
|
33873
33846
|
}
|
|
@@ -33875,7 +33848,7 @@ var MIGRATIONS2 = [
|
|
|
33875
33848
|
{
|
|
33876
33849
|
version: 55,
|
|
33877
33850
|
name: "dreaming-state",
|
|
33878
|
-
up:
|
|
33851
|
+
up: up602,
|
|
33879
33852
|
artifacts: {
|
|
33880
33853
|
tables: ["dreaming_state", "dreaming_passes"]
|
|
33881
33854
|
}
|
|
@@ -33883,22 +33856,22 @@ var MIGRATIONS2 = [
|
|
|
33883
33856
|
{
|
|
33884
33857
|
version: 56,
|
|
33885
33858
|
name: "agent-scoped-content-hash",
|
|
33886
|
-
up:
|
|
33859
|
+
up: up612
|
|
33887
33860
|
},
|
|
33888
33861
|
{
|
|
33889
33862
|
version: 57,
|
|
33890
33863
|
name: "memories-fts-tokenizer-repair",
|
|
33891
|
-
up:
|
|
33864
|
+
up: up622
|
|
33892
33865
|
},
|
|
33893
33866
|
{
|
|
33894
33867
|
version: 58,
|
|
33895
33868
|
name: "knowledge-graph-indices",
|
|
33896
|
-
up:
|
|
33869
|
+
up: up632
|
|
33897
33870
|
},
|
|
33898
33871
|
{
|
|
33899
33872
|
version: 59,
|
|
33900
33873
|
name: "entity-attribute-claim-key",
|
|
33901
|
-
up:
|
|
33874
|
+
up: up642,
|
|
33902
33875
|
artifacts: {
|
|
33903
33876
|
columns: [{ table: "entity_attributes", column: "claim_key" }]
|
|
33904
33877
|
}
|
|
@@ -33906,7 +33879,7 @@ var MIGRATIONS2 = [
|
|
|
33906
33879
|
{
|
|
33907
33880
|
version: 60,
|
|
33908
33881
|
name: "entity-attribute-group-key",
|
|
33909
|
-
up:
|
|
33882
|
+
up: up652,
|
|
33910
33883
|
artifacts: {
|
|
33911
33884
|
columns: [{ table: "entity_attributes", column: "group_key" }]
|
|
33912
33885
|
}
|
|
@@ -33914,7 +33887,7 @@ var MIGRATIONS2 = [
|
|
|
33914
33887
|
{
|
|
33915
33888
|
version: 61,
|
|
33916
33889
|
name: "memory-artifact-source-mtime",
|
|
33917
|
-
up:
|
|
33890
|
+
up: up662,
|
|
33918
33891
|
artifacts: {
|
|
33919
33892
|
columns: [{ table: "memory_artifacts", column: "source_mtime_ms" }]
|
|
33920
33893
|
}
|
|
@@ -33922,7 +33895,7 @@ var MIGRATIONS2 = [
|
|
|
33922
33895
|
{
|
|
33923
33896
|
version: 62,
|
|
33924
33897
|
name: "memory-artifact-soft-delete",
|
|
33925
|
-
up:
|
|
33898
|
+
up: up672,
|
|
33926
33899
|
artifacts: {
|
|
33927
33900
|
columns: [
|
|
33928
33901
|
{ table: "memory_artifacts", column: "is_deleted" },
|
|
@@ -33933,12 +33906,12 @@ var MIGRATIONS2 = [
|
|
|
33933
33906
|
{
|
|
33934
33907
|
version: 63,
|
|
33935
33908
|
name: "content-only-memories-fts-update",
|
|
33936
|
-
up:
|
|
33909
|
+
up: up682
|
|
33937
33910
|
},
|
|
33938
33911
|
{
|
|
33939
33912
|
version: 64,
|
|
33940
33913
|
name: "source-graph-provenance",
|
|
33941
|
-
up:
|
|
33914
|
+
up: up692,
|
|
33942
33915
|
artifacts: {
|
|
33943
33916
|
columns: [
|
|
33944
33917
|
{ table: "entities", column: "source_path" },
|
|
@@ -33951,7 +33924,7 @@ var MIGRATIONS2 = [
|
|
|
33951
33924
|
{
|
|
33952
33925
|
version: 65,
|
|
33953
33926
|
name: "source-embedding-agent-scope",
|
|
33954
|
-
up:
|
|
33927
|
+
up: up702,
|
|
33955
33928
|
artifacts: {
|
|
33956
33929
|
columns: [{ table: "embeddings", column: "agent_id", optional: true }]
|
|
33957
33930
|
}
|
|
@@ -33959,7 +33932,7 @@ var MIGRATIONS2 = [
|
|
|
33959
33932
|
{
|
|
33960
33933
|
version: 66,
|
|
33961
33934
|
name: "memory-search-telemetry",
|
|
33962
|
-
up:
|
|
33935
|
+
up: up712,
|
|
33963
33936
|
artifacts: {
|
|
33964
33937
|
tables: ["memory_search_telemetry"]
|
|
33965
33938
|
}
|
|
@@ -33967,7 +33940,7 @@ var MIGRATIONS2 = [
|
|
|
33967
33940
|
{
|
|
33968
33941
|
version: 67,
|
|
33969
33942
|
name: "ontology-proposals",
|
|
33970
|
-
up:
|
|
33943
|
+
up: up722,
|
|
33971
33944
|
artifacts: {
|
|
33972
33945
|
tables: ["ontology_proposals"],
|
|
33973
33946
|
columns: [
|
|
@@ -33981,7 +33954,7 @@ var MIGRATIONS2 = [
|
|
|
33981
33954
|
{
|
|
33982
33955
|
version: 68,
|
|
33983
33956
|
name: "daily-reflections",
|
|
33984
|
-
up:
|
|
33957
|
+
up: up732,
|
|
33985
33958
|
artifacts: {
|
|
33986
33959
|
tables: ["daily_reflections"]
|
|
33987
33960
|
}
|
|
@@ -33989,7 +33962,7 @@ var MIGRATIONS2 = [
|
|
|
33989
33962
|
{
|
|
33990
33963
|
version: 69,
|
|
33991
33964
|
name: "daily-reflections-multiple-insights",
|
|
33992
|
-
up:
|
|
33965
|
+
up: up742,
|
|
33993
33966
|
artifacts: {
|
|
33994
33967
|
tables: ["daily_reflections"]
|
|
33995
33968
|
}
|
|
@@ -33997,7 +33970,7 @@ var MIGRATIONS2 = [
|
|
|
33997
33970
|
{
|
|
33998
33971
|
version: 70,
|
|
33999
33972
|
name: "ontology-control-plane-state",
|
|
34000
|
-
up:
|
|
33973
|
+
up: up752,
|
|
34001
33974
|
artifacts: {
|
|
34002
33975
|
columns: [
|
|
34003
33976
|
{ table: "entities", column: "status" },
|
|
@@ -34012,7 +33985,7 @@ var MIGRATIONS2 = [
|
|
|
34012
33985
|
{
|
|
34013
33986
|
version: 71,
|
|
34014
33987
|
name: "epistemic-assertions",
|
|
34015
|
-
up:
|
|
33988
|
+
up: up762,
|
|
34016
33989
|
artifacts: {
|
|
34017
33990
|
tables: ["epistemic_assertions"]
|
|
34018
33991
|
}
|
|
@@ -34020,7 +33993,7 @@ var MIGRATIONS2 = [
|
|
|
34020
33993
|
{
|
|
34021
33994
|
version: 72,
|
|
34022
33995
|
name: "agent-scoped-idempotency-key",
|
|
34023
|
-
up:
|
|
33996
|
+
up: up772,
|
|
34024
33997
|
artifacts: {
|
|
34025
33998
|
columns: [
|
|
34026
33999
|
{ table: "memories", column: "idempotency_key" },
|
|
@@ -34031,7 +34004,7 @@ var MIGRATIONS2 = [
|
|
|
34031
34004
|
{
|
|
34032
34005
|
version: 73,
|
|
34033
34006
|
name: "recall-context-dedupe",
|
|
34034
|
-
up:
|
|
34007
|
+
up: up782,
|
|
34035
34008
|
artifacts: {
|
|
34036
34009
|
tables: ["session_context_epochs", "session_recall_events"]
|
|
34037
34010
|
}
|
|
@@ -34039,7 +34012,7 @@ var MIGRATIONS2 = [
|
|
|
34039
34012
|
{
|
|
34040
34013
|
version: 74,
|
|
34041
34014
|
name: "aggregate-memory-links",
|
|
34042
|
-
up:
|
|
34015
|
+
up: up792,
|
|
34043
34016
|
artifacts: {
|
|
34044
34017
|
tables: ["aggregate_memory_sources"]
|
|
34045
34018
|
}
|
|
@@ -34047,7 +34020,7 @@ var MIGRATIONS2 = [
|
|
|
34047
34020
|
{
|
|
34048
34021
|
version: 75,
|
|
34049
34022
|
name: "memory-artifact-source-provenance",
|
|
34050
|
-
up:
|
|
34023
|
+
up: up802,
|
|
34051
34024
|
artifacts: {
|
|
34052
34025
|
columns: [
|
|
34053
34026
|
{ table: "memory_artifacts", column: "source_id" },
|
|
@@ -34061,7 +34034,7 @@ var MIGRATIONS2 = [
|
|
|
34061
34034
|
{
|
|
34062
34035
|
version: 76,
|
|
34063
34036
|
name: "temporal-edges",
|
|
34064
|
-
up:
|
|
34037
|
+
up: up812,
|
|
34065
34038
|
artifacts: {
|
|
34066
34039
|
tables: ["temporal_edges"]
|
|
34067
34040
|
}
|
|
@@ -34069,7 +34042,7 @@ var MIGRATIONS2 = [
|
|
|
34069
34042
|
{
|
|
34070
34043
|
version: 77,
|
|
34071
34044
|
name: "entity-aliases",
|
|
34072
|
-
up:
|
|
34045
|
+
up: up822,
|
|
34073
34046
|
artifacts: {
|
|
34074
34047
|
tables: ["entity_aliases"]
|
|
34075
34048
|
}
|
|
@@ -34077,7 +34050,7 @@ var MIGRATIONS2 = [
|
|
|
34077
34050
|
{
|
|
34078
34051
|
version: 78,
|
|
34079
34052
|
name: "api-keys",
|
|
34080
|
-
up:
|
|
34053
|
+
up: up832,
|
|
34081
34054
|
artifacts: {
|
|
34082
34055
|
tables: ["api_keys"]
|
|
34083
34056
|
}
|
|
@@ -34085,7 +34058,7 @@ var MIGRATIONS2 = [
|
|
|
34085
34058
|
{
|
|
34086
34059
|
version: 79,
|
|
34087
34060
|
name: "transcript-capture-jobs",
|
|
34088
|
-
up:
|
|
34061
|
+
up: up842,
|
|
34089
34062
|
artifacts: {
|
|
34090
34063
|
tables: ["transcript_capture_jobs"]
|
|
34091
34064
|
}
|
|
@@ -34093,7 +34066,7 @@ var MIGRATIONS2 = [
|
|
|
34093
34066
|
{
|
|
34094
34067
|
version: 80,
|
|
34095
34068
|
name: "document-scope-columns",
|
|
34096
|
-
up:
|
|
34069
|
+
up: up852,
|
|
34097
34070
|
artifacts: {
|
|
34098
34071
|
columns: [
|
|
34099
34072
|
{ table: "documents", column: "agent_id" },
|
|
@@ -34104,7 +34077,7 @@ var MIGRATIONS2 = [
|
|
|
34104
34077
|
{
|
|
34105
34078
|
version: 81,
|
|
34106
34079
|
name: "aggregate-evidence-sources",
|
|
34107
|
-
up:
|
|
34080
|
+
up: up862,
|
|
34108
34081
|
artifacts: {
|
|
34109
34082
|
tables: ["aggregate_evidence_sources"]
|
|
34110
34083
|
}
|
|
@@ -34112,7 +34085,7 @@ var MIGRATIONS2 = [
|
|
|
34112
34085
|
{
|
|
34113
34086
|
version: 82,
|
|
34114
34087
|
name: "skill-invocations-harness",
|
|
34115
|
-
up:
|
|
34088
|
+
up: up872,
|
|
34116
34089
|
artifacts: {
|
|
34117
34090
|
columns: [
|
|
34118
34091
|
{ table: "skill_invocations", column: "harness" },
|
|
@@ -34123,7 +34096,7 @@ var MIGRATIONS2 = [
|
|
|
34123
34096
|
{
|
|
34124
34097
|
version: 83,
|
|
34125
34098
|
name: "memory-lifecycle-repair",
|
|
34126
|
-
up:
|
|
34099
|
+
up: up882,
|
|
34127
34100
|
artifacts: {
|
|
34128
34101
|
tables: ["transcript_capture_jobs", "aggregate_evidence_sources", "entity_dependencies"],
|
|
34129
34102
|
columns: [
|
|
@@ -34138,7 +34111,7 @@ var MIGRATIONS2 = [
|
|
|
34138
34111
|
{
|
|
34139
34112
|
version: 84,
|
|
34140
34113
|
name: "legacy-markdown-import-state",
|
|
34141
|
-
up:
|
|
34114
|
+
up: up892,
|
|
34142
34115
|
artifacts: {
|
|
34143
34116
|
tables: ["legacy_markdown_imports", "legacy_markdown_chunks"]
|
|
34144
34117
|
}
|
|
@@ -34146,7 +34119,7 @@ var MIGRATIONS2 = [
|
|
|
34146
34119
|
{
|
|
34147
34120
|
version: 85,
|
|
34148
34121
|
name: "backfill-relations-to-dependencies",
|
|
34149
|
-
up:
|
|
34122
|
+
up: up902,
|
|
34150
34123
|
artifacts: {
|
|
34151
34124
|
tables: ["entity_dependencies"]
|
|
34152
34125
|
}
|
|
@@ -34154,7 +34127,7 @@ var MIGRATIONS2 = [
|
|
|
34154
34127
|
{
|
|
34155
34128
|
version: 86,
|
|
34156
34129
|
name: "summary-jobs-content-hash",
|
|
34157
|
-
up:
|
|
34130
|
+
up: up912,
|
|
34158
34131
|
artifacts: {
|
|
34159
34132
|
columns: [{ table: "summary_jobs", column: "content_hash" }]
|
|
34160
34133
|
}
|
|
@@ -34162,7 +34135,7 @@ var MIGRATIONS2 = [
|
|
|
34162
34135
|
{
|
|
34163
34136
|
version: 87,
|
|
34164
34137
|
name: "summary-jobs-boundary-reason",
|
|
34165
|
-
up:
|
|
34138
|
+
up: up922,
|
|
34166
34139
|
artifacts: {
|
|
34167
34140
|
columns: [{ table: "summary_jobs", column: "boundary_reason" }]
|
|
34168
34141
|
}
|
|
@@ -34170,7 +34143,7 @@ var MIGRATIONS2 = [
|
|
|
34170
34143
|
{
|
|
34171
34144
|
version: 88,
|
|
34172
34145
|
name: "transcript-recovery-files",
|
|
34173
|
-
up:
|
|
34146
|
+
up: up932,
|
|
34174
34147
|
artifacts: {
|
|
34175
34148
|
tables: ["transcript_recovery_files"]
|
|
34176
34149
|
}
|
|
@@ -34178,7 +34151,7 @@ var MIGRATIONS2 = [
|
|
|
34178
34151
|
{
|
|
34179
34152
|
version: 89,
|
|
34180
34153
|
name: "job-cancellations",
|
|
34181
|
-
up:
|
|
34154
|
+
up: up942,
|
|
34182
34155
|
artifacts: {
|
|
34183
34156
|
tables: ["job_cancellations"]
|
|
34184
34157
|
}
|
|
@@ -34186,7 +34159,7 @@ var MIGRATIONS2 = [
|
|
|
34186
34159
|
{
|
|
34187
34160
|
version: 90,
|
|
34188
34161
|
name: "job-archive",
|
|
34189
|
-
up:
|
|
34162
|
+
up: up952,
|
|
34190
34163
|
artifacts: {
|
|
34191
34164
|
tables: ["job_archive"]
|
|
34192
34165
|
}
|
|
@@ -34194,25 +34167,25 @@ var MIGRATIONS2 = [
|
|
|
34194
34167
|
{
|
|
34195
34168
|
version: 91,
|
|
34196
34169
|
name: "embedding-index-generations",
|
|
34197
|
-
up:
|
|
34170
|
+
up: up962,
|
|
34198
34171
|
artifacts: { tables: ["embedding_index_state"] }
|
|
34199
34172
|
},
|
|
34200
34173
|
{
|
|
34201
34174
|
version: 92,
|
|
34202
34175
|
name: "embedding-staging-store",
|
|
34203
|
-
up:
|
|
34176
|
+
up: up972,
|
|
34204
34177
|
artifacts: { tables: ["embeddings_staging"] }
|
|
34205
34178
|
},
|
|
34206
34179
|
{
|
|
34207
34180
|
version: 93,
|
|
34208
34181
|
name: "dreaming-evidence-cursor",
|
|
34209
|
-
up:
|
|
34182
|
+
up: up982,
|
|
34210
34183
|
artifacts: { columns: [{ table: "dreaming_state", column: "evidence_cursor" }] }
|
|
34211
34184
|
},
|
|
34212
34185
|
{
|
|
34213
34186
|
version: 94,
|
|
34214
34187
|
name: "memory-kind",
|
|
34215
|
-
up:
|
|
34188
|
+
up: up992,
|
|
34216
34189
|
artifacts: {
|
|
34217
34190
|
columns: [
|
|
34218
34191
|
{ table: "memories", column: "memory_kind" },
|
|
@@ -34223,35 +34196,35 @@ var MIGRATIONS2 = [
|
|
|
34223
34196
|
{
|
|
34224
34197
|
version: 95,
|
|
34225
34198
|
name: "compaction-recall-projections",
|
|
34226
|
-
up:
|
|
34199
|
+
up: up1002
|
|
34227
34200
|
},
|
|
34228
34201
|
{
|
|
34229
34202
|
version: 96,
|
|
34230
34203
|
name: "retire-legacy-ingestion",
|
|
34231
|
-
up:
|
|
34204
|
+
up: up1012
|
|
34232
34205
|
},
|
|
34233
34206
|
{
|
|
34234
34207
|
version: 97,
|
|
34235
34208
|
name: "dreaming-failure-backoff",
|
|
34236
|
-
up:
|
|
34209
|
+
up: up1022,
|
|
34237
34210
|
artifacts: { columns: [{ table: "dreaming_state", column: "last_failure_at" }] }
|
|
34238
34211
|
},
|
|
34239
34212
|
{
|
|
34240
34213
|
version: 98,
|
|
34241
34214
|
name: "dreaming-evidence-exclusions",
|
|
34242
|
-
up:
|
|
34215
|
+
up: up1032,
|
|
34243
34216
|
artifacts: { tables: ["dreaming_evidence_exclusions"] }
|
|
34244
34217
|
},
|
|
34245
34218
|
{
|
|
34246
34219
|
version: 99,
|
|
34247
34220
|
name: "dreaming-tool-calls",
|
|
34248
|
-
up:
|
|
34221
|
+
up: up1042,
|
|
34249
34222
|
artifacts: { tables: ["dreaming_tool_calls"] }
|
|
34250
34223
|
},
|
|
34251
34224
|
{
|
|
34252
34225
|
version: 100,
|
|
34253
34226
|
name: "dreaming-runbook",
|
|
34254
|
-
up:
|
|
34227
|
+
up: up1052,
|
|
34255
34228
|
artifacts: {
|
|
34256
34229
|
columns: [
|
|
34257
34230
|
{ table: "dreaming_passes", column: "evidence_window_json" },
|
|
@@ -34262,23 +34235,23 @@ var MIGRATIONS2 = [
|
|
|
34262
34235
|
{
|
|
34263
34236
|
version: 101,
|
|
34264
34237
|
name: "dreaming-attention",
|
|
34265
|
-
up:
|
|
34238
|
+
up: up1062,
|
|
34266
34239
|
artifacts: { tables: ["dreaming_attention"] }
|
|
34267
34240
|
},
|
|
34268
34241
|
{
|
|
34269
34242
|
version: 102,
|
|
34270
34243
|
name: "attribute-semantic-memories",
|
|
34271
|
-
up:
|
|
34244
|
+
up: up1072
|
|
34272
34245
|
},
|
|
34273
34246
|
{
|
|
34274
34247
|
version: 103,
|
|
34275
34248
|
name: "semantic-memory-kind",
|
|
34276
|
-
up:
|
|
34249
|
+
up: up1082
|
|
34277
34250
|
},
|
|
34278
34251
|
{
|
|
34279
34252
|
version: 104,
|
|
34280
34253
|
name: "derived-memory-provenance",
|
|
34281
|
-
up:
|
|
34254
|
+
up: up1092,
|
|
34282
34255
|
artifacts: {
|
|
34283
34256
|
tables: ["derived_memory_sources"],
|
|
34284
34257
|
columns: [{ table: "memories", column: "stale_at" }]
|
|
@@ -34287,12 +34260,12 @@ var MIGRATIONS2 = [
|
|
|
34287
34260
|
{
|
|
34288
34261
|
version: 105,
|
|
34289
34262
|
name: "agent-scoped-entity-name",
|
|
34290
|
-
up:
|
|
34263
|
+
up: up1102
|
|
34291
34264
|
},
|
|
34292
34265
|
{
|
|
34293
34266
|
version: 106,
|
|
34294
34267
|
name: "memory-review-after",
|
|
34295
|
-
up:
|
|
34268
|
+
up: up1112,
|
|
34296
34269
|
artifacts: {
|
|
34297
34270
|
columns: [{ table: "memories", column: "review_after" }]
|
|
34298
34271
|
}
|
|
@@ -34300,7 +34273,7 @@ var MIGRATIONS2 = [
|
|
|
34300
34273
|
{
|
|
34301
34274
|
version: 107,
|
|
34302
34275
|
name: "dreaming-pass-usage",
|
|
34303
|
-
up:
|
|
34276
|
+
up: up1122,
|
|
34304
34277
|
artifacts: {
|
|
34305
34278
|
columns: [
|
|
34306
34279
|
{ table: "dreaming_passes", column: "tokens_input" },
|
|
@@ -34314,7 +34287,7 @@ var MIGRATIONS2 = [
|
|
|
34314
34287
|
{
|
|
34315
34288
|
version: 108,
|
|
34316
34289
|
name: "embedding-usage",
|
|
34317
|
-
up:
|
|
34290
|
+
up: up1132,
|
|
34318
34291
|
artifacts: {
|
|
34319
34292
|
tables: ["embedding_usage"]
|
|
34320
34293
|
}
|
|
@@ -34322,7 +34295,7 @@ var MIGRATIONS2 = [
|
|
|
34322
34295
|
{
|
|
34323
34296
|
version: 109,
|
|
34324
34297
|
name: "telemetry-install",
|
|
34325
|
-
up:
|
|
34298
|
+
up: up1142,
|
|
34326
34299
|
artifacts: {
|
|
34327
34300
|
tables: ["telemetry_install"]
|
|
34328
34301
|
}
|
|
@@ -34330,12 +34303,12 @@ var MIGRATIONS2 = [
|
|
|
34330
34303
|
{
|
|
34331
34304
|
version: 110,
|
|
34332
34305
|
name: "memory-mention-join-index",
|
|
34333
|
-
up:
|
|
34306
|
+
up: up1152
|
|
34334
34307
|
},
|
|
34335
34308
|
{
|
|
34336
34309
|
version: 111,
|
|
34337
34310
|
name: "telemetry-first-use",
|
|
34338
|
-
up:
|
|
34311
|
+
up: up1162,
|
|
34339
34312
|
artifacts: {
|
|
34340
34313
|
columns: [
|
|
34341
34314
|
{ table: "telemetry_install", column: "first_remember_at" },
|
|
@@ -34346,7 +34319,7 @@ var MIGRATIONS2 = [
|
|
|
34346
34319
|
{
|
|
34347
34320
|
version: 112,
|
|
34348
34321
|
name: "telemetry-queue-ownership",
|
|
34349
|
-
up:
|
|
34322
|
+
up: up1172,
|
|
34350
34323
|
artifacts: {
|
|
34351
34324
|
columns: [
|
|
34352
34325
|
{ table: "telemetry_events", column: "source" },
|
|
@@ -34358,7 +34331,7 @@ var MIGRATIONS2 = [
|
|
|
34358
34331
|
{
|
|
34359
34332
|
version: 113,
|
|
34360
34333
|
name: "session-claims",
|
|
34361
|
-
up:
|
|
34334
|
+
up: up1182,
|
|
34362
34335
|
artifacts: {
|
|
34363
34336
|
tables: ["session_claims"],
|
|
34364
34337
|
columns: [
|
|
@@ -34372,12 +34345,12 @@ var MIGRATIONS2 = [
|
|
|
34372
34345
|
{
|
|
34373
34346
|
version: 114,
|
|
34374
34347
|
name: "memory-traversal-hydration-index",
|
|
34375
|
-
up:
|
|
34348
|
+
up: up1192
|
|
34376
34349
|
},
|
|
34377
34350
|
{
|
|
34378
34351
|
version: 115,
|
|
34379
34352
|
name: "cross-agent-message-notifications",
|
|
34380
|
-
up:
|
|
34353
|
+
up: up1202,
|
|
34381
34354
|
artifacts: {
|
|
34382
34355
|
tables: ["cross_agent_messages", "cross_agent_message_receipts"]
|
|
34383
34356
|
}
|
|
@@ -34385,7 +34358,7 @@ var MIGRATIONS2 = [
|
|
|
34385
34358
|
{
|
|
34386
34359
|
version: 116,
|
|
34387
34360
|
name: "acp-delivery-reconciliation",
|
|
34388
|
-
up:
|
|
34361
|
+
up: up1212,
|
|
34389
34362
|
artifacts: {
|
|
34390
34363
|
columns: [
|
|
34391
34364
|
{ table: "cross_agent_messages", column: "delivery_state" },
|
|
@@ -34399,7 +34372,7 @@ var MIGRATIONS2 = [
|
|
|
34399
34372
|
{
|
|
34400
34373
|
version: 117,
|
|
34401
34374
|
name: "retire-summary-worker",
|
|
34402
|
-
up:
|
|
34375
|
+
up: up1222,
|
|
34403
34376
|
artifacts: {
|
|
34404
34377
|
columns: [
|
|
34405
34378
|
{ table: "session_transcripts", column: "completed_at" },
|
|
@@ -34410,24 +34383,24 @@ var MIGRATIONS2 = [
|
|
|
34410
34383
|
{
|
|
34411
34384
|
version: 118,
|
|
34412
34385
|
name: "queue-pressure-indices",
|
|
34413
|
-
up:
|
|
34386
|
+
up: up1232
|
|
34414
34387
|
},
|
|
34415
34388
|
{
|
|
34416
34389
|
version: 119,
|
|
34417
34390
|
name: "telemetry-version-observation",
|
|
34418
|
-
up:
|
|
34391
|
+
up: up1242,
|
|
34419
34392
|
artifacts: { columns: [{ table: "telemetry_install", column: "last_seen_version" }] }
|
|
34420
34393
|
},
|
|
34421
34394
|
{
|
|
34422
34395
|
version: 120,
|
|
34423
34396
|
name: "source-lifecycle-telemetry",
|
|
34424
|
-
up:
|
|
34397
|
+
up: up1252,
|
|
34425
34398
|
artifacts: { tables: ["source_lifecycle_state"] }
|
|
34426
34399
|
},
|
|
34427
34400
|
{
|
|
34428
34401
|
version: 121,
|
|
34429
34402
|
name: "telemetry-delivery-health",
|
|
34430
|
-
up:
|
|
34403
|
+
up: up1262,
|
|
34431
34404
|
artifacts: {
|
|
34432
34405
|
tables: ["telemetry_delivery_state"],
|
|
34433
34406
|
columns: [
|
|
@@ -34441,7 +34414,7 @@ var MIGRATIONS2 = [
|
|
|
34441
34414
|
{
|
|
34442
34415
|
version: 122,
|
|
34443
34416
|
name: "dreaming-evidence-retry",
|
|
34444
|
-
up:
|
|
34417
|
+
up: up1272,
|
|
34445
34418
|
artifacts: {
|
|
34446
34419
|
columns: [
|
|
34447
34420
|
{ table: "dreaming_evidence_exclusions", column: "failure_class" },
|
|
@@ -34454,13 +34427,13 @@ var MIGRATIONS2 = [
|
|
|
34454
34427
|
{
|
|
34455
34428
|
version: 123,
|
|
34456
34429
|
name: "embedding-index-failures",
|
|
34457
|
-
up:
|
|
34430
|
+
up: up1282,
|
|
34458
34431
|
artifacts: { tables: ["embedding_index_failures"] }
|
|
34459
34432
|
},
|
|
34460
34433
|
{
|
|
34461
34434
|
version: 124,
|
|
34462
34435
|
name: "import-derived-lifecycle",
|
|
34463
|
-
up:
|
|
34436
|
+
up: up1292,
|
|
34464
34437
|
artifacts: {
|
|
34465
34438
|
tables: ["imported_source_lifecycle"]
|
|
34466
34439
|
}
|
|
@@ -34468,77 +34441,77 @@ var MIGRATIONS2 = [
|
|
|
34468
34441
|
{
|
|
34469
34442
|
version: 125,
|
|
34470
34443
|
name: "memory-content-safety",
|
|
34471
|
-
up:
|
|
34444
|
+
up: up1302,
|
|
34472
34445
|
artifacts: { tables: ["memory_content_safety"] }
|
|
34473
34446
|
},
|
|
34474
34447
|
{
|
|
34475
34448
|
version: 126,
|
|
34476
34449
|
name: "dreaming-surprisal-attention",
|
|
34477
|
-
up:
|
|
34450
|
+
up: up1312,
|
|
34478
34451
|
artifacts: { tables: ["dreaming_attention"] }
|
|
34479
34452
|
},
|
|
34480
34453
|
{
|
|
34481
34454
|
version: 127,
|
|
34482
34455
|
name: "ontology-contradictions",
|
|
34483
|
-
up:
|
|
34456
|
+
up: up1322,
|
|
34484
34457
|
artifacts: { tables: ["ontology_contradictions"] }
|
|
34485
34458
|
},
|
|
34486
34459
|
{
|
|
34487
34460
|
version: 128,
|
|
34488
34461
|
name: "bounded-queue-diagnostics",
|
|
34489
|
-
up:
|
|
34462
|
+
up: up1332
|
|
34490
34463
|
},
|
|
34491
34464
|
{
|
|
34492
34465
|
version: 129,
|
|
34493
34466
|
name: "retire-structural-jobs",
|
|
34494
|
-
up:
|
|
34467
|
+
up: up1342
|
|
34495
34468
|
},
|
|
34496
34469
|
{
|
|
34497
34470
|
version: 130,
|
|
34498
34471
|
name: "embedding-repair-state",
|
|
34499
|
-
up:
|
|
34472
|
+
up: up1352,
|
|
34500
34473
|
artifacts: { tables: ["embedding_repair_budget", "embedding_repair_backoff"] }
|
|
34501
34474
|
},
|
|
34502
34475
|
{
|
|
34503
34476
|
version: 131,
|
|
34504
34477
|
name: "dreaming-evidence-consumption",
|
|
34505
|
-
up:
|
|
34478
|
+
up: up1362,
|
|
34506
34479
|
artifacts: { tables: ["dreaming_evidence_consumption"] }
|
|
34507
34480
|
},
|
|
34508
34481
|
{
|
|
34509
34482
|
version: 132,
|
|
34510
34483
|
name: "observer-scoped-epistemic-assertions",
|
|
34511
|
-
up:
|
|
34484
|
+
up: up1372,
|
|
34512
34485
|
artifacts: { tables: ["epistemic_assertions"] }
|
|
34513
34486
|
},
|
|
34514
34487
|
{
|
|
34515
34488
|
version: 133,
|
|
34516
34489
|
name: "dreaming-memory-head",
|
|
34517
|
-
up:
|
|
34490
|
+
up: up1382,
|
|
34518
34491
|
artifacts: { tables: ["memory_head_revisions", "memory_head_entries", "memory_head_revision_entries"] }
|
|
34519
34492
|
},
|
|
34520
34493
|
{
|
|
34521
34494
|
version: 134,
|
|
34522
34495
|
name: "scope-memory-head-entries",
|
|
34523
|
-
up:
|
|
34496
|
+
up: up1392,
|
|
34524
34497
|
artifacts: { tables: ["memory_head_entries"] }
|
|
34525
34498
|
},
|
|
34526
34499
|
{
|
|
34527
34500
|
version: 135,
|
|
34528
34501
|
name: "memory-head-publication",
|
|
34529
|
-
up:
|
|
34502
|
+
up: up1402,
|
|
34530
34503
|
artifacts: { tables: ["memory_head_publications"] }
|
|
34531
34504
|
},
|
|
34532
34505
|
{
|
|
34533
34506
|
version: 136,
|
|
34534
34507
|
name: "memory-head-revisions",
|
|
34535
|
-
up:
|
|
34508
|
+
up: up1412,
|
|
34536
34509
|
artifacts: { tables: ["memory_head_revisions"] }
|
|
34537
34510
|
},
|
|
34538
34511
|
{
|
|
34539
34512
|
version: 137,
|
|
34540
34513
|
name: "dreaming-head-manifest",
|
|
34541
|
-
up:
|
|
34514
|
+
up: up1422,
|
|
34542
34515
|
artifacts: {
|
|
34543
34516
|
columns: [
|
|
34544
34517
|
{ table: "dreaming_passes", column: "head_revision" },
|
|
@@ -34549,7 +34522,7 @@ var MIGRATIONS2 = [
|
|
|
34549
34522
|
{
|
|
34550
34523
|
version: 138,
|
|
34551
34524
|
name: "bounded-status-projections",
|
|
34552
|
-
up:
|
|
34525
|
+
up: up1432,
|
|
34553
34526
|
artifacts: {
|
|
34554
34527
|
tables: ["transcript_capture_status", "memories_duplicate_hash_counts", "memories_diagnostics_state"]
|
|
34555
34528
|
}
|
|
@@ -34557,31 +34530,31 @@ var MIGRATIONS2 = [
|
|
|
34557
34530
|
{
|
|
34558
34531
|
version: 139,
|
|
34559
34532
|
name: "native-source-sync-state",
|
|
34560
|
-
up:
|
|
34533
|
+
up: up1442,
|
|
34561
34534
|
artifacts: { tables: ["native_source_sync_state"] }
|
|
34562
34535
|
},
|
|
34563
34536
|
{
|
|
34564
34537
|
version: 140,
|
|
34565
34538
|
name: "transcript-recovery-frontier",
|
|
34566
|
-
up:
|
|
34539
|
+
up: up1452,
|
|
34567
34540
|
artifacts: { tables: ["transcript_recovery_frontiers"] }
|
|
34568
34541
|
},
|
|
34569
34542
|
{
|
|
34570
34543
|
version: 141,
|
|
34571
34544
|
name: "source-sync-checkpoints",
|
|
34572
|
-
up:
|
|
34545
|
+
up: up1462,
|
|
34573
34546
|
artifacts: { tables: ["source_sync_checkpoints"] }
|
|
34574
34547
|
},
|
|
34575
34548
|
{
|
|
34576
34549
|
version: 142,
|
|
34577
34550
|
name: "source-sync-frontier",
|
|
34578
|
-
up:
|
|
34551
|
+
up: up1472,
|
|
34579
34552
|
artifacts: { columns: [{ table: "source_sync_checkpoints", column: "frontier" }] }
|
|
34580
34553
|
},
|
|
34581
34554
|
{
|
|
34582
34555
|
version: 143,
|
|
34583
34556
|
name: "embedding-index-progress",
|
|
34584
|
-
up:
|
|
34557
|
+
up: up1482,
|
|
34585
34558
|
artifacts: {
|
|
34586
34559
|
columns: [
|
|
34587
34560
|
{ table: "embedding_index_state", column: "migration_phase" },
|
|
@@ -34597,19 +34570,19 @@ var MIGRATIONS2 = [
|
|
|
34597
34570
|
{
|
|
34598
34571
|
version: 144,
|
|
34599
34572
|
name: "memory-job-lease-token",
|
|
34600
|
-
up:
|
|
34573
|
+
up: up1492,
|
|
34601
34574
|
artifacts: { columns: [{ table: "memory_jobs", column: "lease_token" }] }
|
|
34602
34575
|
},
|
|
34603
34576
|
{
|
|
34604
34577
|
version: 145,
|
|
34605
34578
|
name: "dreaming-evidence-reviews",
|
|
34606
|
-
up:
|
|
34579
|
+
up: up1502,
|
|
34607
34580
|
artifacts: { tables: ["dreaming_evidence_reviews"] }
|
|
34608
34581
|
},
|
|
34609
34582
|
{
|
|
34610
34583
|
version: 146,
|
|
34611
34584
|
name: "source-transcript-import",
|
|
34612
|
-
up:
|
|
34585
|
+
up: up1512,
|
|
34613
34586
|
artifacts: {
|
|
34614
34587
|
tables: [
|
|
34615
34588
|
"source_import_jobs",
|
|
@@ -34628,19 +34601,19 @@ var MIGRATIONS2 = [
|
|
|
34628
34601
|
{
|
|
34629
34602
|
version: 147,
|
|
34630
34603
|
name: "source-import-replay-file-slots",
|
|
34631
|
-
up:
|
|
34604
|
+
up: up1522,
|
|
34632
34605
|
artifacts: { tables: ["source_import_files"] }
|
|
34633
34606
|
},
|
|
34634
34607
|
{
|
|
34635
34608
|
version: 148,
|
|
34636
34609
|
name: "source-import-attempt-provenance",
|
|
34637
|
-
up:
|
|
34610
|
+
up: up1532,
|
|
34638
34611
|
artifacts: { columns: [{ table: "source_import_record_attempts", column: "source_id" }] }
|
|
34639
34612
|
},
|
|
34640
34613
|
{
|
|
34641
34614
|
version: 149,
|
|
34642
34615
|
name: "transcript-import-state-machine",
|
|
34643
|
-
up:
|
|
34616
|
+
up: up1542,
|
|
34644
34617
|
artifacts: {
|
|
34645
34618
|
columns: [
|
|
34646
34619
|
{ table: "source_import_jobs", column: "duplicate_mode" },
|
|
@@ -34652,7 +34625,7 @@ var MIGRATIONS2 = [
|
|
|
34652
34625
|
{
|
|
34653
34626
|
version: 150,
|
|
34654
34627
|
name: "memory-head-freshness",
|
|
34655
|
-
up:
|
|
34628
|
+
up: up1552,
|
|
34656
34629
|
artifacts: {
|
|
34657
34630
|
columns: [
|
|
34658
34631
|
{ table: "memory_md_heads", column: "is_current" },
|
|
@@ -34663,7 +34636,7 @@ var MIGRATIONS2 = [
|
|
|
34663
34636
|
{
|
|
34664
34637
|
version: 151,
|
|
34665
34638
|
name: "transcript-import-bytes",
|
|
34666
|
-
up:
|
|
34639
|
+
up: up160,
|
|
34667
34640
|
artifacts: {
|
|
34668
34641
|
tables: [
|
|
34669
34642
|
"source_import_chunks",
|
|
@@ -34698,7 +34671,7 @@ var MIGRATIONS2 = [
|
|
|
34698
34671
|
{
|
|
34699
34672
|
version: 153,
|
|
34700
34673
|
name: "vector-repair-checkpoints",
|
|
34701
|
-
up:
|
|
34674
|
+
up: up1562,
|
|
34702
34675
|
artifacts: { tables: ["vector_repair_checkpoints"] }
|
|
34703
34676
|
},
|
|
34704
34677
|
{
|
|
@@ -34725,13 +34698,13 @@ var MIGRATIONS2 = [
|
|
|
34725
34698
|
{
|
|
34726
34699
|
version: 156,
|
|
34727
34700
|
name: "embedding-repair-checkpoints",
|
|
34728
|
-
up:
|
|
34701
|
+
up: up1572,
|
|
34729
34702
|
artifacts: { tables: ["embedding_repair_checkpoints"] }
|
|
34730
34703
|
},
|
|
34731
34704
|
{
|
|
34732
34705
|
version: 157,
|
|
34733
34706
|
name: "embedding-repair-progress",
|
|
34734
|
-
up:
|
|
34707
|
+
up: up1582,
|
|
34735
34708
|
artifacts: {
|
|
34736
34709
|
tables: ["embedding_repair_progress"],
|
|
34737
34710
|
columns: [{ table: "embedding_repair_checkpoints", column: "profile_fingerprint" }]
|
|
@@ -34740,8 +34713,13 @@ var MIGRATIONS2 = [
|
|
|
34740
34713
|
{
|
|
34741
34714
|
version: 158,
|
|
34742
34715
|
name: "dreaming-candidate-scan-index",
|
|
34743
|
-
up:
|
|
34716
|
+
up: up1592,
|
|
34744
34717
|
artifacts: { indexes: ["idx_memories_agent_kind"] }
|
|
34718
|
+
},
|
|
34719
|
+
{
|
|
34720
|
+
version: 159,
|
|
34721
|
+
name: "retire-obsolete-invocation-ledger",
|
|
34722
|
+
up: up510
|
|
34745
34723
|
}
|
|
34746
34724
|
];
|
|
34747
34725
|
var LATEST_SCHEMA_VERSION2 = MIGRATIONS2[MIGRATIONS2.length - 1]?.version ?? 0;
|