@signetai/connector-hermes-agent 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
|
@@ -10714,6 +10714,9 @@ function up4(db) {
|
|
|
10714
10714
|
WHERE resolved_at IS NULL;
|
|
10715
10715
|
`);
|
|
10716
10716
|
}
|
|
10717
|
+
function up5(db) {
|
|
10718
|
+
db.exec("DROP TABLE IF EXISTS mcp_invocations");
|
|
10719
|
+
}
|
|
10717
10720
|
var MEMORIES_FTS_TOKENIZER = "unicode61";
|
|
10718
10721
|
var FTS_STATE_TABLE = "memories_fts_state";
|
|
10719
10722
|
function normalizeSql(sql) {
|
|
@@ -10829,7 +10832,7 @@ function memoriesFtsNeedsTokenizerRepair(sql) {
|
|
|
10829
10832
|
return true;
|
|
10830
10833
|
return !normalized.includes(`tokenize='${MEMORIES_FTS_TOKENIZER}'`);
|
|
10831
10834
|
}
|
|
10832
|
-
function
|
|
10835
|
+
function up6(db) {
|
|
10833
10836
|
db.exec(`
|
|
10834
10837
|
CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
10835
10838
|
version INTEGER PRIMARY KEY,
|
|
@@ -10927,7 +10930,7 @@ function addColumnIfMissing2(db, table, column, definition) {
|
|
|
10927
10930
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
10928
10931
|
}
|
|
10929
10932
|
}
|
|
10930
|
-
function
|
|
10933
|
+
function up7(db) {
|
|
10931
10934
|
addColumnIfMissing2(db, "memories", "content_hash", "TEXT");
|
|
10932
10935
|
addColumnIfMissing2(db, "memories", "normalized_content", "TEXT");
|
|
10933
10936
|
addColumnIfMissing2(db, "memories", "is_deleted", "INTEGER DEFAULT 0");
|
|
@@ -11045,7 +11048,7 @@ function addColumnIfMissing3(db, table, column, definition) {
|
|
|
11045
11048
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11046
11049
|
return true;
|
|
11047
11050
|
}
|
|
11048
|
-
function
|
|
11051
|
+
function up8(db) {
|
|
11049
11052
|
addColumnIfMissing3(db, "memories", "why", "TEXT");
|
|
11050
11053
|
addColumnIfMissing3(db, "memories", "project", "TEXT");
|
|
11051
11054
|
db.exec(`DROP INDEX IF EXISTS idx_memories_content_hash`);
|
|
@@ -11082,7 +11085,7 @@ function addColumnIfMissing4(db, table, column, definition) {
|
|
|
11082
11085
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11083
11086
|
}
|
|
11084
11087
|
}
|
|
11085
|
-
function
|
|
11088
|
+
function up9(db) {
|
|
11086
11089
|
addColumnIfMissing4(db, "memory_history", "actor_type", "TEXT");
|
|
11087
11090
|
addColumnIfMissing4(db, "memory_history", "session_id", "TEXT");
|
|
11088
11091
|
addColumnIfMissing4(db, "memory_history", "request_id", "TEXT");
|
|
@@ -11115,7 +11118,7 @@ function addColumnIfMissing5(db, table, column, definition) {
|
|
|
11115
11118
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11116
11119
|
}
|
|
11117
11120
|
}
|
|
11118
|
-
function
|
|
11121
|
+
function up10(db) {
|
|
11119
11122
|
addColumnIfMissing5(db, "entities", "canonical_name", "TEXT");
|
|
11120
11123
|
addColumnIfMissing5(db, "entities", "mentions", "INTEGER DEFAULT 0");
|
|
11121
11124
|
addColumnIfMissing5(db, "entities", "embedding", "BLOB");
|
|
@@ -11132,7 +11135,7 @@ function hasColumn4(db, table, column) {
|
|
|
11132
11135
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
11133
11136
|
return rows.some((r2) => r2.name === column);
|
|
11134
11137
|
}
|
|
11135
|
-
function
|
|
11138
|
+
function up11(db) {
|
|
11136
11139
|
if (!hasColumn4(db, "memories", "idempotency_key")) {
|
|
11137
11140
|
db.exec("ALTER TABLE memories ADD COLUMN idempotency_key TEXT");
|
|
11138
11141
|
}
|
|
@@ -11147,7 +11150,7 @@ function hasColumn5(db, table, column) {
|
|
|
11147
11150
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
11148
11151
|
return rows.some((r2) => r2.name === column);
|
|
11149
11152
|
}
|
|
11150
|
-
function
|
|
11153
|
+
function up12(db) {
|
|
11151
11154
|
db.exec(`
|
|
11152
11155
|
CREATE TABLE IF NOT EXISTS documents (
|
|
11153
11156
|
id TEXT PRIMARY KEY,
|
|
@@ -11204,7 +11207,7 @@ function up11(db) {
|
|
|
11204
11207
|
db.exec("ALTER TABLE memory_jobs ADD COLUMN document_id TEXT");
|
|
11205
11208
|
}
|
|
11206
11209
|
}
|
|
11207
|
-
function
|
|
11210
|
+
function up13(db) {
|
|
11208
11211
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='embeddings'").all();
|
|
11209
11212
|
if (tables.length === 0)
|
|
11210
11213
|
return;
|
|
@@ -11221,7 +11224,7 @@ function up12(db) {
|
|
|
11221
11224
|
ON embeddings(content_hash)
|
|
11222
11225
|
`);
|
|
11223
11226
|
}
|
|
11224
|
-
function
|
|
11227
|
+
function up14(db) {
|
|
11225
11228
|
db.exec(`
|
|
11226
11229
|
CREATE TABLE IF NOT EXISTS summary_jobs (
|
|
11227
11230
|
id TEXT PRIMARY KEY,
|
|
@@ -11241,7 +11244,7 @@ function up13(db) {
|
|
|
11241
11244
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_summary_jobs_status
|
|
11242
11245
|
ON summary_jobs(status)`);
|
|
11243
11246
|
}
|
|
11244
|
-
function
|
|
11247
|
+
function up15(db) {
|
|
11245
11248
|
db.exec(`
|
|
11246
11249
|
CREATE TABLE IF NOT EXISTS umap_cache (
|
|
11247
11250
|
id INTEGER PRIMARY KEY,
|
|
@@ -11252,7 +11255,7 @@ function up14(db) {
|
|
|
11252
11255
|
)
|
|
11253
11256
|
`);
|
|
11254
11257
|
}
|
|
11255
|
-
function
|
|
11258
|
+
function up16(db) {
|
|
11256
11259
|
db.exec(`
|
|
11257
11260
|
CREATE TABLE IF NOT EXISTS session_scores (
|
|
11258
11261
|
id TEXT PRIMARY KEY,
|
|
@@ -11272,7 +11275,7 @@ function up15(db) {
|
|
|
11272
11275
|
ON session_scores(session_key);
|
|
11273
11276
|
`);
|
|
11274
11277
|
}
|
|
11275
|
-
function
|
|
11278
|
+
function up17(db) {
|
|
11276
11279
|
db.exec(`
|
|
11277
11280
|
CREATE TABLE IF NOT EXISTS scheduled_tasks (
|
|
11278
11281
|
id TEXT PRIMARY KEY,
|
|
@@ -11313,7 +11316,7 @@ function addColumnIfMissing6(db, table, column, definition) {
|
|
|
11313
11316
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11314
11317
|
}
|
|
11315
11318
|
}
|
|
11316
|
-
function
|
|
11319
|
+
function up18(db) {
|
|
11317
11320
|
db.exec(`
|
|
11318
11321
|
CREATE TABLE IF NOT EXISTS ingestion_jobs (
|
|
11319
11322
|
id TEXT PRIMARY KEY,
|
|
@@ -11339,7 +11342,7 @@ function up17(db) {
|
|
|
11339
11342
|
addColumnIfMissing6(db, "memories", "source_path", "TEXT");
|
|
11340
11343
|
addColumnIfMissing6(db, "memories", "source_section", "TEXT");
|
|
11341
11344
|
}
|
|
11342
|
-
function
|
|
11345
|
+
function up19(db) {
|
|
11343
11346
|
db.exec(`
|
|
11344
11347
|
CREATE TABLE IF NOT EXISTS telemetry_events (
|
|
11345
11348
|
id TEXT PRIMARY KEY,
|
|
@@ -11364,7 +11367,7 @@ function addColumnIfMissing7(db, table, column, definition) {
|
|
|
11364
11367
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11365
11368
|
}
|
|
11366
11369
|
}
|
|
11367
|
-
function
|
|
11370
|
+
function up20(db) {
|
|
11368
11371
|
db.exec(`
|
|
11369
11372
|
CREATE TABLE IF NOT EXISTS session_memories (
|
|
11370
11373
|
id TEXT PRIMARY KEY,
|
|
@@ -11391,7 +11394,7 @@ function up19(db) {
|
|
|
11391
11394
|
addColumnIfMissing7(db, "session_scores", "confidence", "REAL");
|
|
11392
11395
|
addColumnIfMissing7(db, "session_scores", "continuity_reasoning", "TEXT");
|
|
11393
11396
|
}
|
|
11394
|
-
function
|
|
11397
|
+
function up21(db) {
|
|
11395
11398
|
db.exec(`
|
|
11396
11399
|
CREATE TABLE IF NOT EXISTS session_checkpoints (
|
|
11397
11400
|
id TEXT PRIMARY KEY,
|
|
@@ -11413,7 +11416,7 @@ function up20(db) {
|
|
|
11413
11416
|
ON session_checkpoints(project_normalized, created_at DESC);
|
|
11414
11417
|
`);
|
|
11415
11418
|
}
|
|
11416
|
-
function
|
|
11419
|
+
function up22(db) {
|
|
11417
11420
|
const cols = db.prepare("PRAGMA table_info(scheduled_tasks)").all();
|
|
11418
11421
|
const colNames = new Set(cols.flatMap((c2) => typeof c2.name === "string" ? [c2.name] : []));
|
|
11419
11422
|
if (!colNames.has("skill_name")) {
|
|
@@ -11424,7 +11427,7 @@ function up21(db) {
|
|
|
11424
11427
|
CHECK (skill_mode IN ('inject', 'slash') OR skill_mode IS NULL)`);
|
|
11425
11428
|
}
|
|
11426
11429
|
}
|
|
11427
|
-
function
|
|
11430
|
+
function up23(db) {
|
|
11428
11431
|
const existing = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='skill_meta'").get();
|
|
11429
11432
|
if (existing)
|
|
11430
11433
|
return;
|
|
@@ -11456,7 +11459,7 @@ function up22(db) {
|
|
|
11456
11459
|
CREATE INDEX idx_skill_meta_source ON skill_meta(source);
|
|
11457
11460
|
`);
|
|
11458
11461
|
}
|
|
11459
|
-
function
|
|
11462
|
+
function up24(db) {
|
|
11460
11463
|
const entityCols = db.prepare("PRAGMA table_info(entities)").all();
|
|
11461
11464
|
const entityColNames = new Set(entityCols.flatMap((c2) => typeof c2.name === "string" ? [c2.name] : []));
|
|
11462
11465
|
if (!entityColNames.has("agent_id")) {
|
|
@@ -11541,13 +11544,13 @@ function addColumnIfMissing8(db, table, column, definition) {
|
|
|
11541
11544
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11542
11545
|
}
|
|
11543
11546
|
}
|
|
11544
|
-
function
|
|
11547
|
+
function up25(db) {
|
|
11545
11548
|
addColumnIfMissing8(db, "session_memories", "entity_slot", "INTEGER");
|
|
11546
11549
|
addColumnIfMissing8(db, "session_memories", "aspect_slot", "INTEGER");
|
|
11547
11550
|
addColumnIfMissing8(db, "session_memories", "is_constraint", "INTEGER NOT NULL DEFAULT 0");
|
|
11548
11551
|
addColumnIfMissing8(db, "session_memories", "structural_density", "INTEGER");
|
|
11549
11552
|
}
|
|
11550
|
-
function
|
|
11553
|
+
function up26(db) {
|
|
11551
11554
|
const columns = db.prepare("PRAGMA table_info(session_checkpoints)").all();
|
|
11552
11555
|
const columnNames = new Set(columns.flatMap((column) => typeof column.name === "string" ? [column.name] : []));
|
|
11553
11556
|
if (!columnNames.has("focal_entity_ids")) {
|
|
@@ -11572,25 +11575,25 @@ function addColumnIfMissing9(db, table, column, definition) {
|
|
|
11572
11575
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11573
11576
|
}
|
|
11574
11577
|
}
|
|
11575
|
-
function
|
|
11578
|
+
function up27(db) {
|
|
11576
11579
|
addColumnIfMissing9(db, "entities", "pinned", "INTEGER NOT NULL DEFAULT 0");
|
|
11577
11580
|
addColumnIfMissing9(db, "entities", "pinned_at", "TEXT");
|
|
11578
11581
|
db.exec("CREATE INDEX IF NOT EXISTS idx_entities_pinned ON entities(agent_id, pinned, pinned_at DESC)");
|
|
11579
11582
|
}
|
|
11580
|
-
function up27(_db) {}
|
|
11581
11583
|
function up28(_db) {}
|
|
11584
|
+
function up29(_db) {}
|
|
11582
11585
|
function addColumnIfMissing10(db, table, column, definition) {
|
|
11583
11586
|
const cols = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
11584
11587
|
if (!cols.some((c2) => c2.name === column)) {
|
|
11585
11588
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11586
11589
|
}
|
|
11587
11590
|
}
|
|
11588
|
-
function
|
|
11591
|
+
function up30(db) {
|
|
11589
11592
|
addColumnIfMissing10(db, "session_memories", "agent_relevance_score", "REAL");
|
|
11590
11593
|
addColumnIfMissing10(db, "session_memories", "agent_feedback_count", "INTEGER DEFAULT 0");
|
|
11591
11594
|
}
|
|
11592
|
-
function
|
|
11593
|
-
function
|
|
11595
|
+
function up31(_db) {}
|
|
11596
|
+
function up32(db) {
|
|
11594
11597
|
db.exec(`
|
|
11595
11598
|
UPDATE entities
|
|
11596
11599
|
SET canonical_name = REPLACE(REPLACE(REPLACE(
|
|
@@ -11599,7 +11602,7 @@ function up31(db) {
|
|
|
11599
11602
|
WHERE canonical_name IS NULL
|
|
11600
11603
|
`);
|
|
11601
11604
|
}
|
|
11602
|
-
function
|
|
11605
|
+
function up33(db) {
|
|
11603
11606
|
db.exec(`
|
|
11604
11607
|
CREATE TABLE IF NOT EXISTS memories_cold (
|
|
11605
11608
|
archive_id TEXT PRIMARY KEY,
|
|
@@ -11636,7 +11639,7 @@ function up32(db) {
|
|
|
11636
11639
|
CREATE INDEX IF NOT EXISTS idx_cold_source ON memories_cold(cold_source_id);
|
|
11637
11640
|
`);
|
|
11638
11641
|
}
|
|
11639
|
-
function
|
|
11642
|
+
function up34(db) {
|
|
11640
11643
|
db.exec(`
|
|
11641
11644
|
CREATE TABLE IF NOT EXISTS session_summaries (
|
|
11642
11645
|
id TEXT PRIMARY KEY,
|
|
@@ -11681,7 +11684,7 @@ function up33(db) {
|
|
|
11681
11684
|
WHERE session_key IS NOT NULL;
|
|
11682
11685
|
`);
|
|
11683
11686
|
}
|
|
11684
|
-
function
|
|
11687
|
+
function up35(db) {
|
|
11685
11688
|
db.exec(`
|
|
11686
11689
|
CREATE TABLE IF NOT EXISTS memory_jobs_new (
|
|
11687
11690
|
id TEXT PRIMARY KEY,
|
|
@@ -11726,7 +11729,7 @@ function up34(db) {
|
|
|
11726
11729
|
ON memory_jobs(failed_at);
|
|
11727
11730
|
`);
|
|
11728
11731
|
}
|
|
11729
|
-
function
|
|
11732
|
+
function up36(db) {
|
|
11730
11733
|
const depCols = db.prepare("PRAGMA table_info(entity_dependencies)").all();
|
|
11731
11734
|
if (!depCols.some((c2) => c2.name === "reason")) {
|
|
11732
11735
|
db.exec("ALTER TABLE entity_dependencies ADD COLUMN reason TEXT");
|
|
@@ -11736,7 +11739,7 @@ function up35(db) {
|
|
|
11736
11739
|
db.exec("ALTER TABLE entities ADD COLUMN last_synthesized_at TEXT");
|
|
11737
11740
|
}
|
|
11738
11741
|
}
|
|
11739
|
-
function
|
|
11742
|
+
function up37(db) {
|
|
11740
11743
|
const cols = db.prepare("PRAGMA table_info(embeddings)").all();
|
|
11741
11744
|
if (cols.length === 0)
|
|
11742
11745
|
return;
|
|
@@ -11744,14 +11747,14 @@ function up36(db) {
|
|
|
11744
11747
|
db.exec("ALTER TABLE embeddings ADD COLUMN vector BLOB");
|
|
11745
11748
|
}
|
|
11746
11749
|
}
|
|
11747
|
-
function
|
|
11750
|
+
function up38(db) {
|
|
11748
11751
|
const cols = db.prepare("PRAGMA table_info(memories)").all();
|
|
11749
11752
|
if (!cols.some((c2) => c2.name === "scope")) {
|
|
11750
11753
|
db.exec("ALTER TABLE memories ADD COLUMN scope TEXT DEFAULT NULL");
|
|
11751
11754
|
}
|
|
11752
11755
|
db.exec("CREATE INDEX IF NOT EXISTS idx_memories_scope ON memories(scope) WHERE scope IS NOT NULL");
|
|
11753
11756
|
}
|
|
11754
|
-
function
|
|
11757
|
+
function up39(db) {
|
|
11755
11758
|
db.exec("DROP INDEX IF EXISTS idx_memories_content_hash_unique");
|
|
11756
11759
|
db.exec(`
|
|
11757
11760
|
CREATE UNIQUE INDEX idx_memories_content_hash_unique
|
|
@@ -11759,7 +11762,7 @@ function up38(db) {
|
|
|
11759
11762
|
WHERE content_hash IS NOT NULL AND is_deleted = 0
|
|
11760
11763
|
`);
|
|
11761
11764
|
}
|
|
11762
|
-
function
|
|
11765
|
+
function up40(db) {
|
|
11763
11766
|
db.exec(`
|
|
11764
11767
|
CREATE VIRTUAL TABLE IF NOT EXISTS entities_fts USING fts5(
|
|
11765
11768
|
name, canonical_name,
|
|
@@ -11791,13 +11794,13 @@ function up39(db) {
|
|
|
11791
11794
|
END
|
|
11792
11795
|
`);
|
|
11793
11796
|
}
|
|
11794
|
-
function
|
|
11797
|
+
function up41(db) {
|
|
11795
11798
|
const cols = db.prepare("PRAGMA table_info(entity_dependencies)").all();
|
|
11796
11799
|
if (!cols.some((c2) => c2.name === "confidence")) {
|
|
11797
11800
|
db.exec("ALTER TABLE entity_dependencies ADD COLUMN confidence REAL DEFAULT 0.7");
|
|
11798
11801
|
}
|
|
11799
11802
|
}
|
|
11800
|
-
function
|
|
11803
|
+
function up42(db) {
|
|
11801
11804
|
db.exec(`
|
|
11802
11805
|
CREATE TABLE IF NOT EXISTS entity_communities (
|
|
11803
11806
|
id TEXT PRIMARY KEY,
|
|
@@ -11815,7 +11818,7 @@ function up41(db) {
|
|
|
11815
11818
|
db.exec("ALTER TABLE entities ADD COLUMN community_id TEXT REFERENCES entity_communities(id)");
|
|
11816
11819
|
}
|
|
11817
11820
|
}
|
|
11818
|
-
function
|
|
11821
|
+
function up43(db) {
|
|
11819
11822
|
db.exec(`
|
|
11820
11823
|
CREATE TABLE IF NOT EXISTS memory_hints (
|
|
11821
11824
|
id TEXT PRIMARY KEY,
|
|
@@ -11855,7 +11858,7 @@ function up42(db) {
|
|
|
11855
11858
|
END
|
|
11856
11859
|
`);
|
|
11857
11860
|
}
|
|
11858
|
-
function
|
|
11861
|
+
function up44(db) {
|
|
11859
11862
|
db.exec(`
|
|
11860
11863
|
DELETE FROM entity_dependencies
|
|
11861
11864
|
WHERE id NOT IN (
|
|
@@ -11873,7 +11876,7 @@ function up43(db) {
|
|
|
11873
11876
|
)
|
|
11874
11877
|
`);
|
|
11875
11878
|
}
|
|
11876
|
-
function
|
|
11879
|
+
function up45(db) {
|
|
11877
11880
|
db.exec(`
|
|
11878
11881
|
CREATE TABLE IF NOT EXISTS session_transcripts (
|
|
11879
11882
|
session_key TEXT PRIMARY KEY,
|
|
@@ -11896,7 +11899,7 @@ function addColumnIfMissing11(db, table, column, definition) {
|
|
|
11896
11899
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11897
11900
|
}
|
|
11898
11901
|
}
|
|
11899
|
-
function
|
|
11902
|
+
function up46(db) {
|
|
11900
11903
|
addColumnIfMissing11(db, "session_memories", "path_json", "TEXT");
|
|
11901
11904
|
db.exec(`
|
|
11902
11905
|
CREATE TABLE IF NOT EXISTS path_feedback_events (
|
|
@@ -11971,7 +11974,7 @@ function addColumnIfMissing12(db, table, column, definition) {
|
|
|
11971
11974
|
return;
|
|
11972
11975
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11973
11976
|
}
|
|
11974
|
-
function
|
|
11977
|
+
function up47(db) {
|
|
11975
11978
|
addColumnIfMissing12(db, "session_memories", "entity_slot", "INTEGER");
|
|
11976
11979
|
addColumnIfMissing12(db, "session_memories", "aspect_slot", "INTEGER");
|
|
11977
11980
|
addColumnIfMissing12(db, "session_memories", "is_constraint", "INTEGER NOT NULL DEFAULT 0");
|
|
@@ -12059,7 +12062,7 @@ function addColumnIfMissing13(db, table, column, definition) {
|
|
|
12059
12062
|
return;
|
|
12060
12063
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12061
12064
|
}
|
|
12062
|
-
function
|
|
12065
|
+
function up48(db) {
|
|
12063
12066
|
db.exec(`
|
|
12064
12067
|
CREATE TABLE IF NOT EXISTS agents (
|
|
12065
12068
|
id TEXT PRIMARY KEY,
|
|
@@ -12088,7 +12091,7 @@ function addColumnIfMissing14(db, table, column, definition) {
|
|
|
12088
12091
|
return;
|
|
12089
12092
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12090
12093
|
}
|
|
12091
|
-
function
|
|
12094
|
+
function up49(db) {
|
|
12092
12095
|
addColumnIfMissing14(db, "session_summaries", "source_type", "TEXT");
|
|
12093
12096
|
addColumnIfMissing14(db, "session_summaries", "source_ref", "TEXT");
|
|
12094
12097
|
addColumnIfMissing14(db, "session_summaries", "meta_json", "TEXT");
|
|
@@ -12114,7 +12117,7 @@ function addColumnIfMissing15(db, table, column, definition) {
|
|
|
12114
12117
|
return;
|
|
12115
12118
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12116
12119
|
}
|
|
12117
|
-
function
|
|
12120
|
+
function up50(db) {
|
|
12118
12121
|
addColumnIfMissing15(db, "session_transcripts", "updated_at", "TEXT");
|
|
12119
12122
|
addColumnIfMissing15(db, "summary_jobs", "agent_id", "TEXT NOT NULL DEFAULT 'default'");
|
|
12120
12123
|
addColumnIfMissing15(db, "session_scores", "agent_id", "TEXT NOT NULL DEFAULT 'default'");
|
|
@@ -12185,7 +12188,7 @@ function up49(db) {
|
|
|
12185
12188
|
ON memory_md_heads(lease_expires_at);
|
|
12186
12189
|
`);
|
|
12187
12190
|
}
|
|
12188
|
-
function
|
|
12191
|
+
function up51(db) {
|
|
12189
12192
|
db.exec(`
|
|
12190
12193
|
DROP INDEX IF EXISTS idx_summaries_session_depth;
|
|
12191
12194
|
|
|
@@ -12246,7 +12249,7 @@ function up50(db) {
|
|
|
12246
12249
|
AND COALESCE(source_type, 'summary') = 'summary';
|
|
12247
12250
|
`);
|
|
12248
12251
|
}
|
|
12249
|
-
function
|
|
12252
|
+
function up52(db) {
|
|
12250
12253
|
db.exec(`
|
|
12251
12254
|
DROP TRIGGER IF EXISTS session_transcripts_fts_ai;
|
|
12252
12255
|
DROP TRIGGER IF EXISTS session_transcripts_fts_ad;
|
|
@@ -12344,7 +12347,7 @@ function up51(db) {
|
|
|
12344
12347
|
AND COALESCE(source_type, 'summary') = 'summary';
|
|
12345
12348
|
`);
|
|
12346
12349
|
}
|
|
12347
|
-
function
|
|
12350
|
+
function up53(db) {
|
|
12348
12351
|
db.exec(`
|
|
12349
12352
|
CREATE TABLE IF NOT EXISTS memory_thread_heads (
|
|
12350
12353
|
agent_id TEXT NOT NULL DEFAULT 'default',
|
|
@@ -12462,7 +12465,7 @@ function up52(db) {
|
|
|
12462
12465
|
WHERE excluded.latest_at >= memory_thread_heads.latest_at;
|
|
12463
12466
|
`);
|
|
12464
12467
|
}
|
|
12465
|
-
function
|
|
12468
|
+
function up54(db) {
|
|
12466
12469
|
db.exec(`
|
|
12467
12470
|
CREATE TABLE IF NOT EXISTS session_extract_cursors (
|
|
12468
12471
|
session_key TEXT NOT NULL,
|
|
@@ -12479,7 +12482,7 @@ function hasTable(db, name) {
|
|
|
12479
12482
|
WHERE type = 'table' AND name = ?
|
|
12480
12483
|
LIMIT 1`).get(name) !== undefined;
|
|
12481
12484
|
}
|
|
12482
|
-
function
|
|
12485
|
+
function up55(db) {
|
|
12483
12486
|
db.exec(`
|
|
12484
12487
|
CREATE TABLE IF NOT EXISTS entity_dependency_history (
|
|
12485
12488
|
id TEXT PRIMARY KEY,
|
|
@@ -12649,7 +12652,7 @@ function addColumnIfMissing16(db, table, column, definition) {
|
|
|
12649
12652
|
return;
|
|
12650
12653
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12651
12654
|
}
|
|
12652
|
-
function
|
|
12655
|
+
function up56(db) {
|
|
12653
12656
|
addColumnIfMissing16(db, "summary_jobs", "session_id", "TEXT");
|
|
12654
12657
|
addColumnIfMissing16(db, "summary_jobs", "trigger", "TEXT NOT NULL DEFAULT 'session_end'");
|
|
12655
12658
|
addColumnIfMissing16(db, "summary_jobs", "captured_at", "TEXT");
|
|
@@ -12741,24 +12744,8 @@ function up55(db) {
|
|
|
12741
12744
|
VALUES ('rebuild');
|
|
12742
12745
|
`);
|
|
12743
12746
|
}
|
|
12744
|
-
function
|
|
12745
|
-
|
|
12746
|
-
CREATE TABLE IF NOT EXISTS mcp_invocations (
|
|
12747
|
-
id TEXT PRIMARY KEY,
|
|
12748
|
-
server_id TEXT NOT NULL,
|
|
12749
|
-
tool_name TEXT NOT NULL,
|
|
12750
|
-
agent_id TEXT NOT NULL DEFAULT 'default',
|
|
12751
|
-
source TEXT NOT NULL CHECK(source IN ('cli','agent','mcp','dashboard')),
|
|
12752
|
-
latency_ms INTEGER NOT NULL,
|
|
12753
|
-
success INTEGER NOT NULL DEFAULT 1,
|
|
12754
|
-
error_text TEXT,
|
|
12755
|
-
created_at TEXT NOT NULL DEFAULT (datetime('now'))
|
|
12756
|
-
);
|
|
12757
|
-
CREATE INDEX IF NOT EXISTS idx_mcp_inv_server ON mcp_invocations(server_id, created_at);
|
|
12758
|
-
CREATE INDEX IF NOT EXISTS idx_mcp_inv_agent ON mcp_invocations(agent_id, created_at);
|
|
12759
|
-
`);
|
|
12760
|
-
}
|
|
12761
|
-
function up57(db) {
|
|
12747
|
+
function up57(_db) {}
|
|
12748
|
+
function up58(db) {
|
|
12762
12749
|
db.exec(`
|
|
12763
12750
|
CREATE TABLE IF NOT EXISTS skill_invocations (
|
|
12764
12751
|
id TEXT PRIMARY KEY,
|
|
@@ -12774,7 +12761,7 @@ function up57(db) {
|
|
|
12774
12761
|
CREATE INDEX IF NOT EXISTS idx_skill_inv_agent ON skill_invocations(agent_id, created_at);
|
|
12775
12762
|
`);
|
|
12776
12763
|
}
|
|
12777
|
-
function
|
|
12764
|
+
function up59(db) {
|
|
12778
12765
|
db.exec(`
|
|
12779
12766
|
CREATE TABLE IF NOT EXISTS task_scope_hints (
|
|
12780
12767
|
task_id TEXT PRIMARY KEY REFERENCES scheduled_tasks(id) ON DELETE CASCADE,
|
|
@@ -12805,7 +12792,7 @@ function up58(db) {
|
|
|
12805
12792
|
ON task_scope_hints(agent_id, updated_at);
|
|
12806
12793
|
`);
|
|
12807
12794
|
}
|
|
12808
|
-
function
|
|
12795
|
+
function up60(db) {
|
|
12809
12796
|
db.exec(`
|
|
12810
12797
|
CREATE TABLE IF NOT EXISTS dreaming_state (
|
|
12811
12798
|
agent_id TEXT PRIMARY KEY NOT NULL,
|
|
@@ -12848,7 +12835,7 @@ function ensureMemoriesScopeColumns(db) {
|
|
|
12848
12835
|
if (!names.has("scope"))
|
|
12849
12836
|
db.exec("ALTER TABLE memories ADD COLUMN scope TEXT");
|
|
12850
12837
|
}
|
|
12851
|
-
function
|
|
12838
|
+
function up61(db) {
|
|
12852
12839
|
ensureMemoriesScopeColumns(db);
|
|
12853
12840
|
db.exec("DROP INDEX IF EXISTS idx_memories_content_hash_unique");
|
|
12854
12841
|
db.exec(`
|
|
@@ -12861,20 +12848,20 @@ function up60(db) {
|
|
|
12861
12848
|
WHERE content_hash IS NOT NULL AND is_deleted = 0
|
|
12862
12849
|
`);
|
|
12863
12850
|
}
|
|
12864
|
-
function
|
|
12851
|
+
function up62(db) {
|
|
12865
12852
|
const sql = readMemoriesFtsSql(db);
|
|
12866
12853
|
if (sql !== null && !memoriesFtsNeedsTokenizerRepair(sql))
|
|
12867
12854
|
return;
|
|
12868
12855
|
recreateMemoriesFts(db);
|
|
12869
12856
|
}
|
|
12870
|
-
function
|
|
12857
|
+
function up63(db) {
|
|
12871
12858
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_entities_order
|
|
12872
12859
|
ON entities(agent_id, pinned DESC, pinned_at DESC, mentions DESC, updated_at DESC, name)`);
|
|
12873
12860
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_entities_extracted_mentions
|
|
12874
12861
|
ON entities(entity_type, mentions)
|
|
12875
12862
|
WHERE entity_type = 'extracted'`);
|
|
12876
12863
|
}
|
|
12877
|
-
function
|
|
12864
|
+
function up64(db) {
|
|
12878
12865
|
const cols = db.prepare("PRAGMA table_info(entity_attributes)").all();
|
|
12879
12866
|
if (!cols.some((col) => col.name === "claim_key")) {
|
|
12880
12867
|
db.exec("ALTER TABLE entity_attributes ADD COLUMN claim_key TEXT");
|
|
@@ -12883,7 +12870,7 @@ function up63(db) {
|
|
|
12883
12870
|
ON entity_attributes(agent_id, aspect_id, claim_key, status)
|
|
12884
12871
|
WHERE claim_key IS NOT NULL`);
|
|
12885
12872
|
}
|
|
12886
|
-
function
|
|
12873
|
+
function up65(db) {
|
|
12887
12874
|
const cols = db.prepare("PRAGMA table_info(entity_attributes)").all();
|
|
12888
12875
|
if (!cols.some((col) => col.name === "group_key")) {
|
|
12889
12876
|
db.exec("ALTER TABLE entity_attributes ADD COLUMN group_key TEXT");
|
|
@@ -12895,13 +12882,13 @@ function up64(db) {
|
|
|
12895
12882
|
ON entity_attributes(agent_id, aspect_id, group_key, claim_key, status)
|
|
12896
12883
|
WHERE claim_key IS NOT NULL`);
|
|
12897
12884
|
}
|
|
12898
|
-
function
|
|
12885
|
+
function up66(db) {
|
|
12899
12886
|
const cols = db.prepare("PRAGMA table_info(memory_artifacts)").all();
|
|
12900
12887
|
if (cols.some((col) => col.name === "source_mtime_ms"))
|
|
12901
12888
|
return;
|
|
12902
12889
|
db.exec("ALTER TABLE memory_artifacts ADD COLUMN source_mtime_ms REAL");
|
|
12903
12890
|
}
|
|
12904
|
-
function
|
|
12891
|
+
function up67(db) {
|
|
12905
12892
|
const cols = db.prepare("PRAGMA table_info(memory_artifacts)").all();
|
|
12906
12893
|
const names = new Set(cols.map((col) => col.name));
|
|
12907
12894
|
if (!names.has("is_deleted")) {
|
|
@@ -12915,7 +12902,7 @@ function up66(db) {
|
|
|
12915
12902
|
ON memory_artifacts(agent_id, is_deleted, deleted_at)
|
|
12916
12903
|
`);
|
|
12917
12904
|
}
|
|
12918
|
-
function
|
|
12905
|
+
function up68(db) {
|
|
12919
12906
|
db.exec("DROP TRIGGER IF EXISTS memories_au");
|
|
12920
12907
|
db.exec(`
|
|
12921
12908
|
CREATE TRIGGER IF NOT EXISTS memories_au AFTER UPDATE OF content ON memories BEGIN
|
|
@@ -12933,7 +12920,7 @@ function addColumnIfMissing17(db, table, column, definition) {
|
|
|
12933
12920
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12934
12921
|
}
|
|
12935
12922
|
}
|
|
12936
|
-
function
|
|
12923
|
+
function up69(db) {
|
|
12937
12924
|
for (const table of ["entities", "entity_communities", "entity_attributes", "entity_dependencies"]) {
|
|
12938
12925
|
addColumnIfMissing17(db, table, "source_id", "TEXT");
|
|
12939
12926
|
addColumnIfMissing17(db, table, "source_kind", "TEXT");
|
|
@@ -12953,7 +12940,7 @@ function hasColumn7(db, table, column) {
|
|
|
12953
12940
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
12954
12941
|
return rows.some((row) => row.name === column);
|
|
12955
12942
|
}
|
|
12956
|
-
function
|
|
12943
|
+
function up70(db) {
|
|
12957
12944
|
if (!hasTable2(db, "embeddings"))
|
|
12958
12945
|
return;
|
|
12959
12946
|
if (!hasColumn7(db, "embeddings", "agent_id")) {
|
|
@@ -12961,7 +12948,7 @@ function up69(db) {
|
|
|
12961
12948
|
}
|
|
12962
12949
|
db.exec("CREATE INDEX IF NOT EXISTS idx_embeddings_agent_source ON embeddings(agent_id, source_type, source_id)");
|
|
12963
12950
|
}
|
|
12964
|
-
function
|
|
12951
|
+
function up71(db) {
|
|
12965
12952
|
db.exec(`
|
|
12966
12953
|
CREATE TABLE IF NOT EXISTS memory_search_telemetry (
|
|
12967
12954
|
id TEXT PRIMARY KEY,
|
|
@@ -13002,7 +12989,7 @@ function addColumnIfMissing18(db, table, column, definition) {
|
|
|
13002
12989
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
13003
12990
|
}
|
|
13004
12991
|
}
|
|
13005
|
-
function
|
|
12992
|
+
function up72(db) {
|
|
13006
12993
|
db.exec(`
|
|
13007
12994
|
CREATE TABLE IF NOT EXISTS ontology_proposals (
|
|
13008
12995
|
id TEXT PRIMARY KEY,
|
|
@@ -13045,7 +13032,7 @@ function up71(db) {
|
|
|
13045
13032
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_${table}_proposal ON ${table}(agent_id, proposal_id)`);
|
|
13046
13033
|
}
|
|
13047
13034
|
}
|
|
13048
|
-
function
|
|
13035
|
+
function up73(db) {
|
|
13049
13036
|
db.exec(`
|
|
13050
13037
|
CREATE TABLE IF NOT EXISTS daily_reflections (
|
|
13051
13038
|
id TEXT PRIMARY KEY,
|
|
@@ -13072,7 +13059,7 @@ function up72(db) {
|
|
|
13072
13059
|
WHERE content_key IS NOT NULL;
|
|
13073
13060
|
`);
|
|
13074
13061
|
}
|
|
13075
|
-
function
|
|
13062
|
+
function up74(db) {
|
|
13076
13063
|
const cols = db.prepare("PRAGMA table_info(daily_reflections)").all();
|
|
13077
13064
|
const colNames = new Set(cols.flatMap((c2) => typeof c2.name === "string" ? [c2.name] : []));
|
|
13078
13065
|
if (!colNames.has("content_key")) {
|
|
@@ -13109,7 +13096,7 @@ function backfillVersionRoots(db) {
|
|
|
13109
13096
|
WHERE version_root_id IS NULL
|
|
13110
13097
|
`);
|
|
13111
13098
|
}
|
|
13112
|
-
function
|
|
13099
|
+
function up75(db) {
|
|
13113
13100
|
for (const table of ["entities", "entity_aspects", "entity_dependencies"]) {
|
|
13114
13101
|
addColumnIfMissing19(db, table, "status", "TEXT NOT NULL DEFAULT 'active'");
|
|
13115
13102
|
addColumnIfMissing19(db, table, "archived_at", "TEXT");
|
|
@@ -13144,7 +13131,7 @@ function up74(db) {
|
|
|
13144
13131
|
ON entity_aspects(agent_id, proposal_id);
|
|
13145
13132
|
`);
|
|
13146
13133
|
}
|
|
13147
|
-
function
|
|
13134
|
+
function up76(db) {
|
|
13148
13135
|
db.exec(`
|
|
13149
13136
|
CREATE TABLE IF NOT EXISTS epistemic_assertions (
|
|
13150
13137
|
id TEXT PRIMARY KEY,
|
|
@@ -13200,7 +13187,7 @@ function ensureMemoriesScopeColumns2(db) {
|
|
|
13200
13187
|
if (!names.has("runtime_path"))
|
|
13201
13188
|
db.exec("ALTER TABLE memories ADD COLUMN runtime_path TEXT");
|
|
13202
13189
|
}
|
|
13203
|
-
function
|
|
13190
|
+
function up77(db) {
|
|
13204
13191
|
ensureMemoriesScopeColumns2(db);
|
|
13205
13192
|
db.exec("DROP INDEX IF EXISTS idx_memories_idempotency_key");
|
|
13206
13193
|
db.exec(`
|
|
@@ -13214,7 +13201,7 @@ function up76(db) {
|
|
|
13214
13201
|
WHERE idempotency_key IS NOT NULL AND is_deleted = 0
|
|
13215
13202
|
`);
|
|
13216
13203
|
}
|
|
13217
|
-
function
|
|
13204
|
+
function up78(db) {
|
|
13218
13205
|
db.exec(`
|
|
13219
13206
|
CREATE TABLE IF NOT EXISTS session_context_epochs (
|
|
13220
13207
|
session_key TEXT NOT NULL,
|
|
@@ -13249,7 +13236,7 @@ function up77(db) {
|
|
|
13249
13236
|
ON session_recall_events(item_kind, item_id, created_at DESC);
|
|
13250
13237
|
`);
|
|
13251
13238
|
}
|
|
13252
|
-
function
|
|
13239
|
+
function up79(db) {
|
|
13253
13240
|
db.exec(`
|
|
13254
13241
|
CREATE TABLE IF NOT EXISTS aggregate_memory_sources (
|
|
13255
13242
|
aggregate_memory_id TEXT NOT NULL,
|
|
@@ -13268,7 +13255,7 @@ function addColumnIfMissing20(db, table, column, definition) {
|
|
|
13268
13255
|
return;
|
|
13269
13256
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
13270
13257
|
}
|
|
13271
|
-
function
|
|
13258
|
+
function up80(db) {
|
|
13272
13259
|
addColumnIfMissing20(db, "memory_artifacts", "source_id", "TEXT");
|
|
13273
13260
|
addColumnIfMissing20(db, "memory_artifacts", "source_root", "TEXT");
|
|
13274
13261
|
addColumnIfMissing20(db, "memory_artifacts", "source_external_id", "TEXT");
|
|
@@ -13281,7 +13268,7 @@ function up79(db) {
|
|
|
13281
13268
|
ON memory_artifacts(agent_id, source_id, source_root);
|
|
13282
13269
|
`);
|
|
13283
13270
|
}
|
|
13284
|
-
function
|
|
13271
|
+
function up81(db) {
|
|
13285
13272
|
db.exec(`
|
|
13286
13273
|
CREATE TABLE IF NOT EXISTS temporal_edges (
|
|
13287
13274
|
id TEXT PRIMARY KEY,
|
|
@@ -13304,7 +13291,7 @@ function up80(db) {
|
|
|
13304
13291
|
ON temporal_edges(agent_id, subject_type, subject_id);
|
|
13305
13292
|
`);
|
|
13306
13293
|
}
|
|
13307
|
-
function
|
|
13294
|
+
function up82(db) {
|
|
13308
13295
|
db.exec(`
|
|
13309
13296
|
CREATE TABLE IF NOT EXISTS entity_aliases (
|
|
13310
13297
|
id TEXT PRIMARY KEY,
|
|
@@ -13328,7 +13315,7 @@ function up81(db) {
|
|
|
13328
13315
|
ON entity_aliases(agent_id, canonical_alias, status);
|
|
13329
13316
|
`);
|
|
13330
13317
|
}
|
|
13331
|
-
function
|
|
13318
|
+
function up83(db) {
|
|
13332
13319
|
db.exec(`
|
|
13333
13320
|
CREATE TABLE IF NOT EXISTS api_keys (
|
|
13334
13321
|
id TEXT PRIMARY KEY,
|
|
@@ -13356,7 +13343,7 @@ function up82(db) {
|
|
|
13356
13343
|
ON api_keys(connector, harness);
|
|
13357
13344
|
`);
|
|
13358
13345
|
}
|
|
13359
|
-
function
|
|
13346
|
+
function up84(db) {
|
|
13360
13347
|
db.exec(`
|
|
13361
13348
|
CREATE TABLE IF NOT EXISTS transcript_capture_jobs (
|
|
13362
13349
|
id TEXT PRIMARY KEY,
|
|
@@ -13391,7 +13378,7 @@ function hasColumn10(db, table, column) {
|
|
|
13391
13378
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
13392
13379
|
return rows.some((row) => row.name === column);
|
|
13393
13380
|
}
|
|
13394
|
-
function
|
|
13381
|
+
function up85(db) {
|
|
13395
13382
|
if (!hasColumn10(db, "documents", "agent_id")) {
|
|
13396
13383
|
db.exec("ALTER TABLE documents ADD COLUMN agent_id TEXT NOT NULL DEFAULT 'default'");
|
|
13397
13384
|
}
|
|
@@ -13477,7 +13464,7 @@ function up84(db) {
|
|
|
13477
13464
|
db.exec("CREATE INDEX IF NOT EXISTS idx_documents_agent_project ON documents(agent_id, project)");
|
|
13478
13465
|
db.exec("CREATE INDEX IF NOT EXISTS idx_documents_source_scope ON documents(source_url, agent_id, project)");
|
|
13479
13466
|
}
|
|
13480
|
-
function
|
|
13467
|
+
function up86(db) {
|
|
13481
13468
|
db.exec(`
|
|
13482
13469
|
CREATE TABLE IF NOT EXISTS aggregate_evidence_sources (
|
|
13483
13470
|
aggregate_memory_id TEXT NOT NULL,
|
|
@@ -13499,7 +13486,7 @@ function hasColumn11(db, table, column) {
|
|
|
13499
13486
|
return rows.some((row) => row.name === column);
|
|
13500
13487
|
}
|
|
13501
13488
|
var COLUMNS = ["harness", "session_id", "tool_use_id", "cwd", "origin", "args"];
|
|
13502
|
-
function
|
|
13489
|
+
function up87(db) {
|
|
13503
13490
|
for (const column of COLUMNS) {
|
|
13504
13491
|
if (!hasColumn11(db, "skill_invocations", column)) {
|
|
13505
13492
|
db.exec(`ALTER TABLE skill_invocations ADD COLUMN ${column} TEXT`);
|
|
@@ -13580,7 +13567,7 @@ function documentScopeColumnsPreservingExisting(db) {
|
|
|
13580
13567
|
`);
|
|
13581
13568
|
}
|
|
13582
13569
|
try {
|
|
13583
|
-
|
|
13570
|
+
up85(db);
|
|
13584
13571
|
if (preserveAgentId) {
|
|
13585
13572
|
db.exec(`
|
|
13586
13573
|
UPDATE documents
|
|
@@ -13600,12 +13587,12 @@ function documentScopeColumnsPreservingExisting(db) {
|
|
|
13600
13587
|
db.exec("DROP TABLE IF EXISTS temp.__signet_doc_project_guard");
|
|
13601
13588
|
}
|
|
13602
13589
|
}
|
|
13603
|
-
function
|
|
13604
|
-
|
|
13590
|
+
function up88(db) {
|
|
13591
|
+
up84(db);
|
|
13605
13592
|
if (hasTable3(db, "documents")) {
|
|
13606
13593
|
documentScopeColumnsPreservingExisting(db);
|
|
13607
13594
|
}
|
|
13608
|
-
|
|
13595
|
+
up86(db);
|
|
13609
13596
|
addColumnIfMissing21(db, "memories", "superseded_by", "TEXT");
|
|
13610
13597
|
addColumnIfMissing21(db, "memories", "superseded_at", "TEXT");
|
|
13611
13598
|
addColumnIfMissing21(db, "memories", "superseded_reason", "TEXT");
|
|
@@ -13662,7 +13649,7 @@ function up87(db) {
|
|
|
13662
13649
|
AND ${sourceAgentId} = ${targetAgentId}
|
|
13663
13650
|
`);
|
|
13664
13651
|
}
|
|
13665
|
-
function
|
|
13652
|
+
function up89(db) {
|
|
13666
13653
|
db.exec(`
|
|
13667
13654
|
CREATE TABLE IF NOT EXISTS legacy_markdown_imports (
|
|
13668
13655
|
path TEXT PRIMARY KEY,
|
|
@@ -13692,7 +13679,7 @@ function up88(db) {
|
|
|
13692
13679
|
ON legacy_markdown_chunks(memory_id);
|
|
13693
13680
|
`);
|
|
13694
13681
|
}
|
|
13695
|
-
function
|
|
13682
|
+
function up90(db) {
|
|
13696
13683
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name IN ('relations', 'entity_dependencies')").all();
|
|
13697
13684
|
const tableNames = new Set(tables.map((r2) => String(r2.name)));
|
|
13698
13685
|
if (!tableNames.has("relations") || !tableNames.has("entity_dependencies"))
|
|
@@ -13751,7 +13738,7 @@ function addColumnIfMissing22(db, table, column, definition) {
|
|
|
13751
13738
|
return;
|
|
13752
13739
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
13753
13740
|
}
|
|
13754
|
-
function
|
|
13741
|
+
function up91(db) {
|
|
13755
13742
|
addColumnIfMissing22(db, "summary_jobs", "content_hash", "TEXT");
|
|
13756
13743
|
db.exec(`
|
|
13757
13744
|
CREATE INDEX IF NOT EXISTS idx_summary_jobs_agent_session_content_hash
|
|
@@ -13764,14 +13751,14 @@ function addColumnIfMissing23(db, table, column, definition) {
|
|
|
13764
13751
|
return;
|
|
13765
13752
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
13766
13753
|
}
|
|
13767
|
-
function
|
|
13754
|
+
function up92(db) {
|
|
13768
13755
|
addColumnIfMissing23(db, "summary_jobs", "boundary_reason", "TEXT");
|
|
13769
13756
|
db.exec(`
|
|
13770
13757
|
CREATE INDEX IF NOT EXISTS idx_summary_jobs_boundary_reason
|
|
13771
13758
|
ON summary_jobs(agent_id, session_key, boundary_reason)
|
|
13772
13759
|
`);
|
|
13773
13760
|
}
|
|
13774
|
-
function
|
|
13761
|
+
function up93(db) {
|
|
13775
13762
|
db.exec(`
|
|
13776
13763
|
CREATE TABLE IF NOT EXISTS transcript_recovery_files (
|
|
13777
13764
|
agent_id TEXT NOT NULL,
|
|
@@ -13789,7 +13776,7 @@ function up92(db) {
|
|
|
13789
13776
|
ON transcript_capture_jobs(agent_id, session_id, status);
|
|
13790
13777
|
`);
|
|
13791
13778
|
}
|
|
13792
|
-
function
|
|
13779
|
+
function up94(db) {
|
|
13793
13780
|
db.exec(`
|
|
13794
13781
|
CREATE TABLE IF NOT EXISTS job_cancellations (
|
|
13795
13782
|
id TEXT PRIMARY KEY,
|
|
@@ -13817,7 +13804,7 @@ function indexExists(db, table, indexName) {
|
|
|
13817
13804
|
const rows = db.prepare(`PRAGMA index_list(${table})`).all();
|
|
13818
13805
|
return rows.some((row) => row.name === indexName);
|
|
13819
13806
|
}
|
|
13820
|
-
function
|
|
13807
|
+
function up95(db) {
|
|
13821
13808
|
db.exec(`
|
|
13822
13809
|
CREATE TABLE IF NOT EXISTS job_archive (
|
|
13823
13810
|
id TEXT PRIMARY KEY,
|
|
@@ -13844,7 +13831,7 @@ function indexExists2(db, table, indexName) {
|
|
|
13844
13831
|
const rows = db.prepare(`PRAGMA index_list(${table})`).all();
|
|
13845
13832
|
return rows.some((row) => row.name === indexName);
|
|
13846
13833
|
}
|
|
13847
|
-
function
|
|
13834
|
+
function up96(db) {
|
|
13848
13835
|
db.exec(`
|
|
13849
13836
|
CREATE TABLE IF NOT EXISTS embedding_index_state (
|
|
13850
13837
|
id INTEGER PRIMARY KEY CHECK (id = 1),
|
|
@@ -13857,7 +13844,7 @@ function up95(db) {
|
|
|
13857
13844
|
)
|
|
13858
13845
|
`);
|
|
13859
13846
|
}
|
|
13860
|
-
function
|
|
13847
|
+
function up97(db) {
|
|
13861
13848
|
db.exec(`
|
|
13862
13849
|
CREATE TABLE IF NOT EXISTS embeddings_staging (
|
|
13863
13850
|
id TEXT PRIMARY KEY,
|
|
@@ -13876,7 +13863,7 @@ function up96(db) {
|
|
|
13876
13863
|
ON embeddings_staging(agent_id, source_type, source_id);
|
|
13877
13864
|
`);
|
|
13878
13865
|
}
|
|
13879
|
-
function
|
|
13866
|
+
function up98(db) {
|
|
13880
13867
|
const columns = db.prepare("PRAGMA table_info(dreaming_state)").all();
|
|
13881
13868
|
if (!columns.some((column) => column.name === "evidence_cursor")) {
|
|
13882
13869
|
db.exec("ALTER TABLE dreaming_state ADD COLUMN evidence_cursor TEXT");
|
|
@@ -13887,7 +13874,7 @@ function hasColumn13(db, table, column) {
|
|
|
13887
13874
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
13888
13875
|
return rows.some((r2) => r2.name === column);
|
|
13889
13876
|
}
|
|
13890
|
-
function
|
|
13877
|
+
function up99(db) {
|
|
13891
13878
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name = 'memories'").all();
|
|
13892
13879
|
if (tables.length === 0)
|
|
13893
13880
|
return;
|
|
@@ -13912,23 +13899,23 @@ function up98(db) {
|
|
|
13912
13899
|
function hasColumn14(db, table, column) {
|
|
13913
13900
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
13914
13901
|
}
|
|
13915
|
-
function
|
|
13902
|
+
function up100(db) {
|
|
13916
13903
|
const hasMemories = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'memories'").get();
|
|
13917
13904
|
if (!hasMemories || !hasColumn14(db, "memories", "memory_kind") || !hasColumn14(db, "memories", "type"))
|
|
13918
13905
|
return;
|
|
13919
13906
|
db.exec("UPDATE memories SET memory_kind = NULL WHERE type = 'session_summary'");
|
|
13920
13907
|
}
|
|
13921
|
-
function
|
|
13908
|
+
function up101(db) {
|
|
13922
13909
|
db.exec("DROP TABLE IF EXISTS ingestion_jobs");
|
|
13923
13910
|
}
|
|
13924
|
-
function
|
|
13911
|
+
function up102(db) {
|
|
13925
13912
|
const columns = db.prepare("PRAGMA table_info(dreaming_state)").all();
|
|
13926
13913
|
if (!columns.some((column) => column.name === "last_failure_at")) {
|
|
13927
13914
|
db.exec("ALTER TABLE dreaming_state ADD COLUMN last_failure_at TEXT");
|
|
13928
13915
|
}
|
|
13929
13916
|
db.exec("UPDATE dreaming_state SET last_failure_at = updated_at WHERE consecutive_failures > 0 AND last_failure_at IS NULL");
|
|
13930
13917
|
}
|
|
13931
|
-
function
|
|
13918
|
+
function up103(db) {
|
|
13932
13919
|
db.exec(`
|
|
13933
13920
|
CREATE TABLE IF NOT EXISTS dreaming_evidence_exclusions (
|
|
13934
13921
|
agent_id TEXT NOT NULL,
|
|
@@ -13945,7 +13932,7 @@ function up102(db) {
|
|
|
13945
13932
|
ON dreaming_evidence_exclusions (agent_id, resolved_at, requeue_requested_at, excluded_at DESC);
|
|
13946
13933
|
`);
|
|
13947
13934
|
}
|
|
13948
|
-
function
|
|
13935
|
+
function up104(db) {
|
|
13949
13936
|
db.exec(`
|
|
13950
13937
|
CREATE TABLE IF NOT EXISTS dreaming_tool_calls (
|
|
13951
13938
|
id TEXT PRIMARY KEY,
|
|
@@ -13965,7 +13952,7 @@ function up103(db) {
|
|
|
13965
13952
|
ON dreaming_tool_calls (agent_id, pass_id, sequence ASC);
|
|
13966
13953
|
`);
|
|
13967
13954
|
}
|
|
13968
|
-
function
|
|
13955
|
+
function up105(db) {
|
|
13969
13956
|
const columns = db.prepare("PRAGMA table_info(dreaming_passes)").all();
|
|
13970
13957
|
if (!columns.some((column) => column.name === "evidence_window_json")) {
|
|
13971
13958
|
db.exec("ALTER TABLE dreaming_passes ADD COLUMN evidence_window_json TEXT");
|
|
@@ -13974,7 +13961,7 @@ function up104(db) {
|
|
|
13974
13961
|
db.exec("ALTER TABLE dreaming_passes ADD COLUMN runbook_json TEXT");
|
|
13975
13962
|
}
|
|
13976
13963
|
}
|
|
13977
|
-
function
|
|
13964
|
+
function up106(db) {
|
|
13978
13965
|
db.exec(`
|
|
13979
13966
|
CREATE TABLE IF NOT EXISTS dreaming_attention (
|
|
13980
13967
|
id TEXT PRIMARY KEY,
|
|
@@ -13996,7 +13983,7 @@ function up105(db) {
|
|
|
13996
13983
|
function hasColumn15(db, table, column) {
|
|
13997
13984
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
13998
13985
|
}
|
|
13999
|
-
function
|
|
13986
|
+
function up107(db) {
|
|
14000
13987
|
const requiredMemoryColumns = [
|
|
14001
13988
|
"content_hash",
|
|
14002
13989
|
"normalized_content",
|
|
@@ -14047,7 +14034,7 @@ function up106(db) {
|
|
|
14047
14034
|
WHERE EXISTS (SELECT 1 FROM memory_entity_mentions WHERE entity_id = entities.id)
|
|
14048
14035
|
`);
|
|
14049
14036
|
}
|
|
14050
|
-
function
|
|
14037
|
+
function up108(db) {
|
|
14051
14038
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name IN ('memories', 'entity_attributes')").all();
|
|
14052
14039
|
if (tables.length !== 2)
|
|
14053
14040
|
return;
|
|
@@ -14070,7 +14057,7 @@ function tableExists(db, table) {
|
|
|
14070
14057
|
function hasColumn16(db, table, column) {
|
|
14071
14058
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
14072
14059
|
}
|
|
14073
|
-
function
|
|
14060
|
+
function up109(db) {
|
|
14074
14061
|
db.exec(`
|
|
14075
14062
|
CREATE TABLE IF NOT EXISTS derived_memory_sources (
|
|
14076
14063
|
derived_memory_id TEXT NOT NULL,
|
|
@@ -14113,7 +14100,7 @@ function up108(db) {
|
|
|
14113
14100
|
`);
|
|
14114
14101
|
}
|
|
14115
14102
|
}
|
|
14116
|
-
function
|
|
14103
|
+
function up110(db) {
|
|
14117
14104
|
db.exec(`
|
|
14118
14105
|
DROP TRIGGER IF EXISTS entities_fts_ai;
|
|
14119
14106
|
DROP TRIGGER IF EXISTS entities_fts_ad;
|
|
@@ -14202,7 +14189,7 @@ function up109(db) {
|
|
|
14202
14189
|
function hasColumn17(db, table, column) {
|
|
14203
14190
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
14204
14191
|
}
|
|
14205
|
-
function
|
|
14192
|
+
function up111(db) {
|
|
14206
14193
|
if (!hasColumn17(db, "memories", "review_after")) {
|
|
14207
14194
|
db.exec("ALTER TABLE memories ADD COLUMN review_after TEXT;");
|
|
14208
14195
|
}
|
|
@@ -14218,14 +14205,14 @@ var TOKEN_COLUMNS = [
|
|
|
14218
14205
|
["tokens_cache_write", "INTEGER"],
|
|
14219
14206
|
["tokens_cost", "REAL"]
|
|
14220
14207
|
];
|
|
14221
|
-
function
|
|
14208
|
+
function up112(db) {
|
|
14222
14209
|
for (const [column, type] of TOKEN_COLUMNS) {
|
|
14223
14210
|
if (!hasColumn18(db, "dreaming_passes", column)) {
|
|
14224
14211
|
db.exec(`ALTER TABLE dreaming_passes ADD COLUMN ${column} ${type};`);
|
|
14225
14212
|
}
|
|
14226
14213
|
}
|
|
14227
14214
|
}
|
|
14228
|
-
function
|
|
14215
|
+
function up113(db) {
|
|
14229
14216
|
db.exec(`
|
|
14230
14217
|
CREATE TABLE IF NOT EXISTS embedding_usage (
|
|
14231
14218
|
day TEXT NOT NULL,
|
|
@@ -14238,7 +14225,7 @@ function up112(db) {
|
|
|
14238
14225
|
);
|
|
14239
14226
|
`);
|
|
14240
14227
|
}
|
|
14241
|
-
function
|
|
14228
|
+
function up114(db) {
|
|
14242
14229
|
db.exec(`
|
|
14243
14230
|
CREATE TABLE IF NOT EXISTS telemetry_install (
|
|
14244
14231
|
id TEXT PRIMARY KEY,
|
|
@@ -14246,7 +14233,7 @@ function up113(db) {
|
|
|
14246
14233
|
);
|
|
14247
14234
|
`);
|
|
14248
14235
|
}
|
|
14249
|
-
function
|
|
14236
|
+
function up115(db) {
|
|
14250
14237
|
db.exec(`
|
|
14251
14238
|
CREATE INDEX IF NOT EXISTS idx_memory_entity_mentions_entity_memory
|
|
14252
14239
|
ON memory_entity_mentions(entity_id, memory_id);
|
|
@@ -14257,7 +14244,7 @@ function hasColumn19(db, table, column) {
|
|
|
14257
14244
|
return rows.some((row) => row.name === column);
|
|
14258
14245
|
}
|
|
14259
14246
|
var COLUMNS2 = ["first_remember_at", "first_recall_at"];
|
|
14260
|
-
function
|
|
14247
|
+
function up116(db) {
|
|
14261
14248
|
for (const column of COLUMNS2) {
|
|
14262
14249
|
if (!hasColumn19(db, "telemetry_install", column)) {
|
|
14263
14250
|
db.exec(`ALTER TABLE telemetry_install ADD COLUMN ${column} TEXT`);
|
|
@@ -14273,7 +14260,7 @@ function addColumnIfMissing24(db, column, definition) {
|
|
|
14273
14260
|
db.exec(`ALTER TABLE telemetry_events ADD COLUMN ${column} ${definition}`);
|
|
14274
14261
|
}
|
|
14275
14262
|
}
|
|
14276
|
-
function
|
|
14263
|
+
function up117(db) {
|
|
14277
14264
|
addColumnIfMissing24(db, "source", "TEXT NOT NULL DEFAULT 'daemon'");
|
|
14278
14265
|
addColumnIfMissing24(db, "claim_token", "TEXT");
|
|
14279
14266
|
addColumnIfMissing24(db, "claimed_at", "TEXT");
|
|
@@ -14282,7 +14269,7 @@ function up116(db) {
|
|
|
14282
14269
|
ON telemetry_events(source, sent_to_posthog, claimed_at, timestamp);
|
|
14283
14270
|
`);
|
|
14284
14271
|
}
|
|
14285
|
-
function
|
|
14272
|
+
function up118(db) {
|
|
14286
14273
|
db.exec(`
|
|
14287
14274
|
CREATE TABLE IF NOT EXISTS session_claims (
|
|
14288
14275
|
session_key TEXT NOT NULL,
|
|
@@ -14303,7 +14290,7 @@ function up117(db) {
|
|
|
14303
14290
|
ON session_claims(agent_id, state, expires_at);
|
|
14304
14291
|
`);
|
|
14305
14292
|
}
|
|
14306
|
-
function
|
|
14293
|
+
function up119(db) {
|
|
14307
14294
|
const table = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'entity_attributes'").get();
|
|
14308
14295
|
if (table == null)
|
|
14309
14296
|
return;
|
|
@@ -14312,7 +14299,7 @@ function up118(db) {
|
|
|
14312
14299
|
ON entity_attributes(memory_id, agent_id, status, importance);
|
|
14313
14300
|
`);
|
|
14314
14301
|
}
|
|
14315
|
-
function
|
|
14302
|
+
function up120(db) {
|
|
14316
14303
|
db.exec(`
|
|
14317
14304
|
CREATE TABLE IF NOT EXISTS cross_agent_messages (
|
|
14318
14305
|
id TEXT PRIMARY KEY,
|
|
@@ -14369,7 +14356,7 @@ function addColumnIfMissing25(db, column, definition) {
|
|
|
14369
14356
|
db.exec(`ALTER TABLE cross_agent_messages ADD COLUMN ${column} ${definition}`);
|
|
14370
14357
|
}
|
|
14371
14358
|
}
|
|
14372
|
-
function
|
|
14359
|
+
function up121(db) {
|
|
14373
14360
|
const table = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'cross_agent_messages'").get();
|
|
14374
14361
|
if (table == null)
|
|
14375
14362
|
return;
|
|
@@ -14570,7 +14557,7 @@ function backfillTranscriptsFromSummaryJobs(db) {
|
|
|
14570
14557
|
insert.run(...values);
|
|
14571
14558
|
}
|
|
14572
14559
|
}
|
|
14573
|
-
function
|
|
14560
|
+
function up122(db) {
|
|
14574
14561
|
if (!hasTable4(db, "session_transcripts"))
|
|
14575
14562
|
return;
|
|
14576
14563
|
addColumnIfMissing26(db, "session_transcripts", "completed_at", "TEXT");
|
|
@@ -14623,7 +14610,7 @@ function up121(db) {
|
|
|
14623
14610
|
ON session_transcripts(agent_id, content_hash);
|
|
14624
14611
|
`);
|
|
14625
14612
|
}
|
|
14626
|
-
function
|
|
14613
|
+
function up123(db) {
|
|
14627
14614
|
db.exec(`
|
|
14628
14615
|
CREATE INDEX IF NOT EXISTS idx_memory_jobs_pressure_status
|
|
14629
14616
|
ON memory_jobs(status)
|
|
@@ -14642,12 +14629,12 @@ function up122(db) {
|
|
|
14642
14629
|
function hasColumn22(db, table, column) {
|
|
14643
14630
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
14644
14631
|
}
|
|
14645
|
-
function
|
|
14632
|
+
function up124(db) {
|
|
14646
14633
|
if (!hasColumn22(db, "telemetry_install", "last_seen_version")) {
|
|
14647
14634
|
db.exec("ALTER TABLE telemetry_install ADD COLUMN last_seen_version TEXT");
|
|
14648
14635
|
}
|
|
14649
14636
|
}
|
|
14650
|
-
function
|
|
14637
|
+
function up125(db) {
|
|
14651
14638
|
db.exec(`
|
|
14652
14639
|
CREATE TABLE IF NOT EXISTS source_lifecycle_state (
|
|
14653
14640
|
agent_id TEXT NOT NULL,
|
|
@@ -14676,7 +14663,7 @@ function addColumnIfMissing27(db, column, definition) {
|
|
|
14676
14663
|
db.exec(`ALTER TABLE telemetry_events ADD COLUMN ${column} ${definition}`);
|
|
14677
14664
|
}
|
|
14678
14665
|
}
|
|
14679
|
-
function
|
|
14666
|
+
function up126(db) {
|
|
14680
14667
|
addColumnIfMissing27(db, "delivery_attempts", "INTEGER NOT NULL DEFAULT 0");
|
|
14681
14668
|
addColumnIfMissing27(db, "last_attempt_at", "TEXT");
|
|
14682
14669
|
addColumnIfMissing27(db, "sent_at", "TEXT");
|
|
@@ -14697,7 +14684,7 @@ function up125(db) {
|
|
|
14697
14684
|
VALUES (1, CURRENT_TIMESTAMP);
|
|
14698
14685
|
`);
|
|
14699
14686
|
}
|
|
14700
|
-
function
|
|
14687
|
+
function up127(db) {
|
|
14701
14688
|
const columns = db.prepare("PRAGMA table_info(dreaming_evidence_exclusions)").all();
|
|
14702
14689
|
const names = new Set(columns.map((column) => column.name));
|
|
14703
14690
|
if (!names.has("failure_class")) {
|
|
@@ -14714,7 +14701,7 @@ function up126(db) {
|
|
|
14714
14701
|
}
|
|
14715
14702
|
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)");
|
|
14716
14703
|
}
|
|
14717
|
-
function
|
|
14704
|
+
function up128(db) {
|
|
14718
14705
|
db.exec(`
|
|
14719
14706
|
CREATE TABLE IF NOT EXISTS embedding_index_failures (
|
|
14720
14707
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
@@ -14738,7 +14725,7 @@ function up127(db) {
|
|
|
14738
14725
|
ON embedding_index_failures(source_type, source_id);
|
|
14739
14726
|
`);
|
|
14740
14727
|
}
|
|
14741
|
-
function
|
|
14728
|
+
function up129(db) {
|
|
14742
14729
|
db.exec(`
|
|
14743
14730
|
CREATE TABLE IF NOT EXISTS imported_source_lifecycle (
|
|
14744
14731
|
id TEXT PRIMARY KEY,
|
|
@@ -14788,7 +14775,7 @@ function backfillTable(db, params) {
|
|
|
14788
14775
|
FROM ${params.table}${params.where ? ` WHERE ${params.where}` : ""}`).all();
|
|
14789
14776
|
backfill(db, rows, params.sourceKind, params.scannedAt);
|
|
14790
14777
|
}
|
|
14791
|
-
function
|
|
14778
|
+
function up130(db) {
|
|
14792
14779
|
db.exec(`
|
|
14793
14780
|
CREATE TABLE IF NOT EXISTS memory_content_safety (
|
|
14794
14781
|
agent_id TEXT NOT NULL,
|
|
@@ -14845,7 +14832,7 @@ function up129(db) {
|
|
|
14845
14832
|
scannedAt
|
|
14846
14833
|
});
|
|
14847
14834
|
}
|
|
14848
|
-
function
|
|
14835
|
+
function up131(db) {
|
|
14849
14836
|
const table = db.prepare("SELECT sql FROM sqlite_master WHERE type = 'table' AND name = 'dreaming_attention'").get();
|
|
14850
14837
|
if (!table)
|
|
14851
14838
|
return;
|
|
@@ -14879,7 +14866,7 @@ function up130(db) {
|
|
|
14879
14866
|
ON dreaming_attention (agent_id, resolved_at, priority DESC, created_at ASC);
|
|
14880
14867
|
`);
|
|
14881
14868
|
}
|
|
14882
|
-
function
|
|
14869
|
+
function up132(db) {
|
|
14883
14870
|
db.exec(`
|
|
14884
14871
|
CREATE TABLE IF NOT EXISTS ontology_contradictions (
|
|
14885
14872
|
id TEXT PRIMARY KEY,
|
|
@@ -14935,7 +14922,7 @@ function up131(db) {
|
|
|
14935
14922
|
ON ontology_contradictions(agent_id, left_source_id, right_source_id);
|
|
14936
14923
|
`);
|
|
14937
14924
|
}
|
|
14938
|
-
function
|
|
14925
|
+
function up133(db) {
|
|
14939
14926
|
db.exec(`
|
|
14940
14927
|
CREATE INDEX IF NOT EXISTS idx_memory_jobs_diagnostics_status_created_at
|
|
14941
14928
|
ON memory_jobs(status, created_at)
|
|
@@ -14950,7 +14937,7 @@ function up132(db) {
|
|
|
14950
14937
|
function tableExists3(db, table) {
|
|
14951
14938
|
return db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = ?").get(table) != null;
|
|
14952
14939
|
}
|
|
14953
|
-
function
|
|
14940
|
+
function up134(db) {
|
|
14954
14941
|
if (!tableExists3(db, "memory_jobs"))
|
|
14955
14942
|
return;
|
|
14956
14943
|
if (!tableExists3(db, "job_cancellations")) {
|
|
@@ -14999,7 +14986,7 @@ function up133(db) {
|
|
|
14999
14986
|
AND status IN ('pending', 'leased');
|
|
15000
14987
|
`);
|
|
15001
14988
|
}
|
|
15002
|
-
function
|
|
14989
|
+
function up135(db) {
|
|
15003
14990
|
db.exec(`
|
|
15004
14991
|
CREATE TABLE IF NOT EXISTS embedding_repair_budget (
|
|
15005
14992
|
id INTEGER PRIMARY KEY CHECK (id = 1),
|
|
@@ -15039,7 +15026,7 @@ function up134(db) {
|
|
|
15039
15026
|
END;
|
|
15040
15027
|
`);
|
|
15041
15028
|
}
|
|
15042
|
-
function
|
|
15029
|
+
function up136(db) {
|
|
15043
15030
|
db.exec(`
|
|
15044
15031
|
CREATE TABLE IF NOT EXISTS dreaming_evidence_consumption (
|
|
15045
15032
|
agent_id TEXT NOT NULL,
|
|
@@ -15062,13 +15049,13 @@ function up135(db) {
|
|
|
15062
15049
|
ON dreaming_evidence_consumption(agent_id, pass_id, delivered_offset, source_length);
|
|
15063
15050
|
`);
|
|
15064
15051
|
}
|
|
15065
|
-
function
|
|
15052
|
+
function up137(db) {
|
|
15066
15053
|
db.exec(`
|
|
15067
15054
|
CREATE INDEX IF NOT EXISTS idx_epistemic_assertions_observer_entity
|
|
15068
15055
|
ON epistemic_assertions(agent_id, subject_entity_id, status, asserted_at DESC, created_at DESC);
|
|
15069
15056
|
`);
|
|
15070
15057
|
}
|
|
15071
|
-
function
|
|
15058
|
+
function up138(db) {
|
|
15072
15059
|
db.exec(`
|
|
15073
15060
|
CREATE TABLE IF NOT EXISTS memory_head_revisions (
|
|
15074
15061
|
id TEXT PRIMARY KEY,
|
|
@@ -15120,7 +15107,7 @@ function up137(db) {
|
|
|
15120
15107
|
if (!names.has("format_version"))
|
|
15121
15108
|
db.exec("ALTER TABLE memory_md_heads ADD COLUMN format_version INTEGER NOT NULL DEFAULT 1");
|
|
15122
15109
|
}
|
|
15123
|
-
function
|
|
15110
|
+
function up139(db) {
|
|
15124
15111
|
db.exec(`
|
|
15125
15112
|
CREATE TABLE memory_head_entries_v134 (
|
|
15126
15113
|
entry_id TEXT NOT NULL, agent_id TEXT NOT NULL, canonical_text TEXT NOT NULL,
|
|
@@ -15138,7 +15125,7 @@ function up138(db) {
|
|
|
15138
15125
|
ON memory_head_entries(agent_id, entry_id, last_revision DESC);
|
|
15139
15126
|
`);
|
|
15140
15127
|
}
|
|
15141
|
-
function
|
|
15128
|
+
function up140(db) {
|
|
15142
15129
|
db.exec(`
|
|
15143
15130
|
CREATE TABLE IF NOT EXISTS memory_head_publications (
|
|
15144
15131
|
agent_id TEXT NOT NULL,
|
|
@@ -15154,7 +15141,7 @@ function up139(db) {
|
|
|
15154
15141
|
ON memory_head_publications(agent_id, status, revision DESC);
|
|
15155
15142
|
`);
|
|
15156
15143
|
}
|
|
15157
|
-
function
|
|
15144
|
+
function up141(db) {
|
|
15158
15145
|
const cols = new Set(db.prepare("PRAGMA table_info(memory_head_revisions)").all().map((r2) => r2.name));
|
|
15159
15146
|
for (const [name, type] of [
|
|
15160
15147
|
["entry_id", "TEXT"],
|
|
@@ -15168,7 +15155,7 @@ function up140(db) {
|
|
|
15168
15155
|
}
|
|
15169
15156
|
db.exec("CREATE UNIQUE INDEX IF NOT EXISTS idx_memory_head_revisions_entry ON memory_head_revisions(agent_id, revision, entry_id)");
|
|
15170
15157
|
}
|
|
15171
|
-
function
|
|
15158
|
+
function up142(db) {
|
|
15172
15159
|
const cols = new Set(db.prepare("PRAGMA table_info(dreaming_passes)").all().map((r2) => r2.name));
|
|
15173
15160
|
for (const [name, type] of [
|
|
15174
15161
|
["head_revision", "INTEGER"],
|
|
@@ -15190,7 +15177,7 @@ function addColumnIfMissing28(db, table, column, definition) {
|
|
|
15190
15177
|
if (!hasColumn25(db, table, column))
|
|
15191
15178
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
15192
15179
|
}
|
|
15193
|
-
function
|
|
15180
|
+
function up143(db) {
|
|
15194
15181
|
addColumnIfMissing28(db, "memories", "manual_override", "INTEGER DEFAULT 0");
|
|
15195
15182
|
db.exec(`
|
|
15196
15183
|
CREATE TABLE IF NOT EXISTS transcript_capture_status (
|
|
@@ -15495,7 +15482,7 @@ function up142(db) {
|
|
|
15495
15482
|
GROUP BY j.agent_id;
|
|
15496
15483
|
`);
|
|
15497
15484
|
}
|
|
15498
|
-
function
|
|
15485
|
+
function up144(db) {
|
|
15499
15486
|
db.exec(`
|
|
15500
15487
|
CREATE TABLE IF NOT EXISTS native_source_sync_state (
|
|
15501
15488
|
agent_id TEXT NOT NULL,
|
|
@@ -15511,7 +15498,7 @@ function up143(db) {
|
|
|
15511
15498
|
ON native_source_sync_state(agent_id, status);
|
|
15512
15499
|
`);
|
|
15513
15500
|
}
|
|
15514
|
-
function
|
|
15501
|
+
function up145(db) {
|
|
15515
15502
|
db.exec(`
|
|
15516
15503
|
CREATE TABLE IF NOT EXISTS transcript_recovery_frontiers (
|
|
15517
15504
|
agent_id TEXT NOT NULL,
|
|
@@ -15523,7 +15510,7 @@ function up144(db) {
|
|
|
15523
15510
|
);
|
|
15524
15511
|
`);
|
|
15525
15512
|
}
|
|
15526
|
-
function
|
|
15513
|
+
function up146(db) {
|
|
15527
15514
|
db.exec(`
|
|
15528
15515
|
CREATE TABLE IF NOT EXISTS source_sync_checkpoints (
|
|
15529
15516
|
agent_id TEXT NOT NULL,
|
|
@@ -15537,13 +15524,13 @@ function up145(db) {
|
|
|
15537
15524
|
);
|
|
15538
15525
|
`);
|
|
15539
15526
|
}
|
|
15540
|
-
function
|
|
15527
|
+
function up147(db) {
|
|
15541
15528
|
const columns = db.prepare("PRAGMA table_info(source_sync_checkpoints)").all();
|
|
15542
15529
|
if (!columns.some((column) => column.name === "frontier")) {
|
|
15543
15530
|
db.exec("ALTER TABLE source_sync_checkpoints ADD COLUMN frontier TEXT");
|
|
15544
15531
|
}
|
|
15545
15532
|
}
|
|
15546
|
-
function
|
|
15533
|
+
function up148(db) {
|
|
15547
15534
|
const columns = new Set(db.prepare("PRAGMA table_info(embedding_index_state)").all().map((row) => row.name).filter((name) => typeof name === "string"));
|
|
15548
15535
|
const additions = [
|
|
15549
15536
|
["migration_phase", "TEXT"],
|
|
@@ -15578,13 +15565,13 @@ function up147(db) {
|
|
|
15578
15565
|
`);
|
|
15579
15566
|
}
|
|
15580
15567
|
}
|
|
15581
|
-
function
|
|
15568
|
+
function up149(db) {
|
|
15582
15569
|
const columns = new Set(db.prepare("PRAGMA table_info(memory_jobs)").all().map((row) => row.name).filter((name) => typeof name === "string"));
|
|
15583
15570
|
if (!columns.has("lease_token")) {
|
|
15584
15571
|
db.exec("ALTER TABLE memory_jobs ADD COLUMN lease_token TEXT");
|
|
15585
15572
|
}
|
|
15586
15573
|
}
|
|
15587
|
-
function
|
|
15574
|
+
function up150(db) {
|
|
15588
15575
|
db.exec(`
|
|
15589
15576
|
CREATE TABLE IF NOT EXISTS dreaming_evidence_reviews (
|
|
15590
15577
|
agent_id TEXT NOT NULL,
|
|
@@ -15602,7 +15589,7 @@ function up149(db) {
|
|
|
15602
15589
|
ON dreaming_evidence_reviews (agent_id, reviewed_at DESC);
|
|
15603
15590
|
`);
|
|
15604
15591
|
}
|
|
15605
|
-
function
|
|
15592
|
+
function up151(db) {
|
|
15606
15593
|
db.exec(`
|
|
15607
15594
|
CREATE TABLE IF NOT EXISTS source_import_jobs (
|
|
15608
15595
|
id TEXT PRIMARY KEY, kind TEXT NOT NULL CHECK (kind = 'import'), agent_id TEXT NOT NULL,
|
|
@@ -15669,16 +15656,16 @@ function up150(db) {
|
|
|
15669
15656
|
}
|
|
15670
15657
|
db.exec("CREATE INDEX IF NOT EXISTS idx_session_transcripts_agent_source ON session_transcripts(agent_id, source_id)");
|
|
15671
15658
|
}
|
|
15672
|
-
function
|
|
15659
|
+
function up152(db) {
|
|
15673
15660
|
db.exec("CREATE INDEX IF NOT EXISTS idx_source_import_files_job_state ON source_import_files(job_id, state)");
|
|
15674
15661
|
}
|
|
15675
|
-
function
|
|
15662
|
+
function up153(db) {
|
|
15676
15663
|
const columns = db.prepare("PRAGMA table_info(source_import_record_attempts)").all();
|
|
15677
15664
|
if (!columns.some((column) => column.name === "source_id")) {
|
|
15678
15665
|
db.exec("ALTER TABLE source_import_record_attempts ADD COLUMN source_id TEXT");
|
|
15679
15666
|
}
|
|
15680
15667
|
}
|
|
15681
|
-
function
|
|
15668
|
+
function up154(db) {
|
|
15682
15669
|
const addColumn = (table, column, definition) => {
|
|
15683
15670
|
const statement = db.prepare("SELECT 1 AS found FROM pragma_table_info(?) WHERE name = ?");
|
|
15684
15671
|
let exists;
|
|
@@ -15699,7 +15686,7 @@ function addColumnIfMissing29(db, table, column, definition) {
|
|
|
15699
15686
|
if (!columns.some((row) => row.name === column))
|
|
15700
15687
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
15701
15688
|
}
|
|
15702
|
-
function
|
|
15689
|
+
function up155(db) {
|
|
15703
15690
|
addColumnIfMissing29(db, "memory_md_heads", "is_current", "INTEGER NOT NULL DEFAULT 0");
|
|
15704
15691
|
addColumnIfMissing29(db, "dreaming_passes", "head_base_revision", "INTEGER");
|
|
15705
15692
|
db.exec("CREATE INDEX IF NOT EXISTS idx_memory_head_revisions_content_hash ON memory_head_revisions(content_hash)");
|
|
@@ -15849,7 +15836,7 @@ function up154(db) {
|
|
|
15849
15836
|
`);
|
|
15850
15837
|
}
|
|
15851
15838
|
}
|
|
15852
|
-
function
|
|
15839
|
+
function up156(db) {
|
|
15853
15840
|
db.exec(`
|
|
15854
15841
|
CREATE TABLE IF NOT EXISTS vector_repair_checkpoints (
|
|
15855
15842
|
operation TEXT NOT NULL CHECK (operation IN ('resync', 'clean-orphans')),
|
|
@@ -15874,7 +15861,7 @@ function up155(db) {
|
|
|
15874
15861
|
ON vector_repair_checkpoints(status, updated_at);
|
|
15875
15862
|
`);
|
|
15876
15863
|
}
|
|
15877
|
-
function
|
|
15864
|
+
function up157(db) {
|
|
15878
15865
|
db.exec(`
|
|
15879
15866
|
CREATE TABLE IF NOT EXISTS embedding_repair_checkpoints (
|
|
15880
15867
|
checkpoint_id TEXT PRIMARY KEY,
|
|
@@ -15895,7 +15882,7 @@ function up156(db) {
|
|
|
15895
15882
|
ON embedding_repair_checkpoints(status, updated_at);
|
|
15896
15883
|
`);
|
|
15897
15884
|
}
|
|
15898
|
-
function
|
|
15885
|
+
function up158(db) {
|
|
15899
15886
|
const columns = new Set(db.prepare("PRAGMA table_info(embedding_repair_checkpoints)").all().map((row) => row.name));
|
|
15900
15887
|
if (!columns.has("profile_fingerprint")) {
|
|
15901
15888
|
db.exec("ALTER TABLE embedding_repair_checkpoints ADD COLUMN profile_fingerprint TEXT");
|
|
@@ -15910,7 +15897,7 @@ function up157(db) {
|
|
|
15910
15897
|
);
|
|
15911
15898
|
`);
|
|
15912
15899
|
}
|
|
15913
|
-
function
|
|
15900
|
+
function up159(db) {
|
|
15914
15901
|
db.exec(`
|
|
15915
15902
|
CREATE INDEX IF NOT EXISTS idx_memories_agent_kind
|
|
15916
15903
|
ON memories(agent_id, memory_kind);
|
|
@@ -15920,13 +15907,13 @@ var MIGRATIONS = [
|
|
|
15920
15907
|
{
|
|
15921
15908
|
version: 1,
|
|
15922
15909
|
name: "baseline",
|
|
15923
|
-
up:
|
|
15910
|
+
up: up6,
|
|
15924
15911
|
artifacts: { tables: ["memories", "conversations", "embeddings"] }
|
|
15925
15912
|
},
|
|
15926
15913
|
{
|
|
15927
15914
|
version: 2,
|
|
15928
15915
|
name: "pipeline-v2",
|
|
15929
|
-
up:
|
|
15916
|
+
up: up7,
|
|
15930
15917
|
artifacts: {
|
|
15931
15918
|
tables: ["memory_history", "memory_jobs", "entities", "relations", "memory_entity_mentions"]
|
|
15932
15919
|
}
|
|
@@ -15934,12 +15921,12 @@ var MIGRATIONS = [
|
|
|
15934
15921
|
{
|
|
15935
15922
|
version: 3,
|
|
15936
15923
|
name: "unique-content-hash",
|
|
15937
|
-
up:
|
|
15924
|
+
up: up8
|
|
15938
15925
|
},
|
|
15939
15926
|
{
|
|
15940
15927
|
version: 4,
|
|
15941
15928
|
name: "history-actor-and-retention",
|
|
15942
|
-
up:
|
|
15929
|
+
up: up9,
|
|
15943
15930
|
artifacts: {
|
|
15944
15931
|
columns: [{ table: "memory_history", column: "actor_type" }]
|
|
15945
15932
|
}
|
|
@@ -15947,7 +15934,7 @@ var MIGRATIONS = [
|
|
|
15947
15934
|
{
|
|
15948
15935
|
version: 5,
|
|
15949
15936
|
name: "graph-extended",
|
|
15950
|
-
up:
|
|
15937
|
+
up: up10,
|
|
15951
15938
|
artifacts: {
|
|
15952
15939
|
columns: [{ table: "entities", column: "canonical_name" }]
|
|
15953
15940
|
}
|
|
@@ -15955,7 +15942,7 @@ var MIGRATIONS = [
|
|
|
15955
15942
|
{
|
|
15956
15943
|
version: 6,
|
|
15957
15944
|
name: "idempotency-key",
|
|
15958
|
-
up:
|
|
15945
|
+
up: up11,
|
|
15959
15946
|
artifacts: {
|
|
15960
15947
|
columns: [{ table: "memories", column: "idempotency_key" }]
|
|
15961
15948
|
}
|
|
@@ -15963,42 +15950,42 @@ var MIGRATIONS = [
|
|
|
15963
15950
|
{
|
|
15964
15951
|
version: 7,
|
|
15965
15952
|
name: "documents-and-connectors",
|
|
15966
|
-
up:
|
|
15953
|
+
up: up12,
|
|
15967
15954
|
artifacts: { tables: ["documents", "document_memories", "connectors"] }
|
|
15968
15955
|
},
|
|
15969
15956
|
{
|
|
15970
15957
|
version: 8,
|
|
15971
15958
|
name: "embeddings-unique-hash",
|
|
15972
|
-
up:
|
|
15959
|
+
up: up13
|
|
15973
15960
|
},
|
|
15974
15961
|
{
|
|
15975
15962
|
version: 9,
|
|
15976
15963
|
name: "summary-jobs",
|
|
15977
|
-
up:
|
|
15964
|
+
up: up14,
|
|
15978
15965
|
artifacts: { tables: ["summary_jobs"] }
|
|
15979
15966
|
},
|
|
15980
15967
|
{
|
|
15981
15968
|
version: 10,
|
|
15982
15969
|
name: "umap-cache",
|
|
15983
|
-
up:
|
|
15970
|
+
up: up15,
|
|
15984
15971
|
artifacts: { tables: ["umap_cache"] }
|
|
15985
15972
|
},
|
|
15986
15973
|
{
|
|
15987
15974
|
version: 11,
|
|
15988
15975
|
name: "session-scores",
|
|
15989
|
-
up:
|
|
15976
|
+
up: up16,
|
|
15990
15977
|
artifacts: { tables: ["session_scores"] }
|
|
15991
15978
|
},
|
|
15992
15979
|
{
|
|
15993
15980
|
version: 12,
|
|
15994
15981
|
name: "scheduled-tasks",
|
|
15995
|
-
up:
|
|
15982
|
+
up: up17,
|
|
15996
15983
|
artifacts: { tables: ["scheduled_tasks", "task_runs"] }
|
|
15997
15984
|
},
|
|
15998
15985
|
{
|
|
15999
15986
|
version: 13,
|
|
16000
15987
|
name: "ingestion-tracking",
|
|
16001
|
-
up:
|
|
15988
|
+
up: up18,
|
|
16002
15989
|
artifacts: {
|
|
16003
15990
|
columns: [
|
|
16004
15991
|
{ table: "memories", column: "source_path" },
|
|
@@ -16009,13 +15996,13 @@ var MIGRATIONS = [
|
|
|
16009
15996
|
{
|
|
16010
15997
|
version: 14,
|
|
16011
15998
|
name: "telemetry",
|
|
16012
|
-
up:
|
|
15999
|
+
up: up19,
|
|
16013
16000
|
artifacts: { tables: ["telemetry_events"] }
|
|
16014
16001
|
},
|
|
16015
16002
|
{
|
|
16016
16003
|
version: 15,
|
|
16017
16004
|
name: "session-memories",
|
|
16018
|
-
up:
|
|
16005
|
+
up: up20,
|
|
16019
16006
|
artifacts: {
|
|
16020
16007
|
tables: ["session_memories"],
|
|
16021
16008
|
columns: [
|
|
@@ -16027,13 +16014,13 @@ var MIGRATIONS = [
|
|
|
16027
16014
|
{
|
|
16028
16015
|
version: 16,
|
|
16029
16016
|
name: "session-checkpoints",
|
|
16030
|
-
up:
|
|
16017
|
+
up: up21,
|
|
16031
16018
|
artifacts: { tables: ["session_checkpoints"] }
|
|
16032
16019
|
},
|
|
16033
16020
|
{
|
|
16034
16021
|
version: 17,
|
|
16035
16022
|
name: "task-skills",
|
|
16036
|
-
up:
|
|
16023
|
+
up: up22,
|
|
16037
16024
|
artifacts: {
|
|
16038
16025
|
columns: [{ table: "scheduled_tasks", column: "skill_name" }]
|
|
16039
16026
|
}
|
|
@@ -16041,13 +16028,13 @@ var MIGRATIONS = [
|
|
|
16041
16028
|
{
|
|
16042
16029
|
version: 18,
|
|
16043
16030
|
name: "skill-meta",
|
|
16044
|
-
up:
|
|
16031
|
+
up: up23,
|
|
16045
16032
|
artifacts: { tables: ["skill_meta"] }
|
|
16046
16033
|
},
|
|
16047
16034
|
{
|
|
16048
16035
|
version: 19,
|
|
16049
16036
|
name: "knowledge-structure",
|
|
16050
|
-
up:
|
|
16037
|
+
up: up24,
|
|
16051
16038
|
artifacts: {
|
|
16052
16039
|
tables: ["entity_aspects", "entity_attributes", "entity_dependencies", "task_meta"],
|
|
16053
16040
|
columns: [{ table: "entities", column: "agent_id" }]
|
|
@@ -16056,7 +16043,7 @@ var MIGRATIONS = [
|
|
|
16056
16043
|
{
|
|
16057
16044
|
version: 20,
|
|
16058
16045
|
name: "session-structural-columns",
|
|
16059
|
-
up:
|
|
16046
|
+
up: up25,
|
|
16060
16047
|
artifacts: {
|
|
16061
16048
|
columns: [
|
|
16062
16049
|
{ table: "session_memories", column: "entity_slot" },
|
|
@@ -16069,7 +16056,7 @@ var MIGRATIONS = [
|
|
|
16069
16056
|
{
|
|
16070
16057
|
version: 21,
|
|
16071
16058
|
name: "checkpoint-structural",
|
|
16072
|
-
up:
|
|
16059
|
+
up: up26,
|
|
16073
16060
|
artifacts: {
|
|
16074
16061
|
columns: [{ table: "session_checkpoints", column: "focal_entity_ids" }]
|
|
16075
16062
|
}
|
|
@@ -16077,7 +16064,7 @@ var MIGRATIONS = [
|
|
|
16077
16064
|
{
|
|
16078
16065
|
version: 22,
|
|
16079
16066
|
name: "entity-pinning",
|
|
16080
|
-
up:
|
|
16067
|
+
up: up27,
|
|
16081
16068
|
artifacts: {
|
|
16082
16069
|
columns: [
|
|
16083
16070
|
{ table: "entities", column: "pinned" },
|
|
@@ -16088,17 +16075,17 @@ var MIGRATIONS = [
|
|
|
16088
16075
|
{
|
|
16089
16076
|
version: 23,
|
|
16090
16077
|
name: "retired-scorer-gap",
|
|
16091
|
-
up:
|
|
16078
|
+
up: up28
|
|
16092
16079
|
},
|
|
16093
16080
|
{
|
|
16094
16081
|
version: 24,
|
|
16095
16082
|
name: "retired-scorer-gap",
|
|
16096
|
-
up:
|
|
16083
|
+
up: up29
|
|
16097
16084
|
},
|
|
16098
16085
|
{
|
|
16099
16086
|
version: 25,
|
|
16100
16087
|
name: "agent-feedback",
|
|
16101
|
-
up:
|
|
16088
|
+
up: up30,
|
|
16102
16089
|
artifacts: {
|
|
16103
16090
|
columns: [{ table: "session_memories", column: "agent_relevance_score" }]
|
|
16104
16091
|
}
|
|
@@ -16106,32 +16093,32 @@ var MIGRATIONS = [
|
|
|
16106
16093
|
{
|
|
16107
16094
|
version: 26,
|
|
16108
16095
|
name: "retired-scorer-gap",
|
|
16109
|
-
up:
|
|
16096
|
+
up: up31
|
|
16110
16097
|
},
|
|
16111
16098
|
{
|
|
16112
16099
|
version: 27,
|
|
16113
16100
|
name: "backfill-canonical-names",
|
|
16114
|
-
up:
|
|
16101
|
+
up: up32
|
|
16115
16102
|
},
|
|
16116
16103
|
{
|
|
16117
16104
|
version: 28,
|
|
16118
16105
|
name: "lossless-retention",
|
|
16119
|
-
up:
|
|
16106
|
+
up: up33
|
|
16120
16107
|
},
|
|
16121
16108
|
{
|
|
16122
16109
|
version: 29,
|
|
16123
16110
|
name: "session-summary-dag",
|
|
16124
|
-
up:
|
|
16111
|
+
up: up34
|
|
16125
16112
|
},
|
|
16126
16113
|
{
|
|
16127
16114
|
version: 30,
|
|
16128
16115
|
name: "nullable-memory-job-memory-id",
|
|
16129
|
-
up:
|
|
16116
|
+
up: up35
|
|
16130
16117
|
},
|
|
16131
16118
|
{
|
|
16132
16119
|
version: 31,
|
|
16133
16120
|
name: "dependency-reason",
|
|
16134
|
-
up:
|
|
16121
|
+
up: up36,
|
|
16135
16122
|
artifacts: {
|
|
16136
16123
|
columns: [
|
|
16137
16124
|
{ table: "entity_dependencies", column: "reason" },
|
|
@@ -16142,7 +16129,7 @@ var MIGRATIONS = [
|
|
|
16142
16129
|
{
|
|
16143
16130
|
version: 32,
|
|
16144
16131
|
name: "embeddings-vector-column",
|
|
16145
|
-
up:
|
|
16132
|
+
up: up37,
|
|
16146
16133
|
artifacts: {
|
|
16147
16134
|
columns: [{ table: "embeddings", column: "vector", optional: true }]
|
|
16148
16135
|
}
|
|
@@ -16150,7 +16137,7 @@ var MIGRATIONS = [
|
|
|
16150
16137
|
{
|
|
16151
16138
|
version: 33,
|
|
16152
16139
|
name: "scope",
|
|
16153
|
-
up:
|
|
16140
|
+
up: up38,
|
|
16154
16141
|
artifacts: {
|
|
16155
16142
|
columns: [{ table: "memories", column: "scope" }]
|
|
16156
16143
|
}
|
|
@@ -16158,17 +16145,17 @@ var MIGRATIONS = [
|
|
|
16158
16145
|
{
|
|
16159
16146
|
version: 34,
|
|
16160
16147
|
name: "scope-aware-dedup",
|
|
16161
|
-
up:
|
|
16148
|
+
up: up39
|
|
16162
16149
|
},
|
|
16163
16150
|
{
|
|
16164
16151
|
version: 35,
|
|
16165
16152
|
name: "entity-fts",
|
|
16166
|
-
up:
|
|
16153
|
+
up: up40
|
|
16167
16154
|
},
|
|
16168
16155
|
{
|
|
16169
16156
|
version: 36,
|
|
16170
16157
|
name: "dependency-confidence",
|
|
16171
|
-
up:
|
|
16158
|
+
up: up41,
|
|
16172
16159
|
artifacts: {
|
|
16173
16160
|
columns: [{ table: "entity_dependencies", column: "confidence" }]
|
|
16174
16161
|
}
|
|
@@ -16176,7 +16163,7 @@ var MIGRATIONS = [
|
|
|
16176
16163
|
{
|
|
16177
16164
|
version: 37,
|
|
16178
16165
|
name: "entity-communities",
|
|
16179
|
-
up:
|
|
16166
|
+
up: up42,
|
|
16180
16167
|
artifacts: {
|
|
16181
16168
|
tables: ["entity_communities"],
|
|
16182
16169
|
columns: [{ table: "entities", column: "community_id" }]
|
|
@@ -16185,24 +16172,24 @@ var MIGRATIONS = [
|
|
|
16185
16172
|
{
|
|
16186
16173
|
version: 38,
|
|
16187
16174
|
name: "memory-hints",
|
|
16188
|
-
up:
|
|
16175
|
+
up: up43,
|
|
16189
16176
|
artifacts: { tables: ["memory_hints"] }
|
|
16190
16177
|
},
|
|
16191
16178
|
{
|
|
16192
16179
|
version: 39,
|
|
16193
16180
|
name: "dedup-entity-dependencies",
|
|
16194
|
-
up:
|
|
16181
|
+
up: up44
|
|
16195
16182
|
},
|
|
16196
16183
|
{
|
|
16197
16184
|
version: 40,
|
|
16198
16185
|
name: "session-transcripts",
|
|
16199
|
-
up:
|
|
16186
|
+
up: up45,
|
|
16200
16187
|
artifacts: { tables: ["session_transcripts"] }
|
|
16201
16188
|
},
|
|
16202
16189
|
{
|
|
16203
16190
|
version: 41,
|
|
16204
16191
|
name: "path-feedback",
|
|
16205
|
-
up:
|
|
16192
|
+
up: up46,
|
|
16206
16193
|
artifacts: {
|
|
16207
16194
|
tables: [
|
|
16208
16195
|
"path_feedback_events",
|
|
@@ -16217,7 +16204,7 @@ var MIGRATIONS = [
|
|
|
16217
16204
|
{
|
|
16218
16205
|
version: 42,
|
|
16219
16206
|
name: "session-memories-agent-id",
|
|
16220
|
-
up:
|
|
16207
|
+
up: up47,
|
|
16221
16208
|
artifacts: {
|
|
16222
16209
|
columns: [{ table: "session_memories", column: "agent_id" }]
|
|
16223
16210
|
}
|
|
@@ -16225,7 +16212,7 @@ var MIGRATIONS = [
|
|
|
16225
16212
|
{
|
|
16226
16213
|
version: 43,
|
|
16227
16214
|
name: "agents-table",
|
|
16228
|
-
up:
|
|
16215
|
+
up: up48,
|
|
16229
16216
|
artifacts: {
|
|
16230
16217
|
tables: ["agents"],
|
|
16231
16218
|
columns: [
|
|
@@ -16237,7 +16224,7 @@ var MIGRATIONS = [
|
|
|
16237
16224
|
{
|
|
16238
16225
|
version: 44,
|
|
16239
16226
|
name: "memory-md-temporal-head",
|
|
16240
|
-
up:
|
|
16227
|
+
up: up49,
|
|
16241
16228
|
artifacts: {
|
|
16242
16229
|
columns: [
|
|
16243
16230
|
{ table: "session_summaries", column: "source_type" },
|
|
@@ -16249,7 +16236,7 @@ var MIGRATIONS = [
|
|
|
16249
16236
|
{
|
|
16250
16237
|
version: 45,
|
|
16251
16238
|
name: "lossless-working-memory-hardening",
|
|
16252
|
-
up:
|
|
16239
|
+
up: up50,
|
|
16253
16240
|
artifacts: {
|
|
16254
16241
|
tables: ["session_transcripts_fts", "memory_md_heads"],
|
|
16255
16242
|
columns: [
|
|
@@ -16262,17 +16249,17 @@ var MIGRATIONS = [
|
|
|
16262
16249
|
{
|
|
16263
16250
|
version: 46,
|
|
16264
16251
|
name: "session-summary-uniqueness",
|
|
16265
|
-
up:
|
|
16252
|
+
up: up51
|
|
16266
16253
|
},
|
|
16267
16254
|
{
|
|
16268
16255
|
version: 47,
|
|
16269
16256
|
name: "agent-scoped-temporal-uniqueness",
|
|
16270
|
-
up:
|
|
16257
|
+
up: up52
|
|
16271
16258
|
},
|
|
16272
16259
|
{
|
|
16273
16260
|
version: 48,
|
|
16274
16261
|
name: "thread-heads",
|
|
16275
|
-
up:
|
|
16262
|
+
up: up53,
|
|
16276
16263
|
artifacts: {
|
|
16277
16264
|
tables: ["memory_thread_heads"]
|
|
16278
16265
|
}
|
|
@@ -16280,7 +16267,7 @@ var MIGRATIONS = [
|
|
|
16280
16267
|
{
|
|
16281
16268
|
version: 49,
|
|
16282
16269
|
name: "session-extract-cursors",
|
|
16283
|
-
up:
|
|
16270
|
+
up: up54,
|
|
16284
16271
|
artifacts: {
|
|
16285
16272
|
tables: ["session_extract_cursors"]
|
|
16286
16273
|
}
|
|
@@ -16288,7 +16275,7 @@ var MIGRATIONS = [
|
|
|
16288
16275
|
{
|
|
16289
16276
|
version: 50,
|
|
16290
16277
|
name: "related-to-audit",
|
|
16291
|
-
up:
|
|
16278
|
+
up: up55,
|
|
16292
16279
|
artifacts: {
|
|
16293
16280
|
tables: ["entity_dependency_history"]
|
|
16294
16281
|
}
|
|
@@ -16296,7 +16283,7 @@ var MIGRATIONS = [
|
|
|
16296
16283
|
{
|
|
16297
16284
|
version: 51,
|
|
16298
16285
|
name: "memory-md-rolling-window-lineage",
|
|
16299
|
-
up:
|
|
16286
|
+
up: up56,
|
|
16300
16287
|
artifacts: {
|
|
16301
16288
|
tables: ["memory_artifacts", "memory_artifact_tombstones", "memory_artifacts_fts"],
|
|
16302
16289
|
columns: [
|
|
@@ -16311,15 +16298,12 @@ var MIGRATIONS = [
|
|
|
16311
16298
|
{
|
|
16312
16299
|
version: 52,
|
|
16313
16300
|
name: "mcp-invocations",
|
|
16314
|
-
up:
|
|
16315
|
-
artifacts: {
|
|
16316
|
-
tables: ["mcp_invocations"]
|
|
16317
|
-
}
|
|
16301
|
+
up: up57
|
|
16318
16302
|
},
|
|
16319
16303
|
{
|
|
16320
16304
|
version: 53,
|
|
16321
16305
|
name: "skill-invocations",
|
|
16322
|
-
up:
|
|
16306
|
+
up: up58,
|
|
16323
16307
|
artifacts: {
|
|
16324
16308
|
tables: ["skill_invocations"]
|
|
16325
16309
|
}
|
|
@@ -16327,7 +16311,7 @@ var MIGRATIONS = [
|
|
|
16327
16311
|
{
|
|
16328
16312
|
version: 54,
|
|
16329
16313
|
name: "task-agent-scope",
|
|
16330
|
-
up:
|
|
16314
|
+
up: up59,
|
|
16331
16315
|
artifacts: {
|
|
16332
16316
|
tables: ["task_scope_hints"]
|
|
16333
16317
|
}
|
|
@@ -16335,7 +16319,7 @@ var MIGRATIONS = [
|
|
|
16335
16319
|
{
|
|
16336
16320
|
version: 55,
|
|
16337
16321
|
name: "dreaming-state",
|
|
16338
|
-
up:
|
|
16322
|
+
up: up60,
|
|
16339
16323
|
artifacts: {
|
|
16340
16324
|
tables: ["dreaming_state", "dreaming_passes"]
|
|
16341
16325
|
}
|
|
@@ -16343,22 +16327,22 @@ var MIGRATIONS = [
|
|
|
16343
16327
|
{
|
|
16344
16328
|
version: 56,
|
|
16345
16329
|
name: "agent-scoped-content-hash",
|
|
16346
|
-
up:
|
|
16330
|
+
up: up61
|
|
16347
16331
|
},
|
|
16348
16332
|
{
|
|
16349
16333
|
version: 57,
|
|
16350
16334
|
name: "memories-fts-tokenizer-repair",
|
|
16351
|
-
up:
|
|
16335
|
+
up: up62
|
|
16352
16336
|
},
|
|
16353
16337
|
{
|
|
16354
16338
|
version: 58,
|
|
16355
16339
|
name: "knowledge-graph-indices",
|
|
16356
|
-
up:
|
|
16340
|
+
up: up63
|
|
16357
16341
|
},
|
|
16358
16342
|
{
|
|
16359
16343
|
version: 59,
|
|
16360
16344
|
name: "entity-attribute-claim-key",
|
|
16361
|
-
up:
|
|
16345
|
+
up: up64,
|
|
16362
16346
|
artifacts: {
|
|
16363
16347
|
columns: [{ table: "entity_attributes", column: "claim_key" }]
|
|
16364
16348
|
}
|
|
@@ -16366,7 +16350,7 @@ var MIGRATIONS = [
|
|
|
16366
16350
|
{
|
|
16367
16351
|
version: 60,
|
|
16368
16352
|
name: "entity-attribute-group-key",
|
|
16369
|
-
up:
|
|
16353
|
+
up: up65,
|
|
16370
16354
|
artifacts: {
|
|
16371
16355
|
columns: [{ table: "entity_attributes", column: "group_key" }]
|
|
16372
16356
|
}
|
|
@@ -16374,7 +16358,7 @@ var MIGRATIONS = [
|
|
|
16374
16358
|
{
|
|
16375
16359
|
version: 61,
|
|
16376
16360
|
name: "memory-artifact-source-mtime",
|
|
16377
|
-
up:
|
|
16361
|
+
up: up66,
|
|
16378
16362
|
artifacts: {
|
|
16379
16363
|
columns: [{ table: "memory_artifacts", column: "source_mtime_ms" }]
|
|
16380
16364
|
}
|
|
@@ -16382,7 +16366,7 @@ var MIGRATIONS = [
|
|
|
16382
16366
|
{
|
|
16383
16367
|
version: 62,
|
|
16384
16368
|
name: "memory-artifact-soft-delete",
|
|
16385
|
-
up:
|
|
16369
|
+
up: up67,
|
|
16386
16370
|
artifacts: {
|
|
16387
16371
|
columns: [
|
|
16388
16372
|
{ table: "memory_artifacts", column: "is_deleted" },
|
|
@@ -16393,12 +16377,12 @@ var MIGRATIONS = [
|
|
|
16393
16377
|
{
|
|
16394
16378
|
version: 63,
|
|
16395
16379
|
name: "content-only-memories-fts-update",
|
|
16396
|
-
up:
|
|
16380
|
+
up: up68
|
|
16397
16381
|
},
|
|
16398
16382
|
{
|
|
16399
16383
|
version: 64,
|
|
16400
16384
|
name: "source-graph-provenance",
|
|
16401
|
-
up:
|
|
16385
|
+
up: up69,
|
|
16402
16386
|
artifacts: {
|
|
16403
16387
|
columns: [
|
|
16404
16388
|
{ table: "entities", column: "source_path" },
|
|
@@ -16411,7 +16395,7 @@ var MIGRATIONS = [
|
|
|
16411
16395
|
{
|
|
16412
16396
|
version: 65,
|
|
16413
16397
|
name: "source-embedding-agent-scope",
|
|
16414
|
-
up:
|
|
16398
|
+
up: up70,
|
|
16415
16399
|
artifacts: {
|
|
16416
16400
|
columns: [{ table: "embeddings", column: "agent_id", optional: true }]
|
|
16417
16401
|
}
|
|
@@ -16419,7 +16403,7 @@ var MIGRATIONS = [
|
|
|
16419
16403
|
{
|
|
16420
16404
|
version: 66,
|
|
16421
16405
|
name: "memory-search-telemetry",
|
|
16422
|
-
up:
|
|
16406
|
+
up: up71,
|
|
16423
16407
|
artifacts: {
|
|
16424
16408
|
tables: ["memory_search_telemetry"]
|
|
16425
16409
|
}
|
|
@@ -16427,7 +16411,7 @@ var MIGRATIONS = [
|
|
|
16427
16411
|
{
|
|
16428
16412
|
version: 67,
|
|
16429
16413
|
name: "ontology-proposals",
|
|
16430
|
-
up:
|
|
16414
|
+
up: up72,
|
|
16431
16415
|
artifacts: {
|
|
16432
16416
|
tables: ["ontology_proposals"],
|
|
16433
16417
|
columns: [
|
|
@@ -16441,7 +16425,7 @@ var MIGRATIONS = [
|
|
|
16441
16425
|
{
|
|
16442
16426
|
version: 68,
|
|
16443
16427
|
name: "daily-reflections",
|
|
16444
|
-
up:
|
|
16428
|
+
up: up73,
|
|
16445
16429
|
artifacts: {
|
|
16446
16430
|
tables: ["daily_reflections"]
|
|
16447
16431
|
}
|
|
@@ -16449,7 +16433,7 @@ var MIGRATIONS = [
|
|
|
16449
16433
|
{
|
|
16450
16434
|
version: 69,
|
|
16451
16435
|
name: "daily-reflections-multiple-insights",
|
|
16452
|
-
up:
|
|
16436
|
+
up: up74,
|
|
16453
16437
|
artifacts: {
|
|
16454
16438
|
tables: ["daily_reflections"]
|
|
16455
16439
|
}
|
|
@@ -16457,7 +16441,7 @@ var MIGRATIONS = [
|
|
|
16457
16441
|
{
|
|
16458
16442
|
version: 70,
|
|
16459
16443
|
name: "ontology-control-plane-state",
|
|
16460
|
-
up:
|
|
16444
|
+
up: up75,
|
|
16461
16445
|
artifacts: {
|
|
16462
16446
|
columns: [
|
|
16463
16447
|
{ table: "entities", column: "status" },
|
|
@@ -16472,7 +16456,7 @@ var MIGRATIONS = [
|
|
|
16472
16456
|
{
|
|
16473
16457
|
version: 71,
|
|
16474
16458
|
name: "epistemic-assertions",
|
|
16475
|
-
up:
|
|
16459
|
+
up: up76,
|
|
16476
16460
|
artifacts: {
|
|
16477
16461
|
tables: ["epistemic_assertions"]
|
|
16478
16462
|
}
|
|
@@ -16480,7 +16464,7 @@ var MIGRATIONS = [
|
|
|
16480
16464
|
{
|
|
16481
16465
|
version: 72,
|
|
16482
16466
|
name: "agent-scoped-idempotency-key",
|
|
16483
|
-
up:
|
|
16467
|
+
up: up77,
|
|
16484
16468
|
artifacts: {
|
|
16485
16469
|
columns: [
|
|
16486
16470
|
{ table: "memories", column: "idempotency_key" },
|
|
@@ -16491,7 +16475,7 @@ var MIGRATIONS = [
|
|
|
16491
16475
|
{
|
|
16492
16476
|
version: 73,
|
|
16493
16477
|
name: "recall-context-dedupe",
|
|
16494
|
-
up:
|
|
16478
|
+
up: up78,
|
|
16495
16479
|
artifacts: {
|
|
16496
16480
|
tables: ["session_context_epochs", "session_recall_events"]
|
|
16497
16481
|
}
|
|
@@ -16499,7 +16483,7 @@ var MIGRATIONS = [
|
|
|
16499
16483
|
{
|
|
16500
16484
|
version: 74,
|
|
16501
16485
|
name: "aggregate-memory-links",
|
|
16502
|
-
up:
|
|
16486
|
+
up: up79,
|
|
16503
16487
|
artifacts: {
|
|
16504
16488
|
tables: ["aggregate_memory_sources"]
|
|
16505
16489
|
}
|
|
@@ -16507,7 +16491,7 @@ var MIGRATIONS = [
|
|
|
16507
16491
|
{
|
|
16508
16492
|
version: 75,
|
|
16509
16493
|
name: "memory-artifact-source-provenance",
|
|
16510
|
-
up:
|
|
16494
|
+
up: up80,
|
|
16511
16495
|
artifacts: {
|
|
16512
16496
|
columns: [
|
|
16513
16497
|
{ table: "memory_artifacts", column: "source_id" },
|
|
@@ -16521,7 +16505,7 @@ var MIGRATIONS = [
|
|
|
16521
16505
|
{
|
|
16522
16506
|
version: 76,
|
|
16523
16507
|
name: "temporal-edges",
|
|
16524
|
-
up:
|
|
16508
|
+
up: up81,
|
|
16525
16509
|
artifacts: {
|
|
16526
16510
|
tables: ["temporal_edges"]
|
|
16527
16511
|
}
|
|
@@ -16529,7 +16513,7 @@ var MIGRATIONS = [
|
|
|
16529
16513
|
{
|
|
16530
16514
|
version: 77,
|
|
16531
16515
|
name: "entity-aliases",
|
|
16532
|
-
up:
|
|
16516
|
+
up: up82,
|
|
16533
16517
|
artifacts: {
|
|
16534
16518
|
tables: ["entity_aliases"]
|
|
16535
16519
|
}
|
|
@@ -16537,7 +16521,7 @@ var MIGRATIONS = [
|
|
|
16537
16521
|
{
|
|
16538
16522
|
version: 78,
|
|
16539
16523
|
name: "api-keys",
|
|
16540
|
-
up:
|
|
16524
|
+
up: up83,
|
|
16541
16525
|
artifacts: {
|
|
16542
16526
|
tables: ["api_keys"]
|
|
16543
16527
|
}
|
|
@@ -16545,7 +16529,7 @@ var MIGRATIONS = [
|
|
|
16545
16529
|
{
|
|
16546
16530
|
version: 79,
|
|
16547
16531
|
name: "transcript-capture-jobs",
|
|
16548
|
-
up:
|
|
16532
|
+
up: up84,
|
|
16549
16533
|
artifacts: {
|
|
16550
16534
|
tables: ["transcript_capture_jobs"]
|
|
16551
16535
|
}
|
|
@@ -16553,7 +16537,7 @@ var MIGRATIONS = [
|
|
|
16553
16537
|
{
|
|
16554
16538
|
version: 80,
|
|
16555
16539
|
name: "document-scope-columns",
|
|
16556
|
-
up:
|
|
16540
|
+
up: up85,
|
|
16557
16541
|
artifacts: {
|
|
16558
16542
|
columns: [
|
|
16559
16543
|
{ table: "documents", column: "agent_id" },
|
|
@@ -16564,7 +16548,7 @@ var MIGRATIONS = [
|
|
|
16564
16548
|
{
|
|
16565
16549
|
version: 81,
|
|
16566
16550
|
name: "aggregate-evidence-sources",
|
|
16567
|
-
up:
|
|
16551
|
+
up: up86,
|
|
16568
16552
|
artifacts: {
|
|
16569
16553
|
tables: ["aggregate_evidence_sources"]
|
|
16570
16554
|
}
|
|
@@ -16572,7 +16556,7 @@ var MIGRATIONS = [
|
|
|
16572
16556
|
{
|
|
16573
16557
|
version: 82,
|
|
16574
16558
|
name: "skill-invocations-harness",
|
|
16575
|
-
up:
|
|
16559
|
+
up: up87,
|
|
16576
16560
|
artifacts: {
|
|
16577
16561
|
columns: [
|
|
16578
16562
|
{ table: "skill_invocations", column: "harness" },
|
|
@@ -16583,7 +16567,7 @@ var MIGRATIONS = [
|
|
|
16583
16567
|
{
|
|
16584
16568
|
version: 83,
|
|
16585
16569
|
name: "memory-lifecycle-repair",
|
|
16586
|
-
up:
|
|
16570
|
+
up: up88,
|
|
16587
16571
|
artifacts: {
|
|
16588
16572
|
tables: ["transcript_capture_jobs", "aggregate_evidence_sources", "entity_dependencies"],
|
|
16589
16573
|
columns: [
|
|
@@ -16598,7 +16582,7 @@ var MIGRATIONS = [
|
|
|
16598
16582
|
{
|
|
16599
16583
|
version: 84,
|
|
16600
16584
|
name: "legacy-markdown-import-state",
|
|
16601
|
-
up:
|
|
16585
|
+
up: up89,
|
|
16602
16586
|
artifacts: {
|
|
16603
16587
|
tables: ["legacy_markdown_imports", "legacy_markdown_chunks"]
|
|
16604
16588
|
}
|
|
@@ -16606,7 +16590,7 @@ var MIGRATIONS = [
|
|
|
16606
16590
|
{
|
|
16607
16591
|
version: 85,
|
|
16608
16592
|
name: "backfill-relations-to-dependencies",
|
|
16609
|
-
up:
|
|
16593
|
+
up: up90,
|
|
16610
16594
|
artifacts: {
|
|
16611
16595
|
tables: ["entity_dependencies"]
|
|
16612
16596
|
}
|
|
@@ -16614,7 +16598,7 @@ var MIGRATIONS = [
|
|
|
16614
16598
|
{
|
|
16615
16599
|
version: 86,
|
|
16616
16600
|
name: "summary-jobs-content-hash",
|
|
16617
|
-
up:
|
|
16601
|
+
up: up91,
|
|
16618
16602
|
artifacts: {
|
|
16619
16603
|
columns: [{ table: "summary_jobs", column: "content_hash" }]
|
|
16620
16604
|
}
|
|
@@ -16622,7 +16606,7 @@ var MIGRATIONS = [
|
|
|
16622
16606
|
{
|
|
16623
16607
|
version: 87,
|
|
16624
16608
|
name: "summary-jobs-boundary-reason",
|
|
16625
|
-
up:
|
|
16609
|
+
up: up92,
|
|
16626
16610
|
artifacts: {
|
|
16627
16611
|
columns: [{ table: "summary_jobs", column: "boundary_reason" }]
|
|
16628
16612
|
}
|
|
@@ -16630,7 +16614,7 @@ var MIGRATIONS = [
|
|
|
16630
16614
|
{
|
|
16631
16615
|
version: 88,
|
|
16632
16616
|
name: "transcript-recovery-files",
|
|
16633
|
-
up:
|
|
16617
|
+
up: up93,
|
|
16634
16618
|
artifacts: {
|
|
16635
16619
|
tables: ["transcript_recovery_files"]
|
|
16636
16620
|
}
|
|
@@ -16638,7 +16622,7 @@ var MIGRATIONS = [
|
|
|
16638
16622
|
{
|
|
16639
16623
|
version: 89,
|
|
16640
16624
|
name: "job-cancellations",
|
|
16641
|
-
up:
|
|
16625
|
+
up: up94,
|
|
16642
16626
|
artifacts: {
|
|
16643
16627
|
tables: ["job_cancellations"]
|
|
16644
16628
|
}
|
|
@@ -16646,7 +16630,7 @@ var MIGRATIONS = [
|
|
|
16646
16630
|
{
|
|
16647
16631
|
version: 90,
|
|
16648
16632
|
name: "job-archive",
|
|
16649
|
-
up:
|
|
16633
|
+
up: up95,
|
|
16650
16634
|
artifacts: {
|
|
16651
16635
|
tables: ["job_archive"]
|
|
16652
16636
|
}
|
|
@@ -16654,25 +16638,25 @@ var MIGRATIONS = [
|
|
|
16654
16638
|
{
|
|
16655
16639
|
version: 91,
|
|
16656
16640
|
name: "embedding-index-generations",
|
|
16657
|
-
up:
|
|
16641
|
+
up: up96,
|
|
16658
16642
|
artifacts: { tables: ["embedding_index_state"] }
|
|
16659
16643
|
},
|
|
16660
16644
|
{
|
|
16661
16645
|
version: 92,
|
|
16662
16646
|
name: "embedding-staging-store",
|
|
16663
|
-
up:
|
|
16647
|
+
up: up97,
|
|
16664
16648
|
artifacts: { tables: ["embeddings_staging"] }
|
|
16665
16649
|
},
|
|
16666
16650
|
{
|
|
16667
16651
|
version: 93,
|
|
16668
16652
|
name: "dreaming-evidence-cursor",
|
|
16669
|
-
up:
|
|
16653
|
+
up: up98,
|
|
16670
16654
|
artifacts: { columns: [{ table: "dreaming_state", column: "evidence_cursor" }] }
|
|
16671
16655
|
},
|
|
16672
16656
|
{
|
|
16673
16657
|
version: 94,
|
|
16674
16658
|
name: "memory-kind",
|
|
16675
|
-
up:
|
|
16659
|
+
up: up99,
|
|
16676
16660
|
artifacts: {
|
|
16677
16661
|
columns: [
|
|
16678
16662
|
{ table: "memories", column: "memory_kind" },
|
|
@@ -16683,35 +16667,35 @@ var MIGRATIONS = [
|
|
|
16683
16667
|
{
|
|
16684
16668
|
version: 95,
|
|
16685
16669
|
name: "compaction-recall-projections",
|
|
16686
|
-
up:
|
|
16670
|
+
up: up100
|
|
16687
16671
|
},
|
|
16688
16672
|
{
|
|
16689
16673
|
version: 96,
|
|
16690
16674
|
name: "retire-legacy-ingestion",
|
|
16691
|
-
up:
|
|
16675
|
+
up: up101
|
|
16692
16676
|
},
|
|
16693
16677
|
{
|
|
16694
16678
|
version: 97,
|
|
16695
16679
|
name: "dreaming-failure-backoff",
|
|
16696
|
-
up:
|
|
16680
|
+
up: up102,
|
|
16697
16681
|
artifacts: { columns: [{ table: "dreaming_state", column: "last_failure_at" }] }
|
|
16698
16682
|
},
|
|
16699
16683
|
{
|
|
16700
16684
|
version: 98,
|
|
16701
16685
|
name: "dreaming-evidence-exclusions",
|
|
16702
|
-
up:
|
|
16686
|
+
up: up103,
|
|
16703
16687
|
artifacts: { tables: ["dreaming_evidence_exclusions"] }
|
|
16704
16688
|
},
|
|
16705
16689
|
{
|
|
16706
16690
|
version: 99,
|
|
16707
16691
|
name: "dreaming-tool-calls",
|
|
16708
|
-
up:
|
|
16692
|
+
up: up104,
|
|
16709
16693
|
artifacts: { tables: ["dreaming_tool_calls"] }
|
|
16710
16694
|
},
|
|
16711
16695
|
{
|
|
16712
16696
|
version: 100,
|
|
16713
16697
|
name: "dreaming-runbook",
|
|
16714
|
-
up:
|
|
16698
|
+
up: up105,
|
|
16715
16699
|
artifacts: {
|
|
16716
16700
|
columns: [
|
|
16717
16701
|
{ table: "dreaming_passes", column: "evidence_window_json" },
|
|
@@ -16722,23 +16706,23 @@ var MIGRATIONS = [
|
|
|
16722
16706
|
{
|
|
16723
16707
|
version: 101,
|
|
16724
16708
|
name: "dreaming-attention",
|
|
16725
|
-
up:
|
|
16709
|
+
up: up106,
|
|
16726
16710
|
artifacts: { tables: ["dreaming_attention"] }
|
|
16727
16711
|
},
|
|
16728
16712
|
{
|
|
16729
16713
|
version: 102,
|
|
16730
16714
|
name: "attribute-semantic-memories",
|
|
16731
|
-
up:
|
|
16715
|
+
up: up107
|
|
16732
16716
|
},
|
|
16733
16717
|
{
|
|
16734
16718
|
version: 103,
|
|
16735
16719
|
name: "semantic-memory-kind",
|
|
16736
|
-
up:
|
|
16720
|
+
up: up108
|
|
16737
16721
|
},
|
|
16738
16722
|
{
|
|
16739
16723
|
version: 104,
|
|
16740
16724
|
name: "derived-memory-provenance",
|
|
16741
|
-
up:
|
|
16725
|
+
up: up109,
|
|
16742
16726
|
artifacts: {
|
|
16743
16727
|
tables: ["derived_memory_sources"],
|
|
16744
16728
|
columns: [{ table: "memories", column: "stale_at" }]
|
|
@@ -16747,12 +16731,12 @@ var MIGRATIONS = [
|
|
|
16747
16731
|
{
|
|
16748
16732
|
version: 105,
|
|
16749
16733
|
name: "agent-scoped-entity-name",
|
|
16750
|
-
up:
|
|
16734
|
+
up: up110
|
|
16751
16735
|
},
|
|
16752
16736
|
{
|
|
16753
16737
|
version: 106,
|
|
16754
16738
|
name: "memory-review-after",
|
|
16755
|
-
up:
|
|
16739
|
+
up: up111,
|
|
16756
16740
|
artifacts: {
|
|
16757
16741
|
columns: [{ table: "memories", column: "review_after" }]
|
|
16758
16742
|
}
|
|
@@ -16760,7 +16744,7 @@ var MIGRATIONS = [
|
|
|
16760
16744
|
{
|
|
16761
16745
|
version: 107,
|
|
16762
16746
|
name: "dreaming-pass-usage",
|
|
16763
|
-
up:
|
|
16747
|
+
up: up112,
|
|
16764
16748
|
artifacts: {
|
|
16765
16749
|
columns: [
|
|
16766
16750
|
{ table: "dreaming_passes", column: "tokens_input" },
|
|
@@ -16774,7 +16758,7 @@ var MIGRATIONS = [
|
|
|
16774
16758
|
{
|
|
16775
16759
|
version: 108,
|
|
16776
16760
|
name: "embedding-usage",
|
|
16777
|
-
up:
|
|
16761
|
+
up: up113,
|
|
16778
16762
|
artifacts: {
|
|
16779
16763
|
tables: ["embedding_usage"]
|
|
16780
16764
|
}
|
|
@@ -16782,7 +16766,7 @@ var MIGRATIONS = [
|
|
|
16782
16766
|
{
|
|
16783
16767
|
version: 109,
|
|
16784
16768
|
name: "telemetry-install",
|
|
16785
|
-
up:
|
|
16769
|
+
up: up114,
|
|
16786
16770
|
artifacts: {
|
|
16787
16771
|
tables: ["telemetry_install"]
|
|
16788
16772
|
}
|
|
@@ -16790,12 +16774,12 @@ var MIGRATIONS = [
|
|
|
16790
16774
|
{
|
|
16791
16775
|
version: 110,
|
|
16792
16776
|
name: "memory-mention-join-index",
|
|
16793
|
-
up:
|
|
16777
|
+
up: up115
|
|
16794
16778
|
},
|
|
16795
16779
|
{
|
|
16796
16780
|
version: 111,
|
|
16797
16781
|
name: "telemetry-first-use",
|
|
16798
|
-
up:
|
|
16782
|
+
up: up116,
|
|
16799
16783
|
artifacts: {
|
|
16800
16784
|
columns: [
|
|
16801
16785
|
{ table: "telemetry_install", column: "first_remember_at" },
|
|
@@ -16806,7 +16790,7 @@ var MIGRATIONS = [
|
|
|
16806
16790
|
{
|
|
16807
16791
|
version: 112,
|
|
16808
16792
|
name: "telemetry-queue-ownership",
|
|
16809
|
-
up:
|
|
16793
|
+
up: up117,
|
|
16810
16794
|
artifacts: {
|
|
16811
16795
|
columns: [
|
|
16812
16796
|
{ table: "telemetry_events", column: "source" },
|
|
@@ -16818,7 +16802,7 @@ var MIGRATIONS = [
|
|
|
16818
16802
|
{
|
|
16819
16803
|
version: 113,
|
|
16820
16804
|
name: "session-claims",
|
|
16821
|
-
up:
|
|
16805
|
+
up: up118,
|
|
16822
16806
|
artifacts: {
|
|
16823
16807
|
tables: ["session_claims"],
|
|
16824
16808
|
columns: [
|
|
@@ -16832,12 +16816,12 @@ var MIGRATIONS = [
|
|
|
16832
16816
|
{
|
|
16833
16817
|
version: 114,
|
|
16834
16818
|
name: "memory-traversal-hydration-index",
|
|
16835
|
-
up:
|
|
16819
|
+
up: up119
|
|
16836
16820
|
},
|
|
16837
16821
|
{
|
|
16838
16822
|
version: 115,
|
|
16839
16823
|
name: "cross-agent-message-notifications",
|
|
16840
|
-
up:
|
|
16824
|
+
up: up120,
|
|
16841
16825
|
artifacts: {
|
|
16842
16826
|
tables: ["cross_agent_messages", "cross_agent_message_receipts"]
|
|
16843
16827
|
}
|
|
@@ -16845,7 +16829,7 @@ var MIGRATIONS = [
|
|
|
16845
16829
|
{
|
|
16846
16830
|
version: 116,
|
|
16847
16831
|
name: "acp-delivery-reconciliation",
|
|
16848
|
-
up:
|
|
16832
|
+
up: up121,
|
|
16849
16833
|
artifacts: {
|
|
16850
16834
|
columns: [
|
|
16851
16835
|
{ table: "cross_agent_messages", column: "delivery_state" },
|
|
@@ -16859,7 +16843,7 @@ var MIGRATIONS = [
|
|
|
16859
16843
|
{
|
|
16860
16844
|
version: 117,
|
|
16861
16845
|
name: "retire-summary-worker",
|
|
16862
|
-
up:
|
|
16846
|
+
up: up122,
|
|
16863
16847
|
artifacts: {
|
|
16864
16848
|
columns: [
|
|
16865
16849
|
{ table: "session_transcripts", column: "completed_at" },
|
|
@@ -16870,24 +16854,24 @@ var MIGRATIONS = [
|
|
|
16870
16854
|
{
|
|
16871
16855
|
version: 118,
|
|
16872
16856
|
name: "queue-pressure-indices",
|
|
16873
|
-
up:
|
|
16857
|
+
up: up123
|
|
16874
16858
|
},
|
|
16875
16859
|
{
|
|
16876
16860
|
version: 119,
|
|
16877
16861
|
name: "telemetry-version-observation",
|
|
16878
|
-
up:
|
|
16862
|
+
up: up124,
|
|
16879
16863
|
artifacts: { columns: [{ table: "telemetry_install", column: "last_seen_version" }] }
|
|
16880
16864
|
},
|
|
16881
16865
|
{
|
|
16882
16866
|
version: 120,
|
|
16883
16867
|
name: "source-lifecycle-telemetry",
|
|
16884
|
-
up:
|
|
16868
|
+
up: up125,
|
|
16885
16869
|
artifacts: { tables: ["source_lifecycle_state"] }
|
|
16886
16870
|
},
|
|
16887
16871
|
{
|
|
16888
16872
|
version: 121,
|
|
16889
16873
|
name: "telemetry-delivery-health",
|
|
16890
|
-
up:
|
|
16874
|
+
up: up126,
|
|
16891
16875
|
artifacts: {
|
|
16892
16876
|
tables: ["telemetry_delivery_state"],
|
|
16893
16877
|
columns: [
|
|
@@ -16901,7 +16885,7 @@ var MIGRATIONS = [
|
|
|
16901
16885
|
{
|
|
16902
16886
|
version: 122,
|
|
16903
16887
|
name: "dreaming-evidence-retry",
|
|
16904
|
-
up:
|
|
16888
|
+
up: up127,
|
|
16905
16889
|
artifacts: {
|
|
16906
16890
|
columns: [
|
|
16907
16891
|
{ table: "dreaming_evidence_exclusions", column: "failure_class" },
|
|
@@ -16914,13 +16898,13 @@ var MIGRATIONS = [
|
|
|
16914
16898
|
{
|
|
16915
16899
|
version: 123,
|
|
16916
16900
|
name: "embedding-index-failures",
|
|
16917
|
-
up:
|
|
16901
|
+
up: up128,
|
|
16918
16902
|
artifacts: { tables: ["embedding_index_failures"] }
|
|
16919
16903
|
},
|
|
16920
16904
|
{
|
|
16921
16905
|
version: 124,
|
|
16922
16906
|
name: "import-derived-lifecycle",
|
|
16923
|
-
up:
|
|
16907
|
+
up: up129,
|
|
16924
16908
|
artifacts: {
|
|
16925
16909
|
tables: ["imported_source_lifecycle"]
|
|
16926
16910
|
}
|
|
@@ -16928,77 +16912,77 @@ var MIGRATIONS = [
|
|
|
16928
16912
|
{
|
|
16929
16913
|
version: 125,
|
|
16930
16914
|
name: "memory-content-safety",
|
|
16931
|
-
up:
|
|
16915
|
+
up: up130,
|
|
16932
16916
|
artifacts: { tables: ["memory_content_safety"] }
|
|
16933
16917
|
},
|
|
16934
16918
|
{
|
|
16935
16919
|
version: 126,
|
|
16936
16920
|
name: "dreaming-surprisal-attention",
|
|
16937
|
-
up:
|
|
16921
|
+
up: up131,
|
|
16938
16922
|
artifacts: { tables: ["dreaming_attention"] }
|
|
16939
16923
|
},
|
|
16940
16924
|
{
|
|
16941
16925
|
version: 127,
|
|
16942
16926
|
name: "ontology-contradictions",
|
|
16943
|
-
up:
|
|
16927
|
+
up: up132,
|
|
16944
16928
|
artifacts: { tables: ["ontology_contradictions"] }
|
|
16945
16929
|
},
|
|
16946
16930
|
{
|
|
16947
16931
|
version: 128,
|
|
16948
16932
|
name: "bounded-queue-diagnostics",
|
|
16949
|
-
up:
|
|
16933
|
+
up: up133
|
|
16950
16934
|
},
|
|
16951
16935
|
{
|
|
16952
16936
|
version: 129,
|
|
16953
16937
|
name: "retire-structural-jobs",
|
|
16954
|
-
up:
|
|
16938
|
+
up: up134
|
|
16955
16939
|
},
|
|
16956
16940
|
{
|
|
16957
16941
|
version: 130,
|
|
16958
16942
|
name: "embedding-repair-state",
|
|
16959
|
-
up:
|
|
16943
|
+
up: up135,
|
|
16960
16944
|
artifacts: { tables: ["embedding_repair_budget", "embedding_repair_backoff"] }
|
|
16961
16945
|
},
|
|
16962
16946
|
{
|
|
16963
16947
|
version: 131,
|
|
16964
16948
|
name: "dreaming-evidence-consumption",
|
|
16965
|
-
up:
|
|
16949
|
+
up: up136,
|
|
16966
16950
|
artifacts: { tables: ["dreaming_evidence_consumption"] }
|
|
16967
16951
|
},
|
|
16968
16952
|
{
|
|
16969
16953
|
version: 132,
|
|
16970
16954
|
name: "observer-scoped-epistemic-assertions",
|
|
16971
|
-
up:
|
|
16955
|
+
up: up137,
|
|
16972
16956
|
artifacts: { tables: ["epistemic_assertions"] }
|
|
16973
16957
|
},
|
|
16974
16958
|
{
|
|
16975
16959
|
version: 133,
|
|
16976
16960
|
name: "dreaming-memory-head",
|
|
16977
|
-
up:
|
|
16961
|
+
up: up138,
|
|
16978
16962
|
artifacts: { tables: ["memory_head_revisions", "memory_head_entries", "memory_head_revision_entries"] }
|
|
16979
16963
|
},
|
|
16980
16964
|
{
|
|
16981
16965
|
version: 134,
|
|
16982
16966
|
name: "scope-memory-head-entries",
|
|
16983
|
-
up:
|
|
16967
|
+
up: up139,
|
|
16984
16968
|
artifacts: { tables: ["memory_head_entries"] }
|
|
16985
16969
|
},
|
|
16986
16970
|
{
|
|
16987
16971
|
version: 135,
|
|
16988
16972
|
name: "memory-head-publication",
|
|
16989
|
-
up:
|
|
16973
|
+
up: up140,
|
|
16990
16974
|
artifacts: { tables: ["memory_head_publications"] }
|
|
16991
16975
|
},
|
|
16992
16976
|
{
|
|
16993
16977
|
version: 136,
|
|
16994
16978
|
name: "memory-head-revisions",
|
|
16995
|
-
up:
|
|
16979
|
+
up: up141,
|
|
16996
16980
|
artifacts: { tables: ["memory_head_revisions"] }
|
|
16997
16981
|
},
|
|
16998
16982
|
{
|
|
16999
16983
|
version: 137,
|
|
17000
16984
|
name: "dreaming-head-manifest",
|
|
17001
|
-
up:
|
|
16985
|
+
up: up142,
|
|
17002
16986
|
artifacts: {
|
|
17003
16987
|
columns: [
|
|
17004
16988
|
{ table: "dreaming_passes", column: "head_revision" },
|
|
@@ -17009,7 +16993,7 @@ var MIGRATIONS = [
|
|
|
17009
16993
|
{
|
|
17010
16994
|
version: 138,
|
|
17011
16995
|
name: "bounded-status-projections",
|
|
17012
|
-
up:
|
|
16996
|
+
up: up143,
|
|
17013
16997
|
artifacts: {
|
|
17014
16998
|
tables: ["transcript_capture_status", "memories_duplicate_hash_counts", "memories_diagnostics_state"]
|
|
17015
16999
|
}
|
|
@@ -17017,31 +17001,31 @@ var MIGRATIONS = [
|
|
|
17017
17001
|
{
|
|
17018
17002
|
version: 139,
|
|
17019
17003
|
name: "native-source-sync-state",
|
|
17020
|
-
up:
|
|
17004
|
+
up: up144,
|
|
17021
17005
|
artifacts: { tables: ["native_source_sync_state"] }
|
|
17022
17006
|
},
|
|
17023
17007
|
{
|
|
17024
17008
|
version: 140,
|
|
17025
17009
|
name: "transcript-recovery-frontier",
|
|
17026
|
-
up:
|
|
17010
|
+
up: up145,
|
|
17027
17011
|
artifacts: { tables: ["transcript_recovery_frontiers"] }
|
|
17028
17012
|
},
|
|
17029
17013
|
{
|
|
17030
17014
|
version: 141,
|
|
17031
17015
|
name: "source-sync-checkpoints",
|
|
17032
|
-
up:
|
|
17016
|
+
up: up146,
|
|
17033
17017
|
artifacts: { tables: ["source_sync_checkpoints"] }
|
|
17034
17018
|
},
|
|
17035
17019
|
{
|
|
17036
17020
|
version: 142,
|
|
17037
17021
|
name: "source-sync-frontier",
|
|
17038
|
-
up:
|
|
17022
|
+
up: up147,
|
|
17039
17023
|
artifacts: { columns: [{ table: "source_sync_checkpoints", column: "frontier" }] }
|
|
17040
17024
|
},
|
|
17041
17025
|
{
|
|
17042
17026
|
version: 143,
|
|
17043
17027
|
name: "embedding-index-progress",
|
|
17044
|
-
up:
|
|
17028
|
+
up: up148,
|
|
17045
17029
|
artifacts: {
|
|
17046
17030
|
columns: [
|
|
17047
17031
|
{ table: "embedding_index_state", column: "migration_phase" },
|
|
@@ -17057,19 +17041,19 @@ var MIGRATIONS = [
|
|
|
17057
17041
|
{
|
|
17058
17042
|
version: 144,
|
|
17059
17043
|
name: "memory-job-lease-token",
|
|
17060
|
-
up:
|
|
17044
|
+
up: up149,
|
|
17061
17045
|
artifacts: { columns: [{ table: "memory_jobs", column: "lease_token" }] }
|
|
17062
17046
|
},
|
|
17063
17047
|
{
|
|
17064
17048
|
version: 145,
|
|
17065
17049
|
name: "dreaming-evidence-reviews",
|
|
17066
|
-
up:
|
|
17050
|
+
up: up150,
|
|
17067
17051
|
artifacts: { tables: ["dreaming_evidence_reviews"] }
|
|
17068
17052
|
},
|
|
17069
17053
|
{
|
|
17070
17054
|
version: 146,
|
|
17071
17055
|
name: "source-transcript-import",
|
|
17072
|
-
up:
|
|
17056
|
+
up: up151,
|
|
17073
17057
|
artifacts: {
|
|
17074
17058
|
tables: [
|
|
17075
17059
|
"source_import_jobs",
|
|
@@ -17088,19 +17072,19 @@ var MIGRATIONS = [
|
|
|
17088
17072
|
{
|
|
17089
17073
|
version: 147,
|
|
17090
17074
|
name: "source-import-replay-file-slots",
|
|
17091
|
-
up:
|
|
17075
|
+
up: up152,
|
|
17092
17076
|
artifacts: { tables: ["source_import_files"] }
|
|
17093
17077
|
},
|
|
17094
17078
|
{
|
|
17095
17079
|
version: 148,
|
|
17096
17080
|
name: "source-import-attempt-provenance",
|
|
17097
|
-
up:
|
|
17081
|
+
up: up153,
|
|
17098
17082
|
artifacts: { columns: [{ table: "source_import_record_attempts", column: "source_id" }] }
|
|
17099
17083
|
},
|
|
17100
17084
|
{
|
|
17101
17085
|
version: 149,
|
|
17102
17086
|
name: "transcript-import-state-machine",
|
|
17103
|
-
up:
|
|
17087
|
+
up: up154,
|
|
17104
17088
|
artifacts: {
|
|
17105
17089
|
columns: [
|
|
17106
17090
|
{ table: "source_import_jobs", column: "duplicate_mode" },
|
|
@@ -17112,7 +17096,7 @@ var MIGRATIONS = [
|
|
|
17112
17096
|
{
|
|
17113
17097
|
version: 150,
|
|
17114
17098
|
name: "memory-head-freshness",
|
|
17115
|
-
up:
|
|
17099
|
+
up: up155,
|
|
17116
17100
|
artifacts: {
|
|
17117
17101
|
columns: [
|
|
17118
17102
|
{ table: "memory_md_heads", column: "is_current" },
|
|
@@ -17158,7 +17142,7 @@ var MIGRATIONS = [
|
|
|
17158
17142
|
{
|
|
17159
17143
|
version: 153,
|
|
17160
17144
|
name: "vector-repair-checkpoints",
|
|
17161
|
-
up:
|
|
17145
|
+
up: up156,
|
|
17162
17146
|
artifacts: { tables: ["vector_repair_checkpoints"] }
|
|
17163
17147
|
},
|
|
17164
17148
|
{
|
|
@@ -17185,13 +17169,13 @@ var MIGRATIONS = [
|
|
|
17185
17169
|
{
|
|
17186
17170
|
version: 156,
|
|
17187
17171
|
name: "embedding-repair-checkpoints",
|
|
17188
|
-
up:
|
|
17172
|
+
up: up157,
|
|
17189
17173
|
artifacts: { tables: ["embedding_repair_checkpoints"] }
|
|
17190
17174
|
},
|
|
17191
17175
|
{
|
|
17192
17176
|
version: 157,
|
|
17193
17177
|
name: "embedding-repair-progress",
|
|
17194
|
-
up:
|
|
17178
|
+
up: up158,
|
|
17195
17179
|
artifacts: {
|
|
17196
17180
|
tables: ["embedding_repair_progress"],
|
|
17197
17181
|
columns: [{ table: "embedding_repair_checkpoints", column: "profile_fingerprint" }]
|
|
@@ -17200,8 +17184,13 @@ var MIGRATIONS = [
|
|
|
17200
17184
|
{
|
|
17201
17185
|
version: 158,
|
|
17202
17186
|
name: "dreaming-candidate-scan-index",
|
|
17203
|
-
up:
|
|
17187
|
+
up: up159,
|
|
17204
17188
|
artifacts: { indexes: ["idx_memories_agent_kind"] }
|
|
17189
|
+
},
|
|
17190
|
+
{
|
|
17191
|
+
version: 159,
|
|
17192
|
+
name: "retire-obsolete-invocation-ledger",
|
|
17193
|
+
up: up5
|
|
17205
17194
|
}
|
|
17206
17195
|
];
|
|
17207
17196
|
var LATEST_SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1]?.version ?? 0;
|
|
@@ -28019,7 +28008,7 @@ var DAEMON_DERIVED_MEMORY_SOURCE_TYPES2 = [
|
|
|
28019
28008
|
"checkpoint",
|
|
28020
28009
|
"dreaming"
|
|
28021
28010
|
];
|
|
28022
|
-
function
|
|
28011
|
+
function up160(db) {
|
|
28023
28012
|
const hasColumn26 = (table, column) => {
|
|
28024
28013
|
const statement = db.prepare(`SELECT 1 FROM pragma_table_info('${table}') WHERE name = ?`);
|
|
28025
28014
|
try {
|
|
@@ -28131,6 +28120,9 @@ function up410(db) {
|
|
|
28131
28120
|
WHERE resolved_at IS NULL;
|
|
28132
28121
|
`);
|
|
28133
28122
|
}
|
|
28123
|
+
function up510(db) {
|
|
28124
|
+
db.exec("DROP TABLE IF EXISTS mcp_invocations");
|
|
28125
|
+
}
|
|
28134
28126
|
var MEMORIES_FTS_TOKENIZER2 = "unicode61";
|
|
28135
28127
|
var FTS_STATE_TABLE2 = "memories_fts_state";
|
|
28136
28128
|
function normalizeSql2(sql) {
|
|
@@ -28246,7 +28238,7 @@ function memoriesFtsNeedsTokenizerRepair2(sql) {
|
|
|
28246
28238
|
return true;
|
|
28247
28239
|
return !normalized.includes(`tokenize='${MEMORIES_FTS_TOKENIZER2}'`);
|
|
28248
28240
|
}
|
|
28249
|
-
function
|
|
28241
|
+
function up610(db) {
|
|
28250
28242
|
db.exec(`
|
|
28251
28243
|
CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
28252
28244
|
version INTEGER PRIMARY KEY,
|
|
@@ -28344,7 +28336,7 @@ function addColumnIfMissing210(db, table, column, definition) {
|
|
|
28344
28336
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
28345
28337
|
}
|
|
28346
28338
|
}
|
|
28347
|
-
function
|
|
28339
|
+
function up710(db) {
|
|
28348
28340
|
addColumnIfMissing210(db, "memories", "content_hash", "TEXT");
|
|
28349
28341
|
addColumnIfMissing210(db, "memories", "normalized_content", "TEXT");
|
|
28350
28342
|
addColumnIfMissing210(db, "memories", "is_deleted", "INTEGER DEFAULT 0");
|
|
@@ -28462,7 +28454,7 @@ function addColumnIfMissing32(db, table, column, definition) {
|
|
|
28462
28454
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
28463
28455
|
return true;
|
|
28464
28456
|
}
|
|
28465
|
-
function
|
|
28457
|
+
function up810(db) {
|
|
28466
28458
|
addColumnIfMissing32(db, "memories", "why", "TEXT");
|
|
28467
28459
|
addColumnIfMissing32(db, "memories", "project", "TEXT");
|
|
28468
28460
|
db.exec(`DROP INDEX IF EXISTS idx_memories_content_hash`);
|
|
@@ -28499,7 +28491,7 @@ function addColumnIfMissing42(db, table, column, definition) {
|
|
|
28499
28491
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
28500
28492
|
}
|
|
28501
28493
|
}
|
|
28502
|
-
function
|
|
28494
|
+
function up910(db) {
|
|
28503
28495
|
addColumnIfMissing42(db, "memory_history", "actor_type", "TEXT");
|
|
28504
28496
|
addColumnIfMissing42(db, "memory_history", "session_id", "TEXT");
|
|
28505
28497
|
addColumnIfMissing42(db, "memory_history", "request_id", "TEXT");
|
|
@@ -28532,7 +28524,7 @@ function addColumnIfMissing52(db, table, column, definition) {
|
|
|
28532
28524
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
28533
28525
|
}
|
|
28534
28526
|
}
|
|
28535
|
-
function
|
|
28527
|
+
function up1010(db) {
|
|
28536
28528
|
addColumnIfMissing52(db, "entities", "canonical_name", "TEXT");
|
|
28537
28529
|
addColumnIfMissing52(db, "entities", "mentions", "INTEGER DEFAULT 0");
|
|
28538
28530
|
addColumnIfMissing52(db, "entities", "embedding", "BLOB");
|
|
@@ -28549,7 +28541,7 @@ function hasColumn42(db, table, column) {
|
|
|
28549
28541
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
28550
28542
|
return rows.some((r22) => r22.name === column);
|
|
28551
28543
|
}
|
|
28552
|
-
function
|
|
28544
|
+
function up1110(db) {
|
|
28553
28545
|
if (!hasColumn42(db, "memories", "idempotency_key")) {
|
|
28554
28546
|
db.exec("ALTER TABLE memories ADD COLUMN idempotency_key TEXT");
|
|
28555
28547
|
}
|
|
@@ -28564,7 +28556,7 @@ function hasColumn52(db, table, column) {
|
|
|
28564
28556
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
28565
28557
|
return rows.some((r22) => r22.name === column);
|
|
28566
28558
|
}
|
|
28567
|
-
function
|
|
28559
|
+
function up1210(db) {
|
|
28568
28560
|
db.exec(`
|
|
28569
28561
|
CREATE TABLE IF NOT EXISTS documents (
|
|
28570
28562
|
id TEXT PRIMARY KEY,
|
|
@@ -28621,7 +28613,7 @@ function up1110(db) {
|
|
|
28621
28613
|
db.exec("ALTER TABLE memory_jobs ADD COLUMN document_id TEXT");
|
|
28622
28614
|
}
|
|
28623
28615
|
}
|
|
28624
|
-
function
|
|
28616
|
+
function up1310(db) {
|
|
28625
28617
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='embeddings'").all();
|
|
28626
28618
|
if (tables.length === 0)
|
|
28627
28619
|
return;
|
|
@@ -28638,7 +28630,7 @@ function up1210(db) {
|
|
|
28638
28630
|
ON embeddings(content_hash)
|
|
28639
28631
|
`);
|
|
28640
28632
|
}
|
|
28641
|
-
function
|
|
28633
|
+
function up1410(db) {
|
|
28642
28634
|
db.exec(`
|
|
28643
28635
|
CREATE TABLE IF NOT EXISTS summary_jobs (
|
|
28644
28636
|
id TEXT PRIMARY KEY,
|
|
@@ -28658,7 +28650,7 @@ function up1310(db) {
|
|
|
28658
28650
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_summary_jobs_status
|
|
28659
28651
|
ON summary_jobs(status)`);
|
|
28660
28652
|
}
|
|
28661
|
-
function
|
|
28653
|
+
function up1510(db) {
|
|
28662
28654
|
db.exec(`
|
|
28663
28655
|
CREATE TABLE IF NOT EXISTS umap_cache (
|
|
28664
28656
|
id INTEGER PRIMARY KEY,
|
|
@@ -28669,7 +28661,7 @@ function up1410(db) {
|
|
|
28669
28661
|
)
|
|
28670
28662
|
`);
|
|
28671
28663
|
}
|
|
28672
|
-
function
|
|
28664
|
+
function up162(db) {
|
|
28673
28665
|
db.exec(`
|
|
28674
28666
|
CREATE TABLE IF NOT EXISTS session_scores (
|
|
28675
28667
|
id TEXT PRIMARY KEY,
|
|
@@ -28689,7 +28681,7 @@ function up1510(db) {
|
|
|
28689
28681
|
ON session_scores(session_key);
|
|
28690
28682
|
`);
|
|
28691
28683
|
}
|
|
28692
|
-
function
|
|
28684
|
+
function up172(db) {
|
|
28693
28685
|
db.exec(`
|
|
28694
28686
|
CREATE TABLE IF NOT EXISTS scheduled_tasks (
|
|
28695
28687
|
id TEXT PRIMARY KEY,
|
|
@@ -28730,7 +28722,7 @@ function addColumnIfMissing62(db, table, column, definition) {
|
|
|
28730
28722
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
28731
28723
|
}
|
|
28732
28724
|
}
|
|
28733
|
-
function
|
|
28725
|
+
function up182(db) {
|
|
28734
28726
|
db.exec(`
|
|
28735
28727
|
CREATE TABLE IF NOT EXISTS ingestion_jobs (
|
|
28736
28728
|
id TEXT PRIMARY KEY,
|
|
@@ -28756,7 +28748,7 @@ function up172(db) {
|
|
|
28756
28748
|
addColumnIfMissing62(db, "memories", "source_path", "TEXT");
|
|
28757
28749
|
addColumnIfMissing62(db, "memories", "source_section", "TEXT");
|
|
28758
28750
|
}
|
|
28759
|
-
function
|
|
28751
|
+
function up192(db) {
|
|
28760
28752
|
db.exec(`
|
|
28761
28753
|
CREATE TABLE IF NOT EXISTS telemetry_events (
|
|
28762
28754
|
id TEXT PRIMARY KEY,
|
|
@@ -28781,7 +28773,7 @@ function addColumnIfMissing72(db, table, column, definition) {
|
|
|
28781
28773
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
28782
28774
|
}
|
|
28783
28775
|
}
|
|
28784
|
-
function
|
|
28776
|
+
function up202(db) {
|
|
28785
28777
|
db.exec(`
|
|
28786
28778
|
CREATE TABLE IF NOT EXISTS session_memories (
|
|
28787
28779
|
id TEXT PRIMARY KEY,
|
|
@@ -28808,7 +28800,7 @@ function up192(db) {
|
|
|
28808
28800
|
addColumnIfMissing72(db, "session_scores", "confidence", "REAL");
|
|
28809
28801
|
addColumnIfMissing72(db, "session_scores", "continuity_reasoning", "TEXT");
|
|
28810
28802
|
}
|
|
28811
|
-
function
|
|
28803
|
+
function up212(db) {
|
|
28812
28804
|
db.exec(`
|
|
28813
28805
|
CREATE TABLE IF NOT EXISTS session_checkpoints (
|
|
28814
28806
|
id TEXT PRIMARY KEY,
|
|
@@ -28830,7 +28822,7 @@ function up202(db) {
|
|
|
28830
28822
|
ON session_checkpoints(project_normalized, created_at DESC);
|
|
28831
28823
|
`);
|
|
28832
28824
|
}
|
|
28833
|
-
function
|
|
28825
|
+
function up222(db) {
|
|
28834
28826
|
const cols = db.prepare("PRAGMA table_info(scheduled_tasks)").all();
|
|
28835
28827
|
const colNames = new Set(cols.flatMap((c22) => typeof c22.name === "string" ? [c22.name] : []));
|
|
28836
28828
|
if (!colNames.has("skill_name")) {
|
|
@@ -28841,7 +28833,7 @@ function up212(db) {
|
|
|
28841
28833
|
CHECK (skill_mode IN ('inject', 'slash') OR skill_mode IS NULL)`);
|
|
28842
28834
|
}
|
|
28843
28835
|
}
|
|
28844
|
-
function
|
|
28836
|
+
function up232(db) {
|
|
28845
28837
|
const existing = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='skill_meta'").get();
|
|
28846
28838
|
if (existing)
|
|
28847
28839
|
return;
|
|
@@ -28873,7 +28865,7 @@ function up222(db) {
|
|
|
28873
28865
|
CREATE INDEX idx_skill_meta_source ON skill_meta(source);
|
|
28874
28866
|
`);
|
|
28875
28867
|
}
|
|
28876
|
-
function
|
|
28868
|
+
function up242(db) {
|
|
28877
28869
|
const entityCols = db.prepare("PRAGMA table_info(entities)").all();
|
|
28878
28870
|
const entityColNames = new Set(entityCols.flatMap((c22) => typeof c22.name === "string" ? [c22.name] : []));
|
|
28879
28871
|
if (!entityColNames.has("agent_id")) {
|
|
@@ -28958,13 +28950,13 @@ function addColumnIfMissing82(db, table, column, definition) {
|
|
|
28958
28950
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
28959
28951
|
}
|
|
28960
28952
|
}
|
|
28961
|
-
function
|
|
28953
|
+
function up252(db) {
|
|
28962
28954
|
addColumnIfMissing82(db, "session_memories", "entity_slot", "INTEGER");
|
|
28963
28955
|
addColumnIfMissing82(db, "session_memories", "aspect_slot", "INTEGER");
|
|
28964
28956
|
addColumnIfMissing82(db, "session_memories", "is_constraint", "INTEGER NOT NULL DEFAULT 0");
|
|
28965
28957
|
addColumnIfMissing82(db, "session_memories", "structural_density", "INTEGER");
|
|
28966
28958
|
}
|
|
28967
|
-
function
|
|
28959
|
+
function up262(db) {
|
|
28968
28960
|
const columns = db.prepare("PRAGMA table_info(session_checkpoints)").all();
|
|
28969
28961
|
const columnNames = new Set(columns.flatMap((column) => typeof column.name === "string" ? [column.name] : []));
|
|
28970
28962
|
if (!columnNames.has("focal_entity_ids")) {
|
|
@@ -28989,25 +28981,25 @@ function addColumnIfMissing92(db, table, column, definition) {
|
|
|
28989
28981
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
28990
28982
|
}
|
|
28991
28983
|
}
|
|
28992
|
-
function
|
|
28984
|
+
function up272(db) {
|
|
28993
28985
|
addColumnIfMissing92(db, "entities", "pinned", "INTEGER NOT NULL DEFAULT 0");
|
|
28994
28986
|
addColumnIfMissing92(db, "entities", "pinned_at", "TEXT");
|
|
28995
28987
|
db.exec("CREATE INDEX IF NOT EXISTS idx_entities_pinned ON entities(agent_id, pinned, pinned_at DESC)");
|
|
28996
28988
|
}
|
|
28997
|
-
function up272(_db) {}
|
|
28998
28989
|
function up282(_db) {}
|
|
28990
|
+
function up292(_db) {}
|
|
28999
28991
|
function addColumnIfMissing102(db, table, column, definition) {
|
|
29000
28992
|
const cols = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
29001
28993
|
if (!cols.some((c22) => c22.name === column)) {
|
|
29002
28994
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
29003
28995
|
}
|
|
29004
28996
|
}
|
|
29005
|
-
function
|
|
28997
|
+
function up302(db) {
|
|
29006
28998
|
addColumnIfMissing102(db, "session_memories", "agent_relevance_score", "REAL");
|
|
29007
28999
|
addColumnIfMissing102(db, "session_memories", "agent_feedback_count", "INTEGER DEFAULT 0");
|
|
29008
29000
|
}
|
|
29009
|
-
function
|
|
29010
|
-
function
|
|
29001
|
+
function up312(_db) {}
|
|
29002
|
+
function up322(db) {
|
|
29011
29003
|
db.exec(`
|
|
29012
29004
|
UPDATE entities
|
|
29013
29005
|
SET canonical_name = REPLACE(REPLACE(REPLACE(
|
|
@@ -29016,7 +29008,7 @@ function up312(db) {
|
|
|
29016
29008
|
WHERE canonical_name IS NULL
|
|
29017
29009
|
`);
|
|
29018
29010
|
}
|
|
29019
|
-
function
|
|
29011
|
+
function up332(db) {
|
|
29020
29012
|
db.exec(`
|
|
29021
29013
|
CREATE TABLE IF NOT EXISTS memories_cold (
|
|
29022
29014
|
archive_id TEXT PRIMARY KEY,
|
|
@@ -29053,7 +29045,7 @@ function up322(db) {
|
|
|
29053
29045
|
CREATE INDEX IF NOT EXISTS idx_cold_source ON memories_cold(cold_source_id);
|
|
29054
29046
|
`);
|
|
29055
29047
|
}
|
|
29056
|
-
function
|
|
29048
|
+
function up342(db) {
|
|
29057
29049
|
db.exec(`
|
|
29058
29050
|
CREATE TABLE IF NOT EXISTS session_summaries (
|
|
29059
29051
|
id TEXT PRIMARY KEY,
|
|
@@ -29098,7 +29090,7 @@ function up332(db) {
|
|
|
29098
29090
|
WHERE session_key IS NOT NULL;
|
|
29099
29091
|
`);
|
|
29100
29092
|
}
|
|
29101
|
-
function
|
|
29093
|
+
function up352(db) {
|
|
29102
29094
|
db.exec(`
|
|
29103
29095
|
CREATE TABLE IF NOT EXISTS memory_jobs_new (
|
|
29104
29096
|
id TEXT PRIMARY KEY,
|
|
@@ -29143,7 +29135,7 @@ function up342(db) {
|
|
|
29143
29135
|
ON memory_jobs(failed_at);
|
|
29144
29136
|
`);
|
|
29145
29137
|
}
|
|
29146
|
-
function
|
|
29138
|
+
function up362(db) {
|
|
29147
29139
|
const depCols = db.prepare("PRAGMA table_info(entity_dependencies)").all();
|
|
29148
29140
|
if (!depCols.some((c22) => c22.name === "reason")) {
|
|
29149
29141
|
db.exec("ALTER TABLE entity_dependencies ADD COLUMN reason TEXT");
|
|
@@ -29153,7 +29145,7 @@ function up352(db) {
|
|
|
29153
29145
|
db.exec("ALTER TABLE entities ADD COLUMN last_synthesized_at TEXT");
|
|
29154
29146
|
}
|
|
29155
29147
|
}
|
|
29156
|
-
function
|
|
29148
|
+
function up372(db) {
|
|
29157
29149
|
const cols = db.prepare("PRAGMA table_info(embeddings)").all();
|
|
29158
29150
|
if (cols.length === 0)
|
|
29159
29151
|
return;
|
|
@@ -29161,14 +29153,14 @@ function up362(db) {
|
|
|
29161
29153
|
db.exec("ALTER TABLE embeddings ADD COLUMN vector BLOB");
|
|
29162
29154
|
}
|
|
29163
29155
|
}
|
|
29164
|
-
function
|
|
29156
|
+
function up382(db) {
|
|
29165
29157
|
const cols = db.prepare("PRAGMA table_info(memories)").all();
|
|
29166
29158
|
if (!cols.some((c22) => c22.name === "scope")) {
|
|
29167
29159
|
db.exec("ALTER TABLE memories ADD COLUMN scope TEXT DEFAULT NULL");
|
|
29168
29160
|
}
|
|
29169
29161
|
db.exec("CREATE INDEX IF NOT EXISTS idx_memories_scope ON memories(scope) WHERE scope IS NOT NULL");
|
|
29170
29162
|
}
|
|
29171
|
-
function
|
|
29163
|
+
function up392(db) {
|
|
29172
29164
|
db.exec("DROP INDEX IF EXISTS idx_memories_content_hash_unique");
|
|
29173
29165
|
db.exec(`
|
|
29174
29166
|
CREATE UNIQUE INDEX idx_memories_content_hash_unique
|
|
@@ -29176,7 +29168,7 @@ function up382(db) {
|
|
|
29176
29168
|
WHERE content_hash IS NOT NULL AND is_deleted = 0
|
|
29177
29169
|
`);
|
|
29178
29170
|
}
|
|
29179
|
-
function
|
|
29171
|
+
function up402(db) {
|
|
29180
29172
|
db.exec(`
|
|
29181
29173
|
CREATE VIRTUAL TABLE IF NOT EXISTS entities_fts USING fts5(
|
|
29182
29174
|
name, canonical_name,
|
|
@@ -29208,13 +29200,13 @@ function up392(db) {
|
|
|
29208
29200
|
END
|
|
29209
29201
|
`);
|
|
29210
29202
|
}
|
|
29211
|
-
function
|
|
29203
|
+
function up412(db) {
|
|
29212
29204
|
const cols = db.prepare("PRAGMA table_info(entity_dependencies)").all();
|
|
29213
29205
|
if (!cols.some((c22) => c22.name === "confidence")) {
|
|
29214
29206
|
db.exec("ALTER TABLE entity_dependencies ADD COLUMN confidence REAL DEFAULT 0.7");
|
|
29215
29207
|
}
|
|
29216
29208
|
}
|
|
29217
|
-
function
|
|
29209
|
+
function up422(db) {
|
|
29218
29210
|
db.exec(`
|
|
29219
29211
|
CREATE TABLE IF NOT EXISTS entity_communities (
|
|
29220
29212
|
id TEXT PRIMARY KEY,
|
|
@@ -29232,7 +29224,7 @@ function up412(db) {
|
|
|
29232
29224
|
db.exec("ALTER TABLE entities ADD COLUMN community_id TEXT REFERENCES entity_communities(id)");
|
|
29233
29225
|
}
|
|
29234
29226
|
}
|
|
29235
|
-
function
|
|
29227
|
+
function up432(db) {
|
|
29236
29228
|
db.exec(`
|
|
29237
29229
|
CREATE TABLE IF NOT EXISTS memory_hints (
|
|
29238
29230
|
id TEXT PRIMARY KEY,
|
|
@@ -29272,7 +29264,7 @@ function up422(db) {
|
|
|
29272
29264
|
END
|
|
29273
29265
|
`);
|
|
29274
29266
|
}
|
|
29275
|
-
function
|
|
29267
|
+
function up442(db) {
|
|
29276
29268
|
db.exec(`
|
|
29277
29269
|
DELETE FROM entity_dependencies
|
|
29278
29270
|
WHERE id NOT IN (
|
|
@@ -29290,7 +29282,7 @@ function up432(db) {
|
|
|
29290
29282
|
)
|
|
29291
29283
|
`);
|
|
29292
29284
|
}
|
|
29293
|
-
function
|
|
29285
|
+
function up452(db) {
|
|
29294
29286
|
db.exec(`
|
|
29295
29287
|
CREATE TABLE IF NOT EXISTS session_transcripts (
|
|
29296
29288
|
session_key TEXT PRIMARY KEY,
|
|
@@ -29313,7 +29305,7 @@ function addColumnIfMissing112(db, table, column, definition) {
|
|
|
29313
29305
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
29314
29306
|
}
|
|
29315
29307
|
}
|
|
29316
|
-
function
|
|
29308
|
+
function up462(db) {
|
|
29317
29309
|
addColumnIfMissing112(db, "session_memories", "path_json", "TEXT");
|
|
29318
29310
|
db.exec(`
|
|
29319
29311
|
CREATE TABLE IF NOT EXISTS path_feedback_events (
|
|
@@ -29388,7 +29380,7 @@ function addColumnIfMissing122(db, table, column, definition) {
|
|
|
29388
29380
|
return;
|
|
29389
29381
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
29390
29382
|
}
|
|
29391
|
-
function
|
|
29383
|
+
function up472(db) {
|
|
29392
29384
|
addColumnIfMissing122(db, "session_memories", "entity_slot", "INTEGER");
|
|
29393
29385
|
addColumnIfMissing122(db, "session_memories", "aspect_slot", "INTEGER");
|
|
29394
29386
|
addColumnIfMissing122(db, "session_memories", "is_constraint", "INTEGER NOT NULL DEFAULT 0");
|
|
@@ -29476,7 +29468,7 @@ function addColumnIfMissing132(db, table, column, definition) {
|
|
|
29476
29468
|
return;
|
|
29477
29469
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
29478
29470
|
}
|
|
29479
|
-
function
|
|
29471
|
+
function up482(db) {
|
|
29480
29472
|
db.exec(`
|
|
29481
29473
|
CREATE TABLE IF NOT EXISTS agents (
|
|
29482
29474
|
id TEXT PRIMARY KEY,
|
|
@@ -29505,7 +29497,7 @@ function addColumnIfMissing142(db, table, column, definition) {
|
|
|
29505
29497
|
return;
|
|
29506
29498
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
29507
29499
|
}
|
|
29508
|
-
function
|
|
29500
|
+
function up492(db) {
|
|
29509
29501
|
addColumnIfMissing142(db, "session_summaries", "source_type", "TEXT");
|
|
29510
29502
|
addColumnIfMissing142(db, "session_summaries", "source_ref", "TEXT");
|
|
29511
29503
|
addColumnIfMissing142(db, "session_summaries", "meta_json", "TEXT");
|
|
@@ -29531,7 +29523,7 @@ function addColumnIfMissing152(db, table, column, definition) {
|
|
|
29531
29523
|
return;
|
|
29532
29524
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
29533
29525
|
}
|
|
29534
|
-
function
|
|
29526
|
+
function up502(db) {
|
|
29535
29527
|
addColumnIfMissing152(db, "session_transcripts", "updated_at", "TEXT");
|
|
29536
29528
|
addColumnIfMissing152(db, "summary_jobs", "agent_id", "TEXT NOT NULL DEFAULT 'default'");
|
|
29537
29529
|
addColumnIfMissing152(db, "session_scores", "agent_id", "TEXT NOT NULL DEFAULT 'default'");
|
|
@@ -29602,7 +29594,7 @@ function up492(db) {
|
|
|
29602
29594
|
ON memory_md_heads(lease_expires_at);
|
|
29603
29595
|
`);
|
|
29604
29596
|
}
|
|
29605
|
-
function
|
|
29597
|
+
function up512(db) {
|
|
29606
29598
|
db.exec(`
|
|
29607
29599
|
DROP INDEX IF EXISTS idx_summaries_session_depth;
|
|
29608
29600
|
|
|
@@ -29663,7 +29655,7 @@ function up502(db) {
|
|
|
29663
29655
|
AND COALESCE(source_type, 'summary') = 'summary';
|
|
29664
29656
|
`);
|
|
29665
29657
|
}
|
|
29666
|
-
function
|
|
29658
|
+
function up522(db) {
|
|
29667
29659
|
db.exec(`
|
|
29668
29660
|
DROP TRIGGER IF EXISTS session_transcripts_fts_ai;
|
|
29669
29661
|
DROP TRIGGER IF EXISTS session_transcripts_fts_ad;
|
|
@@ -29761,7 +29753,7 @@ function up512(db) {
|
|
|
29761
29753
|
AND COALESCE(source_type, 'summary') = 'summary';
|
|
29762
29754
|
`);
|
|
29763
29755
|
}
|
|
29764
|
-
function
|
|
29756
|
+
function up532(db) {
|
|
29765
29757
|
db.exec(`
|
|
29766
29758
|
CREATE TABLE IF NOT EXISTS memory_thread_heads (
|
|
29767
29759
|
agent_id TEXT NOT NULL DEFAULT 'default',
|
|
@@ -29879,7 +29871,7 @@ function up522(db) {
|
|
|
29879
29871
|
WHERE excluded.latest_at >= memory_thread_heads.latest_at;
|
|
29880
29872
|
`);
|
|
29881
29873
|
}
|
|
29882
|
-
function
|
|
29874
|
+
function up542(db) {
|
|
29883
29875
|
db.exec(`
|
|
29884
29876
|
CREATE TABLE IF NOT EXISTS session_extract_cursors (
|
|
29885
29877
|
session_key TEXT NOT NULL,
|
|
@@ -29896,7 +29888,7 @@ function hasTable5(db, name) {
|
|
|
29896
29888
|
WHERE type = 'table' AND name = ?
|
|
29897
29889
|
LIMIT 1`).get(name) !== undefined;
|
|
29898
29890
|
}
|
|
29899
|
-
function
|
|
29891
|
+
function up552(db) {
|
|
29900
29892
|
db.exec(`
|
|
29901
29893
|
CREATE TABLE IF NOT EXISTS entity_dependency_history (
|
|
29902
29894
|
id TEXT PRIMARY KEY,
|
|
@@ -30066,7 +30058,7 @@ function addColumnIfMissing162(db, table, column, definition) {
|
|
|
30066
30058
|
return;
|
|
30067
30059
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
30068
30060
|
}
|
|
30069
|
-
function
|
|
30061
|
+
function up562(db) {
|
|
30070
30062
|
addColumnIfMissing162(db, "summary_jobs", "session_id", "TEXT");
|
|
30071
30063
|
addColumnIfMissing162(db, "summary_jobs", "trigger", "TEXT NOT NULL DEFAULT 'session_end'");
|
|
30072
30064
|
addColumnIfMissing162(db, "summary_jobs", "captured_at", "TEXT");
|
|
@@ -30158,24 +30150,8 @@ function up552(db) {
|
|
|
30158
30150
|
VALUES ('rebuild');
|
|
30159
30151
|
`);
|
|
30160
30152
|
}
|
|
30161
|
-
function
|
|
30162
|
-
|
|
30163
|
-
CREATE TABLE IF NOT EXISTS mcp_invocations (
|
|
30164
|
-
id TEXT PRIMARY KEY,
|
|
30165
|
-
server_id TEXT NOT NULL,
|
|
30166
|
-
tool_name TEXT NOT NULL,
|
|
30167
|
-
agent_id TEXT NOT NULL DEFAULT 'default',
|
|
30168
|
-
source TEXT NOT NULL CHECK(source IN ('cli','agent','mcp','dashboard')),
|
|
30169
|
-
latency_ms INTEGER NOT NULL,
|
|
30170
|
-
success INTEGER NOT NULL DEFAULT 1,
|
|
30171
|
-
error_text TEXT,
|
|
30172
|
-
created_at TEXT NOT NULL DEFAULT (datetime('now'))
|
|
30173
|
-
);
|
|
30174
|
-
CREATE INDEX IF NOT EXISTS idx_mcp_inv_server ON mcp_invocations(server_id, created_at);
|
|
30175
|
-
CREATE INDEX IF NOT EXISTS idx_mcp_inv_agent ON mcp_invocations(agent_id, created_at);
|
|
30176
|
-
`);
|
|
30177
|
-
}
|
|
30178
|
-
function up572(db) {
|
|
30153
|
+
function up572(_db) {}
|
|
30154
|
+
function up582(db) {
|
|
30179
30155
|
db.exec(`
|
|
30180
30156
|
CREATE TABLE IF NOT EXISTS skill_invocations (
|
|
30181
30157
|
id TEXT PRIMARY KEY,
|
|
@@ -30191,7 +30167,7 @@ function up572(db) {
|
|
|
30191
30167
|
CREATE INDEX IF NOT EXISTS idx_skill_inv_agent ON skill_invocations(agent_id, created_at);
|
|
30192
30168
|
`);
|
|
30193
30169
|
}
|
|
30194
|
-
function
|
|
30170
|
+
function up592(db) {
|
|
30195
30171
|
db.exec(`
|
|
30196
30172
|
CREATE TABLE IF NOT EXISTS task_scope_hints (
|
|
30197
30173
|
task_id TEXT PRIMARY KEY REFERENCES scheduled_tasks(id) ON DELETE CASCADE,
|
|
@@ -30222,7 +30198,7 @@ function up582(db) {
|
|
|
30222
30198
|
ON task_scope_hints(agent_id, updated_at);
|
|
30223
30199
|
`);
|
|
30224
30200
|
}
|
|
30225
|
-
function
|
|
30201
|
+
function up602(db) {
|
|
30226
30202
|
db.exec(`
|
|
30227
30203
|
CREATE TABLE IF NOT EXISTS dreaming_state (
|
|
30228
30204
|
agent_id TEXT PRIMARY KEY NOT NULL,
|
|
@@ -30265,7 +30241,7 @@ function ensureMemoriesScopeColumns3(db) {
|
|
|
30265
30241
|
if (!names.has("scope"))
|
|
30266
30242
|
db.exec("ALTER TABLE memories ADD COLUMN scope TEXT");
|
|
30267
30243
|
}
|
|
30268
|
-
function
|
|
30244
|
+
function up612(db) {
|
|
30269
30245
|
ensureMemoriesScopeColumns3(db);
|
|
30270
30246
|
db.exec("DROP INDEX IF EXISTS idx_memories_content_hash_unique");
|
|
30271
30247
|
db.exec(`
|
|
@@ -30278,20 +30254,20 @@ function up602(db) {
|
|
|
30278
30254
|
WHERE content_hash IS NOT NULL AND is_deleted = 0
|
|
30279
30255
|
`);
|
|
30280
30256
|
}
|
|
30281
|
-
function
|
|
30257
|
+
function up622(db) {
|
|
30282
30258
|
const sql = readMemoriesFtsSql2(db);
|
|
30283
30259
|
if (sql !== null && !memoriesFtsNeedsTokenizerRepair2(sql))
|
|
30284
30260
|
return;
|
|
30285
30261
|
recreateMemoriesFts2(db);
|
|
30286
30262
|
}
|
|
30287
|
-
function
|
|
30263
|
+
function up632(db) {
|
|
30288
30264
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_entities_order
|
|
30289
30265
|
ON entities(agent_id, pinned DESC, pinned_at DESC, mentions DESC, updated_at DESC, name)`);
|
|
30290
30266
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_entities_extracted_mentions
|
|
30291
30267
|
ON entities(entity_type, mentions)
|
|
30292
30268
|
WHERE entity_type = 'extracted'`);
|
|
30293
30269
|
}
|
|
30294
|
-
function
|
|
30270
|
+
function up642(db) {
|
|
30295
30271
|
const cols = db.prepare("PRAGMA table_info(entity_attributes)").all();
|
|
30296
30272
|
if (!cols.some((col) => col.name === "claim_key")) {
|
|
30297
30273
|
db.exec("ALTER TABLE entity_attributes ADD COLUMN claim_key TEXT");
|
|
@@ -30300,7 +30276,7 @@ function up632(db) {
|
|
|
30300
30276
|
ON entity_attributes(agent_id, aspect_id, claim_key, status)
|
|
30301
30277
|
WHERE claim_key IS NOT NULL`);
|
|
30302
30278
|
}
|
|
30303
|
-
function
|
|
30279
|
+
function up652(db) {
|
|
30304
30280
|
const cols = db.prepare("PRAGMA table_info(entity_attributes)").all();
|
|
30305
30281
|
if (!cols.some((col) => col.name === "group_key")) {
|
|
30306
30282
|
db.exec("ALTER TABLE entity_attributes ADD COLUMN group_key TEXT");
|
|
@@ -30312,13 +30288,13 @@ function up642(db) {
|
|
|
30312
30288
|
ON entity_attributes(agent_id, aspect_id, group_key, claim_key, status)
|
|
30313
30289
|
WHERE claim_key IS NOT NULL`);
|
|
30314
30290
|
}
|
|
30315
|
-
function
|
|
30291
|
+
function up662(db) {
|
|
30316
30292
|
const cols = db.prepare("PRAGMA table_info(memory_artifacts)").all();
|
|
30317
30293
|
if (cols.some((col) => col.name === "source_mtime_ms"))
|
|
30318
30294
|
return;
|
|
30319
30295
|
db.exec("ALTER TABLE memory_artifacts ADD COLUMN source_mtime_ms REAL");
|
|
30320
30296
|
}
|
|
30321
|
-
function
|
|
30297
|
+
function up672(db) {
|
|
30322
30298
|
const cols = db.prepare("PRAGMA table_info(memory_artifacts)").all();
|
|
30323
30299
|
const names = new Set(cols.map((col) => col.name));
|
|
30324
30300
|
if (!names.has("is_deleted")) {
|
|
@@ -30332,7 +30308,7 @@ function up662(db) {
|
|
|
30332
30308
|
ON memory_artifacts(agent_id, is_deleted, deleted_at)
|
|
30333
30309
|
`);
|
|
30334
30310
|
}
|
|
30335
|
-
function
|
|
30311
|
+
function up682(db) {
|
|
30336
30312
|
db.exec("DROP TRIGGER IF EXISTS memories_au");
|
|
30337
30313
|
db.exec(`
|
|
30338
30314
|
CREATE TRIGGER IF NOT EXISTS memories_au AFTER UPDATE OF content ON memories BEGIN
|
|
@@ -30350,7 +30326,7 @@ function addColumnIfMissing172(db, table, column, definition) {
|
|
|
30350
30326
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
30351
30327
|
}
|
|
30352
30328
|
}
|
|
30353
|
-
function
|
|
30329
|
+
function up692(db) {
|
|
30354
30330
|
for (const table of ["entities", "entity_communities", "entity_attributes", "entity_dependencies"]) {
|
|
30355
30331
|
addColumnIfMissing172(db, table, "source_id", "TEXT");
|
|
30356
30332
|
addColumnIfMissing172(db, table, "source_kind", "TEXT");
|
|
@@ -30370,7 +30346,7 @@ function hasColumn72(db, table, column) {
|
|
|
30370
30346
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
30371
30347
|
return rows.some((row) => row.name === column);
|
|
30372
30348
|
}
|
|
30373
|
-
function
|
|
30349
|
+
function up702(db) {
|
|
30374
30350
|
if (!hasTable22(db, "embeddings"))
|
|
30375
30351
|
return;
|
|
30376
30352
|
if (!hasColumn72(db, "embeddings", "agent_id")) {
|
|
@@ -30378,7 +30354,7 @@ function up692(db) {
|
|
|
30378
30354
|
}
|
|
30379
30355
|
db.exec("CREATE INDEX IF NOT EXISTS idx_embeddings_agent_source ON embeddings(agent_id, source_type, source_id)");
|
|
30380
30356
|
}
|
|
30381
|
-
function
|
|
30357
|
+
function up712(db) {
|
|
30382
30358
|
db.exec(`
|
|
30383
30359
|
CREATE TABLE IF NOT EXISTS memory_search_telemetry (
|
|
30384
30360
|
id TEXT PRIMARY KEY,
|
|
@@ -30419,7 +30395,7 @@ function addColumnIfMissing182(db, table, column, definition) {
|
|
|
30419
30395
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
30420
30396
|
}
|
|
30421
30397
|
}
|
|
30422
|
-
function
|
|
30398
|
+
function up722(db) {
|
|
30423
30399
|
db.exec(`
|
|
30424
30400
|
CREATE TABLE IF NOT EXISTS ontology_proposals (
|
|
30425
30401
|
id TEXT PRIMARY KEY,
|
|
@@ -30462,7 +30438,7 @@ function up712(db) {
|
|
|
30462
30438
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_${table}_proposal ON ${table}(agent_id, proposal_id)`);
|
|
30463
30439
|
}
|
|
30464
30440
|
}
|
|
30465
|
-
function
|
|
30441
|
+
function up732(db) {
|
|
30466
30442
|
db.exec(`
|
|
30467
30443
|
CREATE TABLE IF NOT EXISTS daily_reflections (
|
|
30468
30444
|
id TEXT PRIMARY KEY,
|
|
@@ -30489,7 +30465,7 @@ function up722(db) {
|
|
|
30489
30465
|
WHERE content_key IS NOT NULL;
|
|
30490
30466
|
`);
|
|
30491
30467
|
}
|
|
30492
|
-
function
|
|
30468
|
+
function up742(db) {
|
|
30493
30469
|
const cols = db.prepare("PRAGMA table_info(daily_reflections)").all();
|
|
30494
30470
|
const colNames = new Set(cols.flatMap((c22) => typeof c22.name === "string" ? [c22.name] : []));
|
|
30495
30471
|
if (!colNames.has("content_key")) {
|
|
@@ -30526,7 +30502,7 @@ function backfillVersionRoots2(db) {
|
|
|
30526
30502
|
WHERE version_root_id IS NULL
|
|
30527
30503
|
`);
|
|
30528
30504
|
}
|
|
30529
|
-
function
|
|
30505
|
+
function up752(db) {
|
|
30530
30506
|
for (const table of ["entities", "entity_aspects", "entity_dependencies"]) {
|
|
30531
30507
|
addColumnIfMissing192(db, table, "status", "TEXT NOT NULL DEFAULT 'active'");
|
|
30532
30508
|
addColumnIfMissing192(db, table, "archived_at", "TEXT");
|
|
@@ -30561,7 +30537,7 @@ function up742(db) {
|
|
|
30561
30537
|
ON entity_aspects(agent_id, proposal_id);
|
|
30562
30538
|
`);
|
|
30563
30539
|
}
|
|
30564
|
-
function
|
|
30540
|
+
function up762(db) {
|
|
30565
30541
|
db.exec(`
|
|
30566
30542
|
CREATE TABLE IF NOT EXISTS epistemic_assertions (
|
|
30567
30543
|
id TEXT PRIMARY KEY,
|
|
@@ -30617,7 +30593,7 @@ function ensureMemoriesScopeColumns22(db) {
|
|
|
30617
30593
|
if (!names.has("runtime_path"))
|
|
30618
30594
|
db.exec("ALTER TABLE memories ADD COLUMN runtime_path TEXT");
|
|
30619
30595
|
}
|
|
30620
|
-
function
|
|
30596
|
+
function up772(db) {
|
|
30621
30597
|
ensureMemoriesScopeColumns22(db);
|
|
30622
30598
|
db.exec("DROP INDEX IF EXISTS idx_memories_idempotency_key");
|
|
30623
30599
|
db.exec(`
|
|
@@ -30631,7 +30607,7 @@ function up762(db) {
|
|
|
30631
30607
|
WHERE idempotency_key IS NOT NULL AND is_deleted = 0
|
|
30632
30608
|
`);
|
|
30633
30609
|
}
|
|
30634
|
-
function
|
|
30610
|
+
function up782(db) {
|
|
30635
30611
|
db.exec(`
|
|
30636
30612
|
CREATE TABLE IF NOT EXISTS session_context_epochs (
|
|
30637
30613
|
session_key TEXT NOT NULL,
|
|
@@ -30666,7 +30642,7 @@ function up772(db) {
|
|
|
30666
30642
|
ON session_recall_events(item_kind, item_id, created_at DESC);
|
|
30667
30643
|
`);
|
|
30668
30644
|
}
|
|
30669
|
-
function
|
|
30645
|
+
function up792(db) {
|
|
30670
30646
|
db.exec(`
|
|
30671
30647
|
CREATE TABLE IF NOT EXISTS aggregate_memory_sources (
|
|
30672
30648
|
aggregate_memory_id TEXT NOT NULL,
|
|
@@ -30685,7 +30661,7 @@ function addColumnIfMissing202(db, table, column, definition) {
|
|
|
30685
30661
|
return;
|
|
30686
30662
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
30687
30663
|
}
|
|
30688
|
-
function
|
|
30664
|
+
function up802(db) {
|
|
30689
30665
|
addColumnIfMissing202(db, "memory_artifacts", "source_id", "TEXT");
|
|
30690
30666
|
addColumnIfMissing202(db, "memory_artifacts", "source_root", "TEXT");
|
|
30691
30667
|
addColumnIfMissing202(db, "memory_artifacts", "source_external_id", "TEXT");
|
|
@@ -30698,7 +30674,7 @@ function up792(db) {
|
|
|
30698
30674
|
ON memory_artifacts(agent_id, source_id, source_root);
|
|
30699
30675
|
`);
|
|
30700
30676
|
}
|
|
30701
|
-
function
|
|
30677
|
+
function up812(db) {
|
|
30702
30678
|
db.exec(`
|
|
30703
30679
|
CREATE TABLE IF NOT EXISTS temporal_edges (
|
|
30704
30680
|
id TEXT PRIMARY KEY,
|
|
@@ -30721,7 +30697,7 @@ function up802(db) {
|
|
|
30721
30697
|
ON temporal_edges(agent_id, subject_type, subject_id);
|
|
30722
30698
|
`);
|
|
30723
30699
|
}
|
|
30724
|
-
function
|
|
30700
|
+
function up822(db) {
|
|
30725
30701
|
db.exec(`
|
|
30726
30702
|
CREATE TABLE IF NOT EXISTS entity_aliases (
|
|
30727
30703
|
id TEXT PRIMARY KEY,
|
|
@@ -30745,7 +30721,7 @@ function up812(db) {
|
|
|
30745
30721
|
ON entity_aliases(agent_id, canonical_alias, status);
|
|
30746
30722
|
`);
|
|
30747
30723
|
}
|
|
30748
|
-
function
|
|
30724
|
+
function up832(db) {
|
|
30749
30725
|
db.exec(`
|
|
30750
30726
|
CREATE TABLE IF NOT EXISTS api_keys (
|
|
30751
30727
|
id TEXT PRIMARY KEY,
|
|
@@ -30773,7 +30749,7 @@ function up822(db) {
|
|
|
30773
30749
|
ON api_keys(connector, harness);
|
|
30774
30750
|
`);
|
|
30775
30751
|
}
|
|
30776
|
-
function
|
|
30752
|
+
function up842(db) {
|
|
30777
30753
|
db.exec(`
|
|
30778
30754
|
CREATE TABLE IF NOT EXISTS transcript_capture_jobs (
|
|
30779
30755
|
id TEXT PRIMARY KEY,
|
|
@@ -30808,7 +30784,7 @@ function hasColumn102(db, table, column) {
|
|
|
30808
30784
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
30809
30785
|
return rows.some((row) => row.name === column);
|
|
30810
30786
|
}
|
|
30811
|
-
function
|
|
30787
|
+
function up852(db) {
|
|
30812
30788
|
if (!hasColumn102(db, "documents", "agent_id")) {
|
|
30813
30789
|
db.exec("ALTER TABLE documents ADD COLUMN agent_id TEXT NOT NULL DEFAULT 'default'");
|
|
30814
30790
|
}
|
|
@@ -30894,7 +30870,7 @@ function up842(db) {
|
|
|
30894
30870
|
db.exec("CREATE INDEX IF NOT EXISTS idx_documents_agent_project ON documents(agent_id, project)");
|
|
30895
30871
|
db.exec("CREATE INDEX IF NOT EXISTS idx_documents_source_scope ON documents(source_url, agent_id, project)");
|
|
30896
30872
|
}
|
|
30897
|
-
function
|
|
30873
|
+
function up862(db) {
|
|
30898
30874
|
db.exec(`
|
|
30899
30875
|
CREATE TABLE IF NOT EXISTS aggregate_evidence_sources (
|
|
30900
30876
|
aggregate_memory_id TEXT NOT NULL,
|
|
@@ -30916,7 +30892,7 @@ function hasColumn112(db, table, column) {
|
|
|
30916
30892
|
return rows.some((row) => row.name === column);
|
|
30917
30893
|
}
|
|
30918
30894
|
var COLUMNS3 = ["harness", "session_id", "tool_use_id", "cwd", "origin", "args"];
|
|
30919
|
-
function
|
|
30895
|
+
function up872(db) {
|
|
30920
30896
|
for (const column of COLUMNS3) {
|
|
30921
30897
|
if (!hasColumn112(db, "skill_invocations", column)) {
|
|
30922
30898
|
db.exec(`ALTER TABLE skill_invocations ADD COLUMN ${column} TEXT`);
|
|
@@ -30997,7 +30973,7 @@ function documentScopeColumnsPreservingExisting2(db) {
|
|
|
30997
30973
|
`);
|
|
30998
30974
|
}
|
|
30999
30975
|
try {
|
|
31000
|
-
|
|
30976
|
+
up852(db);
|
|
31001
30977
|
if (preserveAgentId) {
|
|
31002
30978
|
db.exec(`
|
|
31003
30979
|
UPDATE documents
|
|
@@ -31017,12 +30993,12 @@ function documentScopeColumnsPreservingExisting2(db) {
|
|
|
31017
30993
|
db.exec("DROP TABLE IF EXISTS temp.__signet_doc_project_guard");
|
|
31018
30994
|
}
|
|
31019
30995
|
}
|
|
31020
|
-
function
|
|
31021
|
-
|
|
30996
|
+
function up882(db) {
|
|
30997
|
+
up842(db);
|
|
31022
30998
|
if (hasTable32(db, "documents")) {
|
|
31023
30999
|
documentScopeColumnsPreservingExisting2(db);
|
|
31024
31000
|
}
|
|
31025
|
-
|
|
31001
|
+
up862(db);
|
|
31026
31002
|
addColumnIfMissing212(db, "memories", "superseded_by", "TEXT");
|
|
31027
31003
|
addColumnIfMissing212(db, "memories", "superseded_at", "TEXT");
|
|
31028
31004
|
addColumnIfMissing212(db, "memories", "superseded_reason", "TEXT");
|
|
@@ -31079,7 +31055,7 @@ function up872(db) {
|
|
|
31079
31055
|
AND ${sourceAgentId} = ${targetAgentId}
|
|
31080
31056
|
`);
|
|
31081
31057
|
}
|
|
31082
|
-
function
|
|
31058
|
+
function up892(db) {
|
|
31083
31059
|
db.exec(`
|
|
31084
31060
|
CREATE TABLE IF NOT EXISTS legacy_markdown_imports (
|
|
31085
31061
|
path TEXT PRIMARY KEY,
|
|
@@ -31109,7 +31085,7 @@ function up882(db) {
|
|
|
31109
31085
|
ON legacy_markdown_chunks(memory_id);
|
|
31110
31086
|
`);
|
|
31111
31087
|
}
|
|
31112
|
-
function
|
|
31088
|
+
function up902(db) {
|
|
31113
31089
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name IN ('relations', 'entity_dependencies')").all();
|
|
31114
31090
|
const tableNames = new Set(tables.map((r22) => String(r22.name)));
|
|
31115
31091
|
if (!tableNames.has("relations") || !tableNames.has("entity_dependencies"))
|
|
@@ -31168,7 +31144,7 @@ function addColumnIfMissing222(db, table, column, definition) {
|
|
|
31168
31144
|
return;
|
|
31169
31145
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
31170
31146
|
}
|
|
31171
|
-
function
|
|
31147
|
+
function up912(db) {
|
|
31172
31148
|
addColumnIfMissing222(db, "summary_jobs", "content_hash", "TEXT");
|
|
31173
31149
|
db.exec(`
|
|
31174
31150
|
CREATE INDEX IF NOT EXISTS idx_summary_jobs_agent_session_content_hash
|
|
@@ -31181,14 +31157,14 @@ function addColumnIfMissing232(db, table, column, definition) {
|
|
|
31181
31157
|
return;
|
|
31182
31158
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
31183
31159
|
}
|
|
31184
|
-
function
|
|
31160
|
+
function up922(db) {
|
|
31185
31161
|
addColumnIfMissing232(db, "summary_jobs", "boundary_reason", "TEXT");
|
|
31186
31162
|
db.exec(`
|
|
31187
31163
|
CREATE INDEX IF NOT EXISTS idx_summary_jobs_boundary_reason
|
|
31188
31164
|
ON summary_jobs(agent_id, session_key, boundary_reason)
|
|
31189
31165
|
`);
|
|
31190
31166
|
}
|
|
31191
|
-
function
|
|
31167
|
+
function up932(db) {
|
|
31192
31168
|
db.exec(`
|
|
31193
31169
|
CREATE TABLE IF NOT EXISTS transcript_recovery_files (
|
|
31194
31170
|
agent_id TEXT NOT NULL,
|
|
@@ -31206,7 +31182,7 @@ function up922(db) {
|
|
|
31206
31182
|
ON transcript_capture_jobs(agent_id, session_id, status);
|
|
31207
31183
|
`);
|
|
31208
31184
|
}
|
|
31209
|
-
function
|
|
31185
|
+
function up942(db) {
|
|
31210
31186
|
db.exec(`
|
|
31211
31187
|
CREATE TABLE IF NOT EXISTS job_cancellations (
|
|
31212
31188
|
id TEXT PRIMARY KEY,
|
|
@@ -31234,7 +31210,7 @@ function indexExists3(db, table, indexName) {
|
|
|
31234
31210
|
const rows = db.prepare(`PRAGMA index_list(${table})`).all();
|
|
31235
31211
|
return rows.some((row) => row.name === indexName);
|
|
31236
31212
|
}
|
|
31237
|
-
function
|
|
31213
|
+
function up952(db) {
|
|
31238
31214
|
db.exec(`
|
|
31239
31215
|
CREATE TABLE IF NOT EXISTS job_archive (
|
|
31240
31216
|
id TEXT PRIMARY KEY,
|
|
@@ -31261,7 +31237,7 @@ function indexExists22(db, table, indexName) {
|
|
|
31261
31237
|
const rows = db.prepare(`PRAGMA index_list(${table})`).all();
|
|
31262
31238
|
return rows.some((row) => row.name === indexName);
|
|
31263
31239
|
}
|
|
31264
|
-
function
|
|
31240
|
+
function up962(db) {
|
|
31265
31241
|
db.exec(`
|
|
31266
31242
|
CREATE TABLE IF NOT EXISTS embedding_index_state (
|
|
31267
31243
|
id INTEGER PRIMARY KEY CHECK (id = 1),
|
|
@@ -31274,7 +31250,7 @@ function up952(db) {
|
|
|
31274
31250
|
)
|
|
31275
31251
|
`);
|
|
31276
31252
|
}
|
|
31277
|
-
function
|
|
31253
|
+
function up972(db) {
|
|
31278
31254
|
db.exec(`
|
|
31279
31255
|
CREATE TABLE IF NOT EXISTS embeddings_staging (
|
|
31280
31256
|
id TEXT PRIMARY KEY,
|
|
@@ -31293,7 +31269,7 @@ function up962(db) {
|
|
|
31293
31269
|
ON embeddings_staging(agent_id, source_type, source_id);
|
|
31294
31270
|
`);
|
|
31295
31271
|
}
|
|
31296
|
-
function
|
|
31272
|
+
function up982(db) {
|
|
31297
31273
|
const columns = db.prepare("PRAGMA table_info(dreaming_state)").all();
|
|
31298
31274
|
if (!columns.some((column) => column.name === "evidence_cursor")) {
|
|
31299
31275
|
db.exec("ALTER TABLE dreaming_state ADD COLUMN evidence_cursor TEXT");
|
|
@@ -31304,7 +31280,7 @@ function hasColumn132(db, table, column) {
|
|
|
31304
31280
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
31305
31281
|
return rows.some((r22) => r22.name === column);
|
|
31306
31282
|
}
|
|
31307
|
-
function
|
|
31283
|
+
function up992(db) {
|
|
31308
31284
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name = 'memories'").all();
|
|
31309
31285
|
if (tables.length === 0)
|
|
31310
31286
|
return;
|
|
@@ -31329,23 +31305,23 @@ function up982(db) {
|
|
|
31329
31305
|
function hasColumn142(db, table, column) {
|
|
31330
31306
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
31331
31307
|
}
|
|
31332
|
-
function
|
|
31308
|
+
function up1002(db) {
|
|
31333
31309
|
const hasMemories = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'memories'").get();
|
|
31334
31310
|
if (!hasMemories || !hasColumn142(db, "memories", "memory_kind") || !hasColumn142(db, "memories", "type"))
|
|
31335
31311
|
return;
|
|
31336
31312
|
db.exec("UPDATE memories SET memory_kind = NULL WHERE type = 'session_summary'");
|
|
31337
31313
|
}
|
|
31338
|
-
function
|
|
31314
|
+
function up1012(db) {
|
|
31339
31315
|
db.exec("DROP TABLE IF EXISTS ingestion_jobs");
|
|
31340
31316
|
}
|
|
31341
|
-
function
|
|
31317
|
+
function up1022(db) {
|
|
31342
31318
|
const columns = db.prepare("PRAGMA table_info(dreaming_state)").all();
|
|
31343
31319
|
if (!columns.some((column) => column.name === "last_failure_at")) {
|
|
31344
31320
|
db.exec("ALTER TABLE dreaming_state ADD COLUMN last_failure_at TEXT");
|
|
31345
31321
|
}
|
|
31346
31322
|
db.exec("UPDATE dreaming_state SET last_failure_at = updated_at WHERE consecutive_failures > 0 AND last_failure_at IS NULL");
|
|
31347
31323
|
}
|
|
31348
|
-
function
|
|
31324
|
+
function up1032(db) {
|
|
31349
31325
|
db.exec(`
|
|
31350
31326
|
CREATE TABLE IF NOT EXISTS dreaming_evidence_exclusions (
|
|
31351
31327
|
agent_id TEXT NOT NULL,
|
|
@@ -31362,7 +31338,7 @@ function up1022(db) {
|
|
|
31362
31338
|
ON dreaming_evidence_exclusions (agent_id, resolved_at, requeue_requested_at, excluded_at DESC);
|
|
31363
31339
|
`);
|
|
31364
31340
|
}
|
|
31365
|
-
function
|
|
31341
|
+
function up1042(db) {
|
|
31366
31342
|
db.exec(`
|
|
31367
31343
|
CREATE TABLE IF NOT EXISTS dreaming_tool_calls (
|
|
31368
31344
|
id TEXT PRIMARY KEY,
|
|
@@ -31382,7 +31358,7 @@ function up1032(db) {
|
|
|
31382
31358
|
ON dreaming_tool_calls (agent_id, pass_id, sequence ASC);
|
|
31383
31359
|
`);
|
|
31384
31360
|
}
|
|
31385
|
-
function
|
|
31361
|
+
function up1052(db) {
|
|
31386
31362
|
const columns = db.prepare("PRAGMA table_info(dreaming_passes)").all();
|
|
31387
31363
|
if (!columns.some((column) => column.name === "evidence_window_json")) {
|
|
31388
31364
|
db.exec("ALTER TABLE dreaming_passes ADD COLUMN evidence_window_json TEXT");
|
|
@@ -31391,7 +31367,7 @@ function up1042(db) {
|
|
|
31391
31367
|
db.exec("ALTER TABLE dreaming_passes ADD COLUMN runbook_json TEXT");
|
|
31392
31368
|
}
|
|
31393
31369
|
}
|
|
31394
|
-
function
|
|
31370
|
+
function up1062(db) {
|
|
31395
31371
|
db.exec(`
|
|
31396
31372
|
CREATE TABLE IF NOT EXISTS dreaming_attention (
|
|
31397
31373
|
id TEXT PRIMARY KEY,
|
|
@@ -31413,7 +31389,7 @@ function up1052(db) {
|
|
|
31413
31389
|
function hasColumn152(db, table, column) {
|
|
31414
31390
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
31415
31391
|
}
|
|
31416
|
-
function
|
|
31392
|
+
function up1072(db) {
|
|
31417
31393
|
const requiredMemoryColumns = [
|
|
31418
31394
|
"content_hash",
|
|
31419
31395
|
"normalized_content",
|
|
@@ -31464,7 +31440,7 @@ function up1062(db) {
|
|
|
31464
31440
|
WHERE EXISTS (SELECT 1 FROM memory_entity_mentions WHERE entity_id = entities.id)
|
|
31465
31441
|
`);
|
|
31466
31442
|
}
|
|
31467
|
-
function
|
|
31443
|
+
function up1082(db) {
|
|
31468
31444
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name IN ('memories', 'entity_attributes')").all();
|
|
31469
31445
|
if (tables.length !== 2)
|
|
31470
31446
|
return;
|
|
@@ -31487,7 +31463,7 @@ function tableExists4(db, table) {
|
|
|
31487
31463
|
function hasColumn162(db, table, column) {
|
|
31488
31464
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
31489
31465
|
}
|
|
31490
|
-
function
|
|
31466
|
+
function up1092(db) {
|
|
31491
31467
|
db.exec(`
|
|
31492
31468
|
CREATE TABLE IF NOT EXISTS derived_memory_sources (
|
|
31493
31469
|
derived_memory_id TEXT NOT NULL,
|
|
@@ -31530,7 +31506,7 @@ function up1082(db) {
|
|
|
31530
31506
|
`);
|
|
31531
31507
|
}
|
|
31532
31508
|
}
|
|
31533
|
-
function
|
|
31509
|
+
function up1102(db) {
|
|
31534
31510
|
db.exec(`
|
|
31535
31511
|
DROP TRIGGER IF EXISTS entities_fts_ai;
|
|
31536
31512
|
DROP TRIGGER IF EXISTS entities_fts_ad;
|
|
@@ -31619,7 +31595,7 @@ function up1092(db) {
|
|
|
31619
31595
|
function hasColumn172(db, table, column) {
|
|
31620
31596
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
31621
31597
|
}
|
|
31622
|
-
function
|
|
31598
|
+
function up1112(db) {
|
|
31623
31599
|
if (!hasColumn172(db, "memories", "review_after")) {
|
|
31624
31600
|
db.exec("ALTER TABLE memories ADD COLUMN review_after TEXT;");
|
|
31625
31601
|
}
|
|
@@ -31635,14 +31611,14 @@ var TOKEN_COLUMNS2 = [
|
|
|
31635
31611
|
["tokens_cache_write", "INTEGER"],
|
|
31636
31612
|
["tokens_cost", "REAL"]
|
|
31637
31613
|
];
|
|
31638
|
-
function
|
|
31614
|
+
function up1122(db) {
|
|
31639
31615
|
for (const [column, type] of TOKEN_COLUMNS2) {
|
|
31640
31616
|
if (!hasColumn182(db, "dreaming_passes", column)) {
|
|
31641
31617
|
db.exec(`ALTER TABLE dreaming_passes ADD COLUMN ${column} ${type};`);
|
|
31642
31618
|
}
|
|
31643
31619
|
}
|
|
31644
31620
|
}
|
|
31645
|
-
function
|
|
31621
|
+
function up1132(db) {
|
|
31646
31622
|
db.exec(`
|
|
31647
31623
|
CREATE TABLE IF NOT EXISTS embedding_usage (
|
|
31648
31624
|
day TEXT NOT NULL,
|
|
@@ -31655,7 +31631,7 @@ function up1122(db) {
|
|
|
31655
31631
|
);
|
|
31656
31632
|
`);
|
|
31657
31633
|
}
|
|
31658
|
-
function
|
|
31634
|
+
function up1142(db) {
|
|
31659
31635
|
db.exec(`
|
|
31660
31636
|
CREATE TABLE IF NOT EXISTS telemetry_install (
|
|
31661
31637
|
id TEXT PRIMARY KEY,
|
|
@@ -31663,7 +31639,7 @@ function up1132(db) {
|
|
|
31663
31639
|
);
|
|
31664
31640
|
`);
|
|
31665
31641
|
}
|
|
31666
|
-
function
|
|
31642
|
+
function up1152(db) {
|
|
31667
31643
|
db.exec(`
|
|
31668
31644
|
CREATE INDEX IF NOT EXISTS idx_memory_entity_mentions_entity_memory
|
|
31669
31645
|
ON memory_entity_mentions(entity_id, memory_id);
|
|
@@ -31674,7 +31650,7 @@ function hasColumn192(db, table, column) {
|
|
|
31674
31650
|
return rows.some((row) => row.name === column);
|
|
31675
31651
|
}
|
|
31676
31652
|
var COLUMNS22 = ["first_remember_at", "first_recall_at"];
|
|
31677
|
-
function
|
|
31653
|
+
function up1162(db) {
|
|
31678
31654
|
for (const column of COLUMNS22) {
|
|
31679
31655
|
if (!hasColumn192(db, "telemetry_install", column)) {
|
|
31680
31656
|
db.exec(`ALTER TABLE telemetry_install ADD COLUMN ${column} TEXT`);
|
|
@@ -31690,7 +31666,7 @@ function addColumnIfMissing242(db, column, definition) {
|
|
|
31690
31666
|
db.exec(`ALTER TABLE telemetry_events ADD COLUMN ${column} ${definition}`);
|
|
31691
31667
|
}
|
|
31692
31668
|
}
|
|
31693
|
-
function
|
|
31669
|
+
function up1172(db) {
|
|
31694
31670
|
addColumnIfMissing242(db, "source", "TEXT NOT NULL DEFAULT 'daemon'");
|
|
31695
31671
|
addColumnIfMissing242(db, "claim_token", "TEXT");
|
|
31696
31672
|
addColumnIfMissing242(db, "claimed_at", "TEXT");
|
|
@@ -31699,7 +31675,7 @@ function up1162(db) {
|
|
|
31699
31675
|
ON telemetry_events(source, sent_to_posthog, claimed_at, timestamp);
|
|
31700
31676
|
`);
|
|
31701
31677
|
}
|
|
31702
|
-
function
|
|
31678
|
+
function up1182(db) {
|
|
31703
31679
|
db.exec(`
|
|
31704
31680
|
CREATE TABLE IF NOT EXISTS session_claims (
|
|
31705
31681
|
session_key TEXT NOT NULL,
|
|
@@ -31720,7 +31696,7 @@ function up1172(db) {
|
|
|
31720
31696
|
ON session_claims(agent_id, state, expires_at);
|
|
31721
31697
|
`);
|
|
31722
31698
|
}
|
|
31723
|
-
function
|
|
31699
|
+
function up1192(db) {
|
|
31724
31700
|
const table = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'entity_attributes'").get();
|
|
31725
31701
|
if (table == null)
|
|
31726
31702
|
return;
|
|
@@ -31729,7 +31705,7 @@ function up1182(db) {
|
|
|
31729
31705
|
ON entity_attributes(memory_id, agent_id, status, importance);
|
|
31730
31706
|
`);
|
|
31731
31707
|
}
|
|
31732
|
-
function
|
|
31708
|
+
function up1202(db) {
|
|
31733
31709
|
db.exec(`
|
|
31734
31710
|
CREATE TABLE IF NOT EXISTS cross_agent_messages (
|
|
31735
31711
|
id TEXT PRIMARY KEY,
|
|
@@ -31786,7 +31762,7 @@ function addColumnIfMissing252(db, column, definition) {
|
|
|
31786
31762
|
db.exec(`ALTER TABLE cross_agent_messages ADD COLUMN ${column} ${definition}`);
|
|
31787
31763
|
}
|
|
31788
31764
|
}
|
|
31789
|
-
function
|
|
31765
|
+
function up1212(db) {
|
|
31790
31766
|
const table = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'cross_agent_messages'").get();
|
|
31791
31767
|
if (table == null)
|
|
31792
31768
|
return;
|
|
@@ -31987,7 +31963,7 @@ function backfillTranscriptsFromSummaryJobs2(db) {
|
|
|
31987
31963
|
insert.run(...values);
|
|
31988
31964
|
}
|
|
31989
31965
|
}
|
|
31990
|
-
function
|
|
31966
|
+
function up1222(db) {
|
|
31991
31967
|
if (!hasTable42(db, "session_transcripts"))
|
|
31992
31968
|
return;
|
|
31993
31969
|
addColumnIfMissing262(db, "session_transcripts", "completed_at", "TEXT");
|
|
@@ -32040,7 +32016,7 @@ function up1212(db) {
|
|
|
32040
32016
|
ON session_transcripts(agent_id, content_hash);
|
|
32041
32017
|
`);
|
|
32042
32018
|
}
|
|
32043
|
-
function
|
|
32019
|
+
function up1232(db) {
|
|
32044
32020
|
db.exec(`
|
|
32045
32021
|
CREATE INDEX IF NOT EXISTS idx_memory_jobs_pressure_status
|
|
32046
32022
|
ON memory_jobs(status)
|
|
@@ -32059,12 +32035,12 @@ function up1222(db) {
|
|
|
32059
32035
|
function hasColumn222(db, table, column) {
|
|
32060
32036
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
32061
32037
|
}
|
|
32062
|
-
function
|
|
32038
|
+
function up1242(db) {
|
|
32063
32039
|
if (!hasColumn222(db, "telemetry_install", "last_seen_version")) {
|
|
32064
32040
|
db.exec("ALTER TABLE telemetry_install ADD COLUMN last_seen_version TEXT");
|
|
32065
32041
|
}
|
|
32066
32042
|
}
|
|
32067
|
-
function
|
|
32043
|
+
function up1252(db) {
|
|
32068
32044
|
db.exec(`
|
|
32069
32045
|
CREATE TABLE IF NOT EXISTS source_lifecycle_state (
|
|
32070
32046
|
agent_id TEXT NOT NULL,
|
|
@@ -32093,7 +32069,7 @@ function addColumnIfMissing272(db, column, definition) {
|
|
|
32093
32069
|
db.exec(`ALTER TABLE telemetry_events ADD COLUMN ${column} ${definition}`);
|
|
32094
32070
|
}
|
|
32095
32071
|
}
|
|
32096
|
-
function
|
|
32072
|
+
function up1262(db) {
|
|
32097
32073
|
addColumnIfMissing272(db, "delivery_attempts", "INTEGER NOT NULL DEFAULT 0");
|
|
32098
32074
|
addColumnIfMissing272(db, "last_attempt_at", "TEXT");
|
|
32099
32075
|
addColumnIfMissing272(db, "sent_at", "TEXT");
|
|
@@ -32114,7 +32090,7 @@ function up1252(db) {
|
|
|
32114
32090
|
VALUES (1, CURRENT_TIMESTAMP);
|
|
32115
32091
|
`);
|
|
32116
32092
|
}
|
|
32117
|
-
function
|
|
32093
|
+
function up1272(db) {
|
|
32118
32094
|
const columns = db.prepare("PRAGMA table_info(dreaming_evidence_exclusions)").all();
|
|
32119
32095
|
const names = new Set(columns.map((column) => column.name));
|
|
32120
32096
|
if (!names.has("failure_class")) {
|
|
@@ -32131,7 +32107,7 @@ function up1262(db) {
|
|
|
32131
32107
|
}
|
|
32132
32108
|
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)");
|
|
32133
32109
|
}
|
|
32134
|
-
function
|
|
32110
|
+
function up1282(db) {
|
|
32135
32111
|
db.exec(`
|
|
32136
32112
|
CREATE TABLE IF NOT EXISTS embedding_index_failures (
|
|
32137
32113
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
@@ -32155,7 +32131,7 @@ function up1272(db) {
|
|
|
32155
32131
|
ON embedding_index_failures(source_type, source_id);
|
|
32156
32132
|
`);
|
|
32157
32133
|
}
|
|
32158
|
-
function
|
|
32134
|
+
function up1292(db) {
|
|
32159
32135
|
db.exec(`
|
|
32160
32136
|
CREATE TABLE IF NOT EXISTS imported_source_lifecycle (
|
|
32161
32137
|
id TEXT PRIMARY KEY,
|
|
@@ -32205,7 +32181,7 @@ function backfillTable2(db, params) {
|
|
|
32205
32181
|
FROM ${params.table}${params.where ? ` WHERE ${params.where}` : ""}`).all();
|
|
32206
32182
|
backfill2(db, rows, params.sourceKind, params.scannedAt);
|
|
32207
32183
|
}
|
|
32208
|
-
function
|
|
32184
|
+
function up1302(db) {
|
|
32209
32185
|
db.exec(`
|
|
32210
32186
|
CREATE TABLE IF NOT EXISTS memory_content_safety (
|
|
32211
32187
|
agent_id TEXT NOT NULL,
|
|
@@ -32262,7 +32238,7 @@ function up1292(db) {
|
|
|
32262
32238
|
scannedAt
|
|
32263
32239
|
});
|
|
32264
32240
|
}
|
|
32265
|
-
function
|
|
32241
|
+
function up1312(db) {
|
|
32266
32242
|
const table = db.prepare("SELECT sql FROM sqlite_master WHERE type = 'table' AND name = 'dreaming_attention'").get();
|
|
32267
32243
|
if (!table)
|
|
32268
32244
|
return;
|
|
@@ -32296,7 +32272,7 @@ function up1302(db) {
|
|
|
32296
32272
|
ON dreaming_attention (agent_id, resolved_at, priority DESC, created_at ASC);
|
|
32297
32273
|
`);
|
|
32298
32274
|
}
|
|
32299
|
-
function
|
|
32275
|
+
function up1322(db) {
|
|
32300
32276
|
db.exec(`
|
|
32301
32277
|
CREATE TABLE IF NOT EXISTS ontology_contradictions (
|
|
32302
32278
|
id TEXT PRIMARY KEY,
|
|
@@ -32352,7 +32328,7 @@ function up1312(db) {
|
|
|
32352
32328
|
ON ontology_contradictions(agent_id, left_source_id, right_source_id);
|
|
32353
32329
|
`);
|
|
32354
32330
|
}
|
|
32355
|
-
function
|
|
32331
|
+
function up1332(db) {
|
|
32356
32332
|
db.exec(`
|
|
32357
32333
|
CREATE INDEX IF NOT EXISTS idx_memory_jobs_diagnostics_status_created_at
|
|
32358
32334
|
ON memory_jobs(status, created_at)
|
|
@@ -32367,7 +32343,7 @@ function up1322(db) {
|
|
|
32367
32343
|
function tableExists32(db, table) {
|
|
32368
32344
|
return db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = ?").get(table) != null;
|
|
32369
32345
|
}
|
|
32370
|
-
function
|
|
32346
|
+
function up1342(db) {
|
|
32371
32347
|
if (!tableExists32(db, "memory_jobs"))
|
|
32372
32348
|
return;
|
|
32373
32349
|
if (!tableExists32(db, "job_cancellations")) {
|
|
@@ -32416,7 +32392,7 @@ function up1332(db) {
|
|
|
32416
32392
|
AND status IN ('pending', 'leased');
|
|
32417
32393
|
`);
|
|
32418
32394
|
}
|
|
32419
|
-
function
|
|
32395
|
+
function up1352(db) {
|
|
32420
32396
|
db.exec(`
|
|
32421
32397
|
CREATE TABLE IF NOT EXISTS embedding_repair_budget (
|
|
32422
32398
|
id INTEGER PRIMARY KEY CHECK (id = 1),
|
|
@@ -32456,7 +32432,7 @@ function up1342(db) {
|
|
|
32456
32432
|
END;
|
|
32457
32433
|
`);
|
|
32458
32434
|
}
|
|
32459
|
-
function
|
|
32435
|
+
function up1362(db) {
|
|
32460
32436
|
db.exec(`
|
|
32461
32437
|
CREATE TABLE IF NOT EXISTS dreaming_evidence_consumption (
|
|
32462
32438
|
agent_id TEXT NOT NULL,
|
|
@@ -32479,13 +32455,13 @@ function up1352(db) {
|
|
|
32479
32455
|
ON dreaming_evidence_consumption(agent_id, pass_id, delivered_offset, source_length);
|
|
32480
32456
|
`);
|
|
32481
32457
|
}
|
|
32482
|
-
function
|
|
32458
|
+
function up1372(db) {
|
|
32483
32459
|
db.exec(`
|
|
32484
32460
|
CREATE INDEX IF NOT EXISTS idx_epistemic_assertions_observer_entity
|
|
32485
32461
|
ON epistemic_assertions(agent_id, subject_entity_id, status, asserted_at DESC, created_at DESC);
|
|
32486
32462
|
`);
|
|
32487
32463
|
}
|
|
32488
|
-
function
|
|
32464
|
+
function up1382(db) {
|
|
32489
32465
|
db.exec(`
|
|
32490
32466
|
CREATE TABLE IF NOT EXISTS memory_head_revisions (
|
|
32491
32467
|
id TEXT PRIMARY KEY,
|
|
@@ -32537,7 +32513,7 @@ function up1372(db) {
|
|
|
32537
32513
|
if (!names.has("format_version"))
|
|
32538
32514
|
db.exec("ALTER TABLE memory_md_heads ADD COLUMN format_version INTEGER NOT NULL DEFAULT 1");
|
|
32539
32515
|
}
|
|
32540
|
-
function
|
|
32516
|
+
function up1392(db) {
|
|
32541
32517
|
db.exec(`
|
|
32542
32518
|
CREATE TABLE memory_head_entries_v134 (
|
|
32543
32519
|
entry_id TEXT NOT NULL, agent_id TEXT NOT NULL, canonical_text TEXT NOT NULL,
|
|
@@ -32555,7 +32531,7 @@ function up1382(db) {
|
|
|
32555
32531
|
ON memory_head_entries(agent_id, entry_id, last_revision DESC);
|
|
32556
32532
|
`);
|
|
32557
32533
|
}
|
|
32558
|
-
function
|
|
32534
|
+
function up1402(db) {
|
|
32559
32535
|
db.exec(`
|
|
32560
32536
|
CREATE TABLE IF NOT EXISTS memory_head_publications (
|
|
32561
32537
|
agent_id TEXT NOT NULL,
|
|
@@ -32571,7 +32547,7 @@ function up1392(db) {
|
|
|
32571
32547
|
ON memory_head_publications(agent_id, status, revision DESC);
|
|
32572
32548
|
`);
|
|
32573
32549
|
}
|
|
32574
|
-
function
|
|
32550
|
+
function up1412(db) {
|
|
32575
32551
|
const cols = new Set(db.prepare("PRAGMA table_info(memory_head_revisions)").all().map((r22) => r22.name));
|
|
32576
32552
|
for (const [name, type] of [
|
|
32577
32553
|
["entry_id", "TEXT"],
|
|
@@ -32585,7 +32561,7 @@ function up1402(db) {
|
|
|
32585
32561
|
}
|
|
32586
32562
|
db.exec("CREATE UNIQUE INDEX IF NOT EXISTS idx_memory_head_revisions_entry ON memory_head_revisions(agent_id, revision, entry_id)");
|
|
32587
32563
|
}
|
|
32588
|
-
function
|
|
32564
|
+
function up1422(db) {
|
|
32589
32565
|
const cols = new Set(db.prepare("PRAGMA table_info(dreaming_passes)").all().map((r22) => r22.name));
|
|
32590
32566
|
for (const [name, type] of [
|
|
32591
32567
|
["head_revision", "INTEGER"],
|
|
@@ -32607,7 +32583,7 @@ function addColumnIfMissing282(db, table, column, definition) {
|
|
|
32607
32583
|
if (!hasColumn252(db, table, column))
|
|
32608
32584
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
32609
32585
|
}
|
|
32610
|
-
function
|
|
32586
|
+
function up1432(db) {
|
|
32611
32587
|
addColumnIfMissing282(db, "memories", "manual_override", "INTEGER DEFAULT 0");
|
|
32612
32588
|
db.exec(`
|
|
32613
32589
|
CREATE TABLE IF NOT EXISTS transcript_capture_status (
|
|
@@ -32912,7 +32888,7 @@ function up1422(db) {
|
|
|
32912
32888
|
GROUP BY j.agent_id;
|
|
32913
32889
|
`);
|
|
32914
32890
|
}
|
|
32915
|
-
function
|
|
32891
|
+
function up1442(db) {
|
|
32916
32892
|
db.exec(`
|
|
32917
32893
|
CREATE TABLE IF NOT EXISTS native_source_sync_state (
|
|
32918
32894
|
agent_id TEXT NOT NULL,
|
|
@@ -32928,7 +32904,7 @@ function up1432(db) {
|
|
|
32928
32904
|
ON native_source_sync_state(agent_id, status);
|
|
32929
32905
|
`);
|
|
32930
32906
|
}
|
|
32931
|
-
function
|
|
32907
|
+
function up1452(db) {
|
|
32932
32908
|
db.exec(`
|
|
32933
32909
|
CREATE TABLE IF NOT EXISTS transcript_recovery_frontiers (
|
|
32934
32910
|
agent_id TEXT NOT NULL,
|
|
@@ -32940,7 +32916,7 @@ function up1442(db) {
|
|
|
32940
32916
|
);
|
|
32941
32917
|
`);
|
|
32942
32918
|
}
|
|
32943
|
-
function
|
|
32919
|
+
function up1462(db) {
|
|
32944
32920
|
db.exec(`
|
|
32945
32921
|
CREATE TABLE IF NOT EXISTS source_sync_checkpoints (
|
|
32946
32922
|
agent_id TEXT NOT NULL,
|
|
@@ -32954,13 +32930,13 @@ function up1452(db) {
|
|
|
32954
32930
|
);
|
|
32955
32931
|
`);
|
|
32956
32932
|
}
|
|
32957
|
-
function
|
|
32933
|
+
function up1472(db) {
|
|
32958
32934
|
const columns = db.prepare("PRAGMA table_info(source_sync_checkpoints)").all();
|
|
32959
32935
|
if (!columns.some((column) => column.name === "frontier")) {
|
|
32960
32936
|
db.exec("ALTER TABLE source_sync_checkpoints ADD COLUMN frontier TEXT");
|
|
32961
32937
|
}
|
|
32962
32938
|
}
|
|
32963
|
-
function
|
|
32939
|
+
function up1482(db) {
|
|
32964
32940
|
const columns = new Set(db.prepare("PRAGMA table_info(embedding_index_state)").all().map((row) => row.name).filter((name) => typeof name === "string"));
|
|
32965
32941
|
const additions = [
|
|
32966
32942
|
["migration_phase", "TEXT"],
|
|
@@ -32995,13 +32971,13 @@ function up1472(db) {
|
|
|
32995
32971
|
`);
|
|
32996
32972
|
}
|
|
32997
32973
|
}
|
|
32998
|
-
function
|
|
32974
|
+
function up1492(db) {
|
|
32999
32975
|
const columns = new Set(db.prepare("PRAGMA table_info(memory_jobs)").all().map((row) => row.name).filter((name) => typeof name === "string"));
|
|
33000
32976
|
if (!columns.has("lease_token")) {
|
|
33001
32977
|
db.exec("ALTER TABLE memory_jobs ADD COLUMN lease_token TEXT");
|
|
33002
32978
|
}
|
|
33003
32979
|
}
|
|
33004
|
-
function
|
|
32980
|
+
function up1502(db) {
|
|
33005
32981
|
db.exec(`
|
|
33006
32982
|
CREATE TABLE IF NOT EXISTS dreaming_evidence_reviews (
|
|
33007
32983
|
agent_id TEXT NOT NULL,
|
|
@@ -33019,7 +32995,7 @@ function up1492(db) {
|
|
|
33019
32995
|
ON dreaming_evidence_reviews (agent_id, reviewed_at DESC);
|
|
33020
32996
|
`);
|
|
33021
32997
|
}
|
|
33022
|
-
function
|
|
32998
|
+
function up1512(db) {
|
|
33023
32999
|
db.exec(`
|
|
33024
33000
|
CREATE TABLE IF NOT EXISTS source_import_jobs (
|
|
33025
33001
|
id TEXT PRIMARY KEY, kind TEXT NOT NULL CHECK (kind = 'import'), agent_id TEXT NOT NULL,
|
|
@@ -33086,16 +33062,16 @@ function up1502(db) {
|
|
|
33086
33062
|
}
|
|
33087
33063
|
db.exec("CREATE INDEX IF NOT EXISTS idx_session_transcripts_agent_source ON session_transcripts(agent_id, source_id)");
|
|
33088
33064
|
}
|
|
33089
|
-
function
|
|
33065
|
+
function up1522(db) {
|
|
33090
33066
|
db.exec("CREATE INDEX IF NOT EXISTS idx_source_import_files_job_state ON source_import_files(job_id, state)");
|
|
33091
33067
|
}
|
|
33092
|
-
function
|
|
33068
|
+
function up1532(db) {
|
|
33093
33069
|
const columns = db.prepare("PRAGMA table_info(source_import_record_attempts)").all();
|
|
33094
33070
|
if (!columns.some((column) => column.name === "source_id")) {
|
|
33095
33071
|
db.exec("ALTER TABLE source_import_record_attempts ADD COLUMN source_id TEXT");
|
|
33096
33072
|
}
|
|
33097
33073
|
}
|
|
33098
|
-
function
|
|
33074
|
+
function up1542(db) {
|
|
33099
33075
|
const addColumn = (table, column, definition) => {
|
|
33100
33076
|
const statement = db.prepare("SELECT 1 AS found FROM pragma_table_info(?) WHERE name = ?");
|
|
33101
33077
|
let exists;
|
|
@@ -33116,7 +33092,7 @@ function addColumnIfMissing292(db, table, column, definition) {
|
|
|
33116
33092
|
if (!columns.some((row) => row.name === column))
|
|
33117
33093
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
33118
33094
|
}
|
|
33119
|
-
function
|
|
33095
|
+
function up1552(db) {
|
|
33120
33096
|
addColumnIfMissing292(db, "memory_md_heads", "is_current", "INTEGER NOT NULL DEFAULT 0");
|
|
33121
33097
|
addColumnIfMissing292(db, "dreaming_passes", "head_base_revision", "INTEGER");
|
|
33122
33098
|
db.exec("CREATE INDEX IF NOT EXISTS idx_memory_head_revisions_content_hash ON memory_head_revisions(content_hash)");
|
|
@@ -33266,7 +33242,7 @@ function up1542(db) {
|
|
|
33266
33242
|
`);
|
|
33267
33243
|
}
|
|
33268
33244
|
}
|
|
33269
|
-
function
|
|
33245
|
+
function up1562(db) {
|
|
33270
33246
|
db.exec(`
|
|
33271
33247
|
CREATE TABLE IF NOT EXISTS vector_repair_checkpoints (
|
|
33272
33248
|
operation TEXT NOT NULL CHECK (operation IN ('resync', 'clean-orphans')),
|
|
@@ -33291,7 +33267,7 @@ function up1552(db) {
|
|
|
33291
33267
|
ON vector_repair_checkpoints(status, updated_at);
|
|
33292
33268
|
`);
|
|
33293
33269
|
}
|
|
33294
|
-
function
|
|
33270
|
+
function up1572(db) {
|
|
33295
33271
|
db.exec(`
|
|
33296
33272
|
CREATE TABLE IF NOT EXISTS embedding_repair_checkpoints (
|
|
33297
33273
|
checkpoint_id TEXT PRIMARY KEY,
|
|
@@ -33312,7 +33288,7 @@ function up1562(db) {
|
|
|
33312
33288
|
ON embedding_repair_checkpoints(status, updated_at);
|
|
33313
33289
|
`);
|
|
33314
33290
|
}
|
|
33315
|
-
function
|
|
33291
|
+
function up1582(db) {
|
|
33316
33292
|
const columns = new Set(db.prepare("PRAGMA table_info(embedding_repair_checkpoints)").all().map((row) => row.name));
|
|
33317
33293
|
if (!columns.has("profile_fingerprint")) {
|
|
33318
33294
|
db.exec("ALTER TABLE embedding_repair_checkpoints ADD COLUMN profile_fingerprint TEXT");
|
|
@@ -33327,7 +33303,7 @@ function up1572(db) {
|
|
|
33327
33303
|
);
|
|
33328
33304
|
`);
|
|
33329
33305
|
}
|
|
33330
|
-
function
|
|
33306
|
+
function up1592(db) {
|
|
33331
33307
|
db.exec(`
|
|
33332
33308
|
CREATE INDEX IF NOT EXISTS idx_memories_agent_kind
|
|
33333
33309
|
ON memories(agent_id, memory_kind);
|
|
@@ -33337,13 +33313,13 @@ var MIGRATIONS2 = [
|
|
|
33337
33313
|
{
|
|
33338
33314
|
version: 1,
|
|
33339
33315
|
name: "baseline",
|
|
33340
|
-
up:
|
|
33316
|
+
up: up610,
|
|
33341
33317
|
artifacts: { tables: ["memories", "conversations", "embeddings"] }
|
|
33342
33318
|
},
|
|
33343
33319
|
{
|
|
33344
33320
|
version: 2,
|
|
33345
33321
|
name: "pipeline-v2",
|
|
33346
|
-
up:
|
|
33322
|
+
up: up710,
|
|
33347
33323
|
artifacts: {
|
|
33348
33324
|
tables: ["memory_history", "memory_jobs", "entities", "relations", "memory_entity_mentions"]
|
|
33349
33325
|
}
|
|
@@ -33351,12 +33327,12 @@ var MIGRATIONS2 = [
|
|
|
33351
33327
|
{
|
|
33352
33328
|
version: 3,
|
|
33353
33329
|
name: "unique-content-hash",
|
|
33354
|
-
up:
|
|
33330
|
+
up: up810
|
|
33355
33331
|
},
|
|
33356
33332
|
{
|
|
33357
33333
|
version: 4,
|
|
33358
33334
|
name: "history-actor-and-retention",
|
|
33359
|
-
up:
|
|
33335
|
+
up: up910,
|
|
33360
33336
|
artifacts: {
|
|
33361
33337
|
columns: [{ table: "memory_history", column: "actor_type" }]
|
|
33362
33338
|
}
|
|
@@ -33364,7 +33340,7 @@ var MIGRATIONS2 = [
|
|
|
33364
33340
|
{
|
|
33365
33341
|
version: 5,
|
|
33366
33342
|
name: "graph-extended",
|
|
33367
|
-
up:
|
|
33343
|
+
up: up1010,
|
|
33368
33344
|
artifacts: {
|
|
33369
33345
|
columns: [{ table: "entities", column: "canonical_name" }]
|
|
33370
33346
|
}
|
|
@@ -33372,7 +33348,7 @@ var MIGRATIONS2 = [
|
|
|
33372
33348
|
{
|
|
33373
33349
|
version: 6,
|
|
33374
33350
|
name: "idempotency-key",
|
|
33375
|
-
up:
|
|
33351
|
+
up: up1110,
|
|
33376
33352
|
artifacts: {
|
|
33377
33353
|
columns: [{ table: "memories", column: "idempotency_key" }]
|
|
33378
33354
|
}
|
|
@@ -33380,42 +33356,42 @@ var MIGRATIONS2 = [
|
|
|
33380
33356
|
{
|
|
33381
33357
|
version: 7,
|
|
33382
33358
|
name: "documents-and-connectors",
|
|
33383
|
-
up:
|
|
33359
|
+
up: up1210,
|
|
33384
33360
|
artifacts: { tables: ["documents", "document_memories", "connectors"] }
|
|
33385
33361
|
},
|
|
33386
33362
|
{
|
|
33387
33363
|
version: 8,
|
|
33388
33364
|
name: "embeddings-unique-hash",
|
|
33389
|
-
up:
|
|
33365
|
+
up: up1310
|
|
33390
33366
|
},
|
|
33391
33367
|
{
|
|
33392
33368
|
version: 9,
|
|
33393
33369
|
name: "summary-jobs",
|
|
33394
|
-
up:
|
|
33370
|
+
up: up1410,
|
|
33395
33371
|
artifacts: { tables: ["summary_jobs"] }
|
|
33396
33372
|
},
|
|
33397
33373
|
{
|
|
33398
33374
|
version: 10,
|
|
33399
33375
|
name: "umap-cache",
|
|
33400
|
-
up:
|
|
33376
|
+
up: up1510,
|
|
33401
33377
|
artifacts: { tables: ["umap_cache"] }
|
|
33402
33378
|
},
|
|
33403
33379
|
{
|
|
33404
33380
|
version: 11,
|
|
33405
33381
|
name: "session-scores",
|
|
33406
|
-
up:
|
|
33382
|
+
up: up162,
|
|
33407
33383
|
artifacts: { tables: ["session_scores"] }
|
|
33408
33384
|
},
|
|
33409
33385
|
{
|
|
33410
33386
|
version: 12,
|
|
33411
33387
|
name: "scheduled-tasks",
|
|
33412
|
-
up:
|
|
33388
|
+
up: up172,
|
|
33413
33389
|
artifacts: { tables: ["scheduled_tasks", "task_runs"] }
|
|
33414
33390
|
},
|
|
33415
33391
|
{
|
|
33416
33392
|
version: 13,
|
|
33417
33393
|
name: "ingestion-tracking",
|
|
33418
|
-
up:
|
|
33394
|
+
up: up182,
|
|
33419
33395
|
artifacts: {
|
|
33420
33396
|
columns: [
|
|
33421
33397
|
{ table: "memories", column: "source_path" },
|
|
@@ -33426,13 +33402,13 @@ var MIGRATIONS2 = [
|
|
|
33426
33402
|
{
|
|
33427
33403
|
version: 14,
|
|
33428
33404
|
name: "telemetry",
|
|
33429
|
-
up:
|
|
33405
|
+
up: up192,
|
|
33430
33406
|
artifacts: { tables: ["telemetry_events"] }
|
|
33431
33407
|
},
|
|
33432
33408
|
{
|
|
33433
33409
|
version: 15,
|
|
33434
33410
|
name: "session-memories",
|
|
33435
|
-
up:
|
|
33411
|
+
up: up202,
|
|
33436
33412
|
artifacts: {
|
|
33437
33413
|
tables: ["session_memories"],
|
|
33438
33414
|
columns: [
|
|
@@ -33444,13 +33420,13 @@ var MIGRATIONS2 = [
|
|
|
33444
33420
|
{
|
|
33445
33421
|
version: 16,
|
|
33446
33422
|
name: "session-checkpoints",
|
|
33447
|
-
up:
|
|
33423
|
+
up: up212,
|
|
33448
33424
|
artifacts: { tables: ["session_checkpoints"] }
|
|
33449
33425
|
},
|
|
33450
33426
|
{
|
|
33451
33427
|
version: 17,
|
|
33452
33428
|
name: "task-skills",
|
|
33453
|
-
up:
|
|
33429
|
+
up: up222,
|
|
33454
33430
|
artifacts: {
|
|
33455
33431
|
columns: [{ table: "scheduled_tasks", column: "skill_name" }]
|
|
33456
33432
|
}
|
|
@@ -33458,13 +33434,13 @@ var MIGRATIONS2 = [
|
|
|
33458
33434
|
{
|
|
33459
33435
|
version: 18,
|
|
33460
33436
|
name: "skill-meta",
|
|
33461
|
-
up:
|
|
33437
|
+
up: up232,
|
|
33462
33438
|
artifacts: { tables: ["skill_meta"] }
|
|
33463
33439
|
},
|
|
33464
33440
|
{
|
|
33465
33441
|
version: 19,
|
|
33466
33442
|
name: "knowledge-structure",
|
|
33467
|
-
up:
|
|
33443
|
+
up: up242,
|
|
33468
33444
|
artifacts: {
|
|
33469
33445
|
tables: ["entity_aspects", "entity_attributes", "entity_dependencies", "task_meta"],
|
|
33470
33446
|
columns: [{ table: "entities", column: "agent_id" }]
|
|
@@ -33473,7 +33449,7 @@ var MIGRATIONS2 = [
|
|
|
33473
33449
|
{
|
|
33474
33450
|
version: 20,
|
|
33475
33451
|
name: "session-structural-columns",
|
|
33476
|
-
up:
|
|
33452
|
+
up: up252,
|
|
33477
33453
|
artifacts: {
|
|
33478
33454
|
columns: [
|
|
33479
33455
|
{ table: "session_memories", column: "entity_slot" },
|
|
@@ -33486,7 +33462,7 @@ var MIGRATIONS2 = [
|
|
|
33486
33462
|
{
|
|
33487
33463
|
version: 21,
|
|
33488
33464
|
name: "checkpoint-structural",
|
|
33489
|
-
up:
|
|
33465
|
+
up: up262,
|
|
33490
33466
|
artifacts: {
|
|
33491
33467
|
columns: [{ table: "session_checkpoints", column: "focal_entity_ids" }]
|
|
33492
33468
|
}
|
|
@@ -33494,7 +33470,7 @@ var MIGRATIONS2 = [
|
|
|
33494
33470
|
{
|
|
33495
33471
|
version: 22,
|
|
33496
33472
|
name: "entity-pinning",
|
|
33497
|
-
up:
|
|
33473
|
+
up: up272,
|
|
33498
33474
|
artifacts: {
|
|
33499
33475
|
columns: [
|
|
33500
33476
|
{ table: "entities", column: "pinned" },
|
|
@@ -33505,17 +33481,17 @@ var MIGRATIONS2 = [
|
|
|
33505
33481
|
{
|
|
33506
33482
|
version: 23,
|
|
33507
33483
|
name: "retired-scorer-gap",
|
|
33508
|
-
up:
|
|
33484
|
+
up: up282
|
|
33509
33485
|
},
|
|
33510
33486
|
{
|
|
33511
33487
|
version: 24,
|
|
33512
33488
|
name: "retired-scorer-gap",
|
|
33513
|
-
up:
|
|
33489
|
+
up: up292
|
|
33514
33490
|
},
|
|
33515
33491
|
{
|
|
33516
33492
|
version: 25,
|
|
33517
33493
|
name: "agent-feedback",
|
|
33518
|
-
up:
|
|
33494
|
+
up: up302,
|
|
33519
33495
|
artifacts: {
|
|
33520
33496
|
columns: [{ table: "session_memories", column: "agent_relevance_score" }]
|
|
33521
33497
|
}
|
|
@@ -33523,32 +33499,32 @@ var MIGRATIONS2 = [
|
|
|
33523
33499
|
{
|
|
33524
33500
|
version: 26,
|
|
33525
33501
|
name: "retired-scorer-gap",
|
|
33526
|
-
up:
|
|
33502
|
+
up: up312
|
|
33527
33503
|
},
|
|
33528
33504
|
{
|
|
33529
33505
|
version: 27,
|
|
33530
33506
|
name: "backfill-canonical-names",
|
|
33531
|
-
up:
|
|
33507
|
+
up: up322
|
|
33532
33508
|
},
|
|
33533
33509
|
{
|
|
33534
33510
|
version: 28,
|
|
33535
33511
|
name: "lossless-retention",
|
|
33536
|
-
up:
|
|
33512
|
+
up: up332
|
|
33537
33513
|
},
|
|
33538
33514
|
{
|
|
33539
33515
|
version: 29,
|
|
33540
33516
|
name: "session-summary-dag",
|
|
33541
|
-
up:
|
|
33517
|
+
up: up342
|
|
33542
33518
|
},
|
|
33543
33519
|
{
|
|
33544
33520
|
version: 30,
|
|
33545
33521
|
name: "nullable-memory-job-memory-id",
|
|
33546
|
-
up:
|
|
33522
|
+
up: up352
|
|
33547
33523
|
},
|
|
33548
33524
|
{
|
|
33549
33525
|
version: 31,
|
|
33550
33526
|
name: "dependency-reason",
|
|
33551
|
-
up:
|
|
33527
|
+
up: up362,
|
|
33552
33528
|
artifacts: {
|
|
33553
33529
|
columns: [
|
|
33554
33530
|
{ table: "entity_dependencies", column: "reason" },
|
|
@@ -33559,7 +33535,7 @@ var MIGRATIONS2 = [
|
|
|
33559
33535
|
{
|
|
33560
33536
|
version: 32,
|
|
33561
33537
|
name: "embeddings-vector-column",
|
|
33562
|
-
up:
|
|
33538
|
+
up: up372,
|
|
33563
33539
|
artifacts: {
|
|
33564
33540
|
columns: [{ table: "embeddings", column: "vector", optional: true }]
|
|
33565
33541
|
}
|
|
@@ -33567,7 +33543,7 @@ var MIGRATIONS2 = [
|
|
|
33567
33543
|
{
|
|
33568
33544
|
version: 33,
|
|
33569
33545
|
name: "scope",
|
|
33570
|
-
up:
|
|
33546
|
+
up: up382,
|
|
33571
33547
|
artifacts: {
|
|
33572
33548
|
columns: [{ table: "memories", column: "scope" }]
|
|
33573
33549
|
}
|
|
@@ -33575,17 +33551,17 @@ var MIGRATIONS2 = [
|
|
|
33575
33551
|
{
|
|
33576
33552
|
version: 34,
|
|
33577
33553
|
name: "scope-aware-dedup",
|
|
33578
|
-
up:
|
|
33554
|
+
up: up392
|
|
33579
33555
|
},
|
|
33580
33556
|
{
|
|
33581
33557
|
version: 35,
|
|
33582
33558
|
name: "entity-fts",
|
|
33583
|
-
up:
|
|
33559
|
+
up: up402
|
|
33584
33560
|
},
|
|
33585
33561
|
{
|
|
33586
33562
|
version: 36,
|
|
33587
33563
|
name: "dependency-confidence",
|
|
33588
|
-
up:
|
|
33564
|
+
up: up412,
|
|
33589
33565
|
artifacts: {
|
|
33590
33566
|
columns: [{ table: "entity_dependencies", column: "confidence" }]
|
|
33591
33567
|
}
|
|
@@ -33593,7 +33569,7 @@ var MIGRATIONS2 = [
|
|
|
33593
33569
|
{
|
|
33594
33570
|
version: 37,
|
|
33595
33571
|
name: "entity-communities",
|
|
33596
|
-
up:
|
|
33572
|
+
up: up422,
|
|
33597
33573
|
artifacts: {
|
|
33598
33574
|
tables: ["entity_communities"],
|
|
33599
33575
|
columns: [{ table: "entities", column: "community_id" }]
|
|
@@ -33602,24 +33578,24 @@ var MIGRATIONS2 = [
|
|
|
33602
33578
|
{
|
|
33603
33579
|
version: 38,
|
|
33604
33580
|
name: "memory-hints",
|
|
33605
|
-
up:
|
|
33581
|
+
up: up432,
|
|
33606
33582
|
artifacts: { tables: ["memory_hints"] }
|
|
33607
33583
|
},
|
|
33608
33584
|
{
|
|
33609
33585
|
version: 39,
|
|
33610
33586
|
name: "dedup-entity-dependencies",
|
|
33611
|
-
up:
|
|
33587
|
+
up: up442
|
|
33612
33588
|
},
|
|
33613
33589
|
{
|
|
33614
33590
|
version: 40,
|
|
33615
33591
|
name: "session-transcripts",
|
|
33616
|
-
up:
|
|
33592
|
+
up: up452,
|
|
33617
33593
|
artifacts: { tables: ["session_transcripts"] }
|
|
33618
33594
|
},
|
|
33619
33595
|
{
|
|
33620
33596
|
version: 41,
|
|
33621
33597
|
name: "path-feedback",
|
|
33622
|
-
up:
|
|
33598
|
+
up: up462,
|
|
33623
33599
|
artifacts: {
|
|
33624
33600
|
tables: [
|
|
33625
33601
|
"path_feedback_events",
|
|
@@ -33634,7 +33610,7 @@ var MIGRATIONS2 = [
|
|
|
33634
33610
|
{
|
|
33635
33611
|
version: 42,
|
|
33636
33612
|
name: "session-memories-agent-id",
|
|
33637
|
-
up:
|
|
33613
|
+
up: up472,
|
|
33638
33614
|
artifacts: {
|
|
33639
33615
|
columns: [{ table: "session_memories", column: "agent_id" }]
|
|
33640
33616
|
}
|
|
@@ -33642,7 +33618,7 @@ var MIGRATIONS2 = [
|
|
|
33642
33618
|
{
|
|
33643
33619
|
version: 43,
|
|
33644
33620
|
name: "agents-table",
|
|
33645
|
-
up:
|
|
33621
|
+
up: up482,
|
|
33646
33622
|
artifacts: {
|
|
33647
33623
|
tables: ["agents"],
|
|
33648
33624
|
columns: [
|
|
@@ -33654,7 +33630,7 @@ var MIGRATIONS2 = [
|
|
|
33654
33630
|
{
|
|
33655
33631
|
version: 44,
|
|
33656
33632
|
name: "memory-md-temporal-head",
|
|
33657
|
-
up:
|
|
33633
|
+
up: up492,
|
|
33658
33634
|
artifacts: {
|
|
33659
33635
|
columns: [
|
|
33660
33636
|
{ table: "session_summaries", column: "source_type" },
|
|
@@ -33666,7 +33642,7 @@ var MIGRATIONS2 = [
|
|
|
33666
33642
|
{
|
|
33667
33643
|
version: 45,
|
|
33668
33644
|
name: "lossless-working-memory-hardening",
|
|
33669
|
-
up:
|
|
33645
|
+
up: up502,
|
|
33670
33646
|
artifacts: {
|
|
33671
33647
|
tables: ["session_transcripts_fts", "memory_md_heads"],
|
|
33672
33648
|
columns: [
|
|
@@ -33679,17 +33655,17 @@ var MIGRATIONS2 = [
|
|
|
33679
33655
|
{
|
|
33680
33656
|
version: 46,
|
|
33681
33657
|
name: "session-summary-uniqueness",
|
|
33682
|
-
up:
|
|
33658
|
+
up: up512
|
|
33683
33659
|
},
|
|
33684
33660
|
{
|
|
33685
33661
|
version: 47,
|
|
33686
33662
|
name: "agent-scoped-temporal-uniqueness",
|
|
33687
|
-
up:
|
|
33663
|
+
up: up522
|
|
33688
33664
|
},
|
|
33689
33665
|
{
|
|
33690
33666
|
version: 48,
|
|
33691
33667
|
name: "thread-heads",
|
|
33692
|
-
up:
|
|
33668
|
+
up: up532,
|
|
33693
33669
|
artifacts: {
|
|
33694
33670
|
tables: ["memory_thread_heads"]
|
|
33695
33671
|
}
|
|
@@ -33697,7 +33673,7 @@ var MIGRATIONS2 = [
|
|
|
33697
33673
|
{
|
|
33698
33674
|
version: 49,
|
|
33699
33675
|
name: "session-extract-cursors",
|
|
33700
|
-
up:
|
|
33676
|
+
up: up542,
|
|
33701
33677
|
artifacts: {
|
|
33702
33678
|
tables: ["session_extract_cursors"]
|
|
33703
33679
|
}
|
|
@@ -33705,7 +33681,7 @@ var MIGRATIONS2 = [
|
|
|
33705
33681
|
{
|
|
33706
33682
|
version: 50,
|
|
33707
33683
|
name: "related-to-audit",
|
|
33708
|
-
up:
|
|
33684
|
+
up: up552,
|
|
33709
33685
|
artifacts: {
|
|
33710
33686
|
tables: ["entity_dependency_history"]
|
|
33711
33687
|
}
|
|
@@ -33713,7 +33689,7 @@ var MIGRATIONS2 = [
|
|
|
33713
33689
|
{
|
|
33714
33690
|
version: 51,
|
|
33715
33691
|
name: "memory-md-rolling-window-lineage",
|
|
33716
|
-
up:
|
|
33692
|
+
up: up562,
|
|
33717
33693
|
artifacts: {
|
|
33718
33694
|
tables: ["memory_artifacts", "memory_artifact_tombstones", "memory_artifacts_fts"],
|
|
33719
33695
|
columns: [
|
|
@@ -33728,15 +33704,12 @@ var MIGRATIONS2 = [
|
|
|
33728
33704
|
{
|
|
33729
33705
|
version: 52,
|
|
33730
33706
|
name: "mcp-invocations",
|
|
33731
|
-
up:
|
|
33732
|
-
artifacts: {
|
|
33733
|
-
tables: ["mcp_invocations"]
|
|
33734
|
-
}
|
|
33707
|
+
up: up572
|
|
33735
33708
|
},
|
|
33736
33709
|
{
|
|
33737
33710
|
version: 53,
|
|
33738
33711
|
name: "skill-invocations",
|
|
33739
|
-
up:
|
|
33712
|
+
up: up582,
|
|
33740
33713
|
artifacts: {
|
|
33741
33714
|
tables: ["skill_invocations"]
|
|
33742
33715
|
}
|
|
@@ -33744,7 +33717,7 @@ var MIGRATIONS2 = [
|
|
|
33744
33717
|
{
|
|
33745
33718
|
version: 54,
|
|
33746
33719
|
name: "task-agent-scope",
|
|
33747
|
-
up:
|
|
33720
|
+
up: up592,
|
|
33748
33721
|
artifacts: {
|
|
33749
33722
|
tables: ["task_scope_hints"]
|
|
33750
33723
|
}
|
|
@@ -33752,7 +33725,7 @@ var MIGRATIONS2 = [
|
|
|
33752
33725
|
{
|
|
33753
33726
|
version: 55,
|
|
33754
33727
|
name: "dreaming-state",
|
|
33755
|
-
up:
|
|
33728
|
+
up: up602,
|
|
33756
33729
|
artifacts: {
|
|
33757
33730
|
tables: ["dreaming_state", "dreaming_passes"]
|
|
33758
33731
|
}
|
|
@@ -33760,22 +33733,22 @@ var MIGRATIONS2 = [
|
|
|
33760
33733
|
{
|
|
33761
33734
|
version: 56,
|
|
33762
33735
|
name: "agent-scoped-content-hash",
|
|
33763
|
-
up:
|
|
33736
|
+
up: up612
|
|
33764
33737
|
},
|
|
33765
33738
|
{
|
|
33766
33739
|
version: 57,
|
|
33767
33740
|
name: "memories-fts-tokenizer-repair",
|
|
33768
|
-
up:
|
|
33741
|
+
up: up622
|
|
33769
33742
|
},
|
|
33770
33743
|
{
|
|
33771
33744
|
version: 58,
|
|
33772
33745
|
name: "knowledge-graph-indices",
|
|
33773
|
-
up:
|
|
33746
|
+
up: up632
|
|
33774
33747
|
},
|
|
33775
33748
|
{
|
|
33776
33749
|
version: 59,
|
|
33777
33750
|
name: "entity-attribute-claim-key",
|
|
33778
|
-
up:
|
|
33751
|
+
up: up642,
|
|
33779
33752
|
artifacts: {
|
|
33780
33753
|
columns: [{ table: "entity_attributes", column: "claim_key" }]
|
|
33781
33754
|
}
|
|
@@ -33783,7 +33756,7 @@ var MIGRATIONS2 = [
|
|
|
33783
33756
|
{
|
|
33784
33757
|
version: 60,
|
|
33785
33758
|
name: "entity-attribute-group-key",
|
|
33786
|
-
up:
|
|
33759
|
+
up: up652,
|
|
33787
33760
|
artifacts: {
|
|
33788
33761
|
columns: [{ table: "entity_attributes", column: "group_key" }]
|
|
33789
33762
|
}
|
|
@@ -33791,7 +33764,7 @@ var MIGRATIONS2 = [
|
|
|
33791
33764
|
{
|
|
33792
33765
|
version: 61,
|
|
33793
33766
|
name: "memory-artifact-source-mtime",
|
|
33794
|
-
up:
|
|
33767
|
+
up: up662,
|
|
33795
33768
|
artifacts: {
|
|
33796
33769
|
columns: [{ table: "memory_artifacts", column: "source_mtime_ms" }]
|
|
33797
33770
|
}
|
|
@@ -33799,7 +33772,7 @@ var MIGRATIONS2 = [
|
|
|
33799
33772
|
{
|
|
33800
33773
|
version: 62,
|
|
33801
33774
|
name: "memory-artifact-soft-delete",
|
|
33802
|
-
up:
|
|
33775
|
+
up: up672,
|
|
33803
33776
|
artifacts: {
|
|
33804
33777
|
columns: [
|
|
33805
33778
|
{ table: "memory_artifacts", column: "is_deleted" },
|
|
@@ -33810,12 +33783,12 @@ var MIGRATIONS2 = [
|
|
|
33810
33783
|
{
|
|
33811
33784
|
version: 63,
|
|
33812
33785
|
name: "content-only-memories-fts-update",
|
|
33813
|
-
up:
|
|
33786
|
+
up: up682
|
|
33814
33787
|
},
|
|
33815
33788
|
{
|
|
33816
33789
|
version: 64,
|
|
33817
33790
|
name: "source-graph-provenance",
|
|
33818
|
-
up:
|
|
33791
|
+
up: up692,
|
|
33819
33792
|
artifacts: {
|
|
33820
33793
|
columns: [
|
|
33821
33794
|
{ table: "entities", column: "source_path" },
|
|
@@ -33828,7 +33801,7 @@ var MIGRATIONS2 = [
|
|
|
33828
33801
|
{
|
|
33829
33802
|
version: 65,
|
|
33830
33803
|
name: "source-embedding-agent-scope",
|
|
33831
|
-
up:
|
|
33804
|
+
up: up702,
|
|
33832
33805
|
artifacts: {
|
|
33833
33806
|
columns: [{ table: "embeddings", column: "agent_id", optional: true }]
|
|
33834
33807
|
}
|
|
@@ -33836,7 +33809,7 @@ var MIGRATIONS2 = [
|
|
|
33836
33809
|
{
|
|
33837
33810
|
version: 66,
|
|
33838
33811
|
name: "memory-search-telemetry",
|
|
33839
|
-
up:
|
|
33812
|
+
up: up712,
|
|
33840
33813
|
artifacts: {
|
|
33841
33814
|
tables: ["memory_search_telemetry"]
|
|
33842
33815
|
}
|
|
@@ -33844,7 +33817,7 @@ var MIGRATIONS2 = [
|
|
|
33844
33817
|
{
|
|
33845
33818
|
version: 67,
|
|
33846
33819
|
name: "ontology-proposals",
|
|
33847
|
-
up:
|
|
33820
|
+
up: up722,
|
|
33848
33821
|
artifacts: {
|
|
33849
33822
|
tables: ["ontology_proposals"],
|
|
33850
33823
|
columns: [
|
|
@@ -33858,7 +33831,7 @@ var MIGRATIONS2 = [
|
|
|
33858
33831
|
{
|
|
33859
33832
|
version: 68,
|
|
33860
33833
|
name: "daily-reflections",
|
|
33861
|
-
up:
|
|
33834
|
+
up: up732,
|
|
33862
33835
|
artifacts: {
|
|
33863
33836
|
tables: ["daily_reflections"]
|
|
33864
33837
|
}
|
|
@@ -33866,7 +33839,7 @@ var MIGRATIONS2 = [
|
|
|
33866
33839
|
{
|
|
33867
33840
|
version: 69,
|
|
33868
33841
|
name: "daily-reflections-multiple-insights",
|
|
33869
|
-
up:
|
|
33842
|
+
up: up742,
|
|
33870
33843
|
artifacts: {
|
|
33871
33844
|
tables: ["daily_reflections"]
|
|
33872
33845
|
}
|
|
@@ -33874,7 +33847,7 @@ var MIGRATIONS2 = [
|
|
|
33874
33847
|
{
|
|
33875
33848
|
version: 70,
|
|
33876
33849
|
name: "ontology-control-plane-state",
|
|
33877
|
-
up:
|
|
33850
|
+
up: up752,
|
|
33878
33851
|
artifacts: {
|
|
33879
33852
|
columns: [
|
|
33880
33853
|
{ table: "entities", column: "status" },
|
|
@@ -33889,7 +33862,7 @@ var MIGRATIONS2 = [
|
|
|
33889
33862
|
{
|
|
33890
33863
|
version: 71,
|
|
33891
33864
|
name: "epistemic-assertions",
|
|
33892
|
-
up:
|
|
33865
|
+
up: up762,
|
|
33893
33866
|
artifacts: {
|
|
33894
33867
|
tables: ["epistemic_assertions"]
|
|
33895
33868
|
}
|
|
@@ -33897,7 +33870,7 @@ var MIGRATIONS2 = [
|
|
|
33897
33870
|
{
|
|
33898
33871
|
version: 72,
|
|
33899
33872
|
name: "agent-scoped-idempotency-key",
|
|
33900
|
-
up:
|
|
33873
|
+
up: up772,
|
|
33901
33874
|
artifacts: {
|
|
33902
33875
|
columns: [
|
|
33903
33876
|
{ table: "memories", column: "idempotency_key" },
|
|
@@ -33908,7 +33881,7 @@ var MIGRATIONS2 = [
|
|
|
33908
33881
|
{
|
|
33909
33882
|
version: 73,
|
|
33910
33883
|
name: "recall-context-dedupe",
|
|
33911
|
-
up:
|
|
33884
|
+
up: up782,
|
|
33912
33885
|
artifacts: {
|
|
33913
33886
|
tables: ["session_context_epochs", "session_recall_events"]
|
|
33914
33887
|
}
|
|
@@ -33916,7 +33889,7 @@ var MIGRATIONS2 = [
|
|
|
33916
33889
|
{
|
|
33917
33890
|
version: 74,
|
|
33918
33891
|
name: "aggregate-memory-links",
|
|
33919
|
-
up:
|
|
33892
|
+
up: up792,
|
|
33920
33893
|
artifacts: {
|
|
33921
33894
|
tables: ["aggregate_memory_sources"]
|
|
33922
33895
|
}
|
|
@@ -33924,7 +33897,7 @@ var MIGRATIONS2 = [
|
|
|
33924
33897
|
{
|
|
33925
33898
|
version: 75,
|
|
33926
33899
|
name: "memory-artifact-source-provenance",
|
|
33927
|
-
up:
|
|
33900
|
+
up: up802,
|
|
33928
33901
|
artifacts: {
|
|
33929
33902
|
columns: [
|
|
33930
33903
|
{ table: "memory_artifacts", column: "source_id" },
|
|
@@ -33938,7 +33911,7 @@ var MIGRATIONS2 = [
|
|
|
33938
33911
|
{
|
|
33939
33912
|
version: 76,
|
|
33940
33913
|
name: "temporal-edges",
|
|
33941
|
-
up:
|
|
33914
|
+
up: up812,
|
|
33942
33915
|
artifacts: {
|
|
33943
33916
|
tables: ["temporal_edges"]
|
|
33944
33917
|
}
|
|
@@ -33946,7 +33919,7 @@ var MIGRATIONS2 = [
|
|
|
33946
33919
|
{
|
|
33947
33920
|
version: 77,
|
|
33948
33921
|
name: "entity-aliases",
|
|
33949
|
-
up:
|
|
33922
|
+
up: up822,
|
|
33950
33923
|
artifacts: {
|
|
33951
33924
|
tables: ["entity_aliases"]
|
|
33952
33925
|
}
|
|
@@ -33954,7 +33927,7 @@ var MIGRATIONS2 = [
|
|
|
33954
33927
|
{
|
|
33955
33928
|
version: 78,
|
|
33956
33929
|
name: "api-keys",
|
|
33957
|
-
up:
|
|
33930
|
+
up: up832,
|
|
33958
33931
|
artifacts: {
|
|
33959
33932
|
tables: ["api_keys"]
|
|
33960
33933
|
}
|
|
@@ -33962,7 +33935,7 @@ var MIGRATIONS2 = [
|
|
|
33962
33935
|
{
|
|
33963
33936
|
version: 79,
|
|
33964
33937
|
name: "transcript-capture-jobs",
|
|
33965
|
-
up:
|
|
33938
|
+
up: up842,
|
|
33966
33939
|
artifacts: {
|
|
33967
33940
|
tables: ["transcript_capture_jobs"]
|
|
33968
33941
|
}
|
|
@@ -33970,7 +33943,7 @@ var MIGRATIONS2 = [
|
|
|
33970
33943
|
{
|
|
33971
33944
|
version: 80,
|
|
33972
33945
|
name: "document-scope-columns",
|
|
33973
|
-
up:
|
|
33946
|
+
up: up852,
|
|
33974
33947
|
artifacts: {
|
|
33975
33948
|
columns: [
|
|
33976
33949
|
{ table: "documents", column: "agent_id" },
|
|
@@ -33981,7 +33954,7 @@ var MIGRATIONS2 = [
|
|
|
33981
33954
|
{
|
|
33982
33955
|
version: 81,
|
|
33983
33956
|
name: "aggregate-evidence-sources",
|
|
33984
|
-
up:
|
|
33957
|
+
up: up862,
|
|
33985
33958
|
artifacts: {
|
|
33986
33959
|
tables: ["aggregate_evidence_sources"]
|
|
33987
33960
|
}
|
|
@@ -33989,7 +33962,7 @@ var MIGRATIONS2 = [
|
|
|
33989
33962
|
{
|
|
33990
33963
|
version: 82,
|
|
33991
33964
|
name: "skill-invocations-harness",
|
|
33992
|
-
up:
|
|
33965
|
+
up: up872,
|
|
33993
33966
|
artifacts: {
|
|
33994
33967
|
columns: [
|
|
33995
33968
|
{ table: "skill_invocations", column: "harness" },
|
|
@@ -34000,7 +33973,7 @@ var MIGRATIONS2 = [
|
|
|
34000
33973
|
{
|
|
34001
33974
|
version: 83,
|
|
34002
33975
|
name: "memory-lifecycle-repair",
|
|
34003
|
-
up:
|
|
33976
|
+
up: up882,
|
|
34004
33977
|
artifacts: {
|
|
34005
33978
|
tables: ["transcript_capture_jobs", "aggregate_evidence_sources", "entity_dependencies"],
|
|
34006
33979
|
columns: [
|
|
@@ -34015,7 +33988,7 @@ var MIGRATIONS2 = [
|
|
|
34015
33988
|
{
|
|
34016
33989
|
version: 84,
|
|
34017
33990
|
name: "legacy-markdown-import-state",
|
|
34018
|
-
up:
|
|
33991
|
+
up: up892,
|
|
34019
33992
|
artifacts: {
|
|
34020
33993
|
tables: ["legacy_markdown_imports", "legacy_markdown_chunks"]
|
|
34021
33994
|
}
|
|
@@ -34023,7 +33996,7 @@ var MIGRATIONS2 = [
|
|
|
34023
33996
|
{
|
|
34024
33997
|
version: 85,
|
|
34025
33998
|
name: "backfill-relations-to-dependencies",
|
|
34026
|
-
up:
|
|
33999
|
+
up: up902,
|
|
34027
34000
|
artifacts: {
|
|
34028
34001
|
tables: ["entity_dependencies"]
|
|
34029
34002
|
}
|
|
@@ -34031,7 +34004,7 @@ var MIGRATIONS2 = [
|
|
|
34031
34004
|
{
|
|
34032
34005
|
version: 86,
|
|
34033
34006
|
name: "summary-jobs-content-hash",
|
|
34034
|
-
up:
|
|
34007
|
+
up: up912,
|
|
34035
34008
|
artifacts: {
|
|
34036
34009
|
columns: [{ table: "summary_jobs", column: "content_hash" }]
|
|
34037
34010
|
}
|
|
@@ -34039,7 +34012,7 @@ var MIGRATIONS2 = [
|
|
|
34039
34012
|
{
|
|
34040
34013
|
version: 87,
|
|
34041
34014
|
name: "summary-jobs-boundary-reason",
|
|
34042
|
-
up:
|
|
34015
|
+
up: up922,
|
|
34043
34016
|
artifacts: {
|
|
34044
34017
|
columns: [{ table: "summary_jobs", column: "boundary_reason" }]
|
|
34045
34018
|
}
|
|
@@ -34047,7 +34020,7 @@ var MIGRATIONS2 = [
|
|
|
34047
34020
|
{
|
|
34048
34021
|
version: 88,
|
|
34049
34022
|
name: "transcript-recovery-files",
|
|
34050
|
-
up:
|
|
34023
|
+
up: up932,
|
|
34051
34024
|
artifacts: {
|
|
34052
34025
|
tables: ["transcript_recovery_files"]
|
|
34053
34026
|
}
|
|
@@ -34055,7 +34028,7 @@ var MIGRATIONS2 = [
|
|
|
34055
34028
|
{
|
|
34056
34029
|
version: 89,
|
|
34057
34030
|
name: "job-cancellations",
|
|
34058
|
-
up:
|
|
34031
|
+
up: up942,
|
|
34059
34032
|
artifacts: {
|
|
34060
34033
|
tables: ["job_cancellations"]
|
|
34061
34034
|
}
|
|
@@ -34063,7 +34036,7 @@ var MIGRATIONS2 = [
|
|
|
34063
34036
|
{
|
|
34064
34037
|
version: 90,
|
|
34065
34038
|
name: "job-archive",
|
|
34066
|
-
up:
|
|
34039
|
+
up: up952,
|
|
34067
34040
|
artifacts: {
|
|
34068
34041
|
tables: ["job_archive"]
|
|
34069
34042
|
}
|
|
@@ -34071,25 +34044,25 @@ var MIGRATIONS2 = [
|
|
|
34071
34044
|
{
|
|
34072
34045
|
version: 91,
|
|
34073
34046
|
name: "embedding-index-generations",
|
|
34074
|
-
up:
|
|
34047
|
+
up: up962,
|
|
34075
34048
|
artifacts: { tables: ["embedding_index_state"] }
|
|
34076
34049
|
},
|
|
34077
34050
|
{
|
|
34078
34051
|
version: 92,
|
|
34079
34052
|
name: "embedding-staging-store",
|
|
34080
|
-
up:
|
|
34053
|
+
up: up972,
|
|
34081
34054
|
artifacts: { tables: ["embeddings_staging"] }
|
|
34082
34055
|
},
|
|
34083
34056
|
{
|
|
34084
34057
|
version: 93,
|
|
34085
34058
|
name: "dreaming-evidence-cursor",
|
|
34086
|
-
up:
|
|
34059
|
+
up: up982,
|
|
34087
34060
|
artifacts: { columns: [{ table: "dreaming_state", column: "evidence_cursor" }] }
|
|
34088
34061
|
},
|
|
34089
34062
|
{
|
|
34090
34063
|
version: 94,
|
|
34091
34064
|
name: "memory-kind",
|
|
34092
|
-
up:
|
|
34065
|
+
up: up992,
|
|
34093
34066
|
artifacts: {
|
|
34094
34067
|
columns: [
|
|
34095
34068
|
{ table: "memories", column: "memory_kind" },
|
|
@@ -34100,35 +34073,35 @@ var MIGRATIONS2 = [
|
|
|
34100
34073
|
{
|
|
34101
34074
|
version: 95,
|
|
34102
34075
|
name: "compaction-recall-projections",
|
|
34103
|
-
up:
|
|
34076
|
+
up: up1002
|
|
34104
34077
|
},
|
|
34105
34078
|
{
|
|
34106
34079
|
version: 96,
|
|
34107
34080
|
name: "retire-legacy-ingestion",
|
|
34108
|
-
up:
|
|
34081
|
+
up: up1012
|
|
34109
34082
|
},
|
|
34110
34083
|
{
|
|
34111
34084
|
version: 97,
|
|
34112
34085
|
name: "dreaming-failure-backoff",
|
|
34113
|
-
up:
|
|
34086
|
+
up: up1022,
|
|
34114
34087
|
artifacts: { columns: [{ table: "dreaming_state", column: "last_failure_at" }] }
|
|
34115
34088
|
},
|
|
34116
34089
|
{
|
|
34117
34090
|
version: 98,
|
|
34118
34091
|
name: "dreaming-evidence-exclusions",
|
|
34119
|
-
up:
|
|
34092
|
+
up: up1032,
|
|
34120
34093
|
artifacts: { tables: ["dreaming_evidence_exclusions"] }
|
|
34121
34094
|
},
|
|
34122
34095
|
{
|
|
34123
34096
|
version: 99,
|
|
34124
34097
|
name: "dreaming-tool-calls",
|
|
34125
|
-
up:
|
|
34098
|
+
up: up1042,
|
|
34126
34099
|
artifacts: { tables: ["dreaming_tool_calls"] }
|
|
34127
34100
|
},
|
|
34128
34101
|
{
|
|
34129
34102
|
version: 100,
|
|
34130
34103
|
name: "dreaming-runbook",
|
|
34131
|
-
up:
|
|
34104
|
+
up: up1052,
|
|
34132
34105
|
artifacts: {
|
|
34133
34106
|
columns: [
|
|
34134
34107
|
{ table: "dreaming_passes", column: "evidence_window_json" },
|
|
@@ -34139,23 +34112,23 @@ var MIGRATIONS2 = [
|
|
|
34139
34112
|
{
|
|
34140
34113
|
version: 101,
|
|
34141
34114
|
name: "dreaming-attention",
|
|
34142
|
-
up:
|
|
34115
|
+
up: up1062,
|
|
34143
34116
|
artifacts: { tables: ["dreaming_attention"] }
|
|
34144
34117
|
},
|
|
34145
34118
|
{
|
|
34146
34119
|
version: 102,
|
|
34147
34120
|
name: "attribute-semantic-memories",
|
|
34148
|
-
up:
|
|
34121
|
+
up: up1072
|
|
34149
34122
|
},
|
|
34150
34123
|
{
|
|
34151
34124
|
version: 103,
|
|
34152
34125
|
name: "semantic-memory-kind",
|
|
34153
|
-
up:
|
|
34126
|
+
up: up1082
|
|
34154
34127
|
},
|
|
34155
34128
|
{
|
|
34156
34129
|
version: 104,
|
|
34157
34130
|
name: "derived-memory-provenance",
|
|
34158
|
-
up:
|
|
34131
|
+
up: up1092,
|
|
34159
34132
|
artifacts: {
|
|
34160
34133
|
tables: ["derived_memory_sources"],
|
|
34161
34134
|
columns: [{ table: "memories", column: "stale_at" }]
|
|
@@ -34164,12 +34137,12 @@ var MIGRATIONS2 = [
|
|
|
34164
34137
|
{
|
|
34165
34138
|
version: 105,
|
|
34166
34139
|
name: "agent-scoped-entity-name",
|
|
34167
|
-
up:
|
|
34140
|
+
up: up1102
|
|
34168
34141
|
},
|
|
34169
34142
|
{
|
|
34170
34143
|
version: 106,
|
|
34171
34144
|
name: "memory-review-after",
|
|
34172
|
-
up:
|
|
34145
|
+
up: up1112,
|
|
34173
34146
|
artifacts: {
|
|
34174
34147
|
columns: [{ table: "memories", column: "review_after" }]
|
|
34175
34148
|
}
|
|
@@ -34177,7 +34150,7 @@ var MIGRATIONS2 = [
|
|
|
34177
34150
|
{
|
|
34178
34151
|
version: 107,
|
|
34179
34152
|
name: "dreaming-pass-usage",
|
|
34180
|
-
up:
|
|
34153
|
+
up: up1122,
|
|
34181
34154
|
artifacts: {
|
|
34182
34155
|
columns: [
|
|
34183
34156
|
{ table: "dreaming_passes", column: "tokens_input" },
|
|
@@ -34191,7 +34164,7 @@ var MIGRATIONS2 = [
|
|
|
34191
34164
|
{
|
|
34192
34165
|
version: 108,
|
|
34193
34166
|
name: "embedding-usage",
|
|
34194
|
-
up:
|
|
34167
|
+
up: up1132,
|
|
34195
34168
|
artifacts: {
|
|
34196
34169
|
tables: ["embedding_usage"]
|
|
34197
34170
|
}
|
|
@@ -34199,7 +34172,7 @@ var MIGRATIONS2 = [
|
|
|
34199
34172
|
{
|
|
34200
34173
|
version: 109,
|
|
34201
34174
|
name: "telemetry-install",
|
|
34202
|
-
up:
|
|
34175
|
+
up: up1142,
|
|
34203
34176
|
artifacts: {
|
|
34204
34177
|
tables: ["telemetry_install"]
|
|
34205
34178
|
}
|
|
@@ -34207,12 +34180,12 @@ var MIGRATIONS2 = [
|
|
|
34207
34180
|
{
|
|
34208
34181
|
version: 110,
|
|
34209
34182
|
name: "memory-mention-join-index",
|
|
34210
|
-
up:
|
|
34183
|
+
up: up1152
|
|
34211
34184
|
},
|
|
34212
34185
|
{
|
|
34213
34186
|
version: 111,
|
|
34214
34187
|
name: "telemetry-first-use",
|
|
34215
|
-
up:
|
|
34188
|
+
up: up1162,
|
|
34216
34189
|
artifacts: {
|
|
34217
34190
|
columns: [
|
|
34218
34191
|
{ table: "telemetry_install", column: "first_remember_at" },
|
|
@@ -34223,7 +34196,7 @@ var MIGRATIONS2 = [
|
|
|
34223
34196
|
{
|
|
34224
34197
|
version: 112,
|
|
34225
34198
|
name: "telemetry-queue-ownership",
|
|
34226
|
-
up:
|
|
34199
|
+
up: up1172,
|
|
34227
34200
|
artifacts: {
|
|
34228
34201
|
columns: [
|
|
34229
34202
|
{ table: "telemetry_events", column: "source" },
|
|
@@ -34235,7 +34208,7 @@ var MIGRATIONS2 = [
|
|
|
34235
34208
|
{
|
|
34236
34209
|
version: 113,
|
|
34237
34210
|
name: "session-claims",
|
|
34238
|
-
up:
|
|
34211
|
+
up: up1182,
|
|
34239
34212
|
artifacts: {
|
|
34240
34213
|
tables: ["session_claims"],
|
|
34241
34214
|
columns: [
|
|
@@ -34249,12 +34222,12 @@ var MIGRATIONS2 = [
|
|
|
34249
34222
|
{
|
|
34250
34223
|
version: 114,
|
|
34251
34224
|
name: "memory-traversal-hydration-index",
|
|
34252
|
-
up:
|
|
34225
|
+
up: up1192
|
|
34253
34226
|
},
|
|
34254
34227
|
{
|
|
34255
34228
|
version: 115,
|
|
34256
34229
|
name: "cross-agent-message-notifications",
|
|
34257
|
-
up:
|
|
34230
|
+
up: up1202,
|
|
34258
34231
|
artifacts: {
|
|
34259
34232
|
tables: ["cross_agent_messages", "cross_agent_message_receipts"]
|
|
34260
34233
|
}
|
|
@@ -34262,7 +34235,7 @@ var MIGRATIONS2 = [
|
|
|
34262
34235
|
{
|
|
34263
34236
|
version: 116,
|
|
34264
34237
|
name: "acp-delivery-reconciliation",
|
|
34265
|
-
up:
|
|
34238
|
+
up: up1212,
|
|
34266
34239
|
artifacts: {
|
|
34267
34240
|
columns: [
|
|
34268
34241
|
{ table: "cross_agent_messages", column: "delivery_state" },
|
|
@@ -34276,7 +34249,7 @@ var MIGRATIONS2 = [
|
|
|
34276
34249
|
{
|
|
34277
34250
|
version: 117,
|
|
34278
34251
|
name: "retire-summary-worker",
|
|
34279
|
-
up:
|
|
34252
|
+
up: up1222,
|
|
34280
34253
|
artifacts: {
|
|
34281
34254
|
columns: [
|
|
34282
34255
|
{ table: "session_transcripts", column: "completed_at" },
|
|
@@ -34287,24 +34260,24 @@ var MIGRATIONS2 = [
|
|
|
34287
34260
|
{
|
|
34288
34261
|
version: 118,
|
|
34289
34262
|
name: "queue-pressure-indices",
|
|
34290
|
-
up:
|
|
34263
|
+
up: up1232
|
|
34291
34264
|
},
|
|
34292
34265
|
{
|
|
34293
34266
|
version: 119,
|
|
34294
34267
|
name: "telemetry-version-observation",
|
|
34295
|
-
up:
|
|
34268
|
+
up: up1242,
|
|
34296
34269
|
artifacts: { columns: [{ table: "telemetry_install", column: "last_seen_version" }] }
|
|
34297
34270
|
},
|
|
34298
34271
|
{
|
|
34299
34272
|
version: 120,
|
|
34300
34273
|
name: "source-lifecycle-telemetry",
|
|
34301
|
-
up:
|
|
34274
|
+
up: up1252,
|
|
34302
34275
|
artifacts: { tables: ["source_lifecycle_state"] }
|
|
34303
34276
|
},
|
|
34304
34277
|
{
|
|
34305
34278
|
version: 121,
|
|
34306
34279
|
name: "telemetry-delivery-health",
|
|
34307
|
-
up:
|
|
34280
|
+
up: up1262,
|
|
34308
34281
|
artifacts: {
|
|
34309
34282
|
tables: ["telemetry_delivery_state"],
|
|
34310
34283
|
columns: [
|
|
@@ -34318,7 +34291,7 @@ var MIGRATIONS2 = [
|
|
|
34318
34291
|
{
|
|
34319
34292
|
version: 122,
|
|
34320
34293
|
name: "dreaming-evidence-retry",
|
|
34321
|
-
up:
|
|
34294
|
+
up: up1272,
|
|
34322
34295
|
artifacts: {
|
|
34323
34296
|
columns: [
|
|
34324
34297
|
{ table: "dreaming_evidence_exclusions", column: "failure_class" },
|
|
@@ -34331,13 +34304,13 @@ var MIGRATIONS2 = [
|
|
|
34331
34304
|
{
|
|
34332
34305
|
version: 123,
|
|
34333
34306
|
name: "embedding-index-failures",
|
|
34334
|
-
up:
|
|
34307
|
+
up: up1282,
|
|
34335
34308
|
artifacts: { tables: ["embedding_index_failures"] }
|
|
34336
34309
|
},
|
|
34337
34310
|
{
|
|
34338
34311
|
version: 124,
|
|
34339
34312
|
name: "import-derived-lifecycle",
|
|
34340
|
-
up:
|
|
34313
|
+
up: up1292,
|
|
34341
34314
|
artifacts: {
|
|
34342
34315
|
tables: ["imported_source_lifecycle"]
|
|
34343
34316
|
}
|
|
@@ -34345,77 +34318,77 @@ var MIGRATIONS2 = [
|
|
|
34345
34318
|
{
|
|
34346
34319
|
version: 125,
|
|
34347
34320
|
name: "memory-content-safety",
|
|
34348
|
-
up:
|
|
34321
|
+
up: up1302,
|
|
34349
34322
|
artifacts: { tables: ["memory_content_safety"] }
|
|
34350
34323
|
},
|
|
34351
34324
|
{
|
|
34352
34325
|
version: 126,
|
|
34353
34326
|
name: "dreaming-surprisal-attention",
|
|
34354
|
-
up:
|
|
34327
|
+
up: up1312,
|
|
34355
34328
|
artifacts: { tables: ["dreaming_attention"] }
|
|
34356
34329
|
},
|
|
34357
34330
|
{
|
|
34358
34331
|
version: 127,
|
|
34359
34332
|
name: "ontology-contradictions",
|
|
34360
|
-
up:
|
|
34333
|
+
up: up1322,
|
|
34361
34334
|
artifacts: { tables: ["ontology_contradictions"] }
|
|
34362
34335
|
},
|
|
34363
34336
|
{
|
|
34364
34337
|
version: 128,
|
|
34365
34338
|
name: "bounded-queue-diagnostics",
|
|
34366
|
-
up:
|
|
34339
|
+
up: up1332
|
|
34367
34340
|
},
|
|
34368
34341
|
{
|
|
34369
34342
|
version: 129,
|
|
34370
34343
|
name: "retire-structural-jobs",
|
|
34371
|
-
up:
|
|
34344
|
+
up: up1342
|
|
34372
34345
|
},
|
|
34373
34346
|
{
|
|
34374
34347
|
version: 130,
|
|
34375
34348
|
name: "embedding-repair-state",
|
|
34376
|
-
up:
|
|
34349
|
+
up: up1352,
|
|
34377
34350
|
artifacts: { tables: ["embedding_repair_budget", "embedding_repair_backoff"] }
|
|
34378
34351
|
},
|
|
34379
34352
|
{
|
|
34380
34353
|
version: 131,
|
|
34381
34354
|
name: "dreaming-evidence-consumption",
|
|
34382
|
-
up:
|
|
34355
|
+
up: up1362,
|
|
34383
34356
|
artifacts: { tables: ["dreaming_evidence_consumption"] }
|
|
34384
34357
|
},
|
|
34385
34358
|
{
|
|
34386
34359
|
version: 132,
|
|
34387
34360
|
name: "observer-scoped-epistemic-assertions",
|
|
34388
|
-
up:
|
|
34361
|
+
up: up1372,
|
|
34389
34362
|
artifacts: { tables: ["epistemic_assertions"] }
|
|
34390
34363
|
},
|
|
34391
34364
|
{
|
|
34392
34365
|
version: 133,
|
|
34393
34366
|
name: "dreaming-memory-head",
|
|
34394
|
-
up:
|
|
34367
|
+
up: up1382,
|
|
34395
34368
|
artifacts: { tables: ["memory_head_revisions", "memory_head_entries", "memory_head_revision_entries"] }
|
|
34396
34369
|
},
|
|
34397
34370
|
{
|
|
34398
34371
|
version: 134,
|
|
34399
34372
|
name: "scope-memory-head-entries",
|
|
34400
|
-
up:
|
|
34373
|
+
up: up1392,
|
|
34401
34374
|
artifacts: { tables: ["memory_head_entries"] }
|
|
34402
34375
|
},
|
|
34403
34376
|
{
|
|
34404
34377
|
version: 135,
|
|
34405
34378
|
name: "memory-head-publication",
|
|
34406
|
-
up:
|
|
34379
|
+
up: up1402,
|
|
34407
34380
|
artifacts: { tables: ["memory_head_publications"] }
|
|
34408
34381
|
},
|
|
34409
34382
|
{
|
|
34410
34383
|
version: 136,
|
|
34411
34384
|
name: "memory-head-revisions",
|
|
34412
|
-
up:
|
|
34385
|
+
up: up1412,
|
|
34413
34386
|
artifacts: { tables: ["memory_head_revisions"] }
|
|
34414
34387
|
},
|
|
34415
34388
|
{
|
|
34416
34389
|
version: 137,
|
|
34417
34390
|
name: "dreaming-head-manifest",
|
|
34418
|
-
up:
|
|
34391
|
+
up: up1422,
|
|
34419
34392
|
artifacts: {
|
|
34420
34393
|
columns: [
|
|
34421
34394
|
{ table: "dreaming_passes", column: "head_revision" },
|
|
@@ -34426,7 +34399,7 @@ var MIGRATIONS2 = [
|
|
|
34426
34399
|
{
|
|
34427
34400
|
version: 138,
|
|
34428
34401
|
name: "bounded-status-projections",
|
|
34429
|
-
up:
|
|
34402
|
+
up: up1432,
|
|
34430
34403
|
artifacts: {
|
|
34431
34404
|
tables: ["transcript_capture_status", "memories_duplicate_hash_counts", "memories_diagnostics_state"]
|
|
34432
34405
|
}
|
|
@@ -34434,31 +34407,31 @@ var MIGRATIONS2 = [
|
|
|
34434
34407
|
{
|
|
34435
34408
|
version: 139,
|
|
34436
34409
|
name: "native-source-sync-state",
|
|
34437
|
-
up:
|
|
34410
|
+
up: up1442,
|
|
34438
34411
|
artifacts: { tables: ["native_source_sync_state"] }
|
|
34439
34412
|
},
|
|
34440
34413
|
{
|
|
34441
34414
|
version: 140,
|
|
34442
34415
|
name: "transcript-recovery-frontier",
|
|
34443
|
-
up:
|
|
34416
|
+
up: up1452,
|
|
34444
34417
|
artifacts: { tables: ["transcript_recovery_frontiers"] }
|
|
34445
34418
|
},
|
|
34446
34419
|
{
|
|
34447
34420
|
version: 141,
|
|
34448
34421
|
name: "source-sync-checkpoints",
|
|
34449
|
-
up:
|
|
34422
|
+
up: up1462,
|
|
34450
34423
|
artifacts: { tables: ["source_sync_checkpoints"] }
|
|
34451
34424
|
},
|
|
34452
34425
|
{
|
|
34453
34426
|
version: 142,
|
|
34454
34427
|
name: "source-sync-frontier",
|
|
34455
|
-
up:
|
|
34428
|
+
up: up1472,
|
|
34456
34429
|
artifacts: { columns: [{ table: "source_sync_checkpoints", column: "frontier" }] }
|
|
34457
34430
|
},
|
|
34458
34431
|
{
|
|
34459
34432
|
version: 143,
|
|
34460
34433
|
name: "embedding-index-progress",
|
|
34461
|
-
up:
|
|
34434
|
+
up: up1482,
|
|
34462
34435
|
artifacts: {
|
|
34463
34436
|
columns: [
|
|
34464
34437
|
{ table: "embedding_index_state", column: "migration_phase" },
|
|
@@ -34474,19 +34447,19 @@ var MIGRATIONS2 = [
|
|
|
34474
34447
|
{
|
|
34475
34448
|
version: 144,
|
|
34476
34449
|
name: "memory-job-lease-token",
|
|
34477
|
-
up:
|
|
34450
|
+
up: up1492,
|
|
34478
34451
|
artifacts: { columns: [{ table: "memory_jobs", column: "lease_token" }] }
|
|
34479
34452
|
},
|
|
34480
34453
|
{
|
|
34481
34454
|
version: 145,
|
|
34482
34455
|
name: "dreaming-evidence-reviews",
|
|
34483
|
-
up:
|
|
34456
|
+
up: up1502,
|
|
34484
34457
|
artifacts: { tables: ["dreaming_evidence_reviews"] }
|
|
34485
34458
|
},
|
|
34486
34459
|
{
|
|
34487
34460
|
version: 146,
|
|
34488
34461
|
name: "source-transcript-import",
|
|
34489
|
-
up:
|
|
34462
|
+
up: up1512,
|
|
34490
34463
|
artifacts: {
|
|
34491
34464
|
tables: [
|
|
34492
34465
|
"source_import_jobs",
|
|
@@ -34505,19 +34478,19 @@ var MIGRATIONS2 = [
|
|
|
34505
34478
|
{
|
|
34506
34479
|
version: 147,
|
|
34507
34480
|
name: "source-import-replay-file-slots",
|
|
34508
|
-
up:
|
|
34481
|
+
up: up1522,
|
|
34509
34482
|
artifacts: { tables: ["source_import_files"] }
|
|
34510
34483
|
},
|
|
34511
34484
|
{
|
|
34512
34485
|
version: 148,
|
|
34513
34486
|
name: "source-import-attempt-provenance",
|
|
34514
|
-
up:
|
|
34487
|
+
up: up1532,
|
|
34515
34488
|
artifacts: { columns: [{ table: "source_import_record_attempts", column: "source_id" }] }
|
|
34516
34489
|
},
|
|
34517
34490
|
{
|
|
34518
34491
|
version: 149,
|
|
34519
34492
|
name: "transcript-import-state-machine",
|
|
34520
|
-
up:
|
|
34493
|
+
up: up1542,
|
|
34521
34494
|
artifacts: {
|
|
34522
34495
|
columns: [
|
|
34523
34496
|
{ table: "source_import_jobs", column: "duplicate_mode" },
|
|
@@ -34529,7 +34502,7 @@ var MIGRATIONS2 = [
|
|
|
34529
34502
|
{
|
|
34530
34503
|
version: 150,
|
|
34531
34504
|
name: "memory-head-freshness",
|
|
34532
|
-
up:
|
|
34505
|
+
up: up1552,
|
|
34533
34506
|
artifacts: {
|
|
34534
34507
|
columns: [
|
|
34535
34508
|
{ table: "memory_md_heads", column: "is_current" },
|
|
@@ -34540,7 +34513,7 @@ var MIGRATIONS2 = [
|
|
|
34540
34513
|
{
|
|
34541
34514
|
version: 151,
|
|
34542
34515
|
name: "transcript-import-bytes",
|
|
34543
|
-
up:
|
|
34516
|
+
up: up160,
|
|
34544
34517
|
artifacts: {
|
|
34545
34518
|
tables: [
|
|
34546
34519
|
"source_import_chunks",
|
|
@@ -34575,7 +34548,7 @@ var MIGRATIONS2 = [
|
|
|
34575
34548
|
{
|
|
34576
34549
|
version: 153,
|
|
34577
34550
|
name: "vector-repair-checkpoints",
|
|
34578
|
-
up:
|
|
34551
|
+
up: up1562,
|
|
34579
34552
|
artifacts: { tables: ["vector_repair_checkpoints"] }
|
|
34580
34553
|
},
|
|
34581
34554
|
{
|
|
@@ -34602,13 +34575,13 @@ var MIGRATIONS2 = [
|
|
|
34602
34575
|
{
|
|
34603
34576
|
version: 156,
|
|
34604
34577
|
name: "embedding-repair-checkpoints",
|
|
34605
|
-
up:
|
|
34578
|
+
up: up1572,
|
|
34606
34579
|
artifacts: { tables: ["embedding_repair_checkpoints"] }
|
|
34607
34580
|
},
|
|
34608
34581
|
{
|
|
34609
34582
|
version: 157,
|
|
34610
34583
|
name: "embedding-repair-progress",
|
|
34611
|
-
up:
|
|
34584
|
+
up: up1582,
|
|
34612
34585
|
artifacts: {
|
|
34613
34586
|
tables: ["embedding_repair_progress"],
|
|
34614
34587
|
columns: [{ table: "embedding_repair_checkpoints", column: "profile_fingerprint" }]
|
|
@@ -34617,8 +34590,13 @@ var MIGRATIONS2 = [
|
|
|
34617
34590
|
{
|
|
34618
34591
|
version: 158,
|
|
34619
34592
|
name: "dreaming-candidate-scan-index",
|
|
34620
|
-
up:
|
|
34593
|
+
up: up1592,
|
|
34621
34594
|
artifacts: { indexes: ["idx_memories_agent_kind"] }
|
|
34595
|
+
},
|
|
34596
|
+
{
|
|
34597
|
+
version: 159,
|
|
34598
|
+
name: "retire-obsolete-invocation-ledger",
|
|
34599
|
+
up: up510
|
|
34622
34600
|
}
|
|
34623
34601
|
];
|
|
34624
34602
|
var LATEST_SCHEMA_VERSION2 = MIGRATIONS2[MIGRATIONS2.length - 1]?.version ?? 0;
|