@signetai/connector-openclaw 0.226.25 → 0.227.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +638 -660
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -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;
|
|
@@ -30140,7 +30129,7 @@ var DAEMON_DERIVED_MEMORY_SOURCE_TYPES2 = [
|
|
|
30140
30129
|
"checkpoint",
|
|
30141
30130
|
"dreaming"
|
|
30142
30131
|
];
|
|
30143
|
-
function
|
|
30132
|
+
function up160(db) {
|
|
30144
30133
|
const hasColumn26 = (table, column) => {
|
|
30145
30134
|
const statement = db.prepare(`SELECT 1 FROM pragma_table_info('${table}') WHERE name = ?`);
|
|
30146
30135
|
try {
|
|
@@ -30252,6 +30241,9 @@ function up410(db) {
|
|
|
30252
30241
|
WHERE resolved_at IS NULL;
|
|
30253
30242
|
`);
|
|
30254
30243
|
}
|
|
30244
|
+
function up510(db) {
|
|
30245
|
+
db.exec("DROP TABLE IF EXISTS mcp_invocations");
|
|
30246
|
+
}
|
|
30255
30247
|
var MEMORIES_FTS_TOKENIZER2 = "unicode61";
|
|
30256
30248
|
var FTS_STATE_TABLE2 = "memories_fts_state";
|
|
30257
30249
|
function normalizeSql2(sql) {
|
|
@@ -30367,7 +30359,7 @@ function memoriesFtsNeedsTokenizerRepair2(sql) {
|
|
|
30367
30359
|
return true;
|
|
30368
30360
|
return !normalized.includes(`tokenize='${MEMORIES_FTS_TOKENIZER2}'`);
|
|
30369
30361
|
}
|
|
30370
|
-
function
|
|
30362
|
+
function up610(db) {
|
|
30371
30363
|
db.exec(`
|
|
30372
30364
|
CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
30373
30365
|
version INTEGER PRIMARY KEY,
|
|
@@ -30465,7 +30457,7 @@ function addColumnIfMissing210(db, table, column, definition) {
|
|
|
30465
30457
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
30466
30458
|
}
|
|
30467
30459
|
}
|
|
30468
|
-
function
|
|
30460
|
+
function up710(db) {
|
|
30469
30461
|
addColumnIfMissing210(db, "memories", "content_hash", "TEXT");
|
|
30470
30462
|
addColumnIfMissing210(db, "memories", "normalized_content", "TEXT");
|
|
30471
30463
|
addColumnIfMissing210(db, "memories", "is_deleted", "INTEGER DEFAULT 0");
|
|
@@ -30583,7 +30575,7 @@ function addColumnIfMissing32(db, table, column, definition) {
|
|
|
30583
30575
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
30584
30576
|
return true;
|
|
30585
30577
|
}
|
|
30586
|
-
function
|
|
30578
|
+
function up810(db) {
|
|
30587
30579
|
addColumnIfMissing32(db, "memories", "why", "TEXT");
|
|
30588
30580
|
addColumnIfMissing32(db, "memories", "project", "TEXT");
|
|
30589
30581
|
db.exec(`DROP INDEX IF EXISTS idx_memories_content_hash`);
|
|
@@ -30620,7 +30612,7 @@ function addColumnIfMissing42(db, table, column, definition) {
|
|
|
30620
30612
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
30621
30613
|
}
|
|
30622
30614
|
}
|
|
30623
|
-
function
|
|
30615
|
+
function up910(db) {
|
|
30624
30616
|
addColumnIfMissing42(db, "memory_history", "actor_type", "TEXT");
|
|
30625
30617
|
addColumnIfMissing42(db, "memory_history", "session_id", "TEXT");
|
|
30626
30618
|
addColumnIfMissing42(db, "memory_history", "request_id", "TEXT");
|
|
@@ -30653,7 +30645,7 @@ function addColumnIfMissing52(db, table, column, definition) {
|
|
|
30653
30645
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
30654
30646
|
}
|
|
30655
30647
|
}
|
|
30656
|
-
function
|
|
30648
|
+
function up1010(db) {
|
|
30657
30649
|
addColumnIfMissing52(db, "entities", "canonical_name", "TEXT");
|
|
30658
30650
|
addColumnIfMissing52(db, "entities", "mentions", "INTEGER DEFAULT 0");
|
|
30659
30651
|
addColumnIfMissing52(db, "entities", "embedding", "BLOB");
|
|
@@ -30670,7 +30662,7 @@ function hasColumn42(db, table, column) {
|
|
|
30670
30662
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
30671
30663
|
return rows.some((r3) => r3.name === column);
|
|
30672
30664
|
}
|
|
30673
|
-
function
|
|
30665
|
+
function up1110(db) {
|
|
30674
30666
|
if (!hasColumn42(db, "memories", "idempotency_key")) {
|
|
30675
30667
|
db.exec("ALTER TABLE memories ADD COLUMN idempotency_key TEXT");
|
|
30676
30668
|
}
|
|
@@ -30685,7 +30677,7 @@ function hasColumn52(db, table, column) {
|
|
|
30685
30677
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
30686
30678
|
return rows.some((r3) => r3.name === column);
|
|
30687
30679
|
}
|
|
30688
|
-
function
|
|
30680
|
+
function up1210(db) {
|
|
30689
30681
|
db.exec(`
|
|
30690
30682
|
CREATE TABLE IF NOT EXISTS documents (
|
|
30691
30683
|
id TEXT PRIMARY KEY,
|
|
@@ -30742,7 +30734,7 @@ function up1110(db) {
|
|
|
30742
30734
|
db.exec("ALTER TABLE memory_jobs ADD COLUMN document_id TEXT");
|
|
30743
30735
|
}
|
|
30744
30736
|
}
|
|
30745
|
-
function
|
|
30737
|
+
function up1310(db) {
|
|
30746
30738
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='embeddings'").all();
|
|
30747
30739
|
if (tables.length === 0)
|
|
30748
30740
|
return;
|
|
@@ -30759,7 +30751,7 @@ function up1210(db) {
|
|
|
30759
30751
|
ON embeddings(content_hash)
|
|
30760
30752
|
`);
|
|
30761
30753
|
}
|
|
30762
|
-
function
|
|
30754
|
+
function up1410(db) {
|
|
30763
30755
|
db.exec(`
|
|
30764
30756
|
CREATE TABLE IF NOT EXISTS summary_jobs (
|
|
30765
30757
|
id TEXT PRIMARY KEY,
|
|
@@ -30779,7 +30771,7 @@ function up1310(db) {
|
|
|
30779
30771
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_summary_jobs_status
|
|
30780
30772
|
ON summary_jobs(status)`);
|
|
30781
30773
|
}
|
|
30782
|
-
function
|
|
30774
|
+
function up1510(db) {
|
|
30783
30775
|
db.exec(`
|
|
30784
30776
|
CREATE TABLE IF NOT EXISTS umap_cache (
|
|
30785
30777
|
id INTEGER PRIMARY KEY,
|
|
@@ -30790,7 +30782,7 @@ function up1410(db) {
|
|
|
30790
30782
|
)
|
|
30791
30783
|
`);
|
|
30792
30784
|
}
|
|
30793
|
-
function
|
|
30785
|
+
function up162(db) {
|
|
30794
30786
|
db.exec(`
|
|
30795
30787
|
CREATE TABLE IF NOT EXISTS session_scores (
|
|
30796
30788
|
id TEXT PRIMARY KEY,
|
|
@@ -30810,7 +30802,7 @@ function up1510(db) {
|
|
|
30810
30802
|
ON session_scores(session_key);
|
|
30811
30803
|
`);
|
|
30812
30804
|
}
|
|
30813
|
-
function
|
|
30805
|
+
function up172(db) {
|
|
30814
30806
|
db.exec(`
|
|
30815
30807
|
CREATE TABLE IF NOT EXISTS scheduled_tasks (
|
|
30816
30808
|
id TEXT PRIMARY KEY,
|
|
@@ -30851,7 +30843,7 @@ function addColumnIfMissing62(db, table, column, definition) {
|
|
|
30851
30843
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
30852
30844
|
}
|
|
30853
30845
|
}
|
|
30854
|
-
function
|
|
30846
|
+
function up182(db) {
|
|
30855
30847
|
db.exec(`
|
|
30856
30848
|
CREATE TABLE IF NOT EXISTS ingestion_jobs (
|
|
30857
30849
|
id TEXT PRIMARY KEY,
|
|
@@ -30877,7 +30869,7 @@ function up172(db) {
|
|
|
30877
30869
|
addColumnIfMissing62(db, "memories", "source_path", "TEXT");
|
|
30878
30870
|
addColumnIfMissing62(db, "memories", "source_section", "TEXT");
|
|
30879
30871
|
}
|
|
30880
|
-
function
|
|
30872
|
+
function up192(db) {
|
|
30881
30873
|
db.exec(`
|
|
30882
30874
|
CREATE TABLE IF NOT EXISTS telemetry_events (
|
|
30883
30875
|
id TEXT PRIMARY KEY,
|
|
@@ -30902,7 +30894,7 @@ function addColumnIfMissing72(db, table, column, definition) {
|
|
|
30902
30894
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
30903
30895
|
}
|
|
30904
30896
|
}
|
|
30905
|
-
function
|
|
30897
|
+
function up202(db) {
|
|
30906
30898
|
db.exec(`
|
|
30907
30899
|
CREATE TABLE IF NOT EXISTS session_memories (
|
|
30908
30900
|
id TEXT PRIMARY KEY,
|
|
@@ -30929,7 +30921,7 @@ function up192(db) {
|
|
|
30929
30921
|
addColumnIfMissing72(db, "session_scores", "confidence", "REAL");
|
|
30930
30922
|
addColumnIfMissing72(db, "session_scores", "continuity_reasoning", "TEXT");
|
|
30931
30923
|
}
|
|
30932
|
-
function
|
|
30924
|
+
function up212(db) {
|
|
30933
30925
|
db.exec(`
|
|
30934
30926
|
CREATE TABLE IF NOT EXISTS session_checkpoints (
|
|
30935
30927
|
id TEXT PRIMARY KEY,
|
|
@@ -30951,7 +30943,7 @@ function up202(db) {
|
|
|
30951
30943
|
ON session_checkpoints(project_normalized, created_at DESC);
|
|
30952
30944
|
`);
|
|
30953
30945
|
}
|
|
30954
|
-
function
|
|
30946
|
+
function up222(db) {
|
|
30955
30947
|
const cols = db.prepare("PRAGMA table_info(scheduled_tasks)").all();
|
|
30956
30948
|
const colNames = new Set(cols.flatMap((c3) => typeof c3.name === "string" ? [c3.name] : []));
|
|
30957
30949
|
if (!colNames.has("skill_name")) {
|
|
@@ -30962,7 +30954,7 @@ function up212(db) {
|
|
|
30962
30954
|
CHECK (skill_mode IN ('inject', 'slash') OR skill_mode IS NULL)`);
|
|
30963
30955
|
}
|
|
30964
30956
|
}
|
|
30965
|
-
function
|
|
30957
|
+
function up232(db) {
|
|
30966
30958
|
const existing = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='skill_meta'").get();
|
|
30967
30959
|
if (existing)
|
|
30968
30960
|
return;
|
|
@@ -30994,7 +30986,7 @@ function up222(db) {
|
|
|
30994
30986
|
CREATE INDEX idx_skill_meta_source ON skill_meta(source);
|
|
30995
30987
|
`);
|
|
30996
30988
|
}
|
|
30997
|
-
function
|
|
30989
|
+
function up242(db) {
|
|
30998
30990
|
const entityCols = db.prepare("PRAGMA table_info(entities)").all();
|
|
30999
30991
|
const entityColNames = new Set(entityCols.flatMap((c3) => typeof c3.name === "string" ? [c3.name] : []));
|
|
31000
30992
|
if (!entityColNames.has("agent_id")) {
|
|
@@ -31079,13 +31071,13 @@ function addColumnIfMissing82(db, table, column, definition) {
|
|
|
31079
31071
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
31080
31072
|
}
|
|
31081
31073
|
}
|
|
31082
|
-
function
|
|
31074
|
+
function up252(db) {
|
|
31083
31075
|
addColumnIfMissing82(db, "session_memories", "entity_slot", "INTEGER");
|
|
31084
31076
|
addColumnIfMissing82(db, "session_memories", "aspect_slot", "INTEGER");
|
|
31085
31077
|
addColumnIfMissing82(db, "session_memories", "is_constraint", "INTEGER NOT NULL DEFAULT 0");
|
|
31086
31078
|
addColumnIfMissing82(db, "session_memories", "structural_density", "INTEGER");
|
|
31087
31079
|
}
|
|
31088
|
-
function
|
|
31080
|
+
function up262(db) {
|
|
31089
31081
|
const columns = db.prepare("PRAGMA table_info(session_checkpoints)").all();
|
|
31090
31082
|
const columnNames = new Set(columns.flatMap((column) => typeof column.name === "string" ? [column.name] : []));
|
|
31091
31083
|
if (!columnNames.has("focal_entity_ids")) {
|
|
@@ -31110,25 +31102,25 @@ function addColumnIfMissing92(db, table, column, definition) {
|
|
|
31110
31102
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
31111
31103
|
}
|
|
31112
31104
|
}
|
|
31113
|
-
function
|
|
31105
|
+
function up272(db) {
|
|
31114
31106
|
addColumnIfMissing92(db, "entities", "pinned", "INTEGER NOT NULL DEFAULT 0");
|
|
31115
31107
|
addColumnIfMissing92(db, "entities", "pinned_at", "TEXT");
|
|
31116
31108
|
db.exec("CREATE INDEX IF NOT EXISTS idx_entities_pinned ON entities(agent_id, pinned, pinned_at DESC)");
|
|
31117
31109
|
}
|
|
31118
|
-
function up272(_db) {}
|
|
31119
31110
|
function up282(_db) {}
|
|
31111
|
+
function up292(_db) {}
|
|
31120
31112
|
function addColumnIfMissing102(db, table, column, definition) {
|
|
31121
31113
|
const cols = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
31122
31114
|
if (!cols.some((c3) => c3.name === column)) {
|
|
31123
31115
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
31124
31116
|
}
|
|
31125
31117
|
}
|
|
31126
|
-
function
|
|
31118
|
+
function up302(db) {
|
|
31127
31119
|
addColumnIfMissing102(db, "session_memories", "agent_relevance_score", "REAL");
|
|
31128
31120
|
addColumnIfMissing102(db, "session_memories", "agent_feedback_count", "INTEGER DEFAULT 0");
|
|
31129
31121
|
}
|
|
31130
|
-
function
|
|
31131
|
-
function
|
|
31122
|
+
function up312(_db) {}
|
|
31123
|
+
function up322(db) {
|
|
31132
31124
|
db.exec(`
|
|
31133
31125
|
UPDATE entities
|
|
31134
31126
|
SET canonical_name = REPLACE(REPLACE(REPLACE(
|
|
@@ -31137,7 +31129,7 @@ function up312(db) {
|
|
|
31137
31129
|
WHERE canonical_name IS NULL
|
|
31138
31130
|
`);
|
|
31139
31131
|
}
|
|
31140
|
-
function
|
|
31132
|
+
function up332(db) {
|
|
31141
31133
|
db.exec(`
|
|
31142
31134
|
CREATE TABLE IF NOT EXISTS memories_cold (
|
|
31143
31135
|
archive_id TEXT PRIMARY KEY,
|
|
@@ -31174,7 +31166,7 @@ function up322(db) {
|
|
|
31174
31166
|
CREATE INDEX IF NOT EXISTS idx_cold_source ON memories_cold(cold_source_id);
|
|
31175
31167
|
`);
|
|
31176
31168
|
}
|
|
31177
|
-
function
|
|
31169
|
+
function up342(db) {
|
|
31178
31170
|
db.exec(`
|
|
31179
31171
|
CREATE TABLE IF NOT EXISTS session_summaries (
|
|
31180
31172
|
id TEXT PRIMARY KEY,
|
|
@@ -31219,7 +31211,7 @@ function up332(db) {
|
|
|
31219
31211
|
WHERE session_key IS NOT NULL;
|
|
31220
31212
|
`);
|
|
31221
31213
|
}
|
|
31222
|
-
function
|
|
31214
|
+
function up352(db) {
|
|
31223
31215
|
db.exec(`
|
|
31224
31216
|
CREATE TABLE IF NOT EXISTS memory_jobs_new (
|
|
31225
31217
|
id TEXT PRIMARY KEY,
|
|
@@ -31264,7 +31256,7 @@ function up342(db) {
|
|
|
31264
31256
|
ON memory_jobs(failed_at);
|
|
31265
31257
|
`);
|
|
31266
31258
|
}
|
|
31267
|
-
function
|
|
31259
|
+
function up362(db) {
|
|
31268
31260
|
const depCols = db.prepare("PRAGMA table_info(entity_dependencies)").all();
|
|
31269
31261
|
if (!depCols.some((c3) => c3.name === "reason")) {
|
|
31270
31262
|
db.exec("ALTER TABLE entity_dependencies ADD COLUMN reason TEXT");
|
|
@@ -31274,7 +31266,7 @@ function up352(db) {
|
|
|
31274
31266
|
db.exec("ALTER TABLE entities ADD COLUMN last_synthesized_at TEXT");
|
|
31275
31267
|
}
|
|
31276
31268
|
}
|
|
31277
|
-
function
|
|
31269
|
+
function up372(db) {
|
|
31278
31270
|
const cols = db.prepare("PRAGMA table_info(embeddings)").all();
|
|
31279
31271
|
if (cols.length === 0)
|
|
31280
31272
|
return;
|
|
@@ -31282,14 +31274,14 @@ function up362(db) {
|
|
|
31282
31274
|
db.exec("ALTER TABLE embeddings ADD COLUMN vector BLOB");
|
|
31283
31275
|
}
|
|
31284
31276
|
}
|
|
31285
|
-
function
|
|
31277
|
+
function up382(db) {
|
|
31286
31278
|
const cols = db.prepare("PRAGMA table_info(memories)").all();
|
|
31287
31279
|
if (!cols.some((c3) => c3.name === "scope")) {
|
|
31288
31280
|
db.exec("ALTER TABLE memories ADD COLUMN scope TEXT DEFAULT NULL");
|
|
31289
31281
|
}
|
|
31290
31282
|
db.exec("CREATE INDEX IF NOT EXISTS idx_memories_scope ON memories(scope) WHERE scope IS NOT NULL");
|
|
31291
31283
|
}
|
|
31292
|
-
function
|
|
31284
|
+
function up392(db) {
|
|
31293
31285
|
db.exec("DROP INDEX IF EXISTS idx_memories_content_hash_unique");
|
|
31294
31286
|
db.exec(`
|
|
31295
31287
|
CREATE UNIQUE INDEX idx_memories_content_hash_unique
|
|
@@ -31297,7 +31289,7 @@ function up382(db) {
|
|
|
31297
31289
|
WHERE content_hash IS NOT NULL AND is_deleted = 0
|
|
31298
31290
|
`);
|
|
31299
31291
|
}
|
|
31300
|
-
function
|
|
31292
|
+
function up402(db) {
|
|
31301
31293
|
db.exec(`
|
|
31302
31294
|
CREATE VIRTUAL TABLE IF NOT EXISTS entities_fts USING fts5(
|
|
31303
31295
|
name, canonical_name,
|
|
@@ -31329,13 +31321,13 @@ function up392(db) {
|
|
|
31329
31321
|
END
|
|
31330
31322
|
`);
|
|
31331
31323
|
}
|
|
31332
|
-
function
|
|
31324
|
+
function up412(db) {
|
|
31333
31325
|
const cols = db.prepare("PRAGMA table_info(entity_dependencies)").all();
|
|
31334
31326
|
if (!cols.some((c3) => c3.name === "confidence")) {
|
|
31335
31327
|
db.exec("ALTER TABLE entity_dependencies ADD COLUMN confidence REAL DEFAULT 0.7");
|
|
31336
31328
|
}
|
|
31337
31329
|
}
|
|
31338
|
-
function
|
|
31330
|
+
function up422(db) {
|
|
31339
31331
|
db.exec(`
|
|
31340
31332
|
CREATE TABLE IF NOT EXISTS entity_communities (
|
|
31341
31333
|
id TEXT PRIMARY KEY,
|
|
@@ -31353,7 +31345,7 @@ function up412(db) {
|
|
|
31353
31345
|
db.exec("ALTER TABLE entities ADD COLUMN community_id TEXT REFERENCES entity_communities(id)");
|
|
31354
31346
|
}
|
|
31355
31347
|
}
|
|
31356
|
-
function
|
|
31348
|
+
function up432(db) {
|
|
31357
31349
|
db.exec(`
|
|
31358
31350
|
CREATE TABLE IF NOT EXISTS memory_hints (
|
|
31359
31351
|
id TEXT PRIMARY KEY,
|
|
@@ -31393,7 +31385,7 @@ function up422(db) {
|
|
|
31393
31385
|
END
|
|
31394
31386
|
`);
|
|
31395
31387
|
}
|
|
31396
|
-
function
|
|
31388
|
+
function up442(db) {
|
|
31397
31389
|
db.exec(`
|
|
31398
31390
|
DELETE FROM entity_dependencies
|
|
31399
31391
|
WHERE id NOT IN (
|
|
@@ -31411,7 +31403,7 @@ function up432(db) {
|
|
|
31411
31403
|
)
|
|
31412
31404
|
`);
|
|
31413
31405
|
}
|
|
31414
|
-
function
|
|
31406
|
+
function up452(db) {
|
|
31415
31407
|
db.exec(`
|
|
31416
31408
|
CREATE TABLE IF NOT EXISTS session_transcripts (
|
|
31417
31409
|
session_key TEXT PRIMARY KEY,
|
|
@@ -31434,7 +31426,7 @@ function addColumnIfMissing112(db, table, column, definition) {
|
|
|
31434
31426
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
31435
31427
|
}
|
|
31436
31428
|
}
|
|
31437
|
-
function
|
|
31429
|
+
function up462(db) {
|
|
31438
31430
|
addColumnIfMissing112(db, "session_memories", "path_json", "TEXT");
|
|
31439
31431
|
db.exec(`
|
|
31440
31432
|
CREATE TABLE IF NOT EXISTS path_feedback_events (
|
|
@@ -31509,7 +31501,7 @@ function addColumnIfMissing122(db, table, column, definition) {
|
|
|
31509
31501
|
return;
|
|
31510
31502
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
31511
31503
|
}
|
|
31512
|
-
function
|
|
31504
|
+
function up472(db) {
|
|
31513
31505
|
addColumnIfMissing122(db, "session_memories", "entity_slot", "INTEGER");
|
|
31514
31506
|
addColumnIfMissing122(db, "session_memories", "aspect_slot", "INTEGER");
|
|
31515
31507
|
addColumnIfMissing122(db, "session_memories", "is_constraint", "INTEGER NOT NULL DEFAULT 0");
|
|
@@ -31597,7 +31589,7 @@ function addColumnIfMissing132(db, table, column, definition) {
|
|
|
31597
31589
|
return;
|
|
31598
31590
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
31599
31591
|
}
|
|
31600
|
-
function
|
|
31592
|
+
function up482(db) {
|
|
31601
31593
|
db.exec(`
|
|
31602
31594
|
CREATE TABLE IF NOT EXISTS agents (
|
|
31603
31595
|
id TEXT PRIMARY KEY,
|
|
@@ -31626,7 +31618,7 @@ function addColumnIfMissing142(db, table, column, definition) {
|
|
|
31626
31618
|
return;
|
|
31627
31619
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
31628
31620
|
}
|
|
31629
|
-
function
|
|
31621
|
+
function up492(db) {
|
|
31630
31622
|
addColumnIfMissing142(db, "session_summaries", "source_type", "TEXT");
|
|
31631
31623
|
addColumnIfMissing142(db, "session_summaries", "source_ref", "TEXT");
|
|
31632
31624
|
addColumnIfMissing142(db, "session_summaries", "meta_json", "TEXT");
|
|
@@ -31652,7 +31644,7 @@ function addColumnIfMissing152(db, table, column, definition) {
|
|
|
31652
31644
|
return;
|
|
31653
31645
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
31654
31646
|
}
|
|
31655
|
-
function
|
|
31647
|
+
function up502(db) {
|
|
31656
31648
|
addColumnIfMissing152(db, "session_transcripts", "updated_at", "TEXT");
|
|
31657
31649
|
addColumnIfMissing152(db, "summary_jobs", "agent_id", "TEXT NOT NULL DEFAULT 'default'");
|
|
31658
31650
|
addColumnIfMissing152(db, "session_scores", "agent_id", "TEXT NOT NULL DEFAULT 'default'");
|
|
@@ -31723,7 +31715,7 @@ function up492(db) {
|
|
|
31723
31715
|
ON memory_md_heads(lease_expires_at);
|
|
31724
31716
|
`);
|
|
31725
31717
|
}
|
|
31726
|
-
function
|
|
31718
|
+
function up512(db) {
|
|
31727
31719
|
db.exec(`
|
|
31728
31720
|
DROP INDEX IF EXISTS idx_summaries_session_depth;
|
|
31729
31721
|
|
|
@@ -31784,7 +31776,7 @@ function up502(db) {
|
|
|
31784
31776
|
AND COALESCE(source_type, 'summary') = 'summary';
|
|
31785
31777
|
`);
|
|
31786
31778
|
}
|
|
31787
|
-
function
|
|
31779
|
+
function up522(db) {
|
|
31788
31780
|
db.exec(`
|
|
31789
31781
|
DROP TRIGGER IF EXISTS session_transcripts_fts_ai;
|
|
31790
31782
|
DROP TRIGGER IF EXISTS session_transcripts_fts_ad;
|
|
@@ -31882,7 +31874,7 @@ function up512(db) {
|
|
|
31882
31874
|
AND COALESCE(source_type, 'summary') = 'summary';
|
|
31883
31875
|
`);
|
|
31884
31876
|
}
|
|
31885
|
-
function
|
|
31877
|
+
function up532(db) {
|
|
31886
31878
|
db.exec(`
|
|
31887
31879
|
CREATE TABLE IF NOT EXISTS memory_thread_heads (
|
|
31888
31880
|
agent_id TEXT NOT NULL DEFAULT 'default',
|
|
@@ -32000,7 +31992,7 @@ function up522(db) {
|
|
|
32000
31992
|
WHERE excluded.latest_at >= memory_thread_heads.latest_at;
|
|
32001
31993
|
`);
|
|
32002
31994
|
}
|
|
32003
|
-
function
|
|
31995
|
+
function up542(db) {
|
|
32004
31996
|
db.exec(`
|
|
32005
31997
|
CREATE TABLE IF NOT EXISTS session_extract_cursors (
|
|
32006
31998
|
session_key TEXT NOT NULL,
|
|
@@ -32017,7 +32009,7 @@ function hasTable5(db, name) {
|
|
|
32017
32009
|
WHERE type = 'table' AND name = ?
|
|
32018
32010
|
LIMIT 1`).get(name) !== undefined;
|
|
32019
32011
|
}
|
|
32020
|
-
function
|
|
32012
|
+
function up552(db) {
|
|
32021
32013
|
db.exec(`
|
|
32022
32014
|
CREATE TABLE IF NOT EXISTS entity_dependency_history (
|
|
32023
32015
|
id TEXT PRIMARY KEY,
|
|
@@ -32187,7 +32179,7 @@ function addColumnIfMissing162(db, table, column, definition) {
|
|
|
32187
32179
|
return;
|
|
32188
32180
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
32189
32181
|
}
|
|
32190
|
-
function
|
|
32182
|
+
function up562(db) {
|
|
32191
32183
|
addColumnIfMissing162(db, "summary_jobs", "session_id", "TEXT");
|
|
32192
32184
|
addColumnIfMissing162(db, "summary_jobs", "trigger", "TEXT NOT NULL DEFAULT 'session_end'");
|
|
32193
32185
|
addColumnIfMissing162(db, "summary_jobs", "captured_at", "TEXT");
|
|
@@ -32279,24 +32271,8 @@ function up552(db) {
|
|
|
32279
32271
|
VALUES ('rebuild');
|
|
32280
32272
|
`);
|
|
32281
32273
|
}
|
|
32282
|
-
function
|
|
32283
|
-
|
|
32284
|
-
CREATE TABLE IF NOT EXISTS mcp_invocations (
|
|
32285
|
-
id TEXT PRIMARY KEY,
|
|
32286
|
-
server_id TEXT NOT NULL,
|
|
32287
|
-
tool_name TEXT NOT NULL,
|
|
32288
|
-
agent_id TEXT NOT NULL DEFAULT 'default',
|
|
32289
|
-
source TEXT NOT NULL CHECK(source IN ('cli','agent','mcp','dashboard')),
|
|
32290
|
-
latency_ms INTEGER NOT NULL,
|
|
32291
|
-
success INTEGER NOT NULL DEFAULT 1,
|
|
32292
|
-
error_text TEXT,
|
|
32293
|
-
created_at TEXT NOT NULL DEFAULT (datetime('now'))
|
|
32294
|
-
);
|
|
32295
|
-
CREATE INDEX IF NOT EXISTS idx_mcp_inv_server ON mcp_invocations(server_id, created_at);
|
|
32296
|
-
CREATE INDEX IF NOT EXISTS idx_mcp_inv_agent ON mcp_invocations(agent_id, created_at);
|
|
32297
|
-
`);
|
|
32298
|
-
}
|
|
32299
|
-
function up572(db) {
|
|
32274
|
+
function up572(_db) {}
|
|
32275
|
+
function up582(db) {
|
|
32300
32276
|
db.exec(`
|
|
32301
32277
|
CREATE TABLE IF NOT EXISTS skill_invocations (
|
|
32302
32278
|
id TEXT PRIMARY KEY,
|
|
@@ -32312,7 +32288,7 @@ function up572(db) {
|
|
|
32312
32288
|
CREATE INDEX IF NOT EXISTS idx_skill_inv_agent ON skill_invocations(agent_id, created_at);
|
|
32313
32289
|
`);
|
|
32314
32290
|
}
|
|
32315
|
-
function
|
|
32291
|
+
function up592(db) {
|
|
32316
32292
|
db.exec(`
|
|
32317
32293
|
CREATE TABLE IF NOT EXISTS task_scope_hints (
|
|
32318
32294
|
task_id TEXT PRIMARY KEY REFERENCES scheduled_tasks(id) ON DELETE CASCADE,
|
|
@@ -32343,7 +32319,7 @@ function up582(db) {
|
|
|
32343
32319
|
ON task_scope_hints(agent_id, updated_at);
|
|
32344
32320
|
`);
|
|
32345
32321
|
}
|
|
32346
|
-
function
|
|
32322
|
+
function up602(db) {
|
|
32347
32323
|
db.exec(`
|
|
32348
32324
|
CREATE TABLE IF NOT EXISTS dreaming_state (
|
|
32349
32325
|
agent_id TEXT PRIMARY KEY NOT NULL,
|
|
@@ -32386,7 +32362,7 @@ function ensureMemoriesScopeColumns3(db) {
|
|
|
32386
32362
|
if (!names.has("scope"))
|
|
32387
32363
|
db.exec("ALTER TABLE memories ADD COLUMN scope TEXT");
|
|
32388
32364
|
}
|
|
32389
|
-
function
|
|
32365
|
+
function up612(db) {
|
|
32390
32366
|
ensureMemoriesScopeColumns3(db);
|
|
32391
32367
|
db.exec("DROP INDEX IF EXISTS idx_memories_content_hash_unique");
|
|
32392
32368
|
db.exec(`
|
|
@@ -32399,20 +32375,20 @@ function up602(db) {
|
|
|
32399
32375
|
WHERE content_hash IS NOT NULL AND is_deleted = 0
|
|
32400
32376
|
`);
|
|
32401
32377
|
}
|
|
32402
|
-
function
|
|
32378
|
+
function up622(db) {
|
|
32403
32379
|
const sql = readMemoriesFtsSql2(db);
|
|
32404
32380
|
if (sql !== null && !memoriesFtsNeedsTokenizerRepair2(sql))
|
|
32405
32381
|
return;
|
|
32406
32382
|
recreateMemoriesFts2(db);
|
|
32407
32383
|
}
|
|
32408
|
-
function
|
|
32384
|
+
function up632(db) {
|
|
32409
32385
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_entities_order
|
|
32410
32386
|
ON entities(agent_id, pinned DESC, pinned_at DESC, mentions DESC, updated_at DESC, name)`);
|
|
32411
32387
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_entities_extracted_mentions
|
|
32412
32388
|
ON entities(entity_type, mentions)
|
|
32413
32389
|
WHERE entity_type = 'extracted'`);
|
|
32414
32390
|
}
|
|
32415
|
-
function
|
|
32391
|
+
function up642(db) {
|
|
32416
32392
|
const cols = db.prepare("PRAGMA table_info(entity_attributes)").all();
|
|
32417
32393
|
if (!cols.some((col) => col.name === "claim_key")) {
|
|
32418
32394
|
db.exec("ALTER TABLE entity_attributes ADD COLUMN claim_key TEXT");
|
|
@@ -32421,7 +32397,7 @@ function up632(db) {
|
|
|
32421
32397
|
ON entity_attributes(agent_id, aspect_id, claim_key, status)
|
|
32422
32398
|
WHERE claim_key IS NOT NULL`);
|
|
32423
32399
|
}
|
|
32424
|
-
function
|
|
32400
|
+
function up652(db) {
|
|
32425
32401
|
const cols = db.prepare("PRAGMA table_info(entity_attributes)").all();
|
|
32426
32402
|
if (!cols.some((col) => col.name === "group_key")) {
|
|
32427
32403
|
db.exec("ALTER TABLE entity_attributes ADD COLUMN group_key TEXT");
|
|
@@ -32433,13 +32409,13 @@ function up642(db) {
|
|
|
32433
32409
|
ON entity_attributes(agent_id, aspect_id, group_key, claim_key, status)
|
|
32434
32410
|
WHERE claim_key IS NOT NULL`);
|
|
32435
32411
|
}
|
|
32436
|
-
function
|
|
32412
|
+
function up662(db) {
|
|
32437
32413
|
const cols = db.prepare("PRAGMA table_info(memory_artifacts)").all();
|
|
32438
32414
|
if (cols.some((col) => col.name === "source_mtime_ms"))
|
|
32439
32415
|
return;
|
|
32440
32416
|
db.exec("ALTER TABLE memory_artifacts ADD COLUMN source_mtime_ms REAL");
|
|
32441
32417
|
}
|
|
32442
|
-
function
|
|
32418
|
+
function up672(db) {
|
|
32443
32419
|
const cols = db.prepare("PRAGMA table_info(memory_artifacts)").all();
|
|
32444
32420
|
const names = new Set(cols.map((col) => col.name));
|
|
32445
32421
|
if (!names.has("is_deleted")) {
|
|
@@ -32453,7 +32429,7 @@ function up662(db) {
|
|
|
32453
32429
|
ON memory_artifacts(agent_id, is_deleted, deleted_at)
|
|
32454
32430
|
`);
|
|
32455
32431
|
}
|
|
32456
|
-
function
|
|
32432
|
+
function up682(db) {
|
|
32457
32433
|
db.exec("DROP TRIGGER IF EXISTS memories_au");
|
|
32458
32434
|
db.exec(`
|
|
32459
32435
|
CREATE TRIGGER IF NOT EXISTS memories_au AFTER UPDATE OF content ON memories BEGIN
|
|
@@ -32471,7 +32447,7 @@ function addColumnIfMissing172(db, table, column, definition) {
|
|
|
32471
32447
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
32472
32448
|
}
|
|
32473
32449
|
}
|
|
32474
|
-
function
|
|
32450
|
+
function up692(db) {
|
|
32475
32451
|
for (const table of ["entities", "entity_communities", "entity_attributes", "entity_dependencies"]) {
|
|
32476
32452
|
addColumnIfMissing172(db, table, "source_id", "TEXT");
|
|
32477
32453
|
addColumnIfMissing172(db, table, "source_kind", "TEXT");
|
|
@@ -32491,7 +32467,7 @@ function hasColumn72(db, table, column) {
|
|
|
32491
32467
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
32492
32468
|
return rows.some((row) => row.name === column);
|
|
32493
32469
|
}
|
|
32494
|
-
function
|
|
32470
|
+
function up702(db) {
|
|
32495
32471
|
if (!hasTable22(db, "embeddings"))
|
|
32496
32472
|
return;
|
|
32497
32473
|
if (!hasColumn72(db, "embeddings", "agent_id")) {
|
|
@@ -32499,7 +32475,7 @@ function up692(db) {
|
|
|
32499
32475
|
}
|
|
32500
32476
|
db.exec("CREATE INDEX IF NOT EXISTS idx_embeddings_agent_source ON embeddings(agent_id, source_type, source_id)");
|
|
32501
32477
|
}
|
|
32502
|
-
function
|
|
32478
|
+
function up712(db) {
|
|
32503
32479
|
db.exec(`
|
|
32504
32480
|
CREATE TABLE IF NOT EXISTS memory_search_telemetry (
|
|
32505
32481
|
id TEXT PRIMARY KEY,
|
|
@@ -32540,7 +32516,7 @@ function addColumnIfMissing182(db, table, column, definition) {
|
|
|
32540
32516
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
32541
32517
|
}
|
|
32542
32518
|
}
|
|
32543
|
-
function
|
|
32519
|
+
function up722(db) {
|
|
32544
32520
|
db.exec(`
|
|
32545
32521
|
CREATE TABLE IF NOT EXISTS ontology_proposals (
|
|
32546
32522
|
id TEXT PRIMARY KEY,
|
|
@@ -32583,7 +32559,7 @@ function up712(db) {
|
|
|
32583
32559
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_${table}_proposal ON ${table}(agent_id, proposal_id)`);
|
|
32584
32560
|
}
|
|
32585
32561
|
}
|
|
32586
|
-
function
|
|
32562
|
+
function up732(db) {
|
|
32587
32563
|
db.exec(`
|
|
32588
32564
|
CREATE TABLE IF NOT EXISTS daily_reflections (
|
|
32589
32565
|
id TEXT PRIMARY KEY,
|
|
@@ -32610,7 +32586,7 @@ function up722(db) {
|
|
|
32610
32586
|
WHERE content_key IS NOT NULL;
|
|
32611
32587
|
`);
|
|
32612
32588
|
}
|
|
32613
|
-
function
|
|
32589
|
+
function up742(db) {
|
|
32614
32590
|
const cols = db.prepare("PRAGMA table_info(daily_reflections)").all();
|
|
32615
32591
|
const colNames = new Set(cols.flatMap((c3) => typeof c3.name === "string" ? [c3.name] : []));
|
|
32616
32592
|
if (!colNames.has("content_key")) {
|
|
@@ -32647,7 +32623,7 @@ function backfillVersionRoots2(db) {
|
|
|
32647
32623
|
WHERE version_root_id IS NULL
|
|
32648
32624
|
`);
|
|
32649
32625
|
}
|
|
32650
|
-
function
|
|
32626
|
+
function up752(db) {
|
|
32651
32627
|
for (const table of ["entities", "entity_aspects", "entity_dependencies"]) {
|
|
32652
32628
|
addColumnIfMissing192(db, table, "status", "TEXT NOT NULL DEFAULT 'active'");
|
|
32653
32629
|
addColumnIfMissing192(db, table, "archived_at", "TEXT");
|
|
@@ -32682,7 +32658,7 @@ function up742(db) {
|
|
|
32682
32658
|
ON entity_aspects(agent_id, proposal_id);
|
|
32683
32659
|
`);
|
|
32684
32660
|
}
|
|
32685
|
-
function
|
|
32661
|
+
function up762(db) {
|
|
32686
32662
|
db.exec(`
|
|
32687
32663
|
CREATE TABLE IF NOT EXISTS epistemic_assertions (
|
|
32688
32664
|
id TEXT PRIMARY KEY,
|
|
@@ -32738,7 +32714,7 @@ function ensureMemoriesScopeColumns22(db) {
|
|
|
32738
32714
|
if (!names.has("runtime_path"))
|
|
32739
32715
|
db.exec("ALTER TABLE memories ADD COLUMN runtime_path TEXT");
|
|
32740
32716
|
}
|
|
32741
|
-
function
|
|
32717
|
+
function up772(db) {
|
|
32742
32718
|
ensureMemoriesScopeColumns22(db);
|
|
32743
32719
|
db.exec("DROP INDEX IF EXISTS idx_memories_idempotency_key");
|
|
32744
32720
|
db.exec(`
|
|
@@ -32752,7 +32728,7 @@ function up762(db) {
|
|
|
32752
32728
|
WHERE idempotency_key IS NOT NULL AND is_deleted = 0
|
|
32753
32729
|
`);
|
|
32754
32730
|
}
|
|
32755
|
-
function
|
|
32731
|
+
function up782(db) {
|
|
32756
32732
|
db.exec(`
|
|
32757
32733
|
CREATE TABLE IF NOT EXISTS session_context_epochs (
|
|
32758
32734
|
session_key TEXT NOT NULL,
|
|
@@ -32787,7 +32763,7 @@ function up772(db) {
|
|
|
32787
32763
|
ON session_recall_events(item_kind, item_id, created_at DESC);
|
|
32788
32764
|
`);
|
|
32789
32765
|
}
|
|
32790
|
-
function
|
|
32766
|
+
function up792(db) {
|
|
32791
32767
|
db.exec(`
|
|
32792
32768
|
CREATE TABLE IF NOT EXISTS aggregate_memory_sources (
|
|
32793
32769
|
aggregate_memory_id TEXT NOT NULL,
|
|
@@ -32806,7 +32782,7 @@ function addColumnIfMissing202(db, table, column, definition) {
|
|
|
32806
32782
|
return;
|
|
32807
32783
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
32808
32784
|
}
|
|
32809
|
-
function
|
|
32785
|
+
function up802(db) {
|
|
32810
32786
|
addColumnIfMissing202(db, "memory_artifacts", "source_id", "TEXT");
|
|
32811
32787
|
addColumnIfMissing202(db, "memory_artifacts", "source_root", "TEXT");
|
|
32812
32788
|
addColumnIfMissing202(db, "memory_artifacts", "source_external_id", "TEXT");
|
|
@@ -32819,7 +32795,7 @@ function up792(db) {
|
|
|
32819
32795
|
ON memory_artifacts(agent_id, source_id, source_root);
|
|
32820
32796
|
`);
|
|
32821
32797
|
}
|
|
32822
|
-
function
|
|
32798
|
+
function up812(db) {
|
|
32823
32799
|
db.exec(`
|
|
32824
32800
|
CREATE TABLE IF NOT EXISTS temporal_edges (
|
|
32825
32801
|
id TEXT PRIMARY KEY,
|
|
@@ -32842,7 +32818,7 @@ function up802(db) {
|
|
|
32842
32818
|
ON temporal_edges(agent_id, subject_type, subject_id);
|
|
32843
32819
|
`);
|
|
32844
32820
|
}
|
|
32845
|
-
function
|
|
32821
|
+
function up822(db) {
|
|
32846
32822
|
db.exec(`
|
|
32847
32823
|
CREATE TABLE IF NOT EXISTS entity_aliases (
|
|
32848
32824
|
id TEXT PRIMARY KEY,
|
|
@@ -32866,7 +32842,7 @@ function up812(db) {
|
|
|
32866
32842
|
ON entity_aliases(agent_id, canonical_alias, status);
|
|
32867
32843
|
`);
|
|
32868
32844
|
}
|
|
32869
|
-
function
|
|
32845
|
+
function up832(db) {
|
|
32870
32846
|
db.exec(`
|
|
32871
32847
|
CREATE TABLE IF NOT EXISTS api_keys (
|
|
32872
32848
|
id TEXT PRIMARY KEY,
|
|
@@ -32894,7 +32870,7 @@ function up822(db) {
|
|
|
32894
32870
|
ON api_keys(connector, harness);
|
|
32895
32871
|
`);
|
|
32896
32872
|
}
|
|
32897
|
-
function
|
|
32873
|
+
function up842(db) {
|
|
32898
32874
|
db.exec(`
|
|
32899
32875
|
CREATE TABLE IF NOT EXISTS transcript_capture_jobs (
|
|
32900
32876
|
id TEXT PRIMARY KEY,
|
|
@@ -32929,7 +32905,7 @@ function hasColumn102(db, table, column) {
|
|
|
32929
32905
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
32930
32906
|
return rows.some((row) => row.name === column);
|
|
32931
32907
|
}
|
|
32932
|
-
function
|
|
32908
|
+
function up852(db) {
|
|
32933
32909
|
if (!hasColumn102(db, "documents", "agent_id")) {
|
|
32934
32910
|
db.exec("ALTER TABLE documents ADD COLUMN agent_id TEXT NOT NULL DEFAULT 'default'");
|
|
32935
32911
|
}
|
|
@@ -33015,7 +32991,7 @@ function up842(db) {
|
|
|
33015
32991
|
db.exec("CREATE INDEX IF NOT EXISTS idx_documents_agent_project ON documents(agent_id, project)");
|
|
33016
32992
|
db.exec("CREATE INDEX IF NOT EXISTS idx_documents_source_scope ON documents(source_url, agent_id, project)");
|
|
33017
32993
|
}
|
|
33018
|
-
function
|
|
32994
|
+
function up862(db) {
|
|
33019
32995
|
db.exec(`
|
|
33020
32996
|
CREATE TABLE IF NOT EXISTS aggregate_evidence_sources (
|
|
33021
32997
|
aggregate_memory_id TEXT NOT NULL,
|
|
@@ -33037,7 +33013,7 @@ function hasColumn112(db, table, column) {
|
|
|
33037
33013
|
return rows.some((row) => row.name === column);
|
|
33038
33014
|
}
|
|
33039
33015
|
var COLUMNS3 = ["harness", "session_id", "tool_use_id", "cwd", "origin", "args"];
|
|
33040
|
-
function
|
|
33016
|
+
function up872(db) {
|
|
33041
33017
|
for (const column of COLUMNS3) {
|
|
33042
33018
|
if (!hasColumn112(db, "skill_invocations", column)) {
|
|
33043
33019
|
db.exec(`ALTER TABLE skill_invocations ADD COLUMN ${column} TEXT`);
|
|
@@ -33118,7 +33094,7 @@ function documentScopeColumnsPreservingExisting2(db) {
|
|
|
33118
33094
|
`);
|
|
33119
33095
|
}
|
|
33120
33096
|
try {
|
|
33121
|
-
|
|
33097
|
+
up852(db);
|
|
33122
33098
|
if (preserveAgentId) {
|
|
33123
33099
|
db.exec(`
|
|
33124
33100
|
UPDATE documents
|
|
@@ -33138,12 +33114,12 @@ function documentScopeColumnsPreservingExisting2(db) {
|
|
|
33138
33114
|
db.exec("DROP TABLE IF EXISTS temp.__signet_doc_project_guard");
|
|
33139
33115
|
}
|
|
33140
33116
|
}
|
|
33141
|
-
function
|
|
33142
|
-
|
|
33117
|
+
function up882(db) {
|
|
33118
|
+
up842(db);
|
|
33143
33119
|
if (hasTable32(db, "documents")) {
|
|
33144
33120
|
documentScopeColumnsPreservingExisting2(db);
|
|
33145
33121
|
}
|
|
33146
|
-
|
|
33122
|
+
up862(db);
|
|
33147
33123
|
addColumnIfMissing212(db, "memories", "superseded_by", "TEXT");
|
|
33148
33124
|
addColumnIfMissing212(db, "memories", "superseded_at", "TEXT");
|
|
33149
33125
|
addColumnIfMissing212(db, "memories", "superseded_reason", "TEXT");
|
|
@@ -33200,7 +33176,7 @@ function up872(db) {
|
|
|
33200
33176
|
AND ${sourceAgentId} = ${targetAgentId}
|
|
33201
33177
|
`);
|
|
33202
33178
|
}
|
|
33203
|
-
function
|
|
33179
|
+
function up892(db) {
|
|
33204
33180
|
db.exec(`
|
|
33205
33181
|
CREATE TABLE IF NOT EXISTS legacy_markdown_imports (
|
|
33206
33182
|
path TEXT PRIMARY KEY,
|
|
@@ -33230,7 +33206,7 @@ function up882(db) {
|
|
|
33230
33206
|
ON legacy_markdown_chunks(memory_id);
|
|
33231
33207
|
`);
|
|
33232
33208
|
}
|
|
33233
|
-
function
|
|
33209
|
+
function up902(db) {
|
|
33234
33210
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name IN ('relations', 'entity_dependencies')").all();
|
|
33235
33211
|
const tableNames = new Set(tables.map((r3) => String(r3.name)));
|
|
33236
33212
|
if (!tableNames.has("relations") || !tableNames.has("entity_dependencies"))
|
|
@@ -33289,7 +33265,7 @@ function addColumnIfMissing222(db, table, column, definition) {
|
|
|
33289
33265
|
return;
|
|
33290
33266
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
33291
33267
|
}
|
|
33292
|
-
function
|
|
33268
|
+
function up912(db) {
|
|
33293
33269
|
addColumnIfMissing222(db, "summary_jobs", "content_hash", "TEXT");
|
|
33294
33270
|
db.exec(`
|
|
33295
33271
|
CREATE INDEX IF NOT EXISTS idx_summary_jobs_agent_session_content_hash
|
|
@@ -33302,14 +33278,14 @@ function addColumnIfMissing232(db, table, column, definition) {
|
|
|
33302
33278
|
return;
|
|
33303
33279
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
33304
33280
|
}
|
|
33305
|
-
function
|
|
33281
|
+
function up922(db) {
|
|
33306
33282
|
addColumnIfMissing232(db, "summary_jobs", "boundary_reason", "TEXT");
|
|
33307
33283
|
db.exec(`
|
|
33308
33284
|
CREATE INDEX IF NOT EXISTS idx_summary_jobs_boundary_reason
|
|
33309
33285
|
ON summary_jobs(agent_id, session_key, boundary_reason)
|
|
33310
33286
|
`);
|
|
33311
33287
|
}
|
|
33312
|
-
function
|
|
33288
|
+
function up932(db) {
|
|
33313
33289
|
db.exec(`
|
|
33314
33290
|
CREATE TABLE IF NOT EXISTS transcript_recovery_files (
|
|
33315
33291
|
agent_id TEXT NOT NULL,
|
|
@@ -33327,7 +33303,7 @@ function up922(db) {
|
|
|
33327
33303
|
ON transcript_capture_jobs(agent_id, session_id, status);
|
|
33328
33304
|
`);
|
|
33329
33305
|
}
|
|
33330
|
-
function
|
|
33306
|
+
function up942(db) {
|
|
33331
33307
|
db.exec(`
|
|
33332
33308
|
CREATE TABLE IF NOT EXISTS job_cancellations (
|
|
33333
33309
|
id TEXT PRIMARY KEY,
|
|
@@ -33355,7 +33331,7 @@ function indexExists3(db, table, indexName) {
|
|
|
33355
33331
|
const rows = db.prepare(`PRAGMA index_list(${table})`).all();
|
|
33356
33332
|
return rows.some((row) => row.name === indexName);
|
|
33357
33333
|
}
|
|
33358
|
-
function
|
|
33334
|
+
function up952(db) {
|
|
33359
33335
|
db.exec(`
|
|
33360
33336
|
CREATE TABLE IF NOT EXISTS job_archive (
|
|
33361
33337
|
id TEXT PRIMARY KEY,
|
|
@@ -33382,7 +33358,7 @@ function indexExists22(db, table, indexName) {
|
|
|
33382
33358
|
const rows = db.prepare(`PRAGMA index_list(${table})`).all();
|
|
33383
33359
|
return rows.some((row) => row.name === indexName);
|
|
33384
33360
|
}
|
|
33385
|
-
function
|
|
33361
|
+
function up962(db) {
|
|
33386
33362
|
db.exec(`
|
|
33387
33363
|
CREATE TABLE IF NOT EXISTS embedding_index_state (
|
|
33388
33364
|
id INTEGER PRIMARY KEY CHECK (id = 1),
|
|
@@ -33395,7 +33371,7 @@ function up952(db) {
|
|
|
33395
33371
|
)
|
|
33396
33372
|
`);
|
|
33397
33373
|
}
|
|
33398
|
-
function
|
|
33374
|
+
function up972(db) {
|
|
33399
33375
|
db.exec(`
|
|
33400
33376
|
CREATE TABLE IF NOT EXISTS embeddings_staging (
|
|
33401
33377
|
id TEXT PRIMARY KEY,
|
|
@@ -33414,7 +33390,7 @@ function up962(db) {
|
|
|
33414
33390
|
ON embeddings_staging(agent_id, source_type, source_id);
|
|
33415
33391
|
`);
|
|
33416
33392
|
}
|
|
33417
|
-
function
|
|
33393
|
+
function up982(db) {
|
|
33418
33394
|
const columns = db.prepare("PRAGMA table_info(dreaming_state)").all();
|
|
33419
33395
|
if (!columns.some((column) => column.name === "evidence_cursor")) {
|
|
33420
33396
|
db.exec("ALTER TABLE dreaming_state ADD COLUMN evidence_cursor TEXT");
|
|
@@ -33425,7 +33401,7 @@ function hasColumn132(db, table, column) {
|
|
|
33425
33401
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
33426
33402
|
return rows.some((r3) => r3.name === column);
|
|
33427
33403
|
}
|
|
33428
|
-
function
|
|
33404
|
+
function up992(db) {
|
|
33429
33405
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name = 'memories'").all();
|
|
33430
33406
|
if (tables.length === 0)
|
|
33431
33407
|
return;
|
|
@@ -33450,23 +33426,23 @@ function up982(db) {
|
|
|
33450
33426
|
function hasColumn142(db, table, column) {
|
|
33451
33427
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
33452
33428
|
}
|
|
33453
|
-
function
|
|
33429
|
+
function up1002(db) {
|
|
33454
33430
|
const hasMemories = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'memories'").get();
|
|
33455
33431
|
if (!hasMemories || !hasColumn142(db, "memories", "memory_kind") || !hasColumn142(db, "memories", "type"))
|
|
33456
33432
|
return;
|
|
33457
33433
|
db.exec("UPDATE memories SET memory_kind = NULL WHERE type = 'session_summary'");
|
|
33458
33434
|
}
|
|
33459
|
-
function
|
|
33435
|
+
function up1012(db) {
|
|
33460
33436
|
db.exec("DROP TABLE IF EXISTS ingestion_jobs");
|
|
33461
33437
|
}
|
|
33462
|
-
function
|
|
33438
|
+
function up1022(db) {
|
|
33463
33439
|
const columns = db.prepare("PRAGMA table_info(dreaming_state)").all();
|
|
33464
33440
|
if (!columns.some((column) => column.name === "last_failure_at")) {
|
|
33465
33441
|
db.exec("ALTER TABLE dreaming_state ADD COLUMN last_failure_at TEXT");
|
|
33466
33442
|
}
|
|
33467
33443
|
db.exec("UPDATE dreaming_state SET last_failure_at = updated_at WHERE consecutive_failures > 0 AND last_failure_at IS NULL");
|
|
33468
33444
|
}
|
|
33469
|
-
function
|
|
33445
|
+
function up1032(db) {
|
|
33470
33446
|
db.exec(`
|
|
33471
33447
|
CREATE TABLE IF NOT EXISTS dreaming_evidence_exclusions (
|
|
33472
33448
|
agent_id TEXT NOT NULL,
|
|
@@ -33483,7 +33459,7 @@ function up1022(db) {
|
|
|
33483
33459
|
ON dreaming_evidence_exclusions (agent_id, resolved_at, requeue_requested_at, excluded_at DESC);
|
|
33484
33460
|
`);
|
|
33485
33461
|
}
|
|
33486
|
-
function
|
|
33462
|
+
function up1042(db) {
|
|
33487
33463
|
db.exec(`
|
|
33488
33464
|
CREATE TABLE IF NOT EXISTS dreaming_tool_calls (
|
|
33489
33465
|
id TEXT PRIMARY KEY,
|
|
@@ -33503,7 +33479,7 @@ function up1032(db) {
|
|
|
33503
33479
|
ON dreaming_tool_calls (agent_id, pass_id, sequence ASC);
|
|
33504
33480
|
`);
|
|
33505
33481
|
}
|
|
33506
|
-
function
|
|
33482
|
+
function up1052(db) {
|
|
33507
33483
|
const columns = db.prepare("PRAGMA table_info(dreaming_passes)").all();
|
|
33508
33484
|
if (!columns.some((column) => column.name === "evidence_window_json")) {
|
|
33509
33485
|
db.exec("ALTER TABLE dreaming_passes ADD COLUMN evidence_window_json TEXT");
|
|
@@ -33512,7 +33488,7 @@ function up1042(db) {
|
|
|
33512
33488
|
db.exec("ALTER TABLE dreaming_passes ADD COLUMN runbook_json TEXT");
|
|
33513
33489
|
}
|
|
33514
33490
|
}
|
|
33515
|
-
function
|
|
33491
|
+
function up1062(db) {
|
|
33516
33492
|
db.exec(`
|
|
33517
33493
|
CREATE TABLE IF NOT EXISTS dreaming_attention (
|
|
33518
33494
|
id TEXT PRIMARY KEY,
|
|
@@ -33534,7 +33510,7 @@ function up1052(db) {
|
|
|
33534
33510
|
function hasColumn152(db, table, column) {
|
|
33535
33511
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
33536
33512
|
}
|
|
33537
|
-
function
|
|
33513
|
+
function up1072(db) {
|
|
33538
33514
|
const requiredMemoryColumns = [
|
|
33539
33515
|
"content_hash",
|
|
33540
33516
|
"normalized_content",
|
|
@@ -33585,7 +33561,7 @@ function up1062(db) {
|
|
|
33585
33561
|
WHERE EXISTS (SELECT 1 FROM memory_entity_mentions WHERE entity_id = entities.id)
|
|
33586
33562
|
`);
|
|
33587
33563
|
}
|
|
33588
|
-
function
|
|
33564
|
+
function up1082(db) {
|
|
33589
33565
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name IN ('memories', 'entity_attributes')").all();
|
|
33590
33566
|
if (tables.length !== 2)
|
|
33591
33567
|
return;
|
|
@@ -33608,7 +33584,7 @@ function tableExists4(db, table) {
|
|
|
33608
33584
|
function hasColumn162(db, table, column) {
|
|
33609
33585
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
33610
33586
|
}
|
|
33611
|
-
function
|
|
33587
|
+
function up1092(db) {
|
|
33612
33588
|
db.exec(`
|
|
33613
33589
|
CREATE TABLE IF NOT EXISTS derived_memory_sources (
|
|
33614
33590
|
derived_memory_id TEXT NOT NULL,
|
|
@@ -33651,7 +33627,7 @@ function up1082(db) {
|
|
|
33651
33627
|
`);
|
|
33652
33628
|
}
|
|
33653
33629
|
}
|
|
33654
|
-
function
|
|
33630
|
+
function up1102(db) {
|
|
33655
33631
|
db.exec(`
|
|
33656
33632
|
DROP TRIGGER IF EXISTS entities_fts_ai;
|
|
33657
33633
|
DROP TRIGGER IF EXISTS entities_fts_ad;
|
|
@@ -33740,7 +33716,7 @@ function up1092(db) {
|
|
|
33740
33716
|
function hasColumn172(db, table, column) {
|
|
33741
33717
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
33742
33718
|
}
|
|
33743
|
-
function
|
|
33719
|
+
function up1112(db) {
|
|
33744
33720
|
if (!hasColumn172(db, "memories", "review_after")) {
|
|
33745
33721
|
db.exec("ALTER TABLE memories ADD COLUMN review_after TEXT;");
|
|
33746
33722
|
}
|
|
@@ -33756,14 +33732,14 @@ var TOKEN_COLUMNS2 = [
|
|
|
33756
33732
|
["tokens_cache_write", "INTEGER"],
|
|
33757
33733
|
["tokens_cost", "REAL"]
|
|
33758
33734
|
];
|
|
33759
|
-
function
|
|
33735
|
+
function up1122(db) {
|
|
33760
33736
|
for (const [column, type] of TOKEN_COLUMNS2) {
|
|
33761
33737
|
if (!hasColumn182(db, "dreaming_passes", column)) {
|
|
33762
33738
|
db.exec(`ALTER TABLE dreaming_passes ADD COLUMN ${column} ${type};`);
|
|
33763
33739
|
}
|
|
33764
33740
|
}
|
|
33765
33741
|
}
|
|
33766
|
-
function
|
|
33742
|
+
function up1132(db) {
|
|
33767
33743
|
db.exec(`
|
|
33768
33744
|
CREATE TABLE IF NOT EXISTS embedding_usage (
|
|
33769
33745
|
day TEXT NOT NULL,
|
|
@@ -33776,7 +33752,7 @@ function up1122(db) {
|
|
|
33776
33752
|
);
|
|
33777
33753
|
`);
|
|
33778
33754
|
}
|
|
33779
|
-
function
|
|
33755
|
+
function up1142(db) {
|
|
33780
33756
|
db.exec(`
|
|
33781
33757
|
CREATE TABLE IF NOT EXISTS telemetry_install (
|
|
33782
33758
|
id TEXT PRIMARY KEY,
|
|
@@ -33784,7 +33760,7 @@ function up1132(db) {
|
|
|
33784
33760
|
);
|
|
33785
33761
|
`);
|
|
33786
33762
|
}
|
|
33787
|
-
function
|
|
33763
|
+
function up1152(db) {
|
|
33788
33764
|
db.exec(`
|
|
33789
33765
|
CREATE INDEX IF NOT EXISTS idx_memory_entity_mentions_entity_memory
|
|
33790
33766
|
ON memory_entity_mentions(entity_id, memory_id);
|
|
@@ -33795,7 +33771,7 @@ function hasColumn192(db, table, column) {
|
|
|
33795
33771
|
return rows.some((row) => row.name === column);
|
|
33796
33772
|
}
|
|
33797
33773
|
var COLUMNS22 = ["first_remember_at", "first_recall_at"];
|
|
33798
|
-
function
|
|
33774
|
+
function up1162(db) {
|
|
33799
33775
|
for (const column of COLUMNS22) {
|
|
33800
33776
|
if (!hasColumn192(db, "telemetry_install", column)) {
|
|
33801
33777
|
db.exec(`ALTER TABLE telemetry_install ADD COLUMN ${column} TEXT`);
|
|
@@ -33811,7 +33787,7 @@ function addColumnIfMissing242(db, column, definition) {
|
|
|
33811
33787
|
db.exec(`ALTER TABLE telemetry_events ADD COLUMN ${column} ${definition}`);
|
|
33812
33788
|
}
|
|
33813
33789
|
}
|
|
33814
|
-
function
|
|
33790
|
+
function up1172(db) {
|
|
33815
33791
|
addColumnIfMissing242(db, "source", "TEXT NOT NULL DEFAULT 'daemon'");
|
|
33816
33792
|
addColumnIfMissing242(db, "claim_token", "TEXT");
|
|
33817
33793
|
addColumnIfMissing242(db, "claimed_at", "TEXT");
|
|
@@ -33820,7 +33796,7 @@ function up1162(db) {
|
|
|
33820
33796
|
ON telemetry_events(source, sent_to_posthog, claimed_at, timestamp);
|
|
33821
33797
|
`);
|
|
33822
33798
|
}
|
|
33823
|
-
function
|
|
33799
|
+
function up1182(db) {
|
|
33824
33800
|
db.exec(`
|
|
33825
33801
|
CREATE TABLE IF NOT EXISTS session_claims (
|
|
33826
33802
|
session_key TEXT NOT NULL,
|
|
@@ -33841,7 +33817,7 @@ function up1172(db) {
|
|
|
33841
33817
|
ON session_claims(agent_id, state, expires_at);
|
|
33842
33818
|
`);
|
|
33843
33819
|
}
|
|
33844
|
-
function
|
|
33820
|
+
function up1192(db) {
|
|
33845
33821
|
const table = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'entity_attributes'").get();
|
|
33846
33822
|
if (table == null)
|
|
33847
33823
|
return;
|
|
@@ -33850,7 +33826,7 @@ function up1182(db) {
|
|
|
33850
33826
|
ON entity_attributes(memory_id, agent_id, status, importance);
|
|
33851
33827
|
`);
|
|
33852
33828
|
}
|
|
33853
|
-
function
|
|
33829
|
+
function up1202(db) {
|
|
33854
33830
|
db.exec(`
|
|
33855
33831
|
CREATE TABLE IF NOT EXISTS cross_agent_messages (
|
|
33856
33832
|
id TEXT PRIMARY KEY,
|
|
@@ -33907,7 +33883,7 @@ function addColumnIfMissing252(db, column, definition) {
|
|
|
33907
33883
|
db.exec(`ALTER TABLE cross_agent_messages ADD COLUMN ${column} ${definition}`);
|
|
33908
33884
|
}
|
|
33909
33885
|
}
|
|
33910
|
-
function
|
|
33886
|
+
function up1212(db) {
|
|
33911
33887
|
const table = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'cross_agent_messages'").get();
|
|
33912
33888
|
if (table == null)
|
|
33913
33889
|
return;
|
|
@@ -34108,7 +34084,7 @@ function backfillTranscriptsFromSummaryJobs2(db) {
|
|
|
34108
34084
|
insert.run(...values);
|
|
34109
34085
|
}
|
|
34110
34086
|
}
|
|
34111
|
-
function
|
|
34087
|
+
function up1222(db) {
|
|
34112
34088
|
if (!hasTable42(db, "session_transcripts"))
|
|
34113
34089
|
return;
|
|
34114
34090
|
addColumnIfMissing262(db, "session_transcripts", "completed_at", "TEXT");
|
|
@@ -34161,7 +34137,7 @@ function up1212(db) {
|
|
|
34161
34137
|
ON session_transcripts(agent_id, content_hash);
|
|
34162
34138
|
`);
|
|
34163
34139
|
}
|
|
34164
|
-
function
|
|
34140
|
+
function up1232(db) {
|
|
34165
34141
|
db.exec(`
|
|
34166
34142
|
CREATE INDEX IF NOT EXISTS idx_memory_jobs_pressure_status
|
|
34167
34143
|
ON memory_jobs(status)
|
|
@@ -34180,12 +34156,12 @@ function up1222(db) {
|
|
|
34180
34156
|
function hasColumn222(db, table, column) {
|
|
34181
34157
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
34182
34158
|
}
|
|
34183
|
-
function
|
|
34159
|
+
function up1242(db) {
|
|
34184
34160
|
if (!hasColumn222(db, "telemetry_install", "last_seen_version")) {
|
|
34185
34161
|
db.exec("ALTER TABLE telemetry_install ADD COLUMN last_seen_version TEXT");
|
|
34186
34162
|
}
|
|
34187
34163
|
}
|
|
34188
|
-
function
|
|
34164
|
+
function up1252(db) {
|
|
34189
34165
|
db.exec(`
|
|
34190
34166
|
CREATE TABLE IF NOT EXISTS source_lifecycle_state (
|
|
34191
34167
|
agent_id TEXT NOT NULL,
|
|
@@ -34214,7 +34190,7 @@ function addColumnIfMissing272(db, column, definition) {
|
|
|
34214
34190
|
db.exec(`ALTER TABLE telemetry_events ADD COLUMN ${column} ${definition}`);
|
|
34215
34191
|
}
|
|
34216
34192
|
}
|
|
34217
|
-
function
|
|
34193
|
+
function up1262(db) {
|
|
34218
34194
|
addColumnIfMissing272(db, "delivery_attempts", "INTEGER NOT NULL DEFAULT 0");
|
|
34219
34195
|
addColumnIfMissing272(db, "last_attempt_at", "TEXT");
|
|
34220
34196
|
addColumnIfMissing272(db, "sent_at", "TEXT");
|
|
@@ -34235,7 +34211,7 @@ function up1252(db) {
|
|
|
34235
34211
|
VALUES (1, CURRENT_TIMESTAMP);
|
|
34236
34212
|
`);
|
|
34237
34213
|
}
|
|
34238
|
-
function
|
|
34214
|
+
function up1272(db) {
|
|
34239
34215
|
const columns = db.prepare("PRAGMA table_info(dreaming_evidence_exclusions)").all();
|
|
34240
34216
|
const names = new Set(columns.map((column) => column.name));
|
|
34241
34217
|
if (!names.has("failure_class")) {
|
|
@@ -34252,7 +34228,7 @@ function up1262(db) {
|
|
|
34252
34228
|
}
|
|
34253
34229
|
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)");
|
|
34254
34230
|
}
|
|
34255
|
-
function
|
|
34231
|
+
function up1282(db) {
|
|
34256
34232
|
db.exec(`
|
|
34257
34233
|
CREATE TABLE IF NOT EXISTS embedding_index_failures (
|
|
34258
34234
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
@@ -34276,7 +34252,7 @@ function up1272(db) {
|
|
|
34276
34252
|
ON embedding_index_failures(source_type, source_id);
|
|
34277
34253
|
`);
|
|
34278
34254
|
}
|
|
34279
|
-
function
|
|
34255
|
+
function up1292(db) {
|
|
34280
34256
|
db.exec(`
|
|
34281
34257
|
CREATE TABLE IF NOT EXISTS imported_source_lifecycle (
|
|
34282
34258
|
id TEXT PRIMARY KEY,
|
|
@@ -34326,7 +34302,7 @@ function backfillTable2(db, params) {
|
|
|
34326
34302
|
FROM ${params.table}${params.where ? ` WHERE ${params.where}` : ""}`).all();
|
|
34327
34303
|
backfill2(db, rows, params.sourceKind, params.scannedAt);
|
|
34328
34304
|
}
|
|
34329
|
-
function
|
|
34305
|
+
function up1302(db) {
|
|
34330
34306
|
db.exec(`
|
|
34331
34307
|
CREATE TABLE IF NOT EXISTS memory_content_safety (
|
|
34332
34308
|
agent_id TEXT NOT NULL,
|
|
@@ -34383,7 +34359,7 @@ function up1292(db) {
|
|
|
34383
34359
|
scannedAt
|
|
34384
34360
|
});
|
|
34385
34361
|
}
|
|
34386
|
-
function
|
|
34362
|
+
function up1312(db) {
|
|
34387
34363
|
const table = db.prepare("SELECT sql FROM sqlite_master WHERE type = 'table' AND name = 'dreaming_attention'").get();
|
|
34388
34364
|
if (!table)
|
|
34389
34365
|
return;
|
|
@@ -34417,7 +34393,7 @@ function up1302(db) {
|
|
|
34417
34393
|
ON dreaming_attention (agent_id, resolved_at, priority DESC, created_at ASC);
|
|
34418
34394
|
`);
|
|
34419
34395
|
}
|
|
34420
|
-
function
|
|
34396
|
+
function up1322(db) {
|
|
34421
34397
|
db.exec(`
|
|
34422
34398
|
CREATE TABLE IF NOT EXISTS ontology_contradictions (
|
|
34423
34399
|
id TEXT PRIMARY KEY,
|
|
@@ -34473,7 +34449,7 @@ function up1312(db) {
|
|
|
34473
34449
|
ON ontology_contradictions(agent_id, left_source_id, right_source_id);
|
|
34474
34450
|
`);
|
|
34475
34451
|
}
|
|
34476
|
-
function
|
|
34452
|
+
function up1332(db) {
|
|
34477
34453
|
db.exec(`
|
|
34478
34454
|
CREATE INDEX IF NOT EXISTS idx_memory_jobs_diagnostics_status_created_at
|
|
34479
34455
|
ON memory_jobs(status, created_at)
|
|
@@ -34488,7 +34464,7 @@ function up1322(db) {
|
|
|
34488
34464
|
function tableExists32(db, table) {
|
|
34489
34465
|
return db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = ?").get(table) != null;
|
|
34490
34466
|
}
|
|
34491
|
-
function
|
|
34467
|
+
function up1342(db) {
|
|
34492
34468
|
if (!tableExists32(db, "memory_jobs"))
|
|
34493
34469
|
return;
|
|
34494
34470
|
if (!tableExists32(db, "job_cancellations")) {
|
|
@@ -34537,7 +34513,7 @@ function up1332(db) {
|
|
|
34537
34513
|
AND status IN ('pending', 'leased');
|
|
34538
34514
|
`);
|
|
34539
34515
|
}
|
|
34540
|
-
function
|
|
34516
|
+
function up1352(db) {
|
|
34541
34517
|
db.exec(`
|
|
34542
34518
|
CREATE TABLE IF NOT EXISTS embedding_repair_budget (
|
|
34543
34519
|
id INTEGER PRIMARY KEY CHECK (id = 1),
|
|
@@ -34577,7 +34553,7 @@ function up1342(db) {
|
|
|
34577
34553
|
END;
|
|
34578
34554
|
`);
|
|
34579
34555
|
}
|
|
34580
|
-
function
|
|
34556
|
+
function up1362(db) {
|
|
34581
34557
|
db.exec(`
|
|
34582
34558
|
CREATE TABLE IF NOT EXISTS dreaming_evidence_consumption (
|
|
34583
34559
|
agent_id TEXT NOT NULL,
|
|
@@ -34600,13 +34576,13 @@ function up1352(db) {
|
|
|
34600
34576
|
ON dreaming_evidence_consumption(agent_id, pass_id, delivered_offset, source_length);
|
|
34601
34577
|
`);
|
|
34602
34578
|
}
|
|
34603
|
-
function
|
|
34579
|
+
function up1372(db) {
|
|
34604
34580
|
db.exec(`
|
|
34605
34581
|
CREATE INDEX IF NOT EXISTS idx_epistemic_assertions_observer_entity
|
|
34606
34582
|
ON epistemic_assertions(agent_id, subject_entity_id, status, asserted_at DESC, created_at DESC);
|
|
34607
34583
|
`);
|
|
34608
34584
|
}
|
|
34609
|
-
function
|
|
34585
|
+
function up1382(db) {
|
|
34610
34586
|
db.exec(`
|
|
34611
34587
|
CREATE TABLE IF NOT EXISTS memory_head_revisions (
|
|
34612
34588
|
id TEXT PRIMARY KEY,
|
|
@@ -34658,7 +34634,7 @@ function up1372(db) {
|
|
|
34658
34634
|
if (!names.has("format_version"))
|
|
34659
34635
|
db.exec("ALTER TABLE memory_md_heads ADD COLUMN format_version INTEGER NOT NULL DEFAULT 1");
|
|
34660
34636
|
}
|
|
34661
|
-
function
|
|
34637
|
+
function up1392(db) {
|
|
34662
34638
|
db.exec(`
|
|
34663
34639
|
CREATE TABLE memory_head_entries_v134 (
|
|
34664
34640
|
entry_id TEXT NOT NULL, agent_id TEXT NOT NULL, canonical_text TEXT NOT NULL,
|
|
@@ -34676,7 +34652,7 @@ function up1382(db) {
|
|
|
34676
34652
|
ON memory_head_entries(agent_id, entry_id, last_revision DESC);
|
|
34677
34653
|
`);
|
|
34678
34654
|
}
|
|
34679
|
-
function
|
|
34655
|
+
function up1402(db) {
|
|
34680
34656
|
db.exec(`
|
|
34681
34657
|
CREATE TABLE IF NOT EXISTS memory_head_publications (
|
|
34682
34658
|
agent_id TEXT NOT NULL,
|
|
@@ -34692,7 +34668,7 @@ function up1392(db) {
|
|
|
34692
34668
|
ON memory_head_publications(agent_id, status, revision DESC);
|
|
34693
34669
|
`);
|
|
34694
34670
|
}
|
|
34695
|
-
function
|
|
34671
|
+
function up1412(db) {
|
|
34696
34672
|
const cols = new Set(db.prepare("PRAGMA table_info(memory_head_revisions)").all().map((r3) => r3.name));
|
|
34697
34673
|
for (const [name, type] of [
|
|
34698
34674
|
["entry_id", "TEXT"],
|
|
@@ -34706,7 +34682,7 @@ function up1402(db) {
|
|
|
34706
34682
|
}
|
|
34707
34683
|
db.exec("CREATE UNIQUE INDEX IF NOT EXISTS idx_memory_head_revisions_entry ON memory_head_revisions(agent_id, revision, entry_id)");
|
|
34708
34684
|
}
|
|
34709
|
-
function
|
|
34685
|
+
function up1422(db) {
|
|
34710
34686
|
const cols = new Set(db.prepare("PRAGMA table_info(dreaming_passes)").all().map((r3) => r3.name));
|
|
34711
34687
|
for (const [name, type] of [
|
|
34712
34688
|
["head_revision", "INTEGER"],
|
|
@@ -34728,7 +34704,7 @@ function addColumnIfMissing282(db, table, column, definition) {
|
|
|
34728
34704
|
if (!hasColumn252(db, table, column))
|
|
34729
34705
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
34730
34706
|
}
|
|
34731
|
-
function
|
|
34707
|
+
function up1432(db) {
|
|
34732
34708
|
addColumnIfMissing282(db, "memories", "manual_override", "INTEGER DEFAULT 0");
|
|
34733
34709
|
db.exec(`
|
|
34734
34710
|
CREATE TABLE IF NOT EXISTS transcript_capture_status (
|
|
@@ -35033,7 +35009,7 @@ function up1422(db) {
|
|
|
35033
35009
|
GROUP BY j.agent_id;
|
|
35034
35010
|
`);
|
|
35035
35011
|
}
|
|
35036
|
-
function
|
|
35012
|
+
function up1442(db) {
|
|
35037
35013
|
db.exec(`
|
|
35038
35014
|
CREATE TABLE IF NOT EXISTS native_source_sync_state (
|
|
35039
35015
|
agent_id TEXT NOT NULL,
|
|
@@ -35049,7 +35025,7 @@ function up1432(db) {
|
|
|
35049
35025
|
ON native_source_sync_state(agent_id, status);
|
|
35050
35026
|
`);
|
|
35051
35027
|
}
|
|
35052
|
-
function
|
|
35028
|
+
function up1452(db) {
|
|
35053
35029
|
db.exec(`
|
|
35054
35030
|
CREATE TABLE IF NOT EXISTS transcript_recovery_frontiers (
|
|
35055
35031
|
agent_id TEXT NOT NULL,
|
|
@@ -35061,7 +35037,7 @@ function up1442(db) {
|
|
|
35061
35037
|
);
|
|
35062
35038
|
`);
|
|
35063
35039
|
}
|
|
35064
|
-
function
|
|
35040
|
+
function up1462(db) {
|
|
35065
35041
|
db.exec(`
|
|
35066
35042
|
CREATE TABLE IF NOT EXISTS source_sync_checkpoints (
|
|
35067
35043
|
agent_id TEXT NOT NULL,
|
|
@@ -35075,13 +35051,13 @@ function up1452(db) {
|
|
|
35075
35051
|
);
|
|
35076
35052
|
`);
|
|
35077
35053
|
}
|
|
35078
|
-
function
|
|
35054
|
+
function up1472(db) {
|
|
35079
35055
|
const columns = db.prepare("PRAGMA table_info(source_sync_checkpoints)").all();
|
|
35080
35056
|
if (!columns.some((column) => column.name === "frontier")) {
|
|
35081
35057
|
db.exec("ALTER TABLE source_sync_checkpoints ADD COLUMN frontier TEXT");
|
|
35082
35058
|
}
|
|
35083
35059
|
}
|
|
35084
|
-
function
|
|
35060
|
+
function up1482(db) {
|
|
35085
35061
|
const columns = new Set(db.prepare("PRAGMA table_info(embedding_index_state)").all().map((row) => row.name).filter((name) => typeof name === "string"));
|
|
35086
35062
|
const additions = [
|
|
35087
35063
|
["migration_phase", "TEXT"],
|
|
@@ -35116,13 +35092,13 @@ function up1472(db) {
|
|
|
35116
35092
|
`);
|
|
35117
35093
|
}
|
|
35118
35094
|
}
|
|
35119
|
-
function
|
|
35095
|
+
function up1492(db) {
|
|
35120
35096
|
const columns = new Set(db.prepare("PRAGMA table_info(memory_jobs)").all().map((row) => row.name).filter((name) => typeof name === "string"));
|
|
35121
35097
|
if (!columns.has("lease_token")) {
|
|
35122
35098
|
db.exec("ALTER TABLE memory_jobs ADD COLUMN lease_token TEXT");
|
|
35123
35099
|
}
|
|
35124
35100
|
}
|
|
35125
|
-
function
|
|
35101
|
+
function up1502(db) {
|
|
35126
35102
|
db.exec(`
|
|
35127
35103
|
CREATE TABLE IF NOT EXISTS dreaming_evidence_reviews (
|
|
35128
35104
|
agent_id TEXT NOT NULL,
|
|
@@ -35140,7 +35116,7 @@ function up1492(db) {
|
|
|
35140
35116
|
ON dreaming_evidence_reviews (agent_id, reviewed_at DESC);
|
|
35141
35117
|
`);
|
|
35142
35118
|
}
|
|
35143
|
-
function
|
|
35119
|
+
function up1512(db) {
|
|
35144
35120
|
db.exec(`
|
|
35145
35121
|
CREATE TABLE IF NOT EXISTS source_import_jobs (
|
|
35146
35122
|
id TEXT PRIMARY KEY, kind TEXT NOT NULL CHECK (kind = 'import'), agent_id TEXT NOT NULL,
|
|
@@ -35207,16 +35183,16 @@ function up1502(db) {
|
|
|
35207
35183
|
}
|
|
35208
35184
|
db.exec("CREATE INDEX IF NOT EXISTS idx_session_transcripts_agent_source ON session_transcripts(agent_id, source_id)");
|
|
35209
35185
|
}
|
|
35210
|
-
function
|
|
35186
|
+
function up1522(db) {
|
|
35211
35187
|
db.exec("CREATE INDEX IF NOT EXISTS idx_source_import_files_job_state ON source_import_files(job_id, state)");
|
|
35212
35188
|
}
|
|
35213
|
-
function
|
|
35189
|
+
function up1532(db) {
|
|
35214
35190
|
const columns = db.prepare("PRAGMA table_info(source_import_record_attempts)").all();
|
|
35215
35191
|
if (!columns.some((column) => column.name === "source_id")) {
|
|
35216
35192
|
db.exec("ALTER TABLE source_import_record_attempts ADD COLUMN source_id TEXT");
|
|
35217
35193
|
}
|
|
35218
35194
|
}
|
|
35219
|
-
function
|
|
35195
|
+
function up1542(db) {
|
|
35220
35196
|
const addColumn = (table, column, definition) => {
|
|
35221
35197
|
const statement = db.prepare("SELECT 1 AS found FROM pragma_table_info(?) WHERE name = ?");
|
|
35222
35198
|
let exists;
|
|
@@ -35237,7 +35213,7 @@ function addColumnIfMissing292(db, table, column, definition) {
|
|
|
35237
35213
|
if (!columns.some((row) => row.name === column))
|
|
35238
35214
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
35239
35215
|
}
|
|
35240
|
-
function
|
|
35216
|
+
function up1552(db) {
|
|
35241
35217
|
addColumnIfMissing292(db, "memory_md_heads", "is_current", "INTEGER NOT NULL DEFAULT 0");
|
|
35242
35218
|
addColumnIfMissing292(db, "dreaming_passes", "head_base_revision", "INTEGER");
|
|
35243
35219
|
db.exec("CREATE INDEX IF NOT EXISTS idx_memory_head_revisions_content_hash ON memory_head_revisions(content_hash)");
|
|
@@ -35387,7 +35363,7 @@ function up1542(db) {
|
|
|
35387
35363
|
`);
|
|
35388
35364
|
}
|
|
35389
35365
|
}
|
|
35390
|
-
function
|
|
35366
|
+
function up1562(db) {
|
|
35391
35367
|
db.exec(`
|
|
35392
35368
|
CREATE TABLE IF NOT EXISTS vector_repair_checkpoints (
|
|
35393
35369
|
operation TEXT NOT NULL CHECK (operation IN ('resync', 'clean-orphans')),
|
|
@@ -35412,7 +35388,7 @@ function up1552(db) {
|
|
|
35412
35388
|
ON vector_repair_checkpoints(status, updated_at);
|
|
35413
35389
|
`);
|
|
35414
35390
|
}
|
|
35415
|
-
function
|
|
35391
|
+
function up1572(db) {
|
|
35416
35392
|
db.exec(`
|
|
35417
35393
|
CREATE TABLE IF NOT EXISTS embedding_repair_checkpoints (
|
|
35418
35394
|
checkpoint_id TEXT PRIMARY KEY,
|
|
@@ -35433,7 +35409,7 @@ function up1562(db) {
|
|
|
35433
35409
|
ON embedding_repair_checkpoints(status, updated_at);
|
|
35434
35410
|
`);
|
|
35435
35411
|
}
|
|
35436
|
-
function
|
|
35412
|
+
function up1582(db) {
|
|
35437
35413
|
const columns = new Set(db.prepare("PRAGMA table_info(embedding_repair_checkpoints)").all().map((row) => row.name));
|
|
35438
35414
|
if (!columns.has("profile_fingerprint")) {
|
|
35439
35415
|
db.exec("ALTER TABLE embedding_repair_checkpoints ADD COLUMN profile_fingerprint TEXT");
|
|
@@ -35448,7 +35424,7 @@ function up1572(db) {
|
|
|
35448
35424
|
);
|
|
35449
35425
|
`);
|
|
35450
35426
|
}
|
|
35451
|
-
function
|
|
35427
|
+
function up1592(db) {
|
|
35452
35428
|
db.exec(`
|
|
35453
35429
|
CREATE INDEX IF NOT EXISTS idx_memories_agent_kind
|
|
35454
35430
|
ON memories(agent_id, memory_kind);
|
|
@@ -35458,13 +35434,13 @@ var MIGRATIONS2 = [
|
|
|
35458
35434
|
{
|
|
35459
35435
|
version: 1,
|
|
35460
35436
|
name: "baseline",
|
|
35461
|
-
up:
|
|
35437
|
+
up: up610,
|
|
35462
35438
|
artifacts: { tables: ["memories", "conversations", "embeddings"] }
|
|
35463
35439
|
},
|
|
35464
35440
|
{
|
|
35465
35441
|
version: 2,
|
|
35466
35442
|
name: "pipeline-v2",
|
|
35467
|
-
up:
|
|
35443
|
+
up: up710,
|
|
35468
35444
|
artifacts: {
|
|
35469
35445
|
tables: ["memory_history", "memory_jobs", "entities", "relations", "memory_entity_mentions"]
|
|
35470
35446
|
}
|
|
@@ -35472,12 +35448,12 @@ var MIGRATIONS2 = [
|
|
|
35472
35448
|
{
|
|
35473
35449
|
version: 3,
|
|
35474
35450
|
name: "unique-content-hash",
|
|
35475
|
-
up:
|
|
35451
|
+
up: up810
|
|
35476
35452
|
},
|
|
35477
35453
|
{
|
|
35478
35454
|
version: 4,
|
|
35479
35455
|
name: "history-actor-and-retention",
|
|
35480
|
-
up:
|
|
35456
|
+
up: up910,
|
|
35481
35457
|
artifacts: {
|
|
35482
35458
|
columns: [{ table: "memory_history", column: "actor_type" }]
|
|
35483
35459
|
}
|
|
@@ -35485,7 +35461,7 @@ var MIGRATIONS2 = [
|
|
|
35485
35461
|
{
|
|
35486
35462
|
version: 5,
|
|
35487
35463
|
name: "graph-extended",
|
|
35488
|
-
up:
|
|
35464
|
+
up: up1010,
|
|
35489
35465
|
artifacts: {
|
|
35490
35466
|
columns: [{ table: "entities", column: "canonical_name" }]
|
|
35491
35467
|
}
|
|
@@ -35493,7 +35469,7 @@ var MIGRATIONS2 = [
|
|
|
35493
35469
|
{
|
|
35494
35470
|
version: 6,
|
|
35495
35471
|
name: "idempotency-key",
|
|
35496
|
-
up:
|
|
35472
|
+
up: up1110,
|
|
35497
35473
|
artifacts: {
|
|
35498
35474
|
columns: [{ table: "memories", column: "idempotency_key" }]
|
|
35499
35475
|
}
|
|
@@ -35501,42 +35477,42 @@ var MIGRATIONS2 = [
|
|
|
35501
35477
|
{
|
|
35502
35478
|
version: 7,
|
|
35503
35479
|
name: "documents-and-connectors",
|
|
35504
|
-
up:
|
|
35480
|
+
up: up1210,
|
|
35505
35481
|
artifacts: { tables: ["documents", "document_memories", "connectors"] }
|
|
35506
35482
|
},
|
|
35507
35483
|
{
|
|
35508
35484
|
version: 8,
|
|
35509
35485
|
name: "embeddings-unique-hash",
|
|
35510
|
-
up:
|
|
35486
|
+
up: up1310
|
|
35511
35487
|
},
|
|
35512
35488
|
{
|
|
35513
35489
|
version: 9,
|
|
35514
35490
|
name: "summary-jobs",
|
|
35515
|
-
up:
|
|
35491
|
+
up: up1410,
|
|
35516
35492
|
artifacts: { tables: ["summary_jobs"] }
|
|
35517
35493
|
},
|
|
35518
35494
|
{
|
|
35519
35495
|
version: 10,
|
|
35520
35496
|
name: "umap-cache",
|
|
35521
|
-
up:
|
|
35497
|
+
up: up1510,
|
|
35522
35498
|
artifacts: { tables: ["umap_cache"] }
|
|
35523
35499
|
},
|
|
35524
35500
|
{
|
|
35525
35501
|
version: 11,
|
|
35526
35502
|
name: "session-scores",
|
|
35527
|
-
up:
|
|
35503
|
+
up: up162,
|
|
35528
35504
|
artifacts: { tables: ["session_scores"] }
|
|
35529
35505
|
},
|
|
35530
35506
|
{
|
|
35531
35507
|
version: 12,
|
|
35532
35508
|
name: "scheduled-tasks",
|
|
35533
|
-
up:
|
|
35509
|
+
up: up172,
|
|
35534
35510
|
artifacts: { tables: ["scheduled_tasks", "task_runs"] }
|
|
35535
35511
|
},
|
|
35536
35512
|
{
|
|
35537
35513
|
version: 13,
|
|
35538
35514
|
name: "ingestion-tracking",
|
|
35539
|
-
up:
|
|
35515
|
+
up: up182,
|
|
35540
35516
|
artifacts: {
|
|
35541
35517
|
columns: [
|
|
35542
35518
|
{ table: "memories", column: "source_path" },
|
|
@@ -35547,13 +35523,13 @@ var MIGRATIONS2 = [
|
|
|
35547
35523
|
{
|
|
35548
35524
|
version: 14,
|
|
35549
35525
|
name: "telemetry",
|
|
35550
|
-
up:
|
|
35526
|
+
up: up192,
|
|
35551
35527
|
artifacts: { tables: ["telemetry_events"] }
|
|
35552
35528
|
},
|
|
35553
35529
|
{
|
|
35554
35530
|
version: 15,
|
|
35555
35531
|
name: "session-memories",
|
|
35556
|
-
up:
|
|
35532
|
+
up: up202,
|
|
35557
35533
|
artifacts: {
|
|
35558
35534
|
tables: ["session_memories"],
|
|
35559
35535
|
columns: [
|
|
@@ -35565,13 +35541,13 @@ var MIGRATIONS2 = [
|
|
|
35565
35541
|
{
|
|
35566
35542
|
version: 16,
|
|
35567
35543
|
name: "session-checkpoints",
|
|
35568
|
-
up:
|
|
35544
|
+
up: up212,
|
|
35569
35545
|
artifacts: { tables: ["session_checkpoints"] }
|
|
35570
35546
|
},
|
|
35571
35547
|
{
|
|
35572
35548
|
version: 17,
|
|
35573
35549
|
name: "task-skills",
|
|
35574
|
-
up:
|
|
35550
|
+
up: up222,
|
|
35575
35551
|
artifacts: {
|
|
35576
35552
|
columns: [{ table: "scheduled_tasks", column: "skill_name" }]
|
|
35577
35553
|
}
|
|
@@ -35579,13 +35555,13 @@ var MIGRATIONS2 = [
|
|
|
35579
35555
|
{
|
|
35580
35556
|
version: 18,
|
|
35581
35557
|
name: "skill-meta",
|
|
35582
|
-
up:
|
|
35558
|
+
up: up232,
|
|
35583
35559
|
artifacts: { tables: ["skill_meta"] }
|
|
35584
35560
|
},
|
|
35585
35561
|
{
|
|
35586
35562
|
version: 19,
|
|
35587
35563
|
name: "knowledge-structure",
|
|
35588
|
-
up:
|
|
35564
|
+
up: up242,
|
|
35589
35565
|
artifacts: {
|
|
35590
35566
|
tables: ["entity_aspects", "entity_attributes", "entity_dependencies", "task_meta"],
|
|
35591
35567
|
columns: [{ table: "entities", column: "agent_id" }]
|
|
@@ -35594,7 +35570,7 @@ var MIGRATIONS2 = [
|
|
|
35594
35570
|
{
|
|
35595
35571
|
version: 20,
|
|
35596
35572
|
name: "session-structural-columns",
|
|
35597
|
-
up:
|
|
35573
|
+
up: up252,
|
|
35598
35574
|
artifacts: {
|
|
35599
35575
|
columns: [
|
|
35600
35576
|
{ table: "session_memories", column: "entity_slot" },
|
|
@@ -35607,7 +35583,7 @@ var MIGRATIONS2 = [
|
|
|
35607
35583
|
{
|
|
35608
35584
|
version: 21,
|
|
35609
35585
|
name: "checkpoint-structural",
|
|
35610
|
-
up:
|
|
35586
|
+
up: up262,
|
|
35611
35587
|
artifacts: {
|
|
35612
35588
|
columns: [{ table: "session_checkpoints", column: "focal_entity_ids" }]
|
|
35613
35589
|
}
|
|
@@ -35615,7 +35591,7 @@ var MIGRATIONS2 = [
|
|
|
35615
35591
|
{
|
|
35616
35592
|
version: 22,
|
|
35617
35593
|
name: "entity-pinning",
|
|
35618
|
-
up:
|
|
35594
|
+
up: up272,
|
|
35619
35595
|
artifacts: {
|
|
35620
35596
|
columns: [
|
|
35621
35597
|
{ table: "entities", column: "pinned" },
|
|
@@ -35626,17 +35602,17 @@ var MIGRATIONS2 = [
|
|
|
35626
35602
|
{
|
|
35627
35603
|
version: 23,
|
|
35628
35604
|
name: "retired-scorer-gap",
|
|
35629
|
-
up:
|
|
35605
|
+
up: up282
|
|
35630
35606
|
},
|
|
35631
35607
|
{
|
|
35632
35608
|
version: 24,
|
|
35633
35609
|
name: "retired-scorer-gap",
|
|
35634
|
-
up:
|
|
35610
|
+
up: up292
|
|
35635
35611
|
},
|
|
35636
35612
|
{
|
|
35637
35613
|
version: 25,
|
|
35638
35614
|
name: "agent-feedback",
|
|
35639
|
-
up:
|
|
35615
|
+
up: up302,
|
|
35640
35616
|
artifacts: {
|
|
35641
35617
|
columns: [{ table: "session_memories", column: "agent_relevance_score" }]
|
|
35642
35618
|
}
|
|
@@ -35644,32 +35620,32 @@ var MIGRATIONS2 = [
|
|
|
35644
35620
|
{
|
|
35645
35621
|
version: 26,
|
|
35646
35622
|
name: "retired-scorer-gap",
|
|
35647
|
-
up:
|
|
35623
|
+
up: up312
|
|
35648
35624
|
},
|
|
35649
35625
|
{
|
|
35650
35626
|
version: 27,
|
|
35651
35627
|
name: "backfill-canonical-names",
|
|
35652
|
-
up:
|
|
35628
|
+
up: up322
|
|
35653
35629
|
},
|
|
35654
35630
|
{
|
|
35655
35631
|
version: 28,
|
|
35656
35632
|
name: "lossless-retention",
|
|
35657
|
-
up:
|
|
35633
|
+
up: up332
|
|
35658
35634
|
},
|
|
35659
35635
|
{
|
|
35660
35636
|
version: 29,
|
|
35661
35637
|
name: "session-summary-dag",
|
|
35662
|
-
up:
|
|
35638
|
+
up: up342
|
|
35663
35639
|
},
|
|
35664
35640
|
{
|
|
35665
35641
|
version: 30,
|
|
35666
35642
|
name: "nullable-memory-job-memory-id",
|
|
35667
|
-
up:
|
|
35643
|
+
up: up352
|
|
35668
35644
|
},
|
|
35669
35645
|
{
|
|
35670
35646
|
version: 31,
|
|
35671
35647
|
name: "dependency-reason",
|
|
35672
|
-
up:
|
|
35648
|
+
up: up362,
|
|
35673
35649
|
artifacts: {
|
|
35674
35650
|
columns: [
|
|
35675
35651
|
{ table: "entity_dependencies", column: "reason" },
|
|
@@ -35680,7 +35656,7 @@ var MIGRATIONS2 = [
|
|
|
35680
35656
|
{
|
|
35681
35657
|
version: 32,
|
|
35682
35658
|
name: "embeddings-vector-column",
|
|
35683
|
-
up:
|
|
35659
|
+
up: up372,
|
|
35684
35660
|
artifacts: {
|
|
35685
35661
|
columns: [{ table: "embeddings", column: "vector", optional: true }]
|
|
35686
35662
|
}
|
|
@@ -35688,7 +35664,7 @@ var MIGRATIONS2 = [
|
|
|
35688
35664
|
{
|
|
35689
35665
|
version: 33,
|
|
35690
35666
|
name: "scope",
|
|
35691
|
-
up:
|
|
35667
|
+
up: up382,
|
|
35692
35668
|
artifacts: {
|
|
35693
35669
|
columns: [{ table: "memories", column: "scope" }]
|
|
35694
35670
|
}
|
|
@@ -35696,17 +35672,17 @@ var MIGRATIONS2 = [
|
|
|
35696
35672
|
{
|
|
35697
35673
|
version: 34,
|
|
35698
35674
|
name: "scope-aware-dedup",
|
|
35699
|
-
up:
|
|
35675
|
+
up: up392
|
|
35700
35676
|
},
|
|
35701
35677
|
{
|
|
35702
35678
|
version: 35,
|
|
35703
35679
|
name: "entity-fts",
|
|
35704
|
-
up:
|
|
35680
|
+
up: up402
|
|
35705
35681
|
},
|
|
35706
35682
|
{
|
|
35707
35683
|
version: 36,
|
|
35708
35684
|
name: "dependency-confidence",
|
|
35709
|
-
up:
|
|
35685
|
+
up: up412,
|
|
35710
35686
|
artifacts: {
|
|
35711
35687
|
columns: [{ table: "entity_dependencies", column: "confidence" }]
|
|
35712
35688
|
}
|
|
@@ -35714,7 +35690,7 @@ var MIGRATIONS2 = [
|
|
|
35714
35690
|
{
|
|
35715
35691
|
version: 37,
|
|
35716
35692
|
name: "entity-communities",
|
|
35717
|
-
up:
|
|
35693
|
+
up: up422,
|
|
35718
35694
|
artifacts: {
|
|
35719
35695
|
tables: ["entity_communities"],
|
|
35720
35696
|
columns: [{ table: "entities", column: "community_id" }]
|
|
@@ -35723,24 +35699,24 @@ var MIGRATIONS2 = [
|
|
|
35723
35699
|
{
|
|
35724
35700
|
version: 38,
|
|
35725
35701
|
name: "memory-hints",
|
|
35726
|
-
up:
|
|
35702
|
+
up: up432,
|
|
35727
35703
|
artifacts: { tables: ["memory_hints"] }
|
|
35728
35704
|
},
|
|
35729
35705
|
{
|
|
35730
35706
|
version: 39,
|
|
35731
35707
|
name: "dedup-entity-dependencies",
|
|
35732
|
-
up:
|
|
35708
|
+
up: up442
|
|
35733
35709
|
},
|
|
35734
35710
|
{
|
|
35735
35711
|
version: 40,
|
|
35736
35712
|
name: "session-transcripts",
|
|
35737
|
-
up:
|
|
35713
|
+
up: up452,
|
|
35738
35714
|
artifacts: { tables: ["session_transcripts"] }
|
|
35739
35715
|
},
|
|
35740
35716
|
{
|
|
35741
35717
|
version: 41,
|
|
35742
35718
|
name: "path-feedback",
|
|
35743
|
-
up:
|
|
35719
|
+
up: up462,
|
|
35744
35720
|
artifacts: {
|
|
35745
35721
|
tables: [
|
|
35746
35722
|
"path_feedback_events",
|
|
@@ -35755,7 +35731,7 @@ var MIGRATIONS2 = [
|
|
|
35755
35731
|
{
|
|
35756
35732
|
version: 42,
|
|
35757
35733
|
name: "session-memories-agent-id",
|
|
35758
|
-
up:
|
|
35734
|
+
up: up472,
|
|
35759
35735
|
artifacts: {
|
|
35760
35736
|
columns: [{ table: "session_memories", column: "agent_id" }]
|
|
35761
35737
|
}
|
|
@@ -35763,7 +35739,7 @@ var MIGRATIONS2 = [
|
|
|
35763
35739
|
{
|
|
35764
35740
|
version: 43,
|
|
35765
35741
|
name: "agents-table",
|
|
35766
|
-
up:
|
|
35742
|
+
up: up482,
|
|
35767
35743
|
artifacts: {
|
|
35768
35744
|
tables: ["agents"],
|
|
35769
35745
|
columns: [
|
|
@@ -35775,7 +35751,7 @@ var MIGRATIONS2 = [
|
|
|
35775
35751
|
{
|
|
35776
35752
|
version: 44,
|
|
35777
35753
|
name: "memory-md-temporal-head",
|
|
35778
|
-
up:
|
|
35754
|
+
up: up492,
|
|
35779
35755
|
artifacts: {
|
|
35780
35756
|
columns: [
|
|
35781
35757
|
{ table: "session_summaries", column: "source_type" },
|
|
@@ -35787,7 +35763,7 @@ var MIGRATIONS2 = [
|
|
|
35787
35763
|
{
|
|
35788
35764
|
version: 45,
|
|
35789
35765
|
name: "lossless-working-memory-hardening",
|
|
35790
|
-
up:
|
|
35766
|
+
up: up502,
|
|
35791
35767
|
artifacts: {
|
|
35792
35768
|
tables: ["session_transcripts_fts", "memory_md_heads"],
|
|
35793
35769
|
columns: [
|
|
@@ -35800,17 +35776,17 @@ var MIGRATIONS2 = [
|
|
|
35800
35776
|
{
|
|
35801
35777
|
version: 46,
|
|
35802
35778
|
name: "session-summary-uniqueness",
|
|
35803
|
-
up:
|
|
35779
|
+
up: up512
|
|
35804
35780
|
},
|
|
35805
35781
|
{
|
|
35806
35782
|
version: 47,
|
|
35807
35783
|
name: "agent-scoped-temporal-uniqueness",
|
|
35808
|
-
up:
|
|
35784
|
+
up: up522
|
|
35809
35785
|
},
|
|
35810
35786
|
{
|
|
35811
35787
|
version: 48,
|
|
35812
35788
|
name: "thread-heads",
|
|
35813
|
-
up:
|
|
35789
|
+
up: up532,
|
|
35814
35790
|
artifacts: {
|
|
35815
35791
|
tables: ["memory_thread_heads"]
|
|
35816
35792
|
}
|
|
@@ -35818,7 +35794,7 @@ var MIGRATIONS2 = [
|
|
|
35818
35794
|
{
|
|
35819
35795
|
version: 49,
|
|
35820
35796
|
name: "session-extract-cursors",
|
|
35821
|
-
up:
|
|
35797
|
+
up: up542,
|
|
35822
35798
|
artifacts: {
|
|
35823
35799
|
tables: ["session_extract_cursors"]
|
|
35824
35800
|
}
|
|
@@ -35826,7 +35802,7 @@ var MIGRATIONS2 = [
|
|
|
35826
35802
|
{
|
|
35827
35803
|
version: 50,
|
|
35828
35804
|
name: "related-to-audit",
|
|
35829
|
-
up:
|
|
35805
|
+
up: up552,
|
|
35830
35806
|
artifacts: {
|
|
35831
35807
|
tables: ["entity_dependency_history"]
|
|
35832
35808
|
}
|
|
@@ -35834,7 +35810,7 @@ var MIGRATIONS2 = [
|
|
|
35834
35810
|
{
|
|
35835
35811
|
version: 51,
|
|
35836
35812
|
name: "memory-md-rolling-window-lineage",
|
|
35837
|
-
up:
|
|
35813
|
+
up: up562,
|
|
35838
35814
|
artifacts: {
|
|
35839
35815
|
tables: ["memory_artifacts", "memory_artifact_tombstones", "memory_artifacts_fts"],
|
|
35840
35816
|
columns: [
|
|
@@ -35849,15 +35825,12 @@ var MIGRATIONS2 = [
|
|
|
35849
35825
|
{
|
|
35850
35826
|
version: 52,
|
|
35851
35827
|
name: "mcp-invocations",
|
|
35852
|
-
up:
|
|
35853
|
-
artifacts: {
|
|
35854
|
-
tables: ["mcp_invocations"]
|
|
35855
|
-
}
|
|
35828
|
+
up: up572
|
|
35856
35829
|
},
|
|
35857
35830
|
{
|
|
35858
35831
|
version: 53,
|
|
35859
35832
|
name: "skill-invocations",
|
|
35860
|
-
up:
|
|
35833
|
+
up: up582,
|
|
35861
35834
|
artifacts: {
|
|
35862
35835
|
tables: ["skill_invocations"]
|
|
35863
35836
|
}
|
|
@@ -35865,7 +35838,7 @@ var MIGRATIONS2 = [
|
|
|
35865
35838
|
{
|
|
35866
35839
|
version: 54,
|
|
35867
35840
|
name: "task-agent-scope",
|
|
35868
|
-
up:
|
|
35841
|
+
up: up592,
|
|
35869
35842
|
artifacts: {
|
|
35870
35843
|
tables: ["task_scope_hints"]
|
|
35871
35844
|
}
|
|
@@ -35873,7 +35846,7 @@ var MIGRATIONS2 = [
|
|
|
35873
35846
|
{
|
|
35874
35847
|
version: 55,
|
|
35875
35848
|
name: "dreaming-state",
|
|
35876
|
-
up:
|
|
35849
|
+
up: up602,
|
|
35877
35850
|
artifacts: {
|
|
35878
35851
|
tables: ["dreaming_state", "dreaming_passes"]
|
|
35879
35852
|
}
|
|
@@ -35881,22 +35854,22 @@ var MIGRATIONS2 = [
|
|
|
35881
35854
|
{
|
|
35882
35855
|
version: 56,
|
|
35883
35856
|
name: "agent-scoped-content-hash",
|
|
35884
|
-
up:
|
|
35857
|
+
up: up612
|
|
35885
35858
|
},
|
|
35886
35859
|
{
|
|
35887
35860
|
version: 57,
|
|
35888
35861
|
name: "memories-fts-tokenizer-repair",
|
|
35889
|
-
up:
|
|
35862
|
+
up: up622
|
|
35890
35863
|
},
|
|
35891
35864
|
{
|
|
35892
35865
|
version: 58,
|
|
35893
35866
|
name: "knowledge-graph-indices",
|
|
35894
|
-
up:
|
|
35867
|
+
up: up632
|
|
35895
35868
|
},
|
|
35896
35869
|
{
|
|
35897
35870
|
version: 59,
|
|
35898
35871
|
name: "entity-attribute-claim-key",
|
|
35899
|
-
up:
|
|
35872
|
+
up: up642,
|
|
35900
35873
|
artifacts: {
|
|
35901
35874
|
columns: [{ table: "entity_attributes", column: "claim_key" }]
|
|
35902
35875
|
}
|
|
@@ -35904,7 +35877,7 @@ var MIGRATIONS2 = [
|
|
|
35904
35877
|
{
|
|
35905
35878
|
version: 60,
|
|
35906
35879
|
name: "entity-attribute-group-key",
|
|
35907
|
-
up:
|
|
35880
|
+
up: up652,
|
|
35908
35881
|
artifacts: {
|
|
35909
35882
|
columns: [{ table: "entity_attributes", column: "group_key" }]
|
|
35910
35883
|
}
|
|
@@ -35912,7 +35885,7 @@ var MIGRATIONS2 = [
|
|
|
35912
35885
|
{
|
|
35913
35886
|
version: 61,
|
|
35914
35887
|
name: "memory-artifact-source-mtime",
|
|
35915
|
-
up:
|
|
35888
|
+
up: up662,
|
|
35916
35889
|
artifacts: {
|
|
35917
35890
|
columns: [{ table: "memory_artifacts", column: "source_mtime_ms" }]
|
|
35918
35891
|
}
|
|
@@ -35920,7 +35893,7 @@ var MIGRATIONS2 = [
|
|
|
35920
35893
|
{
|
|
35921
35894
|
version: 62,
|
|
35922
35895
|
name: "memory-artifact-soft-delete",
|
|
35923
|
-
up:
|
|
35896
|
+
up: up672,
|
|
35924
35897
|
artifacts: {
|
|
35925
35898
|
columns: [
|
|
35926
35899
|
{ table: "memory_artifacts", column: "is_deleted" },
|
|
@@ -35931,12 +35904,12 @@ var MIGRATIONS2 = [
|
|
|
35931
35904
|
{
|
|
35932
35905
|
version: 63,
|
|
35933
35906
|
name: "content-only-memories-fts-update",
|
|
35934
|
-
up:
|
|
35907
|
+
up: up682
|
|
35935
35908
|
},
|
|
35936
35909
|
{
|
|
35937
35910
|
version: 64,
|
|
35938
35911
|
name: "source-graph-provenance",
|
|
35939
|
-
up:
|
|
35912
|
+
up: up692,
|
|
35940
35913
|
artifacts: {
|
|
35941
35914
|
columns: [
|
|
35942
35915
|
{ table: "entities", column: "source_path" },
|
|
@@ -35949,7 +35922,7 @@ var MIGRATIONS2 = [
|
|
|
35949
35922
|
{
|
|
35950
35923
|
version: 65,
|
|
35951
35924
|
name: "source-embedding-agent-scope",
|
|
35952
|
-
up:
|
|
35925
|
+
up: up702,
|
|
35953
35926
|
artifacts: {
|
|
35954
35927
|
columns: [{ table: "embeddings", column: "agent_id", optional: true }]
|
|
35955
35928
|
}
|
|
@@ -35957,7 +35930,7 @@ var MIGRATIONS2 = [
|
|
|
35957
35930
|
{
|
|
35958
35931
|
version: 66,
|
|
35959
35932
|
name: "memory-search-telemetry",
|
|
35960
|
-
up:
|
|
35933
|
+
up: up712,
|
|
35961
35934
|
artifacts: {
|
|
35962
35935
|
tables: ["memory_search_telemetry"]
|
|
35963
35936
|
}
|
|
@@ -35965,7 +35938,7 @@ var MIGRATIONS2 = [
|
|
|
35965
35938
|
{
|
|
35966
35939
|
version: 67,
|
|
35967
35940
|
name: "ontology-proposals",
|
|
35968
|
-
up:
|
|
35941
|
+
up: up722,
|
|
35969
35942
|
artifacts: {
|
|
35970
35943
|
tables: ["ontology_proposals"],
|
|
35971
35944
|
columns: [
|
|
@@ -35979,7 +35952,7 @@ var MIGRATIONS2 = [
|
|
|
35979
35952
|
{
|
|
35980
35953
|
version: 68,
|
|
35981
35954
|
name: "daily-reflections",
|
|
35982
|
-
up:
|
|
35955
|
+
up: up732,
|
|
35983
35956
|
artifacts: {
|
|
35984
35957
|
tables: ["daily_reflections"]
|
|
35985
35958
|
}
|
|
@@ -35987,7 +35960,7 @@ var MIGRATIONS2 = [
|
|
|
35987
35960
|
{
|
|
35988
35961
|
version: 69,
|
|
35989
35962
|
name: "daily-reflections-multiple-insights",
|
|
35990
|
-
up:
|
|
35963
|
+
up: up742,
|
|
35991
35964
|
artifacts: {
|
|
35992
35965
|
tables: ["daily_reflections"]
|
|
35993
35966
|
}
|
|
@@ -35995,7 +35968,7 @@ var MIGRATIONS2 = [
|
|
|
35995
35968
|
{
|
|
35996
35969
|
version: 70,
|
|
35997
35970
|
name: "ontology-control-plane-state",
|
|
35998
|
-
up:
|
|
35971
|
+
up: up752,
|
|
35999
35972
|
artifacts: {
|
|
36000
35973
|
columns: [
|
|
36001
35974
|
{ table: "entities", column: "status" },
|
|
@@ -36010,7 +35983,7 @@ var MIGRATIONS2 = [
|
|
|
36010
35983
|
{
|
|
36011
35984
|
version: 71,
|
|
36012
35985
|
name: "epistemic-assertions",
|
|
36013
|
-
up:
|
|
35986
|
+
up: up762,
|
|
36014
35987
|
artifacts: {
|
|
36015
35988
|
tables: ["epistemic_assertions"]
|
|
36016
35989
|
}
|
|
@@ -36018,7 +35991,7 @@ var MIGRATIONS2 = [
|
|
|
36018
35991
|
{
|
|
36019
35992
|
version: 72,
|
|
36020
35993
|
name: "agent-scoped-idempotency-key",
|
|
36021
|
-
up:
|
|
35994
|
+
up: up772,
|
|
36022
35995
|
artifacts: {
|
|
36023
35996
|
columns: [
|
|
36024
35997
|
{ table: "memories", column: "idempotency_key" },
|
|
@@ -36029,7 +36002,7 @@ var MIGRATIONS2 = [
|
|
|
36029
36002
|
{
|
|
36030
36003
|
version: 73,
|
|
36031
36004
|
name: "recall-context-dedupe",
|
|
36032
|
-
up:
|
|
36005
|
+
up: up782,
|
|
36033
36006
|
artifacts: {
|
|
36034
36007
|
tables: ["session_context_epochs", "session_recall_events"]
|
|
36035
36008
|
}
|
|
@@ -36037,7 +36010,7 @@ var MIGRATIONS2 = [
|
|
|
36037
36010
|
{
|
|
36038
36011
|
version: 74,
|
|
36039
36012
|
name: "aggregate-memory-links",
|
|
36040
|
-
up:
|
|
36013
|
+
up: up792,
|
|
36041
36014
|
artifacts: {
|
|
36042
36015
|
tables: ["aggregate_memory_sources"]
|
|
36043
36016
|
}
|
|
@@ -36045,7 +36018,7 @@ var MIGRATIONS2 = [
|
|
|
36045
36018
|
{
|
|
36046
36019
|
version: 75,
|
|
36047
36020
|
name: "memory-artifact-source-provenance",
|
|
36048
|
-
up:
|
|
36021
|
+
up: up802,
|
|
36049
36022
|
artifacts: {
|
|
36050
36023
|
columns: [
|
|
36051
36024
|
{ table: "memory_artifacts", column: "source_id" },
|
|
@@ -36059,7 +36032,7 @@ var MIGRATIONS2 = [
|
|
|
36059
36032
|
{
|
|
36060
36033
|
version: 76,
|
|
36061
36034
|
name: "temporal-edges",
|
|
36062
|
-
up:
|
|
36035
|
+
up: up812,
|
|
36063
36036
|
artifacts: {
|
|
36064
36037
|
tables: ["temporal_edges"]
|
|
36065
36038
|
}
|
|
@@ -36067,7 +36040,7 @@ var MIGRATIONS2 = [
|
|
|
36067
36040
|
{
|
|
36068
36041
|
version: 77,
|
|
36069
36042
|
name: "entity-aliases",
|
|
36070
|
-
up:
|
|
36043
|
+
up: up822,
|
|
36071
36044
|
artifacts: {
|
|
36072
36045
|
tables: ["entity_aliases"]
|
|
36073
36046
|
}
|
|
@@ -36075,7 +36048,7 @@ var MIGRATIONS2 = [
|
|
|
36075
36048
|
{
|
|
36076
36049
|
version: 78,
|
|
36077
36050
|
name: "api-keys",
|
|
36078
|
-
up:
|
|
36051
|
+
up: up832,
|
|
36079
36052
|
artifacts: {
|
|
36080
36053
|
tables: ["api_keys"]
|
|
36081
36054
|
}
|
|
@@ -36083,7 +36056,7 @@ var MIGRATIONS2 = [
|
|
|
36083
36056
|
{
|
|
36084
36057
|
version: 79,
|
|
36085
36058
|
name: "transcript-capture-jobs",
|
|
36086
|
-
up:
|
|
36059
|
+
up: up842,
|
|
36087
36060
|
artifacts: {
|
|
36088
36061
|
tables: ["transcript_capture_jobs"]
|
|
36089
36062
|
}
|
|
@@ -36091,7 +36064,7 @@ var MIGRATIONS2 = [
|
|
|
36091
36064
|
{
|
|
36092
36065
|
version: 80,
|
|
36093
36066
|
name: "document-scope-columns",
|
|
36094
|
-
up:
|
|
36067
|
+
up: up852,
|
|
36095
36068
|
artifacts: {
|
|
36096
36069
|
columns: [
|
|
36097
36070
|
{ table: "documents", column: "agent_id" },
|
|
@@ -36102,7 +36075,7 @@ var MIGRATIONS2 = [
|
|
|
36102
36075
|
{
|
|
36103
36076
|
version: 81,
|
|
36104
36077
|
name: "aggregate-evidence-sources",
|
|
36105
|
-
up:
|
|
36078
|
+
up: up862,
|
|
36106
36079
|
artifacts: {
|
|
36107
36080
|
tables: ["aggregate_evidence_sources"]
|
|
36108
36081
|
}
|
|
@@ -36110,7 +36083,7 @@ var MIGRATIONS2 = [
|
|
|
36110
36083
|
{
|
|
36111
36084
|
version: 82,
|
|
36112
36085
|
name: "skill-invocations-harness",
|
|
36113
|
-
up:
|
|
36086
|
+
up: up872,
|
|
36114
36087
|
artifacts: {
|
|
36115
36088
|
columns: [
|
|
36116
36089
|
{ table: "skill_invocations", column: "harness" },
|
|
@@ -36121,7 +36094,7 @@ var MIGRATIONS2 = [
|
|
|
36121
36094
|
{
|
|
36122
36095
|
version: 83,
|
|
36123
36096
|
name: "memory-lifecycle-repair",
|
|
36124
|
-
up:
|
|
36097
|
+
up: up882,
|
|
36125
36098
|
artifacts: {
|
|
36126
36099
|
tables: ["transcript_capture_jobs", "aggregate_evidence_sources", "entity_dependencies"],
|
|
36127
36100
|
columns: [
|
|
@@ -36136,7 +36109,7 @@ var MIGRATIONS2 = [
|
|
|
36136
36109
|
{
|
|
36137
36110
|
version: 84,
|
|
36138
36111
|
name: "legacy-markdown-import-state",
|
|
36139
|
-
up:
|
|
36112
|
+
up: up892,
|
|
36140
36113
|
artifacts: {
|
|
36141
36114
|
tables: ["legacy_markdown_imports", "legacy_markdown_chunks"]
|
|
36142
36115
|
}
|
|
@@ -36144,7 +36117,7 @@ var MIGRATIONS2 = [
|
|
|
36144
36117
|
{
|
|
36145
36118
|
version: 85,
|
|
36146
36119
|
name: "backfill-relations-to-dependencies",
|
|
36147
|
-
up:
|
|
36120
|
+
up: up902,
|
|
36148
36121
|
artifacts: {
|
|
36149
36122
|
tables: ["entity_dependencies"]
|
|
36150
36123
|
}
|
|
@@ -36152,7 +36125,7 @@ var MIGRATIONS2 = [
|
|
|
36152
36125
|
{
|
|
36153
36126
|
version: 86,
|
|
36154
36127
|
name: "summary-jobs-content-hash",
|
|
36155
|
-
up:
|
|
36128
|
+
up: up912,
|
|
36156
36129
|
artifacts: {
|
|
36157
36130
|
columns: [{ table: "summary_jobs", column: "content_hash" }]
|
|
36158
36131
|
}
|
|
@@ -36160,7 +36133,7 @@ var MIGRATIONS2 = [
|
|
|
36160
36133
|
{
|
|
36161
36134
|
version: 87,
|
|
36162
36135
|
name: "summary-jobs-boundary-reason",
|
|
36163
|
-
up:
|
|
36136
|
+
up: up922,
|
|
36164
36137
|
artifacts: {
|
|
36165
36138
|
columns: [{ table: "summary_jobs", column: "boundary_reason" }]
|
|
36166
36139
|
}
|
|
@@ -36168,7 +36141,7 @@ var MIGRATIONS2 = [
|
|
|
36168
36141
|
{
|
|
36169
36142
|
version: 88,
|
|
36170
36143
|
name: "transcript-recovery-files",
|
|
36171
|
-
up:
|
|
36144
|
+
up: up932,
|
|
36172
36145
|
artifacts: {
|
|
36173
36146
|
tables: ["transcript_recovery_files"]
|
|
36174
36147
|
}
|
|
@@ -36176,7 +36149,7 @@ var MIGRATIONS2 = [
|
|
|
36176
36149
|
{
|
|
36177
36150
|
version: 89,
|
|
36178
36151
|
name: "job-cancellations",
|
|
36179
|
-
up:
|
|
36152
|
+
up: up942,
|
|
36180
36153
|
artifacts: {
|
|
36181
36154
|
tables: ["job_cancellations"]
|
|
36182
36155
|
}
|
|
@@ -36184,7 +36157,7 @@ var MIGRATIONS2 = [
|
|
|
36184
36157
|
{
|
|
36185
36158
|
version: 90,
|
|
36186
36159
|
name: "job-archive",
|
|
36187
|
-
up:
|
|
36160
|
+
up: up952,
|
|
36188
36161
|
artifacts: {
|
|
36189
36162
|
tables: ["job_archive"]
|
|
36190
36163
|
}
|
|
@@ -36192,25 +36165,25 @@ var MIGRATIONS2 = [
|
|
|
36192
36165
|
{
|
|
36193
36166
|
version: 91,
|
|
36194
36167
|
name: "embedding-index-generations",
|
|
36195
|
-
up:
|
|
36168
|
+
up: up962,
|
|
36196
36169
|
artifacts: { tables: ["embedding_index_state"] }
|
|
36197
36170
|
},
|
|
36198
36171
|
{
|
|
36199
36172
|
version: 92,
|
|
36200
36173
|
name: "embedding-staging-store",
|
|
36201
|
-
up:
|
|
36174
|
+
up: up972,
|
|
36202
36175
|
artifacts: { tables: ["embeddings_staging"] }
|
|
36203
36176
|
},
|
|
36204
36177
|
{
|
|
36205
36178
|
version: 93,
|
|
36206
36179
|
name: "dreaming-evidence-cursor",
|
|
36207
|
-
up:
|
|
36180
|
+
up: up982,
|
|
36208
36181
|
artifacts: { columns: [{ table: "dreaming_state", column: "evidence_cursor" }] }
|
|
36209
36182
|
},
|
|
36210
36183
|
{
|
|
36211
36184
|
version: 94,
|
|
36212
36185
|
name: "memory-kind",
|
|
36213
|
-
up:
|
|
36186
|
+
up: up992,
|
|
36214
36187
|
artifacts: {
|
|
36215
36188
|
columns: [
|
|
36216
36189
|
{ table: "memories", column: "memory_kind" },
|
|
@@ -36221,35 +36194,35 @@ var MIGRATIONS2 = [
|
|
|
36221
36194
|
{
|
|
36222
36195
|
version: 95,
|
|
36223
36196
|
name: "compaction-recall-projections",
|
|
36224
|
-
up:
|
|
36197
|
+
up: up1002
|
|
36225
36198
|
},
|
|
36226
36199
|
{
|
|
36227
36200
|
version: 96,
|
|
36228
36201
|
name: "retire-legacy-ingestion",
|
|
36229
|
-
up:
|
|
36202
|
+
up: up1012
|
|
36230
36203
|
},
|
|
36231
36204
|
{
|
|
36232
36205
|
version: 97,
|
|
36233
36206
|
name: "dreaming-failure-backoff",
|
|
36234
|
-
up:
|
|
36207
|
+
up: up1022,
|
|
36235
36208
|
artifacts: { columns: [{ table: "dreaming_state", column: "last_failure_at" }] }
|
|
36236
36209
|
},
|
|
36237
36210
|
{
|
|
36238
36211
|
version: 98,
|
|
36239
36212
|
name: "dreaming-evidence-exclusions",
|
|
36240
|
-
up:
|
|
36213
|
+
up: up1032,
|
|
36241
36214
|
artifacts: { tables: ["dreaming_evidence_exclusions"] }
|
|
36242
36215
|
},
|
|
36243
36216
|
{
|
|
36244
36217
|
version: 99,
|
|
36245
36218
|
name: "dreaming-tool-calls",
|
|
36246
|
-
up:
|
|
36219
|
+
up: up1042,
|
|
36247
36220
|
artifacts: { tables: ["dreaming_tool_calls"] }
|
|
36248
36221
|
},
|
|
36249
36222
|
{
|
|
36250
36223
|
version: 100,
|
|
36251
36224
|
name: "dreaming-runbook",
|
|
36252
|
-
up:
|
|
36225
|
+
up: up1052,
|
|
36253
36226
|
artifacts: {
|
|
36254
36227
|
columns: [
|
|
36255
36228
|
{ table: "dreaming_passes", column: "evidence_window_json" },
|
|
@@ -36260,23 +36233,23 @@ var MIGRATIONS2 = [
|
|
|
36260
36233
|
{
|
|
36261
36234
|
version: 101,
|
|
36262
36235
|
name: "dreaming-attention",
|
|
36263
|
-
up:
|
|
36236
|
+
up: up1062,
|
|
36264
36237
|
artifacts: { tables: ["dreaming_attention"] }
|
|
36265
36238
|
},
|
|
36266
36239
|
{
|
|
36267
36240
|
version: 102,
|
|
36268
36241
|
name: "attribute-semantic-memories",
|
|
36269
|
-
up:
|
|
36242
|
+
up: up1072
|
|
36270
36243
|
},
|
|
36271
36244
|
{
|
|
36272
36245
|
version: 103,
|
|
36273
36246
|
name: "semantic-memory-kind",
|
|
36274
|
-
up:
|
|
36247
|
+
up: up1082
|
|
36275
36248
|
},
|
|
36276
36249
|
{
|
|
36277
36250
|
version: 104,
|
|
36278
36251
|
name: "derived-memory-provenance",
|
|
36279
|
-
up:
|
|
36252
|
+
up: up1092,
|
|
36280
36253
|
artifacts: {
|
|
36281
36254
|
tables: ["derived_memory_sources"],
|
|
36282
36255
|
columns: [{ table: "memories", column: "stale_at" }]
|
|
@@ -36285,12 +36258,12 @@ var MIGRATIONS2 = [
|
|
|
36285
36258
|
{
|
|
36286
36259
|
version: 105,
|
|
36287
36260
|
name: "agent-scoped-entity-name",
|
|
36288
|
-
up:
|
|
36261
|
+
up: up1102
|
|
36289
36262
|
},
|
|
36290
36263
|
{
|
|
36291
36264
|
version: 106,
|
|
36292
36265
|
name: "memory-review-after",
|
|
36293
|
-
up:
|
|
36266
|
+
up: up1112,
|
|
36294
36267
|
artifacts: {
|
|
36295
36268
|
columns: [{ table: "memories", column: "review_after" }]
|
|
36296
36269
|
}
|
|
@@ -36298,7 +36271,7 @@ var MIGRATIONS2 = [
|
|
|
36298
36271
|
{
|
|
36299
36272
|
version: 107,
|
|
36300
36273
|
name: "dreaming-pass-usage",
|
|
36301
|
-
up:
|
|
36274
|
+
up: up1122,
|
|
36302
36275
|
artifacts: {
|
|
36303
36276
|
columns: [
|
|
36304
36277
|
{ table: "dreaming_passes", column: "tokens_input" },
|
|
@@ -36312,7 +36285,7 @@ var MIGRATIONS2 = [
|
|
|
36312
36285
|
{
|
|
36313
36286
|
version: 108,
|
|
36314
36287
|
name: "embedding-usage",
|
|
36315
|
-
up:
|
|
36288
|
+
up: up1132,
|
|
36316
36289
|
artifacts: {
|
|
36317
36290
|
tables: ["embedding_usage"]
|
|
36318
36291
|
}
|
|
@@ -36320,7 +36293,7 @@ var MIGRATIONS2 = [
|
|
|
36320
36293
|
{
|
|
36321
36294
|
version: 109,
|
|
36322
36295
|
name: "telemetry-install",
|
|
36323
|
-
up:
|
|
36296
|
+
up: up1142,
|
|
36324
36297
|
artifacts: {
|
|
36325
36298
|
tables: ["telemetry_install"]
|
|
36326
36299
|
}
|
|
@@ -36328,12 +36301,12 @@ var MIGRATIONS2 = [
|
|
|
36328
36301
|
{
|
|
36329
36302
|
version: 110,
|
|
36330
36303
|
name: "memory-mention-join-index",
|
|
36331
|
-
up:
|
|
36304
|
+
up: up1152
|
|
36332
36305
|
},
|
|
36333
36306
|
{
|
|
36334
36307
|
version: 111,
|
|
36335
36308
|
name: "telemetry-first-use",
|
|
36336
|
-
up:
|
|
36309
|
+
up: up1162,
|
|
36337
36310
|
artifacts: {
|
|
36338
36311
|
columns: [
|
|
36339
36312
|
{ table: "telemetry_install", column: "first_remember_at" },
|
|
@@ -36344,7 +36317,7 @@ var MIGRATIONS2 = [
|
|
|
36344
36317
|
{
|
|
36345
36318
|
version: 112,
|
|
36346
36319
|
name: "telemetry-queue-ownership",
|
|
36347
|
-
up:
|
|
36320
|
+
up: up1172,
|
|
36348
36321
|
artifacts: {
|
|
36349
36322
|
columns: [
|
|
36350
36323
|
{ table: "telemetry_events", column: "source" },
|
|
@@ -36356,7 +36329,7 @@ var MIGRATIONS2 = [
|
|
|
36356
36329
|
{
|
|
36357
36330
|
version: 113,
|
|
36358
36331
|
name: "session-claims",
|
|
36359
|
-
up:
|
|
36332
|
+
up: up1182,
|
|
36360
36333
|
artifacts: {
|
|
36361
36334
|
tables: ["session_claims"],
|
|
36362
36335
|
columns: [
|
|
@@ -36370,12 +36343,12 @@ var MIGRATIONS2 = [
|
|
|
36370
36343
|
{
|
|
36371
36344
|
version: 114,
|
|
36372
36345
|
name: "memory-traversal-hydration-index",
|
|
36373
|
-
up:
|
|
36346
|
+
up: up1192
|
|
36374
36347
|
},
|
|
36375
36348
|
{
|
|
36376
36349
|
version: 115,
|
|
36377
36350
|
name: "cross-agent-message-notifications",
|
|
36378
|
-
up:
|
|
36351
|
+
up: up1202,
|
|
36379
36352
|
artifacts: {
|
|
36380
36353
|
tables: ["cross_agent_messages", "cross_agent_message_receipts"]
|
|
36381
36354
|
}
|
|
@@ -36383,7 +36356,7 @@ var MIGRATIONS2 = [
|
|
|
36383
36356
|
{
|
|
36384
36357
|
version: 116,
|
|
36385
36358
|
name: "acp-delivery-reconciliation",
|
|
36386
|
-
up:
|
|
36359
|
+
up: up1212,
|
|
36387
36360
|
artifacts: {
|
|
36388
36361
|
columns: [
|
|
36389
36362
|
{ table: "cross_agent_messages", column: "delivery_state" },
|
|
@@ -36397,7 +36370,7 @@ var MIGRATIONS2 = [
|
|
|
36397
36370
|
{
|
|
36398
36371
|
version: 117,
|
|
36399
36372
|
name: "retire-summary-worker",
|
|
36400
|
-
up:
|
|
36373
|
+
up: up1222,
|
|
36401
36374
|
artifacts: {
|
|
36402
36375
|
columns: [
|
|
36403
36376
|
{ table: "session_transcripts", column: "completed_at" },
|
|
@@ -36408,24 +36381,24 @@ var MIGRATIONS2 = [
|
|
|
36408
36381
|
{
|
|
36409
36382
|
version: 118,
|
|
36410
36383
|
name: "queue-pressure-indices",
|
|
36411
|
-
up:
|
|
36384
|
+
up: up1232
|
|
36412
36385
|
},
|
|
36413
36386
|
{
|
|
36414
36387
|
version: 119,
|
|
36415
36388
|
name: "telemetry-version-observation",
|
|
36416
|
-
up:
|
|
36389
|
+
up: up1242,
|
|
36417
36390
|
artifacts: { columns: [{ table: "telemetry_install", column: "last_seen_version" }] }
|
|
36418
36391
|
},
|
|
36419
36392
|
{
|
|
36420
36393
|
version: 120,
|
|
36421
36394
|
name: "source-lifecycle-telemetry",
|
|
36422
|
-
up:
|
|
36395
|
+
up: up1252,
|
|
36423
36396
|
artifacts: { tables: ["source_lifecycle_state"] }
|
|
36424
36397
|
},
|
|
36425
36398
|
{
|
|
36426
36399
|
version: 121,
|
|
36427
36400
|
name: "telemetry-delivery-health",
|
|
36428
|
-
up:
|
|
36401
|
+
up: up1262,
|
|
36429
36402
|
artifacts: {
|
|
36430
36403
|
tables: ["telemetry_delivery_state"],
|
|
36431
36404
|
columns: [
|
|
@@ -36439,7 +36412,7 @@ var MIGRATIONS2 = [
|
|
|
36439
36412
|
{
|
|
36440
36413
|
version: 122,
|
|
36441
36414
|
name: "dreaming-evidence-retry",
|
|
36442
|
-
up:
|
|
36415
|
+
up: up1272,
|
|
36443
36416
|
artifacts: {
|
|
36444
36417
|
columns: [
|
|
36445
36418
|
{ table: "dreaming_evidence_exclusions", column: "failure_class" },
|
|
@@ -36452,13 +36425,13 @@ var MIGRATIONS2 = [
|
|
|
36452
36425
|
{
|
|
36453
36426
|
version: 123,
|
|
36454
36427
|
name: "embedding-index-failures",
|
|
36455
|
-
up:
|
|
36428
|
+
up: up1282,
|
|
36456
36429
|
artifacts: { tables: ["embedding_index_failures"] }
|
|
36457
36430
|
},
|
|
36458
36431
|
{
|
|
36459
36432
|
version: 124,
|
|
36460
36433
|
name: "import-derived-lifecycle",
|
|
36461
|
-
up:
|
|
36434
|
+
up: up1292,
|
|
36462
36435
|
artifacts: {
|
|
36463
36436
|
tables: ["imported_source_lifecycle"]
|
|
36464
36437
|
}
|
|
@@ -36466,77 +36439,77 @@ var MIGRATIONS2 = [
|
|
|
36466
36439
|
{
|
|
36467
36440
|
version: 125,
|
|
36468
36441
|
name: "memory-content-safety",
|
|
36469
|
-
up:
|
|
36442
|
+
up: up1302,
|
|
36470
36443
|
artifacts: { tables: ["memory_content_safety"] }
|
|
36471
36444
|
},
|
|
36472
36445
|
{
|
|
36473
36446
|
version: 126,
|
|
36474
36447
|
name: "dreaming-surprisal-attention",
|
|
36475
|
-
up:
|
|
36448
|
+
up: up1312,
|
|
36476
36449
|
artifacts: { tables: ["dreaming_attention"] }
|
|
36477
36450
|
},
|
|
36478
36451
|
{
|
|
36479
36452
|
version: 127,
|
|
36480
36453
|
name: "ontology-contradictions",
|
|
36481
|
-
up:
|
|
36454
|
+
up: up1322,
|
|
36482
36455
|
artifacts: { tables: ["ontology_contradictions"] }
|
|
36483
36456
|
},
|
|
36484
36457
|
{
|
|
36485
36458
|
version: 128,
|
|
36486
36459
|
name: "bounded-queue-diagnostics",
|
|
36487
|
-
up:
|
|
36460
|
+
up: up1332
|
|
36488
36461
|
},
|
|
36489
36462
|
{
|
|
36490
36463
|
version: 129,
|
|
36491
36464
|
name: "retire-structural-jobs",
|
|
36492
|
-
up:
|
|
36465
|
+
up: up1342
|
|
36493
36466
|
},
|
|
36494
36467
|
{
|
|
36495
36468
|
version: 130,
|
|
36496
36469
|
name: "embedding-repair-state",
|
|
36497
|
-
up:
|
|
36470
|
+
up: up1352,
|
|
36498
36471
|
artifacts: { tables: ["embedding_repair_budget", "embedding_repair_backoff"] }
|
|
36499
36472
|
},
|
|
36500
36473
|
{
|
|
36501
36474
|
version: 131,
|
|
36502
36475
|
name: "dreaming-evidence-consumption",
|
|
36503
|
-
up:
|
|
36476
|
+
up: up1362,
|
|
36504
36477
|
artifacts: { tables: ["dreaming_evidence_consumption"] }
|
|
36505
36478
|
},
|
|
36506
36479
|
{
|
|
36507
36480
|
version: 132,
|
|
36508
36481
|
name: "observer-scoped-epistemic-assertions",
|
|
36509
|
-
up:
|
|
36482
|
+
up: up1372,
|
|
36510
36483
|
artifacts: { tables: ["epistemic_assertions"] }
|
|
36511
36484
|
},
|
|
36512
36485
|
{
|
|
36513
36486
|
version: 133,
|
|
36514
36487
|
name: "dreaming-memory-head",
|
|
36515
|
-
up:
|
|
36488
|
+
up: up1382,
|
|
36516
36489
|
artifacts: { tables: ["memory_head_revisions", "memory_head_entries", "memory_head_revision_entries"] }
|
|
36517
36490
|
},
|
|
36518
36491
|
{
|
|
36519
36492
|
version: 134,
|
|
36520
36493
|
name: "scope-memory-head-entries",
|
|
36521
|
-
up:
|
|
36494
|
+
up: up1392,
|
|
36522
36495
|
artifacts: { tables: ["memory_head_entries"] }
|
|
36523
36496
|
},
|
|
36524
36497
|
{
|
|
36525
36498
|
version: 135,
|
|
36526
36499
|
name: "memory-head-publication",
|
|
36527
|
-
up:
|
|
36500
|
+
up: up1402,
|
|
36528
36501
|
artifacts: { tables: ["memory_head_publications"] }
|
|
36529
36502
|
},
|
|
36530
36503
|
{
|
|
36531
36504
|
version: 136,
|
|
36532
36505
|
name: "memory-head-revisions",
|
|
36533
|
-
up:
|
|
36506
|
+
up: up1412,
|
|
36534
36507
|
artifacts: { tables: ["memory_head_revisions"] }
|
|
36535
36508
|
},
|
|
36536
36509
|
{
|
|
36537
36510
|
version: 137,
|
|
36538
36511
|
name: "dreaming-head-manifest",
|
|
36539
|
-
up:
|
|
36512
|
+
up: up1422,
|
|
36540
36513
|
artifacts: {
|
|
36541
36514
|
columns: [
|
|
36542
36515
|
{ table: "dreaming_passes", column: "head_revision" },
|
|
@@ -36547,7 +36520,7 @@ var MIGRATIONS2 = [
|
|
|
36547
36520
|
{
|
|
36548
36521
|
version: 138,
|
|
36549
36522
|
name: "bounded-status-projections",
|
|
36550
|
-
up:
|
|
36523
|
+
up: up1432,
|
|
36551
36524
|
artifacts: {
|
|
36552
36525
|
tables: ["transcript_capture_status", "memories_duplicate_hash_counts", "memories_diagnostics_state"]
|
|
36553
36526
|
}
|
|
@@ -36555,31 +36528,31 @@ var MIGRATIONS2 = [
|
|
|
36555
36528
|
{
|
|
36556
36529
|
version: 139,
|
|
36557
36530
|
name: "native-source-sync-state",
|
|
36558
|
-
up:
|
|
36531
|
+
up: up1442,
|
|
36559
36532
|
artifacts: { tables: ["native_source_sync_state"] }
|
|
36560
36533
|
},
|
|
36561
36534
|
{
|
|
36562
36535
|
version: 140,
|
|
36563
36536
|
name: "transcript-recovery-frontier",
|
|
36564
|
-
up:
|
|
36537
|
+
up: up1452,
|
|
36565
36538
|
artifacts: { tables: ["transcript_recovery_frontiers"] }
|
|
36566
36539
|
},
|
|
36567
36540
|
{
|
|
36568
36541
|
version: 141,
|
|
36569
36542
|
name: "source-sync-checkpoints",
|
|
36570
|
-
up:
|
|
36543
|
+
up: up1462,
|
|
36571
36544
|
artifacts: { tables: ["source_sync_checkpoints"] }
|
|
36572
36545
|
},
|
|
36573
36546
|
{
|
|
36574
36547
|
version: 142,
|
|
36575
36548
|
name: "source-sync-frontier",
|
|
36576
|
-
up:
|
|
36549
|
+
up: up1472,
|
|
36577
36550
|
artifacts: { columns: [{ table: "source_sync_checkpoints", column: "frontier" }] }
|
|
36578
36551
|
},
|
|
36579
36552
|
{
|
|
36580
36553
|
version: 143,
|
|
36581
36554
|
name: "embedding-index-progress",
|
|
36582
|
-
up:
|
|
36555
|
+
up: up1482,
|
|
36583
36556
|
artifacts: {
|
|
36584
36557
|
columns: [
|
|
36585
36558
|
{ table: "embedding_index_state", column: "migration_phase" },
|
|
@@ -36595,19 +36568,19 @@ var MIGRATIONS2 = [
|
|
|
36595
36568
|
{
|
|
36596
36569
|
version: 144,
|
|
36597
36570
|
name: "memory-job-lease-token",
|
|
36598
|
-
up:
|
|
36571
|
+
up: up1492,
|
|
36599
36572
|
artifacts: { columns: [{ table: "memory_jobs", column: "lease_token" }] }
|
|
36600
36573
|
},
|
|
36601
36574
|
{
|
|
36602
36575
|
version: 145,
|
|
36603
36576
|
name: "dreaming-evidence-reviews",
|
|
36604
|
-
up:
|
|
36577
|
+
up: up1502,
|
|
36605
36578
|
artifacts: { tables: ["dreaming_evidence_reviews"] }
|
|
36606
36579
|
},
|
|
36607
36580
|
{
|
|
36608
36581
|
version: 146,
|
|
36609
36582
|
name: "source-transcript-import",
|
|
36610
|
-
up:
|
|
36583
|
+
up: up1512,
|
|
36611
36584
|
artifacts: {
|
|
36612
36585
|
tables: [
|
|
36613
36586
|
"source_import_jobs",
|
|
@@ -36626,19 +36599,19 @@ var MIGRATIONS2 = [
|
|
|
36626
36599
|
{
|
|
36627
36600
|
version: 147,
|
|
36628
36601
|
name: "source-import-replay-file-slots",
|
|
36629
|
-
up:
|
|
36602
|
+
up: up1522,
|
|
36630
36603
|
artifacts: { tables: ["source_import_files"] }
|
|
36631
36604
|
},
|
|
36632
36605
|
{
|
|
36633
36606
|
version: 148,
|
|
36634
36607
|
name: "source-import-attempt-provenance",
|
|
36635
|
-
up:
|
|
36608
|
+
up: up1532,
|
|
36636
36609
|
artifacts: { columns: [{ table: "source_import_record_attempts", column: "source_id" }] }
|
|
36637
36610
|
},
|
|
36638
36611
|
{
|
|
36639
36612
|
version: 149,
|
|
36640
36613
|
name: "transcript-import-state-machine",
|
|
36641
|
-
up:
|
|
36614
|
+
up: up1542,
|
|
36642
36615
|
artifacts: {
|
|
36643
36616
|
columns: [
|
|
36644
36617
|
{ table: "source_import_jobs", column: "duplicate_mode" },
|
|
@@ -36650,7 +36623,7 @@ var MIGRATIONS2 = [
|
|
|
36650
36623
|
{
|
|
36651
36624
|
version: 150,
|
|
36652
36625
|
name: "memory-head-freshness",
|
|
36653
|
-
up:
|
|
36626
|
+
up: up1552,
|
|
36654
36627
|
artifacts: {
|
|
36655
36628
|
columns: [
|
|
36656
36629
|
{ table: "memory_md_heads", column: "is_current" },
|
|
@@ -36661,7 +36634,7 @@ var MIGRATIONS2 = [
|
|
|
36661
36634
|
{
|
|
36662
36635
|
version: 151,
|
|
36663
36636
|
name: "transcript-import-bytes",
|
|
36664
|
-
up:
|
|
36637
|
+
up: up160,
|
|
36665
36638
|
artifacts: {
|
|
36666
36639
|
tables: [
|
|
36667
36640
|
"source_import_chunks",
|
|
@@ -36696,7 +36669,7 @@ var MIGRATIONS2 = [
|
|
|
36696
36669
|
{
|
|
36697
36670
|
version: 153,
|
|
36698
36671
|
name: "vector-repair-checkpoints",
|
|
36699
|
-
up:
|
|
36672
|
+
up: up1562,
|
|
36700
36673
|
artifacts: { tables: ["vector_repair_checkpoints"] }
|
|
36701
36674
|
},
|
|
36702
36675
|
{
|
|
@@ -36723,13 +36696,13 @@ var MIGRATIONS2 = [
|
|
|
36723
36696
|
{
|
|
36724
36697
|
version: 156,
|
|
36725
36698
|
name: "embedding-repair-checkpoints",
|
|
36726
|
-
up:
|
|
36699
|
+
up: up1572,
|
|
36727
36700
|
artifacts: { tables: ["embedding_repair_checkpoints"] }
|
|
36728
36701
|
},
|
|
36729
36702
|
{
|
|
36730
36703
|
version: 157,
|
|
36731
36704
|
name: "embedding-repair-progress",
|
|
36732
|
-
up:
|
|
36705
|
+
up: up1582,
|
|
36733
36706
|
artifacts: {
|
|
36734
36707
|
tables: ["embedding_repair_progress"],
|
|
36735
36708
|
columns: [{ table: "embedding_repair_checkpoints", column: "profile_fingerprint" }]
|
|
@@ -36738,8 +36711,13 @@ var MIGRATIONS2 = [
|
|
|
36738
36711
|
{
|
|
36739
36712
|
version: 158,
|
|
36740
36713
|
name: "dreaming-candidate-scan-index",
|
|
36741
|
-
up:
|
|
36714
|
+
up: up1592,
|
|
36742
36715
|
artifacts: { indexes: ["idx_memories_agent_kind"] }
|
|
36716
|
+
},
|
|
36717
|
+
{
|
|
36718
|
+
version: 159,
|
|
36719
|
+
name: "retire-obsolete-invocation-ledger",
|
|
36720
|
+
up: up510
|
|
36743
36721
|
}
|
|
36744
36722
|
];
|
|
36745
36723
|
var LATEST_SCHEMA_VERSION2 = MIGRATIONS2[MIGRATIONS2.length - 1]?.version ?? 0;
|