@signetai/connector-claude-code 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
|
@@ -10710,6 +10710,9 @@ function up4(db) {
|
|
|
10710
10710
|
WHERE resolved_at IS NULL;
|
|
10711
10711
|
`);
|
|
10712
10712
|
}
|
|
10713
|
+
function up5(db) {
|
|
10714
|
+
db.exec("DROP TABLE IF EXISTS mcp_invocations");
|
|
10715
|
+
}
|
|
10713
10716
|
var MEMORIES_FTS_TOKENIZER = "unicode61";
|
|
10714
10717
|
var FTS_STATE_TABLE = "memories_fts_state";
|
|
10715
10718
|
function normalizeSql(sql) {
|
|
@@ -10825,7 +10828,7 @@ function memoriesFtsNeedsTokenizerRepair(sql) {
|
|
|
10825
10828
|
return true;
|
|
10826
10829
|
return !normalized.includes(`tokenize='${MEMORIES_FTS_TOKENIZER}'`);
|
|
10827
10830
|
}
|
|
10828
|
-
function
|
|
10831
|
+
function up6(db) {
|
|
10829
10832
|
db.exec(`
|
|
10830
10833
|
CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
10831
10834
|
version INTEGER PRIMARY KEY,
|
|
@@ -10923,7 +10926,7 @@ function addColumnIfMissing2(db, table, column, definition) {
|
|
|
10923
10926
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
10924
10927
|
}
|
|
10925
10928
|
}
|
|
10926
|
-
function
|
|
10929
|
+
function up7(db) {
|
|
10927
10930
|
addColumnIfMissing2(db, "memories", "content_hash", "TEXT");
|
|
10928
10931
|
addColumnIfMissing2(db, "memories", "normalized_content", "TEXT");
|
|
10929
10932
|
addColumnIfMissing2(db, "memories", "is_deleted", "INTEGER DEFAULT 0");
|
|
@@ -11041,7 +11044,7 @@ function addColumnIfMissing3(db, table, column, definition) {
|
|
|
11041
11044
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11042
11045
|
return true;
|
|
11043
11046
|
}
|
|
11044
|
-
function
|
|
11047
|
+
function up8(db) {
|
|
11045
11048
|
addColumnIfMissing3(db, "memories", "why", "TEXT");
|
|
11046
11049
|
addColumnIfMissing3(db, "memories", "project", "TEXT");
|
|
11047
11050
|
db.exec(`DROP INDEX IF EXISTS idx_memories_content_hash`);
|
|
@@ -11078,7 +11081,7 @@ function addColumnIfMissing4(db, table, column, definition) {
|
|
|
11078
11081
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11079
11082
|
}
|
|
11080
11083
|
}
|
|
11081
|
-
function
|
|
11084
|
+
function up9(db) {
|
|
11082
11085
|
addColumnIfMissing4(db, "memory_history", "actor_type", "TEXT");
|
|
11083
11086
|
addColumnIfMissing4(db, "memory_history", "session_id", "TEXT");
|
|
11084
11087
|
addColumnIfMissing4(db, "memory_history", "request_id", "TEXT");
|
|
@@ -11111,7 +11114,7 @@ function addColumnIfMissing5(db, table, column, definition) {
|
|
|
11111
11114
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11112
11115
|
}
|
|
11113
11116
|
}
|
|
11114
|
-
function
|
|
11117
|
+
function up10(db) {
|
|
11115
11118
|
addColumnIfMissing5(db, "entities", "canonical_name", "TEXT");
|
|
11116
11119
|
addColumnIfMissing5(db, "entities", "mentions", "INTEGER DEFAULT 0");
|
|
11117
11120
|
addColumnIfMissing5(db, "entities", "embedding", "BLOB");
|
|
@@ -11128,7 +11131,7 @@ function hasColumn4(db, table, column) {
|
|
|
11128
11131
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
11129
11132
|
return rows.some((r2) => r2.name === column);
|
|
11130
11133
|
}
|
|
11131
|
-
function
|
|
11134
|
+
function up11(db) {
|
|
11132
11135
|
if (!hasColumn4(db, "memories", "idempotency_key")) {
|
|
11133
11136
|
db.exec("ALTER TABLE memories ADD COLUMN idempotency_key TEXT");
|
|
11134
11137
|
}
|
|
@@ -11143,7 +11146,7 @@ function hasColumn5(db, table, column) {
|
|
|
11143
11146
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
11144
11147
|
return rows.some((r2) => r2.name === column);
|
|
11145
11148
|
}
|
|
11146
|
-
function
|
|
11149
|
+
function up12(db) {
|
|
11147
11150
|
db.exec(`
|
|
11148
11151
|
CREATE TABLE IF NOT EXISTS documents (
|
|
11149
11152
|
id TEXT PRIMARY KEY,
|
|
@@ -11200,7 +11203,7 @@ function up11(db) {
|
|
|
11200
11203
|
db.exec("ALTER TABLE memory_jobs ADD COLUMN document_id TEXT");
|
|
11201
11204
|
}
|
|
11202
11205
|
}
|
|
11203
|
-
function
|
|
11206
|
+
function up13(db) {
|
|
11204
11207
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='embeddings'").all();
|
|
11205
11208
|
if (tables.length === 0)
|
|
11206
11209
|
return;
|
|
@@ -11217,7 +11220,7 @@ function up12(db) {
|
|
|
11217
11220
|
ON embeddings(content_hash)
|
|
11218
11221
|
`);
|
|
11219
11222
|
}
|
|
11220
|
-
function
|
|
11223
|
+
function up14(db) {
|
|
11221
11224
|
db.exec(`
|
|
11222
11225
|
CREATE TABLE IF NOT EXISTS summary_jobs (
|
|
11223
11226
|
id TEXT PRIMARY KEY,
|
|
@@ -11237,7 +11240,7 @@ function up13(db) {
|
|
|
11237
11240
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_summary_jobs_status
|
|
11238
11241
|
ON summary_jobs(status)`);
|
|
11239
11242
|
}
|
|
11240
|
-
function
|
|
11243
|
+
function up15(db) {
|
|
11241
11244
|
db.exec(`
|
|
11242
11245
|
CREATE TABLE IF NOT EXISTS umap_cache (
|
|
11243
11246
|
id INTEGER PRIMARY KEY,
|
|
@@ -11248,7 +11251,7 @@ function up14(db) {
|
|
|
11248
11251
|
)
|
|
11249
11252
|
`);
|
|
11250
11253
|
}
|
|
11251
|
-
function
|
|
11254
|
+
function up16(db) {
|
|
11252
11255
|
db.exec(`
|
|
11253
11256
|
CREATE TABLE IF NOT EXISTS session_scores (
|
|
11254
11257
|
id TEXT PRIMARY KEY,
|
|
@@ -11268,7 +11271,7 @@ function up15(db) {
|
|
|
11268
11271
|
ON session_scores(session_key);
|
|
11269
11272
|
`);
|
|
11270
11273
|
}
|
|
11271
|
-
function
|
|
11274
|
+
function up17(db) {
|
|
11272
11275
|
db.exec(`
|
|
11273
11276
|
CREATE TABLE IF NOT EXISTS scheduled_tasks (
|
|
11274
11277
|
id TEXT PRIMARY KEY,
|
|
@@ -11309,7 +11312,7 @@ function addColumnIfMissing6(db, table, column, definition) {
|
|
|
11309
11312
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11310
11313
|
}
|
|
11311
11314
|
}
|
|
11312
|
-
function
|
|
11315
|
+
function up18(db) {
|
|
11313
11316
|
db.exec(`
|
|
11314
11317
|
CREATE TABLE IF NOT EXISTS ingestion_jobs (
|
|
11315
11318
|
id TEXT PRIMARY KEY,
|
|
@@ -11335,7 +11338,7 @@ function up17(db) {
|
|
|
11335
11338
|
addColumnIfMissing6(db, "memories", "source_path", "TEXT");
|
|
11336
11339
|
addColumnIfMissing6(db, "memories", "source_section", "TEXT");
|
|
11337
11340
|
}
|
|
11338
|
-
function
|
|
11341
|
+
function up19(db) {
|
|
11339
11342
|
db.exec(`
|
|
11340
11343
|
CREATE TABLE IF NOT EXISTS telemetry_events (
|
|
11341
11344
|
id TEXT PRIMARY KEY,
|
|
@@ -11360,7 +11363,7 @@ function addColumnIfMissing7(db, table, column, definition) {
|
|
|
11360
11363
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11361
11364
|
}
|
|
11362
11365
|
}
|
|
11363
|
-
function
|
|
11366
|
+
function up20(db) {
|
|
11364
11367
|
db.exec(`
|
|
11365
11368
|
CREATE TABLE IF NOT EXISTS session_memories (
|
|
11366
11369
|
id TEXT PRIMARY KEY,
|
|
@@ -11387,7 +11390,7 @@ function up19(db) {
|
|
|
11387
11390
|
addColumnIfMissing7(db, "session_scores", "confidence", "REAL");
|
|
11388
11391
|
addColumnIfMissing7(db, "session_scores", "continuity_reasoning", "TEXT");
|
|
11389
11392
|
}
|
|
11390
|
-
function
|
|
11393
|
+
function up21(db) {
|
|
11391
11394
|
db.exec(`
|
|
11392
11395
|
CREATE TABLE IF NOT EXISTS session_checkpoints (
|
|
11393
11396
|
id TEXT PRIMARY KEY,
|
|
@@ -11409,7 +11412,7 @@ function up20(db) {
|
|
|
11409
11412
|
ON session_checkpoints(project_normalized, created_at DESC);
|
|
11410
11413
|
`);
|
|
11411
11414
|
}
|
|
11412
|
-
function
|
|
11415
|
+
function up22(db) {
|
|
11413
11416
|
const cols = db.prepare("PRAGMA table_info(scheduled_tasks)").all();
|
|
11414
11417
|
const colNames = new Set(cols.flatMap((c2) => typeof c2.name === "string" ? [c2.name] : []));
|
|
11415
11418
|
if (!colNames.has("skill_name")) {
|
|
@@ -11420,7 +11423,7 @@ function up21(db) {
|
|
|
11420
11423
|
CHECK (skill_mode IN ('inject', 'slash') OR skill_mode IS NULL)`);
|
|
11421
11424
|
}
|
|
11422
11425
|
}
|
|
11423
|
-
function
|
|
11426
|
+
function up23(db) {
|
|
11424
11427
|
const existing = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='skill_meta'").get();
|
|
11425
11428
|
if (existing)
|
|
11426
11429
|
return;
|
|
@@ -11452,7 +11455,7 @@ function up22(db) {
|
|
|
11452
11455
|
CREATE INDEX idx_skill_meta_source ON skill_meta(source);
|
|
11453
11456
|
`);
|
|
11454
11457
|
}
|
|
11455
|
-
function
|
|
11458
|
+
function up24(db) {
|
|
11456
11459
|
const entityCols = db.prepare("PRAGMA table_info(entities)").all();
|
|
11457
11460
|
const entityColNames = new Set(entityCols.flatMap((c2) => typeof c2.name === "string" ? [c2.name] : []));
|
|
11458
11461
|
if (!entityColNames.has("agent_id")) {
|
|
@@ -11537,13 +11540,13 @@ function addColumnIfMissing8(db, table, column, definition) {
|
|
|
11537
11540
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11538
11541
|
}
|
|
11539
11542
|
}
|
|
11540
|
-
function
|
|
11543
|
+
function up25(db) {
|
|
11541
11544
|
addColumnIfMissing8(db, "session_memories", "entity_slot", "INTEGER");
|
|
11542
11545
|
addColumnIfMissing8(db, "session_memories", "aspect_slot", "INTEGER");
|
|
11543
11546
|
addColumnIfMissing8(db, "session_memories", "is_constraint", "INTEGER NOT NULL DEFAULT 0");
|
|
11544
11547
|
addColumnIfMissing8(db, "session_memories", "structural_density", "INTEGER");
|
|
11545
11548
|
}
|
|
11546
|
-
function
|
|
11549
|
+
function up26(db) {
|
|
11547
11550
|
const columns = db.prepare("PRAGMA table_info(session_checkpoints)").all();
|
|
11548
11551
|
const columnNames = new Set(columns.flatMap((column) => typeof column.name === "string" ? [column.name] : []));
|
|
11549
11552
|
if (!columnNames.has("focal_entity_ids")) {
|
|
@@ -11568,25 +11571,25 @@ function addColumnIfMissing9(db, table, column, definition) {
|
|
|
11568
11571
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11569
11572
|
}
|
|
11570
11573
|
}
|
|
11571
|
-
function
|
|
11574
|
+
function up27(db) {
|
|
11572
11575
|
addColumnIfMissing9(db, "entities", "pinned", "INTEGER NOT NULL DEFAULT 0");
|
|
11573
11576
|
addColumnIfMissing9(db, "entities", "pinned_at", "TEXT");
|
|
11574
11577
|
db.exec("CREATE INDEX IF NOT EXISTS idx_entities_pinned ON entities(agent_id, pinned, pinned_at DESC)");
|
|
11575
11578
|
}
|
|
11576
|
-
function up27(_db) {}
|
|
11577
11579
|
function up28(_db) {}
|
|
11580
|
+
function up29(_db) {}
|
|
11578
11581
|
function addColumnIfMissing10(db, table, column, definition) {
|
|
11579
11582
|
const cols = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
11580
11583
|
if (!cols.some((c2) => c2.name === column)) {
|
|
11581
11584
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11582
11585
|
}
|
|
11583
11586
|
}
|
|
11584
|
-
function
|
|
11587
|
+
function up30(db) {
|
|
11585
11588
|
addColumnIfMissing10(db, "session_memories", "agent_relevance_score", "REAL");
|
|
11586
11589
|
addColumnIfMissing10(db, "session_memories", "agent_feedback_count", "INTEGER DEFAULT 0");
|
|
11587
11590
|
}
|
|
11588
|
-
function
|
|
11589
|
-
function
|
|
11591
|
+
function up31(_db) {}
|
|
11592
|
+
function up32(db) {
|
|
11590
11593
|
db.exec(`
|
|
11591
11594
|
UPDATE entities
|
|
11592
11595
|
SET canonical_name = REPLACE(REPLACE(REPLACE(
|
|
@@ -11595,7 +11598,7 @@ function up31(db) {
|
|
|
11595
11598
|
WHERE canonical_name IS NULL
|
|
11596
11599
|
`);
|
|
11597
11600
|
}
|
|
11598
|
-
function
|
|
11601
|
+
function up33(db) {
|
|
11599
11602
|
db.exec(`
|
|
11600
11603
|
CREATE TABLE IF NOT EXISTS memories_cold (
|
|
11601
11604
|
archive_id TEXT PRIMARY KEY,
|
|
@@ -11632,7 +11635,7 @@ function up32(db) {
|
|
|
11632
11635
|
CREATE INDEX IF NOT EXISTS idx_cold_source ON memories_cold(cold_source_id);
|
|
11633
11636
|
`);
|
|
11634
11637
|
}
|
|
11635
|
-
function
|
|
11638
|
+
function up34(db) {
|
|
11636
11639
|
db.exec(`
|
|
11637
11640
|
CREATE TABLE IF NOT EXISTS session_summaries (
|
|
11638
11641
|
id TEXT PRIMARY KEY,
|
|
@@ -11677,7 +11680,7 @@ function up33(db) {
|
|
|
11677
11680
|
WHERE session_key IS NOT NULL;
|
|
11678
11681
|
`);
|
|
11679
11682
|
}
|
|
11680
|
-
function
|
|
11683
|
+
function up35(db) {
|
|
11681
11684
|
db.exec(`
|
|
11682
11685
|
CREATE TABLE IF NOT EXISTS memory_jobs_new (
|
|
11683
11686
|
id TEXT PRIMARY KEY,
|
|
@@ -11722,7 +11725,7 @@ function up34(db) {
|
|
|
11722
11725
|
ON memory_jobs(failed_at);
|
|
11723
11726
|
`);
|
|
11724
11727
|
}
|
|
11725
|
-
function
|
|
11728
|
+
function up36(db) {
|
|
11726
11729
|
const depCols = db.prepare("PRAGMA table_info(entity_dependencies)").all();
|
|
11727
11730
|
if (!depCols.some((c2) => c2.name === "reason")) {
|
|
11728
11731
|
db.exec("ALTER TABLE entity_dependencies ADD COLUMN reason TEXT");
|
|
@@ -11732,7 +11735,7 @@ function up35(db) {
|
|
|
11732
11735
|
db.exec("ALTER TABLE entities ADD COLUMN last_synthesized_at TEXT");
|
|
11733
11736
|
}
|
|
11734
11737
|
}
|
|
11735
|
-
function
|
|
11738
|
+
function up37(db) {
|
|
11736
11739
|
const cols = db.prepare("PRAGMA table_info(embeddings)").all();
|
|
11737
11740
|
if (cols.length === 0)
|
|
11738
11741
|
return;
|
|
@@ -11740,14 +11743,14 @@ function up36(db) {
|
|
|
11740
11743
|
db.exec("ALTER TABLE embeddings ADD COLUMN vector BLOB");
|
|
11741
11744
|
}
|
|
11742
11745
|
}
|
|
11743
|
-
function
|
|
11746
|
+
function up38(db) {
|
|
11744
11747
|
const cols = db.prepare("PRAGMA table_info(memories)").all();
|
|
11745
11748
|
if (!cols.some((c2) => c2.name === "scope")) {
|
|
11746
11749
|
db.exec("ALTER TABLE memories ADD COLUMN scope TEXT DEFAULT NULL");
|
|
11747
11750
|
}
|
|
11748
11751
|
db.exec("CREATE INDEX IF NOT EXISTS idx_memories_scope ON memories(scope) WHERE scope IS NOT NULL");
|
|
11749
11752
|
}
|
|
11750
|
-
function
|
|
11753
|
+
function up39(db) {
|
|
11751
11754
|
db.exec("DROP INDEX IF EXISTS idx_memories_content_hash_unique");
|
|
11752
11755
|
db.exec(`
|
|
11753
11756
|
CREATE UNIQUE INDEX idx_memories_content_hash_unique
|
|
@@ -11755,7 +11758,7 @@ function up38(db) {
|
|
|
11755
11758
|
WHERE content_hash IS NOT NULL AND is_deleted = 0
|
|
11756
11759
|
`);
|
|
11757
11760
|
}
|
|
11758
|
-
function
|
|
11761
|
+
function up40(db) {
|
|
11759
11762
|
db.exec(`
|
|
11760
11763
|
CREATE VIRTUAL TABLE IF NOT EXISTS entities_fts USING fts5(
|
|
11761
11764
|
name, canonical_name,
|
|
@@ -11787,13 +11790,13 @@ function up39(db) {
|
|
|
11787
11790
|
END
|
|
11788
11791
|
`);
|
|
11789
11792
|
}
|
|
11790
|
-
function
|
|
11793
|
+
function up41(db) {
|
|
11791
11794
|
const cols = db.prepare("PRAGMA table_info(entity_dependencies)").all();
|
|
11792
11795
|
if (!cols.some((c2) => c2.name === "confidence")) {
|
|
11793
11796
|
db.exec("ALTER TABLE entity_dependencies ADD COLUMN confidence REAL DEFAULT 0.7");
|
|
11794
11797
|
}
|
|
11795
11798
|
}
|
|
11796
|
-
function
|
|
11799
|
+
function up42(db) {
|
|
11797
11800
|
db.exec(`
|
|
11798
11801
|
CREATE TABLE IF NOT EXISTS entity_communities (
|
|
11799
11802
|
id TEXT PRIMARY KEY,
|
|
@@ -11811,7 +11814,7 @@ function up41(db) {
|
|
|
11811
11814
|
db.exec("ALTER TABLE entities ADD COLUMN community_id TEXT REFERENCES entity_communities(id)");
|
|
11812
11815
|
}
|
|
11813
11816
|
}
|
|
11814
|
-
function
|
|
11817
|
+
function up43(db) {
|
|
11815
11818
|
db.exec(`
|
|
11816
11819
|
CREATE TABLE IF NOT EXISTS memory_hints (
|
|
11817
11820
|
id TEXT PRIMARY KEY,
|
|
@@ -11851,7 +11854,7 @@ function up42(db) {
|
|
|
11851
11854
|
END
|
|
11852
11855
|
`);
|
|
11853
11856
|
}
|
|
11854
|
-
function
|
|
11857
|
+
function up44(db) {
|
|
11855
11858
|
db.exec(`
|
|
11856
11859
|
DELETE FROM entity_dependencies
|
|
11857
11860
|
WHERE id NOT IN (
|
|
@@ -11869,7 +11872,7 @@ function up43(db) {
|
|
|
11869
11872
|
)
|
|
11870
11873
|
`);
|
|
11871
11874
|
}
|
|
11872
|
-
function
|
|
11875
|
+
function up45(db) {
|
|
11873
11876
|
db.exec(`
|
|
11874
11877
|
CREATE TABLE IF NOT EXISTS session_transcripts (
|
|
11875
11878
|
session_key TEXT PRIMARY KEY,
|
|
@@ -11892,7 +11895,7 @@ function addColumnIfMissing11(db, table, column, definition) {
|
|
|
11892
11895
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11893
11896
|
}
|
|
11894
11897
|
}
|
|
11895
|
-
function
|
|
11898
|
+
function up46(db) {
|
|
11896
11899
|
addColumnIfMissing11(db, "session_memories", "path_json", "TEXT");
|
|
11897
11900
|
db.exec(`
|
|
11898
11901
|
CREATE TABLE IF NOT EXISTS path_feedback_events (
|
|
@@ -11967,7 +11970,7 @@ function addColumnIfMissing12(db, table, column, definition) {
|
|
|
11967
11970
|
return;
|
|
11968
11971
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11969
11972
|
}
|
|
11970
|
-
function
|
|
11973
|
+
function up47(db) {
|
|
11971
11974
|
addColumnIfMissing12(db, "session_memories", "entity_slot", "INTEGER");
|
|
11972
11975
|
addColumnIfMissing12(db, "session_memories", "aspect_slot", "INTEGER");
|
|
11973
11976
|
addColumnIfMissing12(db, "session_memories", "is_constraint", "INTEGER NOT NULL DEFAULT 0");
|
|
@@ -12055,7 +12058,7 @@ function addColumnIfMissing13(db, table, column, definition) {
|
|
|
12055
12058
|
return;
|
|
12056
12059
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12057
12060
|
}
|
|
12058
|
-
function
|
|
12061
|
+
function up48(db) {
|
|
12059
12062
|
db.exec(`
|
|
12060
12063
|
CREATE TABLE IF NOT EXISTS agents (
|
|
12061
12064
|
id TEXT PRIMARY KEY,
|
|
@@ -12084,7 +12087,7 @@ function addColumnIfMissing14(db, table, column, definition) {
|
|
|
12084
12087
|
return;
|
|
12085
12088
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12086
12089
|
}
|
|
12087
|
-
function
|
|
12090
|
+
function up49(db) {
|
|
12088
12091
|
addColumnIfMissing14(db, "session_summaries", "source_type", "TEXT");
|
|
12089
12092
|
addColumnIfMissing14(db, "session_summaries", "source_ref", "TEXT");
|
|
12090
12093
|
addColumnIfMissing14(db, "session_summaries", "meta_json", "TEXT");
|
|
@@ -12110,7 +12113,7 @@ function addColumnIfMissing15(db, table, column, definition) {
|
|
|
12110
12113
|
return;
|
|
12111
12114
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12112
12115
|
}
|
|
12113
|
-
function
|
|
12116
|
+
function up50(db) {
|
|
12114
12117
|
addColumnIfMissing15(db, "session_transcripts", "updated_at", "TEXT");
|
|
12115
12118
|
addColumnIfMissing15(db, "summary_jobs", "agent_id", "TEXT NOT NULL DEFAULT 'default'");
|
|
12116
12119
|
addColumnIfMissing15(db, "session_scores", "agent_id", "TEXT NOT NULL DEFAULT 'default'");
|
|
@@ -12181,7 +12184,7 @@ function up49(db) {
|
|
|
12181
12184
|
ON memory_md_heads(lease_expires_at);
|
|
12182
12185
|
`);
|
|
12183
12186
|
}
|
|
12184
|
-
function
|
|
12187
|
+
function up51(db) {
|
|
12185
12188
|
db.exec(`
|
|
12186
12189
|
DROP INDEX IF EXISTS idx_summaries_session_depth;
|
|
12187
12190
|
|
|
@@ -12242,7 +12245,7 @@ function up50(db) {
|
|
|
12242
12245
|
AND COALESCE(source_type, 'summary') = 'summary';
|
|
12243
12246
|
`);
|
|
12244
12247
|
}
|
|
12245
|
-
function
|
|
12248
|
+
function up52(db) {
|
|
12246
12249
|
db.exec(`
|
|
12247
12250
|
DROP TRIGGER IF EXISTS session_transcripts_fts_ai;
|
|
12248
12251
|
DROP TRIGGER IF EXISTS session_transcripts_fts_ad;
|
|
@@ -12340,7 +12343,7 @@ function up51(db) {
|
|
|
12340
12343
|
AND COALESCE(source_type, 'summary') = 'summary';
|
|
12341
12344
|
`);
|
|
12342
12345
|
}
|
|
12343
|
-
function
|
|
12346
|
+
function up53(db) {
|
|
12344
12347
|
db.exec(`
|
|
12345
12348
|
CREATE TABLE IF NOT EXISTS memory_thread_heads (
|
|
12346
12349
|
agent_id TEXT NOT NULL DEFAULT 'default',
|
|
@@ -12458,7 +12461,7 @@ function up52(db) {
|
|
|
12458
12461
|
WHERE excluded.latest_at >= memory_thread_heads.latest_at;
|
|
12459
12462
|
`);
|
|
12460
12463
|
}
|
|
12461
|
-
function
|
|
12464
|
+
function up54(db) {
|
|
12462
12465
|
db.exec(`
|
|
12463
12466
|
CREATE TABLE IF NOT EXISTS session_extract_cursors (
|
|
12464
12467
|
session_key TEXT NOT NULL,
|
|
@@ -12475,7 +12478,7 @@ function hasTable(db, name) {
|
|
|
12475
12478
|
WHERE type = 'table' AND name = ?
|
|
12476
12479
|
LIMIT 1`).get(name) !== undefined;
|
|
12477
12480
|
}
|
|
12478
|
-
function
|
|
12481
|
+
function up55(db) {
|
|
12479
12482
|
db.exec(`
|
|
12480
12483
|
CREATE TABLE IF NOT EXISTS entity_dependency_history (
|
|
12481
12484
|
id TEXT PRIMARY KEY,
|
|
@@ -12645,7 +12648,7 @@ function addColumnIfMissing16(db, table, column, definition) {
|
|
|
12645
12648
|
return;
|
|
12646
12649
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12647
12650
|
}
|
|
12648
|
-
function
|
|
12651
|
+
function up56(db) {
|
|
12649
12652
|
addColumnIfMissing16(db, "summary_jobs", "session_id", "TEXT");
|
|
12650
12653
|
addColumnIfMissing16(db, "summary_jobs", "trigger", "TEXT NOT NULL DEFAULT 'session_end'");
|
|
12651
12654
|
addColumnIfMissing16(db, "summary_jobs", "captured_at", "TEXT");
|
|
@@ -12737,24 +12740,8 @@ function up55(db) {
|
|
|
12737
12740
|
VALUES ('rebuild');
|
|
12738
12741
|
`);
|
|
12739
12742
|
}
|
|
12740
|
-
function
|
|
12741
|
-
|
|
12742
|
-
CREATE TABLE IF NOT EXISTS mcp_invocations (
|
|
12743
|
-
id TEXT PRIMARY KEY,
|
|
12744
|
-
server_id TEXT NOT NULL,
|
|
12745
|
-
tool_name TEXT NOT NULL,
|
|
12746
|
-
agent_id TEXT NOT NULL DEFAULT 'default',
|
|
12747
|
-
source TEXT NOT NULL CHECK(source IN ('cli','agent','mcp','dashboard')),
|
|
12748
|
-
latency_ms INTEGER NOT NULL,
|
|
12749
|
-
success INTEGER NOT NULL DEFAULT 1,
|
|
12750
|
-
error_text TEXT,
|
|
12751
|
-
created_at TEXT NOT NULL DEFAULT (datetime('now'))
|
|
12752
|
-
);
|
|
12753
|
-
CREATE INDEX IF NOT EXISTS idx_mcp_inv_server ON mcp_invocations(server_id, created_at);
|
|
12754
|
-
CREATE INDEX IF NOT EXISTS idx_mcp_inv_agent ON mcp_invocations(agent_id, created_at);
|
|
12755
|
-
`);
|
|
12756
|
-
}
|
|
12757
|
-
function up57(db) {
|
|
12743
|
+
function up57(_db) {}
|
|
12744
|
+
function up58(db) {
|
|
12758
12745
|
db.exec(`
|
|
12759
12746
|
CREATE TABLE IF NOT EXISTS skill_invocations (
|
|
12760
12747
|
id TEXT PRIMARY KEY,
|
|
@@ -12770,7 +12757,7 @@ function up57(db) {
|
|
|
12770
12757
|
CREATE INDEX IF NOT EXISTS idx_skill_inv_agent ON skill_invocations(agent_id, created_at);
|
|
12771
12758
|
`);
|
|
12772
12759
|
}
|
|
12773
|
-
function
|
|
12760
|
+
function up59(db) {
|
|
12774
12761
|
db.exec(`
|
|
12775
12762
|
CREATE TABLE IF NOT EXISTS task_scope_hints (
|
|
12776
12763
|
task_id TEXT PRIMARY KEY REFERENCES scheduled_tasks(id) ON DELETE CASCADE,
|
|
@@ -12801,7 +12788,7 @@ function up58(db) {
|
|
|
12801
12788
|
ON task_scope_hints(agent_id, updated_at);
|
|
12802
12789
|
`);
|
|
12803
12790
|
}
|
|
12804
|
-
function
|
|
12791
|
+
function up60(db) {
|
|
12805
12792
|
db.exec(`
|
|
12806
12793
|
CREATE TABLE IF NOT EXISTS dreaming_state (
|
|
12807
12794
|
agent_id TEXT PRIMARY KEY NOT NULL,
|
|
@@ -12844,7 +12831,7 @@ function ensureMemoriesScopeColumns(db) {
|
|
|
12844
12831
|
if (!names.has("scope"))
|
|
12845
12832
|
db.exec("ALTER TABLE memories ADD COLUMN scope TEXT");
|
|
12846
12833
|
}
|
|
12847
|
-
function
|
|
12834
|
+
function up61(db) {
|
|
12848
12835
|
ensureMemoriesScopeColumns(db);
|
|
12849
12836
|
db.exec("DROP INDEX IF EXISTS idx_memories_content_hash_unique");
|
|
12850
12837
|
db.exec(`
|
|
@@ -12857,20 +12844,20 @@ function up60(db) {
|
|
|
12857
12844
|
WHERE content_hash IS NOT NULL AND is_deleted = 0
|
|
12858
12845
|
`);
|
|
12859
12846
|
}
|
|
12860
|
-
function
|
|
12847
|
+
function up62(db) {
|
|
12861
12848
|
const sql = readMemoriesFtsSql(db);
|
|
12862
12849
|
if (sql !== null && !memoriesFtsNeedsTokenizerRepair(sql))
|
|
12863
12850
|
return;
|
|
12864
12851
|
recreateMemoriesFts(db);
|
|
12865
12852
|
}
|
|
12866
|
-
function
|
|
12853
|
+
function up63(db) {
|
|
12867
12854
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_entities_order
|
|
12868
12855
|
ON entities(agent_id, pinned DESC, pinned_at DESC, mentions DESC, updated_at DESC, name)`);
|
|
12869
12856
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_entities_extracted_mentions
|
|
12870
12857
|
ON entities(entity_type, mentions)
|
|
12871
12858
|
WHERE entity_type = 'extracted'`);
|
|
12872
12859
|
}
|
|
12873
|
-
function
|
|
12860
|
+
function up64(db) {
|
|
12874
12861
|
const cols = db.prepare("PRAGMA table_info(entity_attributes)").all();
|
|
12875
12862
|
if (!cols.some((col) => col.name === "claim_key")) {
|
|
12876
12863
|
db.exec("ALTER TABLE entity_attributes ADD COLUMN claim_key TEXT");
|
|
@@ -12879,7 +12866,7 @@ function up63(db) {
|
|
|
12879
12866
|
ON entity_attributes(agent_id, aspect_id, claim_key, status)
|
|
12880
12867
|
WHERE claim_key IS NOT NULL`);
|
|
12881
12868
|
}
|
|
12882
|
-
function
|
|
12869
|
+
function up65(db) {
|
|
12883
12870
|
const cols = db.prepare("PRAGMA table_info(entity_attributes)").all();
|
|
12884
12871
|
if (!cols.some((col) => col.name === "group_key")) {
|
|
12885
12872
|
db.exec("ALTER TABLE entity_attributes ADD COLUMN group_key TEXT");
|
|
@@ -12891,13 +12878,13 @@ function up64(db) {
|
|
|
12891
12878
|
ON entity_attributes(agent_id, aspect_id, group_key, claim_key, status)
|
|
12892
12879
|
WHERE claim_key IS NOT NULL`);
|
|
12893
12880
|
}
|
|
12894
|
-
function
|
|
12881
|
+
function up66(db) {
|
|
12895
12882
|
const cols = db.prepare("PRAGMA table_info(memory_artifacts)").all();
|
|
12896
12883
|
if (cols.some((col) => col.name === "source_mtime_ms"))
|
|
12897
12884
|
return;
|
|
12898
12885
|
db.exec("ALTER TABLE memory_artifacts ADD COLUMN source_mtime_ms REAL");
|
|
12899
12886
|
}
|
|
12900
|
-
function
|
|
12887
|
+
function up67(db) {
|
|
12901
12888
|
const cols = db.prepare("PRAGMA table_info(memory_artifacts)").all();
|
|
12902
12889
|
const names = new Set(cols.map((col) => col.name));
|
|
12903
12890
|
if (!names.has("is_deleted")) {
|
|
@@ -12911,7 +12898,7 @@ function up66(db) {
|
|
|
12911
12898
|
ON memory_artifacts(agent_id, is_deleted, deleted_at)
|
|
12912
12899
|
`);
|
|
12913
12900
|
}
|
|
12914
|
-
function
|
|
12901
|
+
function up68(db) {
|
|
12915
12902
|
db.exec("DROP TRIGGER IF EXISTS memories_au");
|
|
12916
12903
|
db.exec(`
|
|
12917
12904
|
CREATE TRIGGER IF NOT EXISTS memories_au AFTER UPDATE OF content ON memories BEGIN
|
|
@@ -12929,7 +12916,7 @@ function addColumnIfMissing17(db, table, column, definition) {
|
|
|
12929
12916
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12930
12917
|
}
|
|
12931
12918
|
}
|
|
12932
|
-
function
|
|
12919
|
+
function up69(db) {
|
|
12933
12920
|
for (const table of ["entities", "entity_communities", "entity_attributes", "entity_dependencies"]) {
|
|
12934
12921
|
addColumnIfMissing17(db, table, "source_id", "TEXT");
|
|
12935
12922
|
addColumnIfMissing17(db, table, "source_kind", "TEXT");
|
|
@@ -12949,7 +12936,7 @@ function hasColumn7(db, table, column) {
|
|
|
12949
12936
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
12950
12937
|
return rows.some((row) => row.name === column);
|
|
12951
12938
|
}
|
|
12952
|
-
function
|
|
12939
|
+
function up70(db) {
|
|
12953
12940
|
if (!hasTable2(db, "embeddings"))
|
|
12954
12941
|
return;
|
|
12955
12942
|
if (!hasColumn7(db, "embeddings", "agent_id")) {
|
|
@@ -12957,7 +12944,7 @@ function up69(db) {
|
|
|
12957
12944
|
}
|
|
12958
12945
|
db.exec("CREATE INDEX IF NOT EXISTS idx_embeddings_agent_source ON embeddings(agent_id, source_type, source_id)");
|
|
12959
12946
|
}
|
|
12960
|
-
function
|
|
12947
|
+
function up71(db) {
|
|
12961
12948
|
db.exec(`
|
|
12962
12949
|
CREATE TABLE IF NOT EXISTS memory_search_telemetry (
|
|
12963
12950
|
id TEXT PRIMARY KEY,
|
|
@@ -12998,7 +12985,7 @@ function addColumnIfMissing18(db, table, column, definition) {
|
|
|
12998
12985
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12999
12986
|
}
|
|
13000
12987
|
}
|
|
13001
|
-
function
|
|
12988
|
+
function up72(db) {
|
|
13002
12989
|
db.exec(`
|
|
13003
12990
|
CREATE TABLE IF NOT EXISTS ontology_proposals (
|
|
13004
12991
|
id TEXT PRIMARY KEY,
|
|
@@ -13041,7 +13028,7 @@ function up71(db) {
|
|
|
13041
13028
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_${table}_proposal ON ${table}(agent_id, proposal_id)`);
|
|
13042
13029
|
}
|
|
13043
13030
|
}
|
|
13044
|
-
function
|
|
13031
|
+
function up73(db) {
|
|
13045
13032
|
db.exec(`
|
|
13046
13033
|
CREATE TABLE IF NOT EXISTS daily_reflections (
|
|
13047
13034
|
id TEXT PRIMARY KEY,
|
|
@@ -13068,7 +13055,7 @@ function up72(db) {
|
|
|
13068
13055
|
WHERE content_key IS NOT NULL;
|
|
13069
13056
|
`);
|
|
13070
13057
|
}
|
|
13071
|
-
function
|
|
13058
|
+
function up74(db) {
|
|
13072
13059
|
const cols = db.prepare("PRAGMA table_info(daily_reflections)").all();
|
|
13073
13060
|
const colNames = new Set(cols.flatMap((c2) => typeof c2.name === "string" ? [c2.name] : []));
|
|
13074
13061
|
if (!colNames.has("content_key")) {
|
|
@@ -13105,7 +13092,7 @@ function backfillVersionRoots(db) {
|
|
|
13105
13092
|
WHERE version_root_id IS NULL
|
|
13106
13093
|
`);
|
|
13107
13094
|
}
|
|
13108
|
-
function
|
|
13095
|
+
function up75(db) {
|
|
13109
13096
|
for (const table of ["entities", "entity_aspects", "entity_dependencies"]) {
|
|
13110
13097
|
addColumnIfMissing19(db, table, "status", "TEXT NOT NULL DEFAULT 'active'");
|
|
13111
13098
|
addColumnIfMissing19(db, table, "archived_at", "TEXT");
|
|
@@ -13140,7 +13127,7 @@ function up74(db) {
|
|
|
13140
13127
|
ON entity_aspects(agent_id, proposal_id);
|
|
13141
13128
|
`);
|
|
13142
13129
|
}
|
|
13143
|
-
function
|
|
13130
|
+
function up76(db) {
|
|
13144
13131
|
db.exec(`
|
|
13145
13132
|
CREATE TABLE IF NOT EXISTS epistemic_assertions (
|
|
13146
13133
|
id TEXT PRIMARY KEY,
|
|
@@ -13196,7 +13183,7 @@ function ensureMemoriesScopeColumns2(db) {
|
|
|
13196
13183
|
if (!names.has("runtime_path"))
|
|
13197
13184
|
db.exec("ALTER TABLE memories ADD COLUMN runtime_path TEXT");
|
|
13198
13185
|
}
|
|
13199
|
-
function
|
|
13186
|
+
function up77(db) {
|
|
13200
13187
|
ensureMemoriesScopeColumns2(db);
|
|
13201
13188
|
db.exec("DROP INDEX IF EXISTS idx_memories_idempotency_key");
|
|
13202
13189
|
db.exec(`
|
|
@@ -13210,7 +13197,7 @@ function up76(db) {
|
|
|
13210
13197
|
WHERE idempotency_key IS NOT NULL AND is_deleted = 0
|
|
13211
13198
|
`);
|
|
13212
13199
|
}
|
|
13213
|
-
function
|
|
13200
|
+
function up78(db) {
|
|
13214
13201
|
db.exec(`
|
|
13215
13202
|
CREATE TABLE IF NOT EXISTS session_context_epochs (
|
|
13216
13203
|
session_key TEXT NOT NULL,
|
|
@@ -13245,7 +13232,7 @@ function up77(db) {
|
|
|
13245
13232
|
ON session_recall_events(item_kind, item_id, created_at DESC);
|
|
13246
13233
|
`);
|
|
13247
13234
|
}
|
|
13248
|
-
function
|
|
13235
|
+
function up79(db) {
|
|
13249
13236
|
db.exec(`
|
|
13250
13237
|
CREATE TABLE IF NOT EXISTS aggregate_memory_sources (
|
|
13251
13238
|
aggregate_memory_id TEXT NOT NULL,
|
|
@@ -13264,7 +13251,7 @@ function addColumnIfMissing20(db, table, column, definition) {
|
|
|
13264
13251
|
return;
|
|
13265
13252
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
13266
13253
|
}
|
|
13267
|
-
function
|
|
13254
|
+
function up80(db) {
|
|
13268
13255
|
addColumnIfMissing20(db, "memory_artifacts", "source_id", "TEXT");
|
|
13269
13256
|
addColumnIfMissing20(db, "memory_artifacts", "source_root", "TEXT");
|
|
13270
13257
|
addColumnIfMissing20(db, "memory_artifacts", "source_external_id", "TEXT");
|
|
@@ -13277,7 +13264,7 @@ function up79(db) {
|
|
|
13277
13264
|
ON memory_artifacts(agent_id, source_id, source_root);
|
|
13278
13265
|
`);
|
|
13279
13266
|
}
|
|
13280
|
-
function
|
|
13267
|
+
function up81(db) {
|
|
13281
13268
|
db.exec(`
|
|
13282
13269
|
CREATE TABLE IF NOT EXISTS temporal_edges (
|
|
13283
13270
|
id TEXT PRIMARY KEY,
|
|
@@ -13300,7 +13287,7 @@ function up80(db) {
|
|
|
13300
13287
|
ON temporal_edges(agent_id, subject_type, subject_id);
|
|
13301
13288
|
`);
|
|
13302
13289
|
}
|
|
13303
|
-
function
|
|
13290
|
+
function up82(db) {
|
|
13304
13291
|
db.exec(`
|
|
13305
13292
|
CREATE TABLE IF NOT EXISTS entity_aliases (
|
|
13306
13293
|
id TEXT PRIMARY KEY,
|
|
@@ -13324,7 +13311,7 @@ function up81(db) {
|
|
|
13324
13311
|
ON entity_aliases(agent_id, canonical_alias, status);
|
|
13325
13312
|
`);
|
|
13326
13313
|
}
|
|
13327
|
-
function
|
|
13314
|
+
function up83(db) {
|
|
13328
13315
|
db.exec(`
|
|
13329
13316
|
CREATE TABLE IF NOT EXISTS api_keys (
|
|
13330
13317
|
id TEXT PRIMARY KEY,
|
|
@@ -13352,7 +13339,7 @@ function up82(db) {
|
|
|
13352
13339
|
ON api_keys(connector, harness);
|
|
13353
13340
|
`);
|
|
13354
13341
|
}
|
|
13355
|
-
function
|
|
13342
|
+
function up84(db) {
|
|
13356
13343
|
db.exec(`
|
|
13357
13344
|
CREATE TABLE IF NOT EXISTS transcript_capture_jobs (
|
|
13358
13345
|
id TEXT PRIMARY KEY,
|
|
@@ -13387,7 +13374,7 @@ function hasColumn10(db, table, column) {
|
|
|
13387
13374
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
13388
13375
|
return rows.some((row) => row.name === column);
|
|
13389
13376
|
}
|
|
13390
|
-
function
|
|
13377
|
+
function up85(db) {
|
|
13391
13378
|
if (!hasColumn10(db, "documents", "agent_id")) {
|
|
13392
13379
|
db.exec("ALTER TABLE documents ADD COLUMN agent_id TEXT NOT NULL DEFAULT 'default'");
|
|
13393
13380
|
}
|
|
@@ -13473,7 +13460,7 @@ function up84(db) {
|
|
|
13473
13460
|
db.exec("CREATE INDEX IF NOT EXISTS idx_documents_agent_project ON documents(agent_id, project)");
|
|
13474
13461
|
db.exec("CREATE INDEX IF NOT EXISTS idx_documents_source_scope ON documents(source_url, agent_id, project)");
|
|
13475
13462
|
}
|
|
13476
|
-
function
|
|
13463
|
+
function up86(db) {
|
|
13477
13464
|
db.exec(`
|
|
13478
13465
|
CREATE TABLE IF NOT EXISTS aggregate_evidence_sources (
|
|
13479
13466
|
aggregate_memory_id TEXT NOT NULL,
|
|
@@ -13495,7 +13482,7 @@ function hasColumn11(db, table, column) {
|
|
|
13495
13482
|
return rows.some((row) => row.name === column);
|
|
13496
13483
|
}
|
|
13497
13484
|
var COLUMNS = ["harness", "session_id", "tool_use_id", "cwd", "origin", "args"];
|
|
13498
|
-
function
|
|
13485
|
+
function up87(db) {
|
|
13499
13486
|
for (const column of COLUMNS) {
|
|
13500
13487
|
if (!hasColumn11(db, "skill_invocations", column)) {
|
|
13501
13488
|
db.exec(`ALTER TABLE skill_invocations ADD COLUMN ${column} TEXT`);
|
|
@@ -13576,7 +13563,7 @@ function documentScopeColumnsPreservingExisting(db) {
|
|
|
13576
13563
|
`);
|
|
13577
13564
|
}
|
|
13578
13565
|
try {
|
|
13579
|
-
|
|
13566
|
+
up85(db);
|
|
13580
13567
|
if (preserveAgentId) {
|
|
13581
13568
|
db.exec(`
|
|
13582
13569
|
UPDATE documents
|
|
@@ -13596,12 +13583,12 @@ function documentScopeColumnsPreservingExisting(db) {
|
|
|
13596
13583
|
db.exec("DROP TABLE IF EXISTS temp.__signet_doc_project_guard");
|
|
13597
13584
|
}
|
|
13598
13585
|
}
|
|
13599
|
-
function
|
|
13600
|
-
|
|
13586
|
+
function up88(db) {
|
|
13587
|
+
up84(db);
|
|
13601
13588
|
if (hasTable3(db, "documents")) {
|
|
13602
13589
|
documentScopeColumnsPreservingExisting(db);
|
|
13603
13590
|
}
|
|
13604
|
-
|
|
13591
|
+
up86(db);
|
|
13605
13592
|
addColumnIfMissing21(db, "memories", "superseded_by", "TEXT");
|
|
13606
13593
|
addColumnIfMissing21(db, "memories", "superseded_at", "TEXT");
|
|
13607
13594
|
addColumnIfMissing21(db, "memories", "superseded_reason", "TEXT");
|
|
@@ -13658,7 +13645,7 @@ function up87(db) {
|
|
|
13658
13645
|
AND ${sourceAgentId} = ${targetAgentId}
|
|
13659
13646
|
`);
|
|
13660
13647
|
}
|
|
13661
|
-
function
|
|
13648
|
+
function up89(db) {
|
|
13662
13649
|
db.exec(`
|
|
13663
13650
|
CREATE TABLE IF NOT EXISTS legacy_markdown_imports (
|
|
13664
13651
|
path TEXT PRIMARY KEY,
|
|
@@ -13688,7 +13675,7 @@ function up88(db) {
|
|
|
13688
13675
|
ON legacy_markdown_chunks(memory_id);
|
|
13689
13676
|
`);
|
|
13690
13677
|
}
|
|
13691
|
-
function
|
|
13678
|
+
function up90(db) {
|
|
13692
13679
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name IN ('relations', 'entity_dependencies')").all();
|
|
13693
13680
|
const tableNames = new Set(tables.map((r2) => String(r2.name)));
|
|
13694
13681
|
if (!tableNames.has("relations") || !tableNames.has("entity_dependencies"))
|
|
@@ -13747,7 +13734,7 @@ function addColumnIfMissing22(db, table, column, definition) {
|
|
|
13747
13734
|
return;
|
|
13748
13735
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
13749
13736
|
}
|
|
13750
|
-
function
|
|
13737
|
+
function up91(db) {
|
|
13751
13738
|
addColumnIfMissing22(db, "summary_jobs", "content_hash", "TEXT");
|
|
13752
13739
|
db.exec(`
|
|
13753
13740
|
CREATE INDEX IF NOT EXISTS idx_summary_jobs_agent_session_content_hash
|
|
@@ -13760,14 +13747,14 @@ function addColumnIfMissing23(db, table, column, definition) {
|
|
|
13760
13747
|
return;
|
|
13761
13748
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
13762
13749
|
}
|
|
13763
|
-
function
|
|
13750
|
+
function up92(db) {
|
|
13764
13751
|
addColumnIfMissing23(db, "summary_jobs", "boundary_reason", "TEXT");
|
|
13765
13752
|
db.exec(`
|
|
13766
13753
|
CREATE INDEX IF NOT EXISTS idx_summary_jobs_boundary_reason
|
|
13767
13754
|
ON summary_jobs(agent_id, session_key, boundary_reason)
|
|
13768
13755
|
`);
|
|
13769
13756
|
}
|
|
13770
|
-
function
|
|
13757
|
+
function up93(db) {
|
|
13771
13758
|
db.exec(`
|
|
13772
13759
|
CREATE TABLE IF NOT EXISTS transcript_recovery_files (
|
|
13773
13760
|
agent_id TEXT NOT NULL,
|
|
@@ -13785,7 +13772,7 @@ function up92(db) {
|
|
|
13785
13772
|
ON transcript_capture_jobs(agent_id, session_id, status);
|
|
13786
13773
|
`);
|
|
13787
13774
|
}
|
|
13788
|
-
function
|
|
13775
|
+
function up94(db) {
|
|
13789
13776
|
db.exec(`
|
|
13790
13777
|
CREATE TABLE IF NOT EXISTS job_cancellations (
|
|
13791
13778
|
id TEXT PRIMARY KEY,
|
|
@@ -13813,7 +13800,7 @@ function indexExists(db, table, indexName) {
|
|
|
13813
13800
|
const rows = db.prepare(`PRAGMA index_list(${table})`).all();
|
|
13814
13801
|
return rows.some((row) => row.name === indexName);
|
|
13815
13802
|
}
|
|
13816
|
-
function
|
|
13803
|
+
function up95(db) {
|
|
13817
13804
|
db.exec(`
|
|
13818
13805
|
CREATE TABLE IF NOT EXISTS job_archive (
|
|
13819
13806
|
id TEXT PRIMARY KEY,
|
|
@@ -13840,7 +13827,7 @@ function indexExists2(db, table, indexName) {
|
|
|
13840
13827
|
const rows = db.prepare(`PRAGMA index_list(${table})`).all();
|
|
13841
13828
|
return rows.some((row) => row.name === indexName);
|
|
13842
13829
|
}
|
|
13843
|
-
function
|
|
13830
|
+
function up96(db) {
|
|
13844
13831
|
db.exec(`
|
|
13845
13832
|
CREATE TABLE IF NOT EXISTS embedding_index_state (
|
|
13846
13833
|
id INTEGER PRIMARY KEY CHECK (id = 1),
|
|
@@ -13853,7 +13840,7 @@ function up95(db) {
|
|
|
13853
13840
|
)
|
|
13854
13841
|
`);
|
|
13855
13842
|
}
|
|
13856
|
-
function
|
|
13843
|
+
function up97(db) {
|
|
13857
13844
|
db.exec(`
|
|
13858
13845
|
CREATE TABLE IF NOT EXISTS embeddings_staging (
|
|
13859
13846
|
id TEXT PRIMARY KEY,
|
|
@@ -13872,7 +13859,7 @@ function up96(db) {
|
|
|
13872
13859
|
ON embeddings_staging(agent_id, source_type, source_id);
|
|
13873
13860
|
`);
|
|
13874
13861
|
}
|
|
13875
|
-
function
|
|
13862
|
+
function up98(db) {
|
|
13876
13863
|
const columns = db.prepare("PRAGMA table_info(dreaming_state)").all();
|
|
13877
13864
|
if (!columns.some((column) => column.name === "evidence_cursor")) {
|
|
13878
13865
|
db.exec("ALTER TABLE dreaming_state ADD COLUMN evidence_cursor TEXT");
|
|
@@ -13883,7 +13870,7 @@ function hasColumn13(db, table, column) {
|
|
|
13883
13870
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
13884
13871
|
return rows.some((r2) => r2.name === column);
|
|
13885
13872
|
}
|
|
13886
|
-
function
|
|
13873
|
+
function up99(db) {
|
|
13887
13874
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name = 'memories'").all();
|
|
13888
13875
|
if (tables.length === 0)
|
|
13889
13876
|
return;
|
|
@@ -13908,23 +13895,23 @@ function up98(db) {
|
|
|
13908
13895
|
function hasColumn14(db, table, column) {
|
|
13909
13896
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
13910
13897
|
}
|
|
13911
|
-
function
|
|
13898
|
+
function up100(db) {
|
|
13912
13899
|
const hasMemories = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'memories'").get();
|
|
13913
13900
|
if (!hasMemories || !hasColumn14(db, "memories", "memory_kind") || !hasColumn14(db, "memories", "type"))
|
|
13914
13901
|
return;
|
|
13915
13902
|
db.exec("UPDATE memories SET memory_kind = NULL WHERE type = 'session_summary'");
|
|
13916
13903
|
}
|
|
13917
|
-
function
|
|
13904
|
+
function up101(db) {
|
|
13918
13905
|
db.exec("DROP TABLE IF EXISTS ingestion_jobs");
|
|
13919
13906
|
}
|
|
13920
|
-
function
|
|
13907
|
+
function up102(db) {
|
|
13921
13908
|
const columns = db.prepare("PRAGMA table_info(dreaming_state)").all();
|
|
13922
13909
|
if (!columns.some((column) => column.name === "last_failure_at")) {
|
|
13923
13910
|
db.exec("ALTER TABLE dreaming_state ADD COLUMN last_failure_at TEXT");
|
|
13924
13911
|
}
|
|
13925
13912
|
db.exec("UPDATE dreaming_state SET last_failure_at = updated_at WHERE consecutive_failures > 0 AND last_failure_at IS NULL");
|
|
13926
13913
|
}
|
|
13927
|
-
function
|
|
13914
|
+
function up103(db) {
|
|
13928
13915
|
db.exec(`
|
|
13929
13916
|
CREATE TABLE IF NOT EXISTS dreaming_evidence_exclusions (
|
|
13930
13917
|
agent_id TEXT NOT NULL,
|
|
@@ -13941,7 +13928,7 @@ function up102(db) {
|
|
|
13941
13928
|
ON dreaming_evidence_exclusions (agent_id, resolved_at, requeue_requested_at, excluded_at DESC);
|
|
13942
13929
|
`);
|
|
13943
13930
|
}
|
|
13944
|
-
function
|
|
13931
|
+
function up104(db) {
|
|
13945
13932
|
db.exec(`
|
|
13946
13933
|
CREATE TABLE IF NOT EXISTS dreaming_tool_calls (
|
|
13947
13934
|
id TEXT PRIMARY KEY,
|
|
@@ -13961,7 +13948,7 @@ function up103(db) {
|
|
|
13961
13948
|
ON dreaming_tool_calls (agent_id, pass_id, sequence ASC);
|
|
13962
13949
|
`);
|
|
13963
13950
|
}
|
|
13964
|
-
function
|
|
13951
|
+
function up105(db) {
|
|
13965
13952
|
const columns = db.prepare("PRAGMA table_info(dreaming_passes)").all();
|
|
13966
13953
|
if (!columns.some((column) => column.name === "evidence_window_json")) {
|
|
13967
13954
|
db.exec("ALTER TABLE dreaming_passes ADD COLUMN evidence_window_json TEXT");
|
|
@@ -13970,7 +13957,7 @@ function up104(db) {
|
|
|
13970
13957
|
db.exec("ALTER TABLE dreaming_passes ADD COLUMN runbook_json TEXT");
|
|
13971
13958
|
}
|
|
13972
13959
|
}
|
|
13973
|
-
function
|
|
13960
|
+
function up106(db) {
|
|
13974
13961
|
db.exec(`
|
|
13975
13962
|
CREATE TABLE IF NOT EXISTS dreaming_attention (
|
|
13976
13963
|
id TEXT PRIMARY KEY,
|
|
@@ -13992,7 +13979,7 @@ function up105(db) {
|
|
|
13992
13979
|
function hasColumn15(db, table, column) {
|
|
13993
13980
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
13994
13981
|
}
|
|
13995
|
-
function
|
|
13982
|
+
function up107(db) {
|
|
13996
13983
|
const requiredMemoryColumns = [
|
|
13997
13984
|
"content_hash",
|
|
13998
13985
|
"normalized_content",
|
|
@@ -14043,7 +14030,7 @@ function up106(db) {
|
|
|
14043
14030
|
WHERE EXISTS (SELECT 1 FROM memory_entity_mentions WHERE entity_id = entities.id)
|
|
14044
14031
|
`);
|
|
14045
14032
|
}
|
|
14046
|
-
function
|
|
14033
|
+
function up108(db) {
|
|
14047
14034
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name IN ('memories', 'entity_attributes')").all();
|
|
14048
14035
|
if (tables.length !== 2)
|
|
14049
14036
|
return;
|
|
@@ -14066,7 +14053,7 @@ function tableExists(db, table) {
|
|
|
14066
14053
|
function hasColumn16(db, table, column) {
|
|
14067
14054
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
14068
14055
|
}
|
|
14069
|
-
function
|
|
14056
|
+
function up109(db) {
|
|
14070
14057
|
db.exec(`
|
|
14071
14058
|
CREATE TABLE IF NOT EXISTS derived_memory_sources (
|
|
14072
14059
|
derived_memory_id TEXT NOT NULL,
|
|
@@ -14109,7 +14096,7 @@ function up108(db) {
|
|
|
14109
14096
|
`);
|
|
14110
14097
|
}
|
|
14111
14098
|
}
|
|
14112
|
-
function
|
|
14099
|
+
function up110(db) {
|
|
14113
14100
|
db.exec(`
|
|
14114
14101
|
DROP TRIGGER IF EXISTS entities_fts_ai;
|
|
14115
14102
|
DROP TRIGGER IF EXISTS entities_fts_ad;
|
|
@@ -14198,7 +14185,7 @@ function up109(db) {
|
|
|
14198
14185
|
function hasColumn17(db, table, column) {
|
|
14199
14186
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
14200
14187
|
}
|
|
14201
|
-
function
|
|
14188
|
+
function up111(db) {
|
|
14202
14189
|
if (!hasColumn17(db, "memories", "review_after")) {
|
|
14203
14190
|
db.exec("ALTER TABLE memories ADD COLUMN review_after TEXT;");
|
|
14204
14191
|
}
|
|
@@ -14214,14 +14201,14 @@ var TOKEN_COLUMNS = [
|
|
|
14214
14201
|
["tokens_cache_write", "INTEGER"],
|
|
14215
14202
|
["tokens_cost", "REAL"]
|
|
14216
14203
|
];
|
|
14217
|
-
function
|
|
14204
|
+
function up112(db) {
|
|
14218
14205
|
for (const [column, type] of TOKEN_COLUMNS) {
|
|
14219
14206
|
if (!hasColumn18(db, "dreaming_passes", column)) {
|
|
14220
14207
|
db.exec(`ALTER TABLE dreaming_passes ADD COLUMN ${column} ${type};`);
|
|
14221
14208
|
}
|
|
14222
14209
|
}
|
|
14223
14210
|
}
|
|
14224
|
-
function
|
|
14211
|
+
function up113(db) {
|
|
14225
14212
|
db.exec(`
|
|
14226
14213
|
CREATE TABLE IF NOT EXISTS embedding_usage (
|
|
14227
14214
|
day TEXT NOT NULL,
|
|
@@ -14234,7 +14221,7 @@ function up112(db) {
|
|
|
14234
14221
|
);
|
|
14235
14222
|
`);
|
|
14236
14223
|
}
|
|
14237
|
-
function
|
|
14224
|
+
function up114(db) {
|
|
14238
14225
|
db.exec(`
|
|
14239
14226
|
CREATE TABLE IF NOT EXISTS telemetry_install (
|
|
14240
14227
|
id TEXT PRIMARY KEY,
|
|
@@ -14242,7 +14229,7 @@ function up113(db) {
|
|
|
14242
14229
|
);
|
|
14243
14230
|
`);
|
|
14244
14231
|
}
|
|
14245
|
-
function
|
|
14232
|
+
function up115(db) {
|
|
14246
14233
|
db.exec(`
|
|
14247
14234
|
CREATE INDEX IF NOT EXISTS idx_memory_entity_mentions_entity_memory
|
|
14248
14235
|
ON memory_entity_mentions(entity_id, memory_id);
|
|
@@ -14253,7 +14240,7 @@ function hasColumn19(db, table, column) {
|
|
|
14253
14240
|
return rows.some((row) => row.name === column);
|
|
14254
14241
|
}
|
|
14255
14242
|
var COLUMNS2 = ["first_remember_at", "first_recall_at"];
|
|
14256
|
-
function
|
|
14243
|
+
function up116(db) {
|
|
14257
14244
|
for (const column of COLUMNS2) {
|
|
14258
14245
|
if (!hasColumn19(db, "telemetry_install", column)) {
|
|
14259
14246
|
db.exec(`ALTER TABLE telemetry_install ADD COLUMN ${column} TEXT`);
|
|
@@ -14269,7 +14256,7 @@ function addColumnIfMissing24(db, column, definition) {
|
|
|
14269
14256
|
db.exec(`ALTER TABLE telemetry_events ADD COLUMN ${column} ${definition}`);
|
|
14270
14257
|
}
|
|
14271
14258
|
}
|
|
14272
|
-
function
|
|
14259
|
+
function up117(db) {
|
|
14273
14260
|
addColumnIfMissing24(db, "source", "TEXT NOT NULL DEFAULT 'daemon'");
|
|
14274
14261
|
addColumnIfMissing24(db, "claim_token", "TEXT");
|
|
14275
14262
|
addColumnIfMissing24(db, "claimed_at", "TEXT");
|
|
@@ -14278,7 +14265,7 @@ function up116(db) {
|
|
|
14278
14265
|
ON telemetry_events(source, sent_to_posthog, claimed_at, timestamp);
|
|
14279
14266
|
`);
|
|
14280
14267
|
}
|
|
14281
|
-
function
|
|
14268
|
+
function up118(db) {
|
|
14282
14269
|
db.exec(`
|
|
14283
14270
|
CREATE TABLE IF NOT EXISTS session_claims (
|
|
14284
14271
|
session_key TEXT NOT NULL,
|
|
@@ -14299,7 +14286,7 @@ function up117(db) {
|
|
|
14299
14286
|
ON session_claims(agent_id, state, expires_at);
|
|
14300
14287
|
`);
|
|
14301
14288
|
}
|
|
14302
|
-
function
|
|
14289
|
+
function up119(db) {
|
|
14303
14290
|
const table = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'entity_attributes'").get();
|
|
14304
14291
|
if (table == null)
|
|
14305
14292
|
return;
|
|
@@ -14308,7 +14295,7 @@ function up118(db) {
|
|
|
14308
14295
|
ON entity_attributes(memory_id, agent_id, status, importance);
|
|
14309
14296
|
`);
|
|
14310
14297
|
}
|
|
14311
|
-
function
|
|
14298
|
+
function up120(db) {
|
|
14312
14299
|
db.exec(`
|
|
14313
14300
|
CREATE TABLE IF NOT EXISTS cross_agent_messages (
|
|
14314
14301
|
id TEXT PRIMARY KEY,
|
|
@@ -14365,7 +14352,7 @@ function addColumnIfMissing25(db, column, definition) {
|
|
|
14365
14352
|
db.exec(`ALTER TABLE cross_agent_messages ADD COLUMN ${column} ${definition}`);
|
|
14366
14353
|
}
|
|
14367
14354
|
}
|
|
14368
|
-
function
|
|
14355
|
+
function up121(db) {
|
|
14369
14356
|
const table = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'cross_agent_messages'").get();
|
|
14370
14357
|
if (table == null)
|
|
14371
14358
|
return;
|
|
@@ -14566,7 +14553,7 @@ function backfillTranscriptsFromSummaryJobs(db) {
|
|
|
14566
14553
|
insert.run(...values);
|
|
14567
14554
|
}
|
|
14568
14555
|
}
|
|
14569
|
-
function
|
|
14556
|
+
function up122(db) {
|
|
14570
14557
|
if (!hasTable4(db, "session_transcripts"))
|
|
14571
14558
|
return;
|
|
14572
14559
|
addColumnIfMissing26(db, "session_transcripts", "completed_at", "TEXT");
|
|
@@ -14619,7 +14606,7 @@ function up121(db) {
|
|
|
14619
14606
|
ON session_transcripts(agent_id, content_hash);
|
|
14620
14607
|
`);
|
|
14621
14608
|
}
|
|
14622
|
-
function
|
|
14609
|
+
function up123(db) {
|
|
14623
14610
|
db.exec(`
|
|
14624
14611
|
CREATE INDEX IF NOT EXISTS idx_memory_jobs_pressure_status
|
|
14625
14612
|
ON memory_jobs(status)
|
|
@@ -14638,12 +14625,12 @@ function up122(db) {
|
|
|
14638
14625
|
function hasColumn22(db, table, column) {
|
|
14639
14626
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
14640
14627
|
}
|
|
14641
|
-
function
|
|
14628
|
+
function up124(db) {
|
|
14642
14629
|
if (!hasColumn22(db, "telemetry_install", "last_seen_version")) {
|
|
14643
14630
|
db.exec("ALTER TABLE telemetry_install ADD COLUMN last_seen_version TEXT");
|
|
14644
14631
|
}
|
|
14645
14632
|
}
|
|
14646
|
-
function
|
|
14633
|
+
function up125(db) {
|
|
14647
14634
|
db.exec(`
|
|
14648
14635
|
CREATE TABLE IF NOT EXISTS source_lifecycle_state (
|
|
14649
14636
|
agent_id TEXT NOT NULL,
|
|
@@ -14672,7 +14659,7 @@ function addColumnIfMissing27(db, column, definition) {
|
|
|
14672
14659
|
db.exec(`ALTER TABLE telemetry_events ADD COLUMN ${column} ${definition}`);
|
|
14673
14660
|
}
|
|
14674
14661
|
}
|
|
14675
|
-
function
|
|
14662
|
+
function up126(db) {
|
|
14676
14663
|
addColumnIfMissing27(db, "delivery_attempts", "INTEGER NOT NULL DEFAULT 0");
|
|
14677
14664
|
addColumnIfMissing27(db, "last_attempt_at", "TEXT");
|
|
14678
14665
|
addColumnIfMissing27(db, "sent_at", "TEXT");
|
|
@@ -14693,7 +14680,7 @@ function up125(db) {
|
|
|
14693
14680
|
VALUES (1, CURRENT_TIMESTAMP);
|
|
14694
14681
|
`);
|
|
14695
14682
|
}
|
|
14696
|
-
function
|
|
14683
|
+
function up127(db) {
|
|
14697
14684
|
const columns = db.prepare("PRAGMA table_info(dreaming_evidence_exclusions)").all();
|
|
14698
14685
|
const names = new Set(columns.map((column) => column.name));
|
|
14699
14686
|
if (!names.has("failure_class")) {
|
|
@@ -14710,7 +14697,7 @@ function up126(db) {
|
|
|
14710
14697
|
}
|
|
14711
14698
|
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)");
|
|
14712
14699
|
}
|
|
14713
|
-
function
|
|
14700
|
+
function up128(db) {
|
|
14714
14701
|
db.exec(`
|
|
14715
14702
|
CREATE TABLE IF NOT EXISTS embedding_index_failures (
|
|
14716
14703
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
@@ -14734,7 +14721,7 @@ function up127(db) {
|
|
|
14734
14721
|
ON embedding_index_failures(source_type, source_id);
|
|
14735
14722
|
`);
|
|
14736
14723
|
}
|
|
14737
|
-
function
|
|
14724
|
+
function up129(db) {
|
|
14738
14725
|
db.exec(`
|
|
14739
14726
|
CREATE TABLE IF NOT EXISTS imported_source_lifecycle (
|
|
14740
14727
|
id TEXT PRIMARY KEY,
|
|
@@ -14784,7 +14771,7 @@ function backfillTable(db, params) {
|
|
|
14784
14771
|
FROM ${params.table}${params.where ? ` WHERE ${params.where}` : ""}`).all();
|
|
14785
14772
|
backfill(db, rows, params.sourceKind, params.scannedAt);
|
|
14786
14773
|
}
|
|
14787
|
-
function
|
|
14774
|
+
function up130(db) {
|
|
14788
14775
|
db.exec(`
|
|
14789
14776
|
CREATE TABLE IF NOT EXISTS memory_content_safety (
|
|
14790
14777
|
agent_id TEXT NOT NULL,
|
|
@@ -14841,7 +14828,7 @@ function up129(db) {
|
|
|
14841
14828
|
scannedAt
|
|
14842
14829
|
});
|
|
14843
14830
|
}
|
|
14844
|
-
function
|
|
14831
|
+
function up131(db) {
|
|
14845
14832
|
const table = db.prepare("SELECT sql FROM sqlite_master WHERE type = 'table' AND name = 'dreaming_attention'").get();
|
|
14846
14833
|
if (!table)
|
|
14847
14834
|
return;
|
|
@@ -14875,7 +14862,7 @@ function up130(db) {
|
|
|
14875
14862
|
ON dreaming_attention (agent_id, resolved_at, priority DESC, created_at ASC);
|
|
14876
14863
|
`);
|
|
14877
14864
|
}
|
|
14878
|
-
function
|
|
14865
|
+
function up132(db) {
|
|
14879
14866
|
db.exec(`
|
|
14880
14867
|
CREATE TABLE IF NOT EXISTS ontology_contradictions (
|
|
14881
14868
|
id TEXT PRIMARY KEY,
|
|
@@ -14931,7 +14918,7 @@ function up131(db) {
|
|
|
14931
14918
|
ON ontology_contradictions(agent_id, left_source_id, right_source_id);
|
|
14932
14919
|
`);
|
|
14933
14920
|
}
|
|
14934
|
-
function
|
|
14921
|
+
function up133(db) {
|
|
14935
14922
|
db.exec(`
|
|
14936
14923
|
CREATE INDEX IF NOT EXISTS idx_memory_jobs_diagnostics_status_created_at
|
|
14937
14924
|
ON memory_jobs(status, created_at)
|
|
@@ -14946,7 +14933,7 @@ function up132(db) {
|
|
|
14946
14933
|
function tableExists3(db, table) {
|
|
14947
14934
|
return db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = ?").get(table) != null;
|
|
14948
14935
|
}
|
|
14949
|
-
function
|
|
14936
|
+
function up134(db) {
|
|
14950
14937
|
if (!tableExists3(db, "memory_jobs"))
|
|
14951
14938
|
return;
|
|
14952
14939
|
if (!tableExists3(db, "job_cancellations")) {
|
|
@@ -14995,7 +14982,7 @@ function up133(db) {
|
|
|
14995
14982
|
AND status IN ('pending', 'leased');
|
|
14996
14983
|
`);
|
|
14997
14984
|
}
|
|
14998
|
-
function
|
|
14985
|
+
function up135(db) {
|
|
14999
14986
|
db.exec(`
|
|
15000
14987
|
CREATE TABLE IF NOT EXISTS embedding_repair_budget (
|
|
15001
14988
|
id INTEGER PRIMARY KEY CHECK (id = 1),
|
|
@@ -15035,7 +15022,7 @@ function up134(db) {
|
|
|
15035
15022
|
END;
|
|
15036
15023
|
`);
|
|
15037
15024
|
}
|
|
15038
|
-
function
|
|
15025
|
+
function up136(db) {
|
|
15039
15026
|
db.exec(`
|
|
15040
15027
|
CREATE TABLE IF NOT EXISTS dreaming_evidence_consumption (
|
|
15041
15028
|
agent_id TEXT NOT NULL,
|
|
@@ -15058,13 +15045,13 @@ function up135(db) {
|
|
|
15058
15045
|
ON dreaming_evidence_consumption(agent_id, pass_id, delivered_offset, source_length);
|
|
15059
15046
|
`);
|
|
15060
15047
|
}
|
|
15061
|
-
function
|
|
15048
|
+
function up137(db) {
|
|
15062
15049
|
db.exec(`
|
|
15063
15050
|
CREATE INDEX IF NOT EXISTS idx_epistemic_assertions_observer_entity
|
|
15064
15051
|
ON epistemic_assertions(agent_id, subject_entity_id, status, asserted_at DESC, created_at DESC);
|
|
15065
15052
|
`);
|
|
15066
15053
|
}
|
|
15067
|
-
function
|
|
15054
|
+
function up138(db) {
|
|
15068
15055
|
db.exec(`
|
|
15069
15056
|
CREATE TABLE IF NOT EXISTS memory_head_revisions (
|
|
15070
15057
|
id TEXT PRIMARY KEY,
|
|
@@ -15116,7 +15103,7 @@ function up137(db) {
|
|
|
15116
15103
|
if (!names.has("format_version"))
|
|
15117
15104
|
db.exec("ALTER TABLE memory_md_heads ADD COLUMN format_version INTEGER NOT NULL DEFAULT 1");
|
|
15118
15105
|
}
|
|
15119
|
-
function
|
|
15106
|
+
function up139(db) {
|
|
15120
15107
|
db.exec(`
|
|
15121
15108
|
CREATE TABLE memory_head_entries_v134 (
|
|
15122
15109
|
entry_id TEXT NOT NULL, agent_id TEXT NOT NULL, canonical_text TEXT NOT NULL,
|
|
@@ -15134,7 +15121,7 @@ function up138(db) {
|
|
|
15134
15121
|
ON memory_head_entries(agent_id, entry_id, last_revision DESC);
|
|
15135
15122
|
`);
|
|
15136
15123
|
}
|
|
15137
|
-
function
|
|
15124
|
+
function up140(db) {
|
|
15138
15125
|
db.exec(`
|
|
15139
15126
|
CREATE TABLE IF NOT EXISTS memory_head_publications (
|
|
15140
15127
|
agent_id TEXT NOT NULL,
|
|
@@ -15150,7 +15137,7 @@ function up139(db) {
|
|
|
15150
15137
|
ON memory_head_publications(agent_id, status, revision DESC);
|
|
15151
15138
|
`);
|
|
15152
15139
|
}
|
|
15153
|
-
function
|
|
15140
|
+
function up141(db) {
|
|
15154
15141
|
const cols = new Set(db.prepare("PRAGMA table_info(memory_head_revisions)").all().map((r2) => r2.name));
|
|
15155
15142
|
for (const [name, type] of [
|
|
15156
15143
|
["entry_id", "TEXT"],
|
|
@@ -15164,7 +15151,7 @@ function up140(db) {
|
|
|
15164
15151
|
}
|
|
15165
15152
|
db.exec("CREATE UNIQUE INDEX IF NOT EXISTS idx_memory_head_revisions_entry ON memory_head_revisions(agent_id, revision, entry_id)");
|
|
15166
15153
|
}
|
|
15167
|
-
function
|
|
15154
|
+
function up142(db) {
|
|
15168
15155
|
const cols = new Set(db.prepare("PRAGMA table_info(dreaming_passes)").all().map((r2) => r2.name));
|
|
15169
15156
|
for (const [name, type] of [
|
|
15170
15157
|
["head_revision", "INTEGER"],
|
|
@@ -15186,7 +15173,7 @@ function addColumnIfMissing28(db, table, column, definition) {
|
|
|
15186
15173
|
if (!hasColumn25(db, table, column))
|
|
15187
15174
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
15188
15175
|
}
|
|
15189
|
-
function
|
|
15176
|
+
function up143(db) {
|
|
15190
15177
|
addColumnIfMissing28(db, "memories", "manual_override", "INTEGER DEFAULT 0");
|
|
15191
15178
|
db.exec(`
|
|
15192
15179
|
CREATE TABLE IF NOT EXISTS transcript_capture_status (
|
|
@@ -15491,7 +15478,7 @@ function up142(db) {
|
|
|
15491
15478
|
GROUP BY j.agent_id;
|
|
15492
15479
|
`);
|
|
15493
15480
|
}
|
|
15494
|
-
function
|
|
15481
|
+
function up144(db) {
|
|
15495
15482
|
db.exec(`
|
|
15496
15483
|
CREATE TABLE IF NOT EXISTS native_source_sync_state (
|
|
15497
15484
|
agent_id TEXT NOT NULL,
|
|
@@ -15507,7 +15494,7 @@ function up143(db) {
|
|
|
15507
15494
|
ON native_source_sync_state(agent_id, status);
|
|
15508
15495
|
`);
|
|
15509
15496
|
}
|
|
15510
|
-
function
|
|
15497
|
+
function up145(db) {
|
|
15511
15498
|
db.exec(`
|
|
15512
15499
|
CREATE TABLE IF NOT EXISTS transcript_recovery_frontiers (
|
|
15513
15500
|
agent_id TEXT NOT NULL,
|
|
@@ -15519,7 +15506,7 @@ function up144(db) {
|
|
|
15519
15506
|
);
|
|
15520
15507
|
`);
|
|
15521
15508
|
}
|
|
15522
|
-
function
|
|
15509
|
+
function up146(db) {
|
|
15523
15510
|
db.exec(`
|
|
15524
15511
|
CREATE TABLE IF NOT EXISTS source_sync_checkpoints (
|
|
15525
15512
|
agent_id TEXT NOT NULL,
|
|
@@ -15533,13 +15520,13 @@ function up145(db) {
|
|
|
15533
15520
|
);
|
|
15534
15521
|
`);
|
|
15535
15522
|
}
|
|
15536
|
-
function
|
|
15523
|
+
function up147(db) {
|
|
15537
15524
|
const columns = db.prepare("PRAGMA table_info(source_sync_checkpoints)").all();
|
|
15538
15525
|
if (!columns.some((column) => column.name === "frontier")) {
|
|
15539
15526
|
db.exec("ALTER TABLE source_sync_checkpoints ADD COLUMN frontier TEXT");
|
|
15540
15527
|
}
|
|
15541
15528
|
}
|
|
15542
|
-
function
|
|
15529
|
+
function up148(db) {
|
|
15543
15530
|
const columns = new Set(db.prepare("PRAGMA table_info(embedding_index_state)").all().map((row) => row.name).filter((name) => typeof name === "string"));
|
|
15544
15531
|
const additions = [
|
|
15545
15532
|
["migration_phase", "TEXT"],
|
|
@@ -15574,13 +15561,13 @@ function up147(db) {
|
|
|
15574
15561
|
`);
|
|
15575
15562
|
}
|
|
15576
15563
|
}
|
|
15577
|
-
function
|
|
15564
|
+
function up149(db) {
|
|
15578
15565
|
const columns = new Set(db.prepare("PRAGMA table_info(memory_jobs)").all().map((row) => row.name).filter((name) => typeof name === "string"));
|
|
15579
15566
|
if (!columns.has("lease_token")) {
|
|
15580
15567
|
db.exec("ALTER TABLE memory_jobs ADD COLUMN lease_token TEXT");
|
|
15581
15568
|
}
|
|
15582
15569
|
}
|
|
15583
|
-
function
|
|
15570
|
+
function up150(db) {
|
|
15584
15571
|
db.exec(`
|
|
15585
15572
|
CREATE TABLE IF NOT EXISTS dreaming_evidence_reviews (
|
|
15586
15573
|
agent_id TEXT NOT NULL,
|
|
@@ -15598,7 +15585,7 @@ function up149(db) {
|
|
|
15598
15585
|
ON dreaming_evidence_reviews (agent_id, reviewed_at DESC);
|
|
15599
15586
|
`);
|
|
15600
15587
|
}
|
|
15601
|
-
function
|
|
15588
|
+
function up151(db) {
|
|
15602
15589
|
db.exec(`
|
|
15603
15590
|
CREATE TABLE IF NOT EXISTS source_import_jobs (
|
|
15604
15591
|
id TEXT PRIMARY KEY, kind TEXT NOT NULL CHECK (kind = 'import'), agent_id TEXT NOT NULL,
|
|
@@ -15665,16 +15652,16 @@ function up150(db) {
|
|
|
15665
15652
|
}
|
|
15666
15653
|
db.exec("CREATE INDEX IF NOT EXISTS idx_session_transcripts_agent_source ON session_transcripts(agent_id, source_id)");
|
|
15667
15654
|
}
|
|
15668
|
-
function
|
|
15655
|
+
function up152(db) {
|
|
15669
15656
|
db.exec("CREATE INDEX IF NOT EXISTS idx_source_import_files_job_state ON source_import_files(job_id, state)");
|
|
15670
15657
|
}
|
|
15671
|
-
function
|
|
15658
|
+
function up153(db) {
|
|
15672
15659
|
const columns = db.prepare("PRAGMA table_info(source_import_record_attempts)").all();
|
|
15673
15660
|
if (!columns.some((column) => column.name === "source_id")) {
|
|
15674
15661
|
db.exec("ALTER TABLE source_import_record_attempts ADD COLUMN source_id TEXT");
|
|
15675
15662
|
}
|
|
15676
15663
|
}
|
|
15677
|
-
function
|
|
15664
|
+
function up154(db) {
|
|
15678
15665
|
const addColumn = (table, column, definition) => {
|
|
15679
15666
|
const statement = db.prepare("SELECT 1 AS found FROM pragma_table_info(?) WHERE name = ?");
|
|
15680
15667
|
let exists;
|
|
@@ -15695,7 +15682,7 @@ function addColumnIfMissing29(db, table, column, definition) {
|
|
|
15695
15682
|
if (!columns.some((row) => row.name === column))
|
|
15696
15683
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
15697
15684
|
}
|
|
15698
|
-
function
|
|
15685
|
+
function up155(db) {
|
|
15699
15686
|
addColumnIfMissing29(db, "memory_md_heads", "is_current", "INTEGER NOT NULL DEFAULT 0");
|
|
15700
15687
|
addColumnIfMissing29(db, "dreaming_passes", "head_base_revision", "INTEGER");
|
|
15701
15688
|
db.exec("CREATE INDEX IF NOT EXISTS idx_memory_head_revisions_content_hash ON memory_head_revisions(content_hash)");
|
|
@@ -15845,7 +15832,7 @@ function up154(db) {
|
|
|
15845
15832
|
`);
|
|
15846
15833
|
}
|
|
15847
15834
|
}
|
|
15848
|
-
function
|
|
15835
|
+
function up156(db) {
|
|
15849
15836
|
db.exec(`
|
|
15850
15837
|
CREATE TABLE IF NOT EXISTS vector_repair_checkpoints (
|
|
15851
15838
|
operation TEXT NOT NULL CHECK (operation IN ('resync', 'clean-orphans')),
|
|
@@ -15870,7 +15857,7 @@ function up155(db) {
|
|
|
15870
15857
|
ON vector_repair_checkpoints(status, updated_at);
|
|
15871
15858
|
`);
|
|
15872
15859
|
}
|
|
15873
|
-
function
|
|
15860
|
+
function up157(db) {
|
|
15874
15861
|
db.exec(`
|
|
15875
15862
|
CREATE TABLE IF NOT EXISTS embedding_repair_checkpoints (
|
|
15876
15863
|
checkpoint_id TEXT PRIMARY KEY,
|
|
@@ -15891,7 +15878,7 @@ function up156(db) {
|
|
|
15891
15878
|
ON embedding_repair_checkpoints(status, updated_at);
|
|
15892
15879
|
`);
|
|
15893
15880
|
}
|
|
15894
|
-
function
|
|
15881
|
+
function up158(db) {
|
|
15895
15882
|
const columns = new Set(db.prepare("PRAGMA table_info(embedding_repair_checkpoints)").all().map((row) => row.name));
|
|
15896
15883
|
if (!columns.has("profile_fingerprint")) {
|
|
15897
15884
|
db.exec("ALTER TABLE embedding_repair_checkpoints ADD COLUMN profile_fingerprint TEXT");
|
|
@@ -15906,7 +15893,7 @@ function up157(db) {
|
|
|
15906
15893
|
);
|
|
15907
15894
|
`);
|
|
15908
15895
|
}
|
|
15909
|
-
function
|
|
15896
|
+
function up159(db) {
|
|
15910
15897
|
db.exec(`
|
|
15911
15898
|
CREATE INDEX IF NOT EXISTS idx_memories_agent_kind
|
|
15912
15899
|
ON memories(agent_id, memory_kind);
|
|
@@ -15916,13 +15903,13 @@ var MIGRATIONS = [
|
|
|
15916
15903
|
{
|
|
15917
15904
|
version: 1,
|
|
15918
15905
|
name: "baseline",
|
|
15919
|
-
up:
|
|
15906
|
+
up: up6,
|
|
15920
15907
|
artifacts: { tables: ["memories", "conversations", "embeddings"] }
|
|
15921
15908
|
},
|
|
15922
15909
|
{
|
|
15923
15910
|
version: 2,
|
|
15924
15911
|
name: "pipeline-v2",
|
|
15925
|
-
up:
|
|
15912
|
+
up: up7,
|
|
15926
15913
|
artifacts: {
|
|
15927
15914
|
tables: ["memory_history", "memory_jobs", "entities", "relations", "memory_entity_mentions"]
|
|
15928
15915
|
}
|
|
@@ -15930,12 +15917,12 @@ var MIGRATIONS = [
|
|
|
15930
15917
|
{
|
|
15931
15918
|
version: 3,
|
|
15932
15919
|
name: "unique-content-hash",
|
|
15933
|
-
up:
|
|
15920
|
+
up: up8
|
|
15934
15921
|
},
|
|
15935
15922
|
{
|
|
15936
15923
|
version: 4,
|
|
15937
15924
|
name: "history-actor-and-retention",
|
|
15938
|
-
up:
|
|
15925
|
+
up: up9,
|
|
15939
15926
|
artifacts: {
|
|
15940
15927
|
columns: [{ table: "memory_history", column: "actor_type" }]
|
|
15941
15928
|
}
|
|
@@ -15943,7 +15930,7 @@ var MIGRATIONS = [
|
|
|
15943
15930
|
{
|
|
15944
15931
|
version: 5,
|
|
15945
15932
|
name: "graph-extended",
|
|
15946
|
-
up:
|
|
15933
|
+
up: up10,
|
|
15947
15934
|
artifacts: {
|
|
15948
15935
|
columns: [{ table: "entities", column: "canonical_name" }]
|
|
15949
15936
|
}
|
|
@@ -15951,7 +15938,7 @@ var MIGRATIONS = [
|
|
|
15951
15938
|
{
|
|
15952
15939
|
version: 6,
|
|
15953
15940
|
name: "idempotency-key",
|
|
15954
|
-
up:
|
|
15941
|
+
up: up11,
|
|
15955
15942
|
artifacts: {
|
|
15956
15943
|
columns: [{ table: "memories", column: "idempotency_key" }]
|
|
15957
15944
|
}
|
|
@@ -15959,42 +15946,42 @@ var MIGRATIONS = [
|
|
|
15959
15946
|
{
|
|
15960
15947
|
version: 7,
|
|
15961
15948
|
name: "documents-and-connectors",
|
|
15962
|
-
up:
|
|
15949
|
+
up: up12,
|
|
15963
15950
|
artifacts: { tables: ["documents", "document_memories", "connectors"] }
|
|
15964
15951
|
},
|
|
15965
15952
|
{
|
|
15966
15953
|
version: 8,
|
|
15967
15954
|
name: "embeddings-unique-hash",
|
|
15968
|
-
up:
|
|
15955
|
+
up: up13
|
|
15969
15956
|
},
|
|
15970
15957
|
{
|
|
15971
15958
|
version: 9,
|
|
15972
15959
|
name: "summary-jobs",
|
|
15973
|
-
up:
|
|
15960
|
+
up: up14,
|
|
15974
15961
|
artifacts: { tables: ["summary_jobs"] }
|
|
15975
15962
|
},
|
|
15976
15963
|
{
|
|
15977
15964
|
version: 10,
|
|
15978
15965
|
name: "umap-cache",
|
|
15979
|
-
up:
|
|
15966
|
+
up: up15,
|
|
15980
15967
|
artifacts: { tables: ["umap_cache"] }
|
|
15981
15968
|
},
|
|
15982
15969
|
{
|
|
15983
15970
|
version: 11,
|
|
15984
15971
|
name: "session-scores",
|
|
15985
|
-
up:
|
|
15972
|
+
up: up16,
|
|
15986
15973
|
artifacts: { tables: ["session_scores"] }
|
|
15987
15974
|
},
|
|
15988
15975
|
{
|
|
15989
15976
|
version: 12,
|
|
15990
15977
|
name: "scheduled-tasks",
|
|
15991
|
-
up:
|
|
15978
|
+
up: up17,
|
|
15992
15979
|
artifacts: { tables: ["scheduled_tasks", "task_runs"] }
|
|
15993
15980
|
},
|
|
15994
15981
|
{
|
|
15995
15982
|
version: 13,
|
|
15996
15983
|
name: "ingestion-tracking",
|
|
15997
|
-
up:
|
|
15984
|
+
up: up18,
|
|
15998
15985
|
artifacts: {
|
|
15999
15986
|
columns: [
|
|
16000
15987
|
{ table: "memories", column: "source_path" },
|
|
@@ -16005,13 +15992,13 @@ var MIGRATIONS = [
|
|
|
16005
15992
|
{
|
|
16006
15993
|
version: 14,
|
|
16007
15994
|
name: "telemetry",
|
|
16008
|
-
up:
|
|
15995
|
+
up: up19,
|
|
16009
15996
|
artifacts: { tables: ["telemetry_events"] }
|
|
16010
15997
|
},
|
|
16011
15998
|
{
|
|
16012
15999
|
version: 15,
|
|
16013
16000
|
name: "session-memories",
|
|
16014
|
-
up:
|
|
16001
|
+
up: up20,
|
|
16015
16002
|
artifacts: {
|
|
16016
16003
|
tables: ["session_memories"],
|
|
16017
16004
|
columns: [
|
|
@@ -16023,13 +16010,13 @@ var MIGRATIONS = [
|
|
|
16023
16010
|
{
|
|
16024
16011
|
version: 16,
|
|
16025
16012
|
name: "session-checkpoints",
|
|
16026
|
-
up:
|
|
16013
|
+
up: up21,
|
|
16027
16014
|
artifacts: { tables: ["session_checkpoints"] }
|
|
16028
16015
|
},
|
|
16029
16016
|
{
|
|
16030
16017
|
version: 17,
|
|
16031
16018
|
name: "task-skills",
|
|
16032
|
-
up:
|
|
16019
|
+
up: up22,
|
|
16033
16020
|
artifacts: {
|
|
16034
16021
|
columns: [{ table: "scheduled_tasks", column: "skill_name" }]
|
|
16035
16022
|
}
|
|
@@ -16037,13 +16024,13 @@ var MIGRATIONS = [
|
|
|
16037
16024
|
{
|
|
16038
16025
|
version: 18,
|
|
16039
16026
|
name: "skill-meta",
|
|
16040
|
-
up:
|
|
16027
|
+
up: up23,
|
|
16041
16028
|
artifacts: { tables: ["skill_meta"] }
|
|
16042
16029
|
},
|
|
16043
16030
|
{
|
|
16044
16031
|
version: 19,
|
|
16045
16032
|
name: "knowledge-structure",
|
|
16046
|
-
up:
|
|
16033
|
+
up: up24,
|
|
16047
16034
|
artifacts: {
|
|
16048
16035
|
tables: ["entity_aspects", "entity_attributes", "entity_dependencies", "task_meta"],
|
|
16049
16036
|
columns: [{ table: "entities", column: "agent_id" }]
|
|
@@ -16052,7 +16039,7 @@ var MIGRATIONS = [
|
|
|
16052
16039
|
{
|
|
16053
16040
|
version: 20,
|
|
16054
16041
|
name: "session-structural-columns",
|
|
16055
|
-
up:
|
|
16042
|
+
up: up25,
|
|
16056
16043
|
artifacts: {
|
|
16057
16044
|
columns: [
|
|
16058
16045
|
{ table: "session_memories", column: "entity_slot" },
|
|
@@ -16065,7 +16052,7 @@ var MIGRATIONS = [
|
|
|
16065
16052
|
{
|
|
16066
16053
|
version: 21,
|
|
16067
16054
|
name: "checkpoint-structural",
|
|
16068
|
-
up:
|
|
16055
|
+
up: up26,
|
|
16069
16056
|
artifacts: {
|
|
16070
16057
|
columns: [{ table: "session_checkpoints", column: "focal_entity_ids" }]
|
|
16071
16058
|
}
|
|
@@ -16073,7 +16060,7 @@ var MIGRATIONS = [
|
|
|
16073
16060
|
{
|
|
16074
16061
|
version: 22,
|
|
16075
16062
|
name: "entity-pinning",
|
|
16076
|
-
up:
|
|
16063
|
+
up: up27,
|
|
16077
16064
|
artifacts: {
|
|
16078
16065
|
columns: [
|
|
16079
16066
|
{ table: "entities", column: "pinned" },
|
|
@@ -16084,17 +16071,17 @@ var MIGRATIONS = [
|
|
|
16084
16071
|
{
|
|
16085
16072
|
version: 23,
|
|
16086
16073
|
name: "retired-scorer-gap",
|
|
16087
|
-
up:
|
|
16074
|
+
up: up28
|
|
16088
16075
|
},
|
|
16089
16076
|
{
|
|
16090
16077
|
version: 24,
|
|
16091
16078
|
name: "retired-scorer-gap",
|
|
16092
|
-
up:
|
|
16079
|
+
up: up29
|
|
16093
16080
|
},
|
|
16094
16081
|
{
|
|
16095
16082
|
version: 25,
|
|
16096
16083
|
name: "agent-feedback",
|
|
16097
|
-
up:
|
|
16084
|
+
up: up30,
|
|
16098
16085
|
artifacts: {
|
|
16099
16086
|
columns: [{ table: "session_memories", column: "agent_relevance_score" }]
|
|
16100
16087
|
}
|
|
@@ -16102,32 +16089,32 @@ var MIGRATIONS = [
|
|
|
16102
16089
|
{
|
|
16103
16090
|
version: 26,
|
|
16104
16091
|
name: "retired-scorer-gap",
|
|
16105
|
-
up:
|
|
16092
|
+
up: up31
|
|
16106
16093
|
},
|
|
16107
16094
|
{
|
|
16108
16095
|
version: 27,
|
|
16109
16096
|
name: "backfill-canonical-names",
|
|
16110
|
-
up:
|
|
16097
|
+
up: up32
|
|
16111
16098
|
},
|
|
16112
16099
|
{
|
|
16113
16100
|
version: 28,
|
|
16114
16101
|
name: "lossless-retention",
|
|
16115
|
-
up:
|
|
16102
|
+
up: up33
|
|
16116
16103
|
},
|
|
16117
16104
|
{
|
|
16118
16105
|
version: 29,
|
|
16119
16106
|
name: "session-summary-dag",
|
|
16120
|
-
up:
|
|
16107
|
+
up: up34
|
|
16121
16108
|
},
|
|
16122
16109
|
{
|
|
16123
16110
|
version: 30,
|
|
16124
16111
|
name: "nullable-memory-job-memory-id",
|
|
16125
|
-
up:
|
|
16112
|
+
up: up35
|
|
16126
16113
|
},
|
|
16127
16114
|
{
|
|
16128
16115
|
version: 31,
|
|
16129
16116
|
name: "dependency-reason",
|
|
16130
|
-
up:
|
|
16117
|
+
up: up36,
|
|
16131
16118
|
artifacts: {
|
|
16132
16119
|
columns: [
|
|
16133
16120
|
{ table: "entity_dependencies", column: "reason" },
|
|
@@ -16138,7 +16125,7 @@ var MIGRATIONS = [
|
|
|
16138
16125
|
{
|
|
16139
16126
|
version: 32,
|
|
16140
16127
|
name: "embeddings-vector-column",
|
|
16141
|
-
up:
|
|
16128
|
+
up: up37,
|
|
16142
16129
|
artifacts: {
|
|
16143
16130
|
columns: [{ table: "embeddings", column: "vector", optional: true }]
|
|
16144
16131
|
}
|
|
@@ -16146,7 +16133,7 @@ var MIGRATIONS = [
|
|
|
16146
16133
|
{
|
|
16147
16134
|
version: 33,
|
|
16148
16135
|
name: "scope",
|
|
16149
|
-
up:
|
|
16136
|
+
up: up38,
|
|
16150
16137
|
artifacts: {
|
|
16151
16138
|
columns: [{ table: "memories", column: "scope" }]
|
|
16152
16139
|
}
|
|
@@ -16154,17 +16141,17 @@ var MIGRATIONS = [
|
|
|
16154
16141
|
{
|
|
16155
16142
|
version: 34,
|
|
16156
16143
|
name: "scope-aware-dedup",
|
|
16157
|
-
up:
|
|
16144
|
+
up: up39
|
|
16158
16145
|
},
|
|
16159
16146
|
{
|
|
16160
16147
|
version: 35,
|
|
16161
16148
|
name: "entity-fts",
|
|
16162
|
-
up:
|
|
16149
|
+
up: up40
|
|
16163
16150
|
},
|
|
16164
16151
|
{
|
|
16165
16152
|
version: 36,
|
|
16166
16153
|
name: "dependency-confidence",
|
|
16167
|
-
up:
|
|
16154
|
+
up: up41,
|
|
16168
16155
|
artifacts: {
|
|
16169
16156
|
columns: [{ table: "entity_dependencies", column: "confidence" }]
|
|
16170
16157
|
}
|
|
@@ -16172,7 +16159,7 @@ var MIGRATIONS = [
|
|
|
16172
16159
|
{
|
|
16173
16160
|
version: 37,
|
|
16174
16161
|
name: "entity-communities",
|
|
16175
|
-
up:
|
|
16162
|
+
up: up42,
|
|
16176
16163
|
artifacts: {
|
|
16177
16164
|
tables: ["entity_communities"],
|
|
16178
16165
|
columns: [{ table: "entities", column: "community_id" }]
|
|
@@ -16181,24 +16168,24 @@ var MIGRATIONS = [
|
|
|
16181
16168
|
{
|
|
16182
16169
|
version: 38,
|
|
16183
16170
|
name: "memory-hints",
|
|
16184
|
-
up:
|
|
16171
|
+
up: up43,
|
|
16185
16172
|
artifacts: { tables: ["memory_hints"] }
|
|
16186
16173
|
},
|
|
16187
16174
|
{
|
|
16188
16175
|
version: 39,
|
|
16189
16176
|
name: "dedup-entity-dependencies",
|
|
16190
|
-
up:
|
|
16177
|
+
up: up44
|
|
16191
16178
|
},
|
|
16192
16179
|
{
|
|
16193
16180
|
version: 40,
|
|
16194
16181
|
name: "session-transcripts",
|
|
16195
|
-
up:
|
|
16182
|
+
up: up45,
|
|
16196
16183
|
artifacts: { tables: ["session_transcripts"] }
|
|
16197
16184
|
},
|
|
16198
16185
|
{
|
|
16199
16186
|
version: 41,
|
|
16200
16187
|
name: "path-feedback",
|
|
16201
|
-
up:
|
|
16188
|
+
up: up46,
|
|
16202
16189
|
artifacts: {
|
|
16203
16190
|
tables: [
|
|
16204
16191
|
"path_feedback_events",
|
|
@@ -16213,7 +16200,7 @@ var MIGRATIONS = [
|
|
|
16213
16200
|
{
|
|
16214
16201
|
version: 42,
|
|
16215
16202
|
name: "session-memories-agent-id",
|
|
16216
|
-
up:
|
|
16203
|
+
up: up47,
|
|
16217
16204
|
artifacts: {
|
|
16218
16205
|
columns: [{ table: "session_memories", column: "agent_id" }]
|
|
16219
16206
|
}
|
|
@@ -16221,7 +16208,7 @@ var MIGRATIONS = [
|
|
|
16221
16208
|
{
|
|
16222
16209
|
version: 43,
|
|
16223
16210
|
name: "agents-table",
|
|
16224
|
-
up:
|
|
16211
|
+
up: up48,
|
|
16225
16212
|
artifacts: {
|
|
16226
16213
|
tables: ["agents"],
|
|
16227
16214
|
columns: [
|
|
@@ -16233,7 +16220,7 @@ var MIGRATIONS = [
|
|
|
16233
16220
|
{
|
|
16234
16221
|
version: 44,
|
|
16235
16222
|
name: "memory-md-temporal-head",
|
|
16236
|
-
up:
|
|
16223
|
+
up: up49,
|
|
16237
16224
|
artifacts: {
|
|
16238
16225
|
columns: [
|
|
16239
16226
|
{ table: "session_summaries", column: "source_type" },
|
|
@@ -16245,7 +16232,7 @@ var MIGRATIONS = [
|
|
|
16245
16232
|
{
|
|
16246
16233
|
version: 45,
|
|
16247
16234
|
name: "lossless-working-memory-hardening",
|
|
16248
|
-
up:
|
|
16235
|
+
up: up50,
|
|
16249
16236
|
artifacts: {
|
|
16250
16237
|
tables: ["session_transcripts_fts", "memory_md_heads"],
|
|
16251
16238
|
columns: [
|
|
@@ -16258,17 +16245,17 @@ var MIGRATIONS = [
|
|
|
16258
16245
|
{
|
|
16259
16246
|
version: 46,
|
|
16260
16247
|
name: "session-summary-uniqueness",
|
|
16261
|
-
up:
|
|
16248
|
+
up: up51
|
|
16262
16249
|
},
|
|
16263
16250
|
{
|
|
16264
16251
|
version: 47,
|
|
16265
16252
|
name: "agent-scoped-temporal-uniqueness",
|
|
16266
|
-
up:
|
|
16253
|
+
up: up52
|
|
16267
16254
|
},
|
|
16268
16255
|
{
|
|
16269
16256
|
version: 48,
|
|
16270
16257
|
name: "thread-heads",
|
|
16271
|
-
up:
|
|
16258
|
+
up: up53,
|
|
16272
16259
|
artifacts: {
|
|
16273
16260
|
tables: ["memory_thread_heads"]
|
|
16274
16261
|
}
|
|
@@ -16276,7 +16263,7 @@ var MIGRATIONS = [
|
|
|
16276
16263
|
{
|
|
16277
16264
|
version: 49,
|
|
16278
16265
|
name: "session-extract-cursors",
|
|
16279
|
-
up:
|
|
16266
|
+
up: up54,
|
|
16280
16267
|
artifacts: {
|
|
16281
16268
|
tables: ["session_extract_cursors"]
|
|
16282
16269
|
}
|
|
@@ -16284,7 +16271,7 @@ var MIGRATIONS = [
|
|
|
16284
16271
|
{
|
|
16285
16272
|
version: 50,
|
|
16286
16273
|
name: "related-to-audit",
|
|
16287
|
-
up:
|
|
16274
|
+
up: up55,
|
|
16288
16275
|
artifacts: {
|
|
16289
16276
|
tables: ["entity_dependency_history"]
|
|
16290
16277
|
}
|
|
@@ -16292,7 +16279,7 @@ var MIGRATIONS = [
|
|
|
16292
16279
|
{
|
|
16293
16280
|
version: 51,
|
|
16294
16281
|
name: "memory-md-rolling-window-lineage",
|
|
16295
|
-
up:
|
|
16282
|
+
up: up56,
|
|
16296
16283
|
artifacts: {
|
|
16297
16284
|
tables: ["memory_artifacts", "memory_artifact_tombstones", "memory_artifacts_fts"],
|
|
16298
16285
|
columns: [
|
|
@@ -16307,15 +16294,12 @@ var MIGRATIONS = [
|
|
|
16307
16294
|
{
|
|
16308
16295
|
version: 52,
|
|
16309
16296
|
name: "mcp-invocations",
|
|
16310
|
-
up:
|
|
16311
|
-
artifacts: {
|
|
16312
|
-
tables: ["mcp_invocations"]
|
|
16313
|
-
}
|
|
16297
|
+
up: up57
|
|
16314
16298
|
},
|
|
16315
16299
|
{
|
|
16316
16300
|
version: 53,
|
|
16317
16301
|
name: "skill-invocations",
|
|
16318
|
-
up:
|
|
16302
|
+
up: up58,
|
|
16319
16303
|
artifacts: {
|
|
16320
16304
|
tables: ["skill_invocations"]
|
|
16321
16305
|
}
|
|
@@ -16323,7 +16307,7 @@ var MIGRATIONS = [
|
|
|
16323
16307
|
{
|
|
16324
16308
|
version: 54,
|
|
16325
16309
|
name: "task-agent-scope",
|
|
16326
|
-
up:
|
|
16310
|
+
up: up59,
|
|
16327
16311
|
artifacts: {
|
|
16328
16312
|
tables: ["task_scope_hints"]
|
|
16329
16313
|
}
|
|
@@ -16331,7 +16315,7 @@ var MIGRATIONS = [
|
|
|
16331
16315
|
{
|
|
16332
16316
|
version: 55,
|
|
16333
16317
|
name: "dreaming-state",
|
|
16334
|
-
up:
|
|
16318
|
+
up: up60,
|
|
16335
16319
|
artifacts: {
|
|
16336
16320
|
tables: ["dreaming_state", "dreaming_passes"]
|
|
16337
16321
|
}
|
|
@@ -16339,22 +16323,22 @@ var MIGRATIONS = [
|
|
|
16339
16323
|
{
|
|
16340
16324
|
version: 56,
|
|
16341
16325
|
name: "agent-scoped-content-hash",
|
|
16342
|
-
up:
|
|
16326
|
+
up: up61
|
|
16343
16327
|
},
|
|
16344
16328
|
{
|
|
16345
16329
|
version: 57,
|
|
16346
16330
|
name: "memories-fts-tokenizer-repair",
|
|
16347
|
-
up:
|
|
16331
|
+
up: up62
|
|
16348
16332
|
},
|
|
16349
16333
|
{
|
|
16350
16334
|
version: 58,
|
|
16351
16335
|
name: "knowledge-graph-indices",
|
|
16352
|
-
up:
|
|
16336
|
+
up: up63
|
|
16353
16337
|
},
|
|
16354
16338
|
{
|
|
16355
16339
|
version: 59,
|
|
16356
16340
|
name: "entity-attribute-claim-key",
|
|
16357
|
-
up:
|
|
16341
|
+
up: up64,
|
|
16358
16342
|
artifacts: {
|
|
16359
16343
|
columns: [{ table: "entity_attributes", column: "claim_key" }]
|
|
16360
16344
|
}
|
|
@@ -16362,7 +16346,7 @@ var MIGRATIONS = [
|
|
|
16362
16346
|
{
|
|
16363
16347
|
version: 60,
|
|
16364
16348
|
name: "entity-attribute-group-key",
|
|
16365
|
-
up:
|
|
16349
|
+
up: up65,
|
|
16366
16350
|
artifacts: {
|
|
16367
16351
|
columns: [{ table: "entity_attributes", column: "group_key" }]
|
|
16368
16352
|
}
|
|
@@ -16370,7 +16354,7 @@ var MIGRATIONS = [
|
|
|
16370
16354
|
{
|
|
16371
16355
|
version: 61,
|
|
16372
16356
|
name: "memory-artifact-source-mtime",
|
|
16373
|
-
up:
|
|
16357
|
+
up: up66,
|
|
16374
16358
|
artifacts: {
|
|
16375
16359
|
columns: [{ table: "memory_artifacts", column: "source_mtime_ms" }]
|
|
16376
16360
|
}
|
|
@@ -16378,7 +16362,7 @@ var MIGRATIONS = [
|
|
|
16378
16362
|
{
|
|
16379
16363
|
version: 62,
|
|
16380
16364
|
name: "memory-artifact-soft-delete",
|
|
16381
|
-
up:
|
|
16365
|
+
up: up67,
|
|
16382
16366
|
artifacts: {
|
|
16383
16367
|
columns: [
|
|
16384
16368
|
{ table: "memory_artifacts", column: "is_deleted" },
|
|
@@ -16389,12 +16373,12 @@ var MIGRATIONS = [
|
|
|
16389
16373
|
{
|
|
16390
16374
|
version: 63,
|
|
16391
16375
|
name: "content-only-memories-fts-update",
|
|
16392
|
-
up:
|
|
16376
|
+
up: up68
|
|
16393
16377
|
},
|
|
16394
16378
|
{
|
|
16395
16379
|
version: 64,
|
|
16396
16380
|
name: "source-graph-provenance",
|
|
16397
|
-
up:
|
|
16381
|
+
up: up69,
|
|
16398
16382
|
artifacts: {
|
|
16399
16383
|
columns: [
|
|
16400
16384
|
{ table: "entities", column: "source_path" },
|
|
@@ -16407,7 +16391,7 @@ var MIGRATIONS = [
|
|
|
16407
16391
|
{
|
|
16408
16392
|
version: 65,
|
|
16409
16393
|
name: "source-embedding-agent-scope",
|
|
16410
|
-
up:
|
|
16394
|
+
up: up70,
|
|
16411
16395
|
artifacts: {
|
|
16412
16396
|
columns: [{ table: "embeddings", column: "agent_id", optional: true }]
|
|
16413
16397
|
}
|
|
@@ -16415,7 +16399,7 @@ var MIGRATIONS = [
|
|
|
16415
16399
|
{
|
|
16416
16400
|
version: 66,
|
|
16417
16401
|
name: "memory-search-telemetry",
|
|
16418
|
-
up:
|
|
16402
|
+
up: up71,
|
|
16419
16403
|
artifacts: {
|
|
16420
16404
|
tables: ["memory_search_telemetry"]
|
|
16421
16405
|
}
|
|
@@ -16423,7 +16407,7 @@ var MIGRATIONS = [
|
|
|
16423
16407
|
{
|
|
16424
16408
|
version: 67,
|
|
16425
16409
|
name: "ontology-proposals",
|
|
16426
|
-
up:
|
|
16410
|
+
up: up72,
|
|
16427
16411
|
artifacts: {
|
|
16428
16412
|
tables: ["ontology_proposals"],
|
|
16429
16413
|
columns: [
|
|
@@ -16437,7 +16421,7 @@ var MIGRATIONS = [
|
|
|
16437
16421
|
{
|
|
16438
16422
|
version: 68,
|
|
16439
16423
|
name: "daily-reflections",
|
|
16440
|
-
up:
|
|
16424
|
+
up: up73,
|
|
16441
16425
|
artifacts: {
|
|
16442
16426
|
tables: ["daily_reflections"]
|
|
16443
16427
|
}
|
|
@@ -16445,7 +16429,7 @@ var MIGRATIONS = [
|
|
|
16445
16429
|
{
|
|
16446
16430
|
version: 69,
|
|
16447
16431
|
name: "daily-reflections-multiple-insights",
|
|
16448
|
-
up:
|
|
16432
|
+
up: up74,
|
|
16449
16433
|
artifacts: {
|
|
16450
16434
|
tables: ["daily_reflections"]
|
|
16451
16435
|
}
|
|
@@ -16453,7 +16437,7 @@ var MIGRATIONS = [
|
|
|
16453
16437
|
{
|
|
16454
16438
|
version: 70,
|
|
16455
16439
|
name: "ontology-control-plane-state",
|
|
16456
|
-
up:
|
|
16440
|
+
up: up75,
|
|
16457
16441
|
artifacts: {
|
|
16458
16442
|
columns: [
|
|
16459
16443
|
{ table: "entities", column: "status" },
|
|
@@ -16468,7 +16452,7 @@ var MIGRATIONS = [
|
|
|
16468
16452
|
{
|
|
16469
16453
|
version: 71,
|
|
16470
16454
|
name: "epistemic-assertions",
|
|
16471
|
-
up:
|
|
16455
|
+
up: up76,
|
|
16472
16456
|
artifacts: {
|
|
16473
16457
|
tables: ["epistemic_assertions"]
|
|
16474
16458
|
}
|
|
@@ -16476,7 +16460,7 @@ var MIGRATIONS = [
|
|
|
16476
16460
|
{
|
|
16477
16461
|
version: 72,
|
|
16478
16462
|
name: "agent-scoped-idempotency-key",
|
|
16479
|
-
up:
|
|
16463
|
+
up: up77,
|
|
16480
16464
|
artifacts: {
|
|
16481
16465
|
columns: [
|
|
16482
16466
|
{ table: "memories", column: "idempotency_key" },
|
|
@@ -16487,7 +16471,7 @@ var MIGRATIONS = [
|
|
|
16487
16471
|
{
|
|
16488
16472
|
version: 73,
|
|
16489
16473
|
name: "recall-context-dedupe",
|
|
16490
|
-
up:
|
|
16474
|
+
up: up78,
|
|
16491
16475
|
artifacts: {
|
|
16492
16476
|
tables: ["session_context_epochs", "session_recall_events"]
|
|
16493
16477
|
}
|
|
@@ -16495,7 +16479,7 @@ var MIGRATIONS = [
|
|
|
16495
16479
|
{
|
|
16496
16480
|
version: 74,
|
|
16497
16481
|
name: "aggregate-memory-links",
|
|
16498
|
-
up:
|
|
16482
|
+
up: up79,
|
|
16499
16483
|
artifacts: {
|
|
16500
16484
|
tables: ["aggregate_memory_sources"]
|
|
16501
16485
|
}
|
|
@@ -16503,7 +16487,7 @@ var MIGRATIONS = [
|
|
|
16503
16487
|
{
|
|
16504
16488
|
version: 75,
|
|
16505
16489
|
name: "memory-artifact-source-provenance",
|
|
16506
|
-
up:
|
|
16490
|
+
up: up80,
|
|
16507
16491
|
artifacts: {
|
|
16508
16492
|
columns: [
|
|
16509
16493
|
{ table: "memory_artifacts", column: "source_id" },
|
|
@@ -16517,7 +16501,7 @@ var MIGRATIONS = [
|
|
|
16517
16501
|
{
|
|
16518
16502
|
version: 76,
|
|
16519
16503
|
name: "temporal-edges",
|
|
16520
|
-
up:
|
|
16504
|
+
up: up81,
|
|
16521
16505
|
artifacts: {
|
|
16522
16506
|
tables: ["temporal_edges"]
|
|
16523
16507
|
}
|
|
@@ -16525,7 +16509,7 @@ var MIGRATIONS = [
|
|
|
16525
16509
|
{
|
|
16526
16510
|
version: 77,
|
|
16527
16511
|
name: "entity-aliases",
|
|
16528
|
-
up:
|
|
16512
|
+
up: up82,
|
|
16529
16513
|
artifacts: {
|
|
16530
16514
|
tables: ["entity_aliases"]
|
|
16531
16515
|
}
|
|
@@ -16533,7 +16517,7 @@ var MIGRATIONS = [
|
|
|
16533
16517
|
{
|
|
16534
16518
|
version: 78,
|
|
16535
16519
|
name: "api-keys",
|
|
16536
|
-
up:
|
|
16520
|
+
up: up83,
|
|
16537
16521
|
artifacts: {
|
|
16538
16522
|
tables: ["api_keys"]
|
|
16539
16523
|
}
|
|
@@ -16541,7 +16525,7 @@ var MIGRATIONS = [
|
|
|
16541
16525
|
{
|
|
16542
16526
|
version: 79,
|
|
16543
16527
|
name: "transcript-capture-jobs",
|
|
16544
|
-
up:
|
|
16528
|
+
up: up84,
|
|
16545
16529
|
artifacts: {
|
|
16546
16530
|
tables: ["transcript_capture_jobs"]
|
|
16547
16531
|
}
|
|
@@ -16549,7 +16533,7 @@ var MIGRATIONS = [
|
|
|
16549
16533
|
{
|
|
16550
16534
|
version: 80,
|
|
16551
16535
|
name: "document-scope-columns",
|
|
16552
|
-
up:
|
|
16536
|
+
up: up85,
|
|
16553
16537
|
artifacts: {
|
|
16554
16538
|
columns: [
|
|
16555
16539
|
{ table: "documents", column: "agent_id" },
|
|
@@ -16560,7 +16544,7 @@ var MIGRATIONS = [
|
|
|
16560
16544
|
{
|
|
16561
16545
|
version: 81,
|
|
16562
16546
|
name: "aggregate-evidence-sources",
|
|
16563
|
-
up:
|
|
16547
|
+
up: up86,
|
|
16564
16548
|
artifacts: {
|
|
16565
16549
|
tables: ["aggregate_evidence_sources"]
|
|
16566
16550
|
}
|
|
@@ -16568,7 +16552,7 @@ var MIGRATIONS = [
|
|
|
16568
16552
|
{
|
|
16569
16553
|
version: 82,
|
|
16570
16554
|
name: "skill-invocations-harness",
|
|
16571
|
-
up:
|
|
16555
|
+
up: up87,
|
|
16572
16556
|
artifacts: {
|
|
16573
16557
|
columns: [
|
|
16574
16558
|
{ table: "skill_invocations", column: "harness" },
|
|
@@ -16579,7 +16563,7 @@ var MIGRATIONS = [
|
|
|
16579
16563
|
{
|
|
16580
16564
|
version: 83,
|
|
16581
16565
|
name: "memory-lifecycle-repair",
|
|
16582
|
-
up:
|
|
16566
|
+
up: up88,
|
|
16583
16567
|
artifacts: {
|
|
16584
16568
|
tables: ["transcript_capture_jobs", "aggregate_evidence_sources", "entity_dependencies"],
|
|
16585
16569
|
columns: [
|
|
@@ -16594,7 +16578,7 @@ var MIGRATIONS = [
|
|
|
16594
16578
|
{
|
|
16595
16579
|
version: 84,
|
|
16596
16580
|
name: "legacy-markdown-import-state",
|
|
16597
|
-
up:
|
|
16581
|
+
up: up89,
|
|
16598
16582
|
artifacts: {
|
|
16599
16583
|
tables: ["legacy_markdown_imports", "legacy_markdown_chunks"]
|
|
16600
16584
|
}
|
|
@@ -16602,7 +16586,7 @@ var MIGRATIONS = [
|
|
|
16602
16586
|
{
|
|
16603
16587
|
version: 85,
|
|
16604
16588
|
name: "backfill-relations-to-dependencies",
|
|
16605
|
-
up:
|
|
16589
|
+
up: up90,
|
|
16606
16590
|
artifacts: {
|
|
16607
16591
|
tables: ["entity_dependencies"]
|
|
16608
16592
|
}
|
|
@@ -16610,7 +16594,7 @@ var MIGRATIONS = [
|
|
|
16610
16594
|
{
|
|
16611
16595
|
version: 86,
|
|
16612
16596
|
name: "summary-jobs-content-hash",
|
|
16613
|
-
up:
|
|
16597
|
+
up: up91,
|
|
16614
16598
|
artifacts: {
|
|
16615
16599
|
columns: [{ table: "summary_jobs", column: "content_hash" }]
|
|
16616
16600
|
}
|
|
@@ -16618,7 +16602,7 @@ var MIGRATIONS = [
|
|
|
16618
16602
|
{
|
|
16619
16603
|
version: 87,
|
|
16620
16604
|
name: "summary-jobs-boundary-reason",
|
|
16621
|
-
up:
|
|
16605
|
+
up: up92,
|
|
16622
16606
|
artifacts: {
|
|
16623
16607
|
columns: [{ table: "summary_jobs", column: "boundary_reason" }]
|
|
16624
16608
|
}
|
|
@@ -16626,7 +16610,7 @@ var MIGRATIONS = [
|
|
|
16626
16610
|
{
|
|
16627
16611
|
version: 88,
|
|
16628
16612
|
name: "transcript-recovery-files",
|
|
16629
|
-
up:
|
|
16613
|
+
up: up93,
|
|
16630
16614
|
artifacts: {
|
|
16631
16615
|
tables: ["transcript_recovery_files"]
|
|
16632
16616
|
}
|
|
@@ -16634,7 +16618,7 @@ var MIGRATIONS = [
|
|
|
16634
16618
|
{
|
|
16635
16619
|
version: 89,
|
|
16636
16620
|
name: "job-cancellations",
|
|
16637
|
-
up:
|
|
16621
|
+
up: up94,
|
|
16638
16622
|
artifacts: {
|
|
16639
16623
|
tables: ["job_cancellations"]
|
|
16640
16624
|
}
|
|
@@ -16642,7 +16626,7 @@ var MIGRATIONS = [
|
|
|
16642
16626
|
{
|
|
16643
16627
|
version: 90,
|
|
16644
16628
|
name: "job-archive",
|
|
16645
|
-
up:
|
|
16629
|
+
up: up95,
|
|
16646
16630
|
artifacts: {
|
|
16647
16631
|
tables: ["job_archive"]
|
|
16648
16632
|
}
|
|
@@ -16650,25 +16634,25 @@ var MIGRATIONS = [
|
|
|
16650
16634
|
{
|
|
16651
16635
|
version: 91,
|
|
16652
16636
|
name: "embedding-index-generations",
|
|
16653
|
-
up:
|
|
16637
|
+
up: up96,
|
|
16654
16638
|
artifacts: { tables: ["embedding_index_state"] }
|
|
16655
16639
|
},
|
|
16656
16640
|
{
|
|
16657
16641
|
version: 92,
|
|
16658
16642
|
name: "embedding-staging-store",
|
|
16659
|
-
up:
|
|
16643
|
+
up: up97,
|
|
16660
16644
|
artifacts: { tables: ["embeddings_staging"] }
|
|
16661
16645
|
},
|
|
16662
16646
|
{
|
|
16663
16647
|
version: 93,
|
|
16664
16648
|
name: "dreaming-evidence-cursor",
|
|
16665
|
-
up:
|
|
16649
|
+
up: up98,
|
|
16666
16650
|
artifacts: { columns: [{ table: "dreaming_state", column: "evidence_cursor" }] }
|
|
16667
16651
|
},
|
|
16668
16652
|
{
|
|
16669
16653
|
version: 94,
|
|
16670
16654
|
name: "memory-kind",
|
|
16671
|
-
up:
|
|
16655
|
+
up: up99,
|
|
16672
16656
|
artifacts: {
|
|
16673
16657
|
columns: [
|
|
16674
16658
|
{ table: "memories", column: "memory_kind" },
|
|
@@ -16679,35 +16663,35 @@ var MIGRATIONS = [
|
|
|
16679
16663
|
{
|
|
16680
16664
|
version: 95,
|
|
16681
16665
|
name: "compaction-recall-projections",
|
|
16682
|
-
up:
|
|
16666
|
+
up: up100
|
|
16683
16667
|
},
|
|
16684
16668
|
{
|
|
16685
16669
|
version: 96,
|
|
16686
16670
|
name: "retire-legacy-ingestion",
|
|
16687
|
-
up:
|
|
16671
|
+
up: up101
|
|
16688
16672
|
},
|
|
16689
16673
|
{
|
|
16690
16674
|
version: 97,
|
|
16691
16675
|
name: "dreaming-failure-backoff",
|
|
16692
|
-
up:
|
|
16676
|
+
up: up102,
|
|
16693
16677
|
artifacts: { columns: [{ table: "dreaming_state", column: "last_failure_at" }] }
|
|
16694
16678
|
},
|
|
16695
16679
|
{
|
|
16696
16680
|
version: 98,
|
|
16697
16681
|
name: "dreaming-evidence-exclusions",
|
|
16698
|
-
up:
|
|
16682
|
+
up: up103,
|
|
16699
16683
|
artifacts: { tables: ["dreaming_evidence_exclusions"] }
|
|
16700
16684
|
},
|
|
16701
16685
|
{
|
|
16702
16686
|
version: 99,
|
|
16703
16687
|
name: "dreaming-tool-calls",
|
|
16704
|
-
up:
|
|
16688
|
+
up: up104,
|
|
16705
16689
|
artifacts: { tables: ["dreaming_tool_calls"] }
|
|
16706
16690
|
},
|
|
16707
16691
|
{
|
|
16708
16692
|
version: 100,
|
|
16709
16693
|
name: "dreaming-runbook",
|
|
16710
|
-
up:
|
|
16694
|
+
up: up105,
|
|
16711
16695
|
artifacts: {
|
|
16712
16696
|
columns: [
|
|
16713
16697
|
{ table: "dreaming_passes", column: "evidence_window_json" },
|
|
@@ -16718,23 +16702,23 @@ var MIGRATIONS = [
|
|
|
16718
16702
|
{
|
|
16719
16703
|
version: 101,
|
|
16720
16704
|
name: "dreaming-attention",
|
|
16721
|
-
up:
|
|
16705
|
+
up: up106,
|
|
16722
16706
|
artifacts: { tables: ["dreaming_attention"] }
|
|
16723
16707
|
},
|
|
16724
16708
|
{
|
|
16725
16709
|
version: 102,
|
|
16726
16710
|
name: "attribute-semantic-memories",
|
|
16727
|
-
up:
|
|
16711
|
+
up: up107
|
|
16728
16712
|
},
|
|
16729
16713
|
{
|
|
16730
16714
|
version: 103,
|
|
16731
16715
|
name: "semantic-memory-kind",
|
|
16732
|
-
up:
|
|
16716
|
+
up: up108
|
|
16733
16717
|
},
|
|
16734
16718
|
{
|
|
16735
16719
|
version: 104,
|
|
16736
16720
|
name: "derived-memory-provenance",
|
|
16737
|
-
up:
|
|
16721
|
+
up: up109,
|
|
16738
16722
|
artifacts: {
|
|
16739
16723
|
tables: ["derived_memory_sources"],
|
|
16740
16724
|
columns: [{ table: "memories", column: "stale_at" }]
|
|
@@ -16743,12 +16727,12 @@ var MIGRATIONS = [
|
|
|
16743
16727
|
{
|
|
16744
16728
|
version: 105,
|
|
16745
16729
|
name: "agent-scoped-entity-name",
|
|
16746
|
-
up:
|
|
16730
|
+
up: up110
|
|
16747
16731
|
},
|
|
16748
16732
|
{
|
|
16749
16733
|
version: 106,
|
|
16750
16734
|
name: "memory-review-after",
|
|
16751
|
-
up:
|
|
16735
|
+
up: up111,
|
|
16752
16736
|
artifacts: {
|
|
16753
16737
|
columns: [{ table: "memories", column: "review_after" }]
|
|
16754
16738
|
}
|
|
@@ -16756,7 +16740,7 @@ var MIGRATIONS = [
|
|
|
16756
16740
|
{
|
|
16757
16741
|
version: 107,
|
|
16758
16742
|
name: "dreaming-pass-usage",
|
|
16759
|
-
up:
|
|
16743
|
+
up: up112,
|
|
16760
16744
|
artifacts: {
|
|
16761
16745
|
columns: [
|
|
16762
16746
|
{ table: "dreaming_passes", column: "tokens_input" },
|
|
@@ -16770,7 +16754,7 @@ var MIGRATIONS = [
|
|
|
16770
16754
|
{
|
|
16771
16755
|
version: 108,
|
|
16772
16756
|
name: "embedding-usage",
|
|
16773
|
-
up:
|
|
16757
|
+
up: up113,
|
|
16774
16758
|
artifacts: {
|
|
16775
16759
|
tables: ["embedding_usage"]
|
|
16776
16760
|
}
|
|
@@ -16778,7 +16762,7 @@ var MIGRATIONS = [
|
|
|
16778
16762
|
{
|
|
16779
16763
|
version: 109,
|
|
16780
16764
|
name: "telemetry-install",
|
|
16781
|
-
up:
|
|
16765
|
+
up: up114,
|
|
16782
16766
|
artifacts: {
|
|
16783
16767
|
tables: ["telemetry_install"]
|
|
16784
16768
|
}
|
|
@@ -16786,12 +16770,12 @@ var MIGRATIONS = [
|
|
|
16786
16770
|
{
|
|
16787
16771
|
version: 110,
|
|
16788
16772
|
name: "memory-mention-join-index",
|
|
16789
|
-
up:
|
|
16773
|
+
up: up115
|
|
16790
16774
|
},
|
|
16791
16775
|
{
|
|
16792
16776
|
version: 111,
|
|
16793
16777
|
name: "telemetry-first-use",
|
|
16794
|
-
up:
|
|
16778
|
+
up: up116,
|
|
16795
16779
|
artifacts: {
|
|
16796
16780
|
columns: [
|
|
16797
16781
|
{ table: "telemetry_install", column: "first_remember_at" },
|
|
@@ -16802,7 +16786,7 @@ var MIGRATIONS = [
|
|
|
16802
16786
|
{
|
|
16803
16787
|
version: 112,
|
|
16804
16788
|
name: "telemetry-queue-ownership",
|
|
16805
|
-
up:
|
|
16789
|
+
up: up117,
|
|
16806
16790
|
artifacts: {
|
|
16807
16791
|
columns: [
|
|
16808
16792
|
{ table: "telemetry_events", column: "source" },
|
|
@@ -16814,7 +16798,7 @@ var MIGRATIONS = [
|
|
|
16814
16798
|
{
|
|
16815
16799
|
version: 113,
|
|
16816
16800
|
name: "session-claims",
|
|
16817
|
-
up:
|
|
16801
|
+
up: up118,
|
|
16818
16802
|
artifacts: {
|
|
16819
16803
|
tables: ["session_claims"],
|
|
16820
16804
|
columns: [
|
|
@@ -16828,12 +16812,12 @@ var MIGRATIONS = [
|
|
|
16828
16812
|
{
|
|
16829
16813
|
version: 114,
|
|
16830
16814
|
name: "memory-traversal-hydration-index",
|
|
16831
|
-
up:
|
|
16815
|
+
up: up119
|
|
16832
16816
|
},
|
|
16833
16817
|
{
|
|
16834
16818
|
version: 115,
|
|
16835
16819
|
name: "cross-agent-message-notifications",
|
|
16836
|
-
up:
|
|
16820
|
+
up: up120,
|
|
16837
16821
|
artifacts: {
|
|
16838
16822
|
tables: ["cross_agent_messages", "cross_agent_message_receipts"]
|
|
16839
16823
|
}
|
|
@@ -16841,7 +16825,7 @@ var MIGRATIONS = [
|
|
|
16841
16825
|
{
|
|
16842
16826
|
version: 116,
|
|
16843
16827
|
name: "acp-delivery-reconciliation",
|
|
16844
|
-
up:
|
|
16828
|
+
up: up121,
|
|
16845
16829
|
artifacts: {
|
|
16846
16830
|
columns: [
|
|
16847
16831
|
{ table: "cross_agent_messages", column: "delivery_state" },
|
|
@@ -16855,7 +16839,7 @@ var MIGRATIONS = [
|
|
|
16855
16839
|
{
|
|
16856
16840
|
version: 117,
|
|
16857
16841
|
name: "retire-summary-worker",
|
|
16858
|
-
up:
|
|
16842
|
+
up: up122,
|
|
16859
16843
|
artifacts: {
|
|
16860
16844
|
columns: [
|
|
16861
16845
|
{ table: "session_transcripts", column: "completed_at" },
|
|
@@ -16866,24 +16850,24 @@ var MIGRATIONS = [
|
|
|
16866
16850
|
{
|
|
16867
16851
|
version: 118,
|
|
16868
16852
|
name: "queue-pressure-indices",
|
|
16869
|
-
up:
|
|
16853
|
+
up: up123
|
|
16870
16854
|
},
|
|
16871
16855
|
{
|
|
16872
16856
|
version: 119,
|
|
16873
16857
|
name: "telemetry-version-observation",
|
|
16874
|
-
up:
|
|
16858
|
+
up: up124,
|
|
16875
16859
|
artifacts: { columns: [{ table: "telemetry_install", column: "last_seen_version" }] }
|
|
16876
16860
|
},
|
|
16877
16861
|
{
|
|
16878
16862
|
version: 120,
|
|
16879
16863
|
name: "source-lifecycle-telemetry",
|
|
16880
|
-
up:
|
|
16864
|
+
up: up125,
|
|
16881
16865
|
artifacts: { tables: ["source_lifecycle_state"] }
|
|
16882
16866
|
},
|
|
16883
16867
|
{
|
|
16884
16868
|
version: 121,
|
|
16885
16869
|
name: "telemetry-delivery-health",
|
|
16886
|
-
up:
|
|
16870
|
+
up: up126,
|
|
16887
16871
|
artifacts: {
|
|
16888
16872
|
tables: ["telemetry_delivery_state"],
|
|
16889
16873
|
columns: [
|
|
@@ -16897,7 +16881,7 @@ var MIGRATIONS = [
|
|
|
16897
16881
|
{
|
|
16898
16882
|
version: 122,
|
|
16899
16883
|
name: "dreaming-evidence-retry",
|
|
16900
|
-
up:
|
|
16884
|
+
up: up127,
|
|
16901
16885
|
artifacts: {
|
|
16902
16886
|
columns: [
|
|
16903
16887
|
{ table: "dreaming_evidence_exclusions", column: "failure_class" },
|
|
@@ -16910,13 +16894,13 @@ var MIGRATIONS = [
|
|
|
16910
16894
|
{
|
|
16911
16895
|
version: 123,
|
|
16912
16896
|
name: "embedding-index-failures",
|
|
16913
|
-
up:
|
|
16897
|
+
up: up128,
|
|
16914
16898
|
artifacts: { tables: ["embedding_index_failures"] }
|
|
16915
16899
|
},
|
|
16916
16900
|
{
|
|
16917
16901
|
version: 124,
|
|
16918
16902
|
name: "import-derived-lifecycle",
|
|
16919
|
-
up:
|
|
16903
|
+
up: up129,
|
|
16920
16904
|
artifacts: {
|
|
16921
16905
|
tables: ["imported_source_lifecycle"]
|
|
16922
16906
|
}
|
|
@@ -16924,77 +16908,77 @@ var MIGRATIONS = [
|
|
|
16924
16908
|
{
|
|
16925
16909
|
version: 125,
|
|
16926
16910
|
name: "memory-content-safety",
|
|
16927
|
-
up:
|
|
16911
|
+
up: up130,
|
|
16928
16912
|
artifacts: { tables: ["memory_content_safety"] }
|
|
16929
16913
|
},
|
|
16930
16914
|
{
|
|
16931
16915
|
version: 126,
|
|
16932
16916
|
name: "dreaming-surprisal-attention",
|
|
16933
|
-
up:
|
|
16917
|
+
up: up131,
|
|
16934
16918
|
artifacts: { tables: ["dreaming_attention"] }
|
|
16935
16919
|
},
|
|
16936
16920
|
{
|
|
16937
16921
|
version: 127,
|
|
16938
16922
|
name: "ontology-contradictions",
|
|
16939
|
-
up:
|
|
16923
|
+
up: up132,
|
|
16940
16924
|
artifacts: { tables: ["ontology_contradictions"] }
|
|
16941
16925
|
},
|
|
16942
16926
|
{
|
|
16943
16927
|
version: 128,
|
|
16944
16928
|
name: "bounded-queue-diagnostics",
|
|
16945
|
-
up:
|
|
16929
|
+
up: up133
|
|
16946
16930
|
},
|
|
16947
16931
|
{
|
|
16948
16932
|
version: 129,
|
|
16949
16933
|
name: "retire-structural-jobs",
|
|
16950
|
-
up:
|
|
16934
|
+
up: up134
|
|
16951
16935
|
},
|
|
16952
16936
|
{
|
|
16953
16937
|
version: 130,
|
|
16954
16938
|
name: "embedding-repair-state",
|
|
16955
|
-
up:
|
|
16939
|
+
up: up135,
|
|
16956
16940
|
artifacts: { tables: ["embedding_repair_budget", "embedding_repair_backoff"] }
|
|
16957
16941
|
},
|
|
16958
16942
|
{
|
|
16959
16943
|
version: 131,
|
|
16960
16944
|
name: "dreaming-evidence-consumption",
|
|
16961
|
-
up:
|
|
16945
|
+
up: up136,
|
|
16962
16946
|
artifacts: { tables: ["dreaming_evidence_consumption"] }
|
|
16963
16947
|
},
|
|
16964
16948
|
{
|
|
16965
16949
|
version: 132,
|
|
16966
16950
|
name: "observer-scoped-epistemic-assertions",
|
|
16967
|
-
up:
|
|
16951
|
+
up: up137,
|
|
16968
16952
|
artifacts: { tables: ["epistemic_assertions"] }
|
|
16969
16953
|
},
|
|
16970
16954
|
{
|
|
16971
16955
|
version: 133,
|
|
16972
16956
|
name: "dreaming-memory-head",
|
|
16973
|
-
up:
|
|
16957
|
+
up: up138,
|
|
16974
16958
|
artifacts: { tables: ["memory_head_revisions", "memory_head_entries", "memory_head_revision_entries"] }
|
|
16975
16959
|
},
|
|
16976
16960
|
{
|
|
16977
16961
|
version: 134,
|
|
16978
16962
|
name: "scope-memory-head-entries",
|
|
16979
|
-
up:
|
|
16963
|
+
up: up139,
|
|
16980
16964
|
artifacts: { tables: ["memory_head_entries"] }
|
|
16981
16965
|
},
|
|
16982
16966
|
{
|
|
16983
16967
|
version: 135,
|
|
16984
16968
|
name: "memory-head-publication",
|
|
16985
|
-
up:
|
|
16969
|
+
up: up140,
|
|
16986
16970
|
artifacts: { tables: ["memory_head_publications"] }
|
|
16987
16971
|
},
|
|
16988
16972
|
{
|
|
16989
16973
|
version: 136,
|
|
16990
16974
|
name: "memory-head-revisions",
|
|
16991
|
-
up:
|
|
16975
|
+
up: up141,
|
|
16992
16976
|
artifacts: { tables: ["memory_head_revisions"] }
|
|
16993
16977
|
},
|
|
16994
16978
|
{
|
|
16995
16979
|
version: 137,
|
|
16996
16980
|
name: "dreaming-head-manifest",
|
|
16997
|
-
up:
|
|
16981
|
+
up: up142,
|
|
16998
16982
|
artifacts: {
|
|
16999
16983
|
columns: [
|
|
17000
16984
|
{ table: "dreaming_passes", column: "head_revision" },
|
|
@@ -17005,7 +16989,7 @@ var MIGRATIONS = [
|
|
|
17005
16989
|
{
|
|
17006
16990
|
version: 138,
|
|
17007
16991
|
name: "bounded-status-projections",
|
|
17008
|
-
up:
|
|
16992
|
+
up: up143,
|
|
17009
16993
|
artifacts: {
|
|
17010
16994
|
tables: ["transcript_capture_status", "memories_duplicate_hash_counts", "memories_diagnostics_state"]
|
|
17011
16995
|
}
|
|
@@ -17013,31 +16997,31 @@ var MIGRATIONS = [
|
|
|
17013
16997
|
{
|
|
17014
16998
|
version: 139,
|
|
17015
16999
|
name: "native-source-sync-state",
|
|
17016
|
-
up:
|
|
17000
|
+
up: up144,
|
|
17017
17001
|
artifacts: { tables: ["native_source_sync_state"] }
|
|
17018
17002
|
},
|
|
17019
17003
|
{
|
|
17020
17004
|
version: 140,
|
|
17021
17005
|
name: "transcript-recovery-frontier",
|
|
17022
|
-
up:
|
|
17006
|
+
up: up145,
|
|
17023
17007
|
artifacts: { tables: ["transcript_recovery_frontiers"] }
|
|
17024
17008
|
},
|
|
17025
17009
|
{
|
|
17026
17010
|
version: 141,
|
|
17027
17011
|
name: "source-sync-checkpoints",
|
|
17028
|
-
up:
|
|
17012
|
+
up: up146,
|
|
17029
17013
|
artifacts: { tables: ["source_sync_checkpoints"] }
|
|
17030
17014
|
},
|
|
17031
17015
|
{
|
|
17032
17016
|
version: 142,
|
|
17033
17017
|
name: "source-sync-frontier",
|
|
17034
|
-
up:
|
|
17018
|
+
up: up147,
|
|
17035
17019
|
artifacts: { columns: [{ table: "source_sync_checkpoints", column: "frontier" }] }
|
|
17036
17020
|
},
|
|
17037
17021
|
{
|
|
17038
17022
|
version: 143,
|
|
17039
17023
|
name: "embedding-index-progress",
|
|
17040
|
-
up:
|
|
17024
|
+
up: up148,
|
|
17041
17025
|
artifacts: {
|
|
17042
17026
|
columns: [
|
|
17043
17027
|
{ table: "embedding_index_state", column: "migration_phase" },
|
|
@@ -17053,19 +17037,19 @@ var MIGRATIONS = [
|
|
|
17053
17037
|
{
|
|
17054
17038
|
version: 144,
|
|
17055
17039
|
name: "memory-job-lease-token",
|
|
17056
|
-
up:
|
|
17040
|
+
up: up149,
|
|
17057
17041
|
artifacts: { columns: [{ table: "memory_jobs", column: "lease_token" }] }
|
|
17058
17042
|
},
|
|
17059
17043
|
{
|
|
17060
17044
|
version: 145,
|
|
17061
17045
|
name: "dreaming-evidence-reviews",
|
|
17062
|
-
up:
|
|
17046
|
+
up: up150,
|
|
17063
17047
|
artifacts: { tables: ["dreaming_evidence_reviews"] }
|
|
17064
17048
|
},
|
|
17065
17049
|
{
|
|
17066
17050
|
version: 146,
|
|
17067
17051
|
name: "source-transcript-import",
|
|
17068
|
-
up:
|
|
17052
|
+
up: up151,
|
|
17069
17053
|
artifacts: {
|
|
17070
17054
|
tables: [
|
|
17071
17055
|
"source_import_jobs",
|
|
@@ -17084,19 +17068,19 @@ var MIGRATIONS = [
|
|
|
17084
17068
|
{
|
|
17085
17069
|
version: 147,
|
|
17086
17070
|
name: "source-import-replay-file-slots",
|
|
17087
|
-
up:
|
|
17071
|
+
up: up152,
|
|
17088
17072
|
artifacts: { tables: ["source_import_files"] }
|
|
17089
17073
|
},
|
|
17090
17074
|
{
|
|
17091
17075
|
version: 148,
|
|
17092
17076
|
name: "source-import-attempt-provenance",
|
|
17093
|
-
up:
|
|
17077
|
+
up: up153,
|
|
17094
17078
|
artifacts: { columns: [{ table: "source_import_record_attempts", column: "source_id" }] }
|
|
17095
17079
|
},
|
|
17096
17080
|
{
|
|
17097
17081
|
version: 149,
|
|
17098
17082
|
name: "transcript-import-state-machine",
|
|
17099
|
-
up:
|
|
17083
|
+
up: up154,
|
|
17100
17084
|
artifacts: {
|
|
17101
17085
|
columns: [
|
|
17102
17086
|
{ table: "source_import_jobs", column: "duplicate_mode" },
|
|
@@ -17108,7 +17092,7 @@ var MIGRATIONS = [
|
|
|
17108
17092
|
{
|
|
17109
17093
|
version: 150,
|
|
17110
17094
|
name: "memory-head-freshness",
|
|
17111
|
-
up:
|
|
17095
|
+
up: up155,
|
|
17112
17096
|
artifacts: {
|
|
17113
17097
|
columns: [
|
|
17114
17098
|
{ table: "memory_md_heads", column: "is_current" },
|
|
@@ -17154,7 +17138,7 @@ var MIGRATIONS = [
|
|
|
17154
17138
|
{
|
|
17155
17139
|
version: 153,
|
|
17156
17140
|
name: "vector-repair-checkpoints",
|
|
17157
|
-
up:
|
|
17141
|
+
up: up156,
|
|
17158
17142
|
artifacts: { tables: ["vector_repair_checkpoints"] }
|
|
17159
17143
|
},
|
|
17160
17144
|
{
|
|
@@ -17181,13 +17165,13 @@ var MIGRATIONS = [
|
|
|
17181
17165
|
{
|
|
17182
17166
|
version: 156,
|
|
17183
17167
|
name: "embedding-repair-checkpoints",
|
|
17184
|
-
up:
|
|
17168
|
+
up: up157,
|
|
17185
17169
|
artifacts: { tables: ["embedding_repair_checkpoints"] }
|
|
17186
17170
|
},
|
|
17187
17171
|
{
|
|
17188
17172
|
version: 157,
|
|
17189
17173
|
name: "embedding-repair-progress",
|
|
17190
|
-
up:
|
|
17174
|
+
up: up158,
|
|
17191
17175
|
artifacts: {
|
|
17192
17176
|
tables: ["embedding_repair_progress"],
|
|
17193
17177
|
columns: [{ table: "embedding_repair_checkpoints", column: "profile_fingerprint" }]
|
|
@@ -17196,8 +17180,13 @@ var MIGRATIONS = [
|
|
|
17196
17180
|
{
|
|
17197
17181
|
version: 158,
|
|
17198
17182
|
name: "dreaming-candidate-scan-index",
|
|
17199
|
-
up:
|
|
17183
|
+
up: up159,
|
|
17200
17184
|
artifacts: { indexes: ["idx_memories_agent_kind"] }
|
|
17185
|
+
},
|
|
17186
|
+
{
|
|
17187
|
+
version: 159,
|
|
17188
|
+
name: "retire-obsolete-invocation-ledger",
|
|
17189
|
+
up: up5
|
|
17201
17190
|
}
|
|
17202
17191
|
];
|
|
17203
17192
|
var LATEST_SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1]?.version ?? 0;
|
|
@@ -27978,7 +27967,7 @@ var DAEMON_DERIVED_MEMORY_SOURCE_TYPES2 = [
|
|
|
27978
27967
|
"checkpoint",
|
|
27979
27968
|
"dreaming"
|
|
27980
27969
|
];
|
|
27981
|
-
function
|
|
27970
|
+
function up160(db) {
|
|
27982
27971
|
const hasColumn26 = (table, column) => {
|
|
27983
27972
|
const statement = db.prepare(`SELECT 1 FROM pragma_table_info('${table}') WHERE name = ?`);
|
|
27984
27973
|
try {
|
|
@@ -28090,6 +28079,9 @@ function up410(db) {
|
|
|
28090
28079
|
WHERE resolved_at IS NULL;
|
|
28091
28080
|
`);
|
|
28092
28081
|
}
|
|
28082
|
+
function up510(db) {
|
|
28083
|
+
db.exec("DROP TABLE IF EXISTS mcp_invocations");
|
|
28084
|
+
}
|
|
28093
28085
|
var MEMORIES_FTS_TOKENIZER2 = "unicode61";
|
|
28094
28086
|
var FTS_STATE_TABLE2 = "memories_fts_state";
|
|
28095
28087
|
function normalizeSql2(sql) {
|
|
@@ -28205,7 +28197,7 @@ function memoriesFtsNeedsTokenizerRepair2(sql) {
|
|
|
28205
28197
|
return true;
|
|
28206
28198
|
return !normalized.includes(`tokenize='${MEMORIES_FTS_TOKENIZER2}'`);
|
|
28207
28199
|
}
|
|
28208
|
-
function
|
|
28200
|
+
function up610(db) {
|
|
28209
28201
|
db.exec(`
|
|
28210
28202
|
CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
28211
28203
|
version INTEGER PRIMARY KEY,
|
|
@@ -28303,7 +28295,7 @@ function addColumnIfMissing210(db, table, column, definition) {
|
|
|
28303
28295
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
28304
28296
|
}
|
|
28305
28297
|
}
|
|
28306
|
-
function
|
|
28298
|
+
function up710(db) {
|
|
28307
28299
|
addColumnIfMissing210(db, "memories", "content_hash", "TEXT");
|
|
28308
28300
|
addColumnIfMissing210(db, "memories", "normalized_content", "TEXT");
|
|
28309
28301
|
addColumnIfMissing210(db, "memories", "is_deleted", "INTEGER DEFAULT 0");
|
|
@@ -28421,7 +28413,7 @@ function addColumnIfMissing32(db, table, column, definition) {
|
|
|
28421
28413
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
28422
28414
|
return true;
|
|
28423
28415
|
}
|
|
28424
|
-
function
|
|
28416
|
+
function up810(db) {
|
|
28425
28417
|
addColumnIfMissing32(db, "memories", "why", "TEXT");
|
|
28426
28418
|
addColumnIfMissing32(db, "memories", "project", "TEXT");
|
|
28427
28419
|
db.exec(`DROP INDEX IF EXISTS idx_memories_content_hash`);
|
|
@@ -28458,7 +28450,7 @@ function addColumnIfMissing42(db, table, column, definition) {
|
|
|
28458
28450
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
28459
28451
|
}
|
|
28460
28452
|
}
|
|
28461
|
-
function
|
|
28453
|
+
function up910(db) {
|
|
28462
28454
|
addColumnIfMissing42(db, "memory_history", "actor_type", "TEXT");
|
|
28463
28455
|
addColumnIfMissing42(db, "memory_history", "session_id", "TEXT");
|
|
28464
28456
|
addColumnIfMissing42(db, "memory_history", "request_id", "TEXT");
|
|
@@ -28491,7 +28483,7 @@ function addColumnIfMissing52(db, table, column, definition) {
|
|
|
28491
28483
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
28492
28484
|
}
|
|
28493
28485
|
}
|
|
28494
|
-
function
|
|
28486
|
+
function up1010(db) {
|
|
28495
28487
|
addColumnIfMissing52(db, "entities", "canonical_name", "TEXT");
|
|
28496
28488
|
addColumnIfMissing52(db, "entities", "mentions", "INTEGER DEFAULT 0");
|
|
28497
28489
|
addColumnIfMissing52(db, "entities", "embedding", "BLOB");
|
|
@@ -28508,7 +28500,7 @@ function hasColumn42(db, table, column) {
|
|
|
28508
28500
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
28509
28501
|
return rows.some((r22) => r22.name === column);
|
|
28510
28502
|
}
|
|
28511
|
-
function
|
|
28503
|
+
function up1110(db) {
|
|
28512
28504
|
if (!hasColumn42(db, "memories", "idempotency_key")) {
|
|
28513
28505
|
db.exec("ALTER TABLE memories ADD COLUMN idempotency_key TEXT");
|
|
28514
28506
|
}
|
|
@@ -28523,7 +28515,7 @@ function hasColumn52(db, table, column) {
|
|
|
28523
28515
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
28524
28516
|
return rows.some((r22) => r22.name === column);
|
|
28525
28517
|
}
|
|
28526
|
-
function
|
|
28518
|
+
function up1210(db) {
|
|
28527
28519
|
db.exec(`
|
|
28528
28520
|
CREATE TABLE IF NOT EXISTS documents (
|
|
28529
28521
|
id TEXT PRIMARY KEY,
|
|
@@ -28580,7 +28572,7 @@ function up1110(db) {
|
|
|
28580
28572
|
db.exec("ALTER TABLE memory_jobs ADD COLUMN document_id TEXT");
|
|
28581
28573
|
}
|
|
28582
28574
|
}
|
|
28583
|
-
function
|
|
28575
|
+
function up1310(db) {
|
|
28584
28576
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='embeddings'").all();
|
|
28585
28577
|
if (tables.length === 0)
|
|
28586
28578
|
return;
|
|
@@ -28597,7 +28589,7 @@ function up1210(db) {
|
|
|
28597
28589
|
ON embeddings(content_hash)
|
|
28598
28590
|
`);
|
|
28599
28591
|
}
|
|
28600
|
-
function
|
|
28592
|
+
function up1410(db) {
|
|
28601
28593
|
db.exec(`
|
|
28602
28594
|
CREATE TABLE IF NOT EXISTS summary_jobs (
|
|
28603
28595
|
id TEXT PRIMARY KEY,
|
|
@@ -28617,7 +28609,7 @@ function up1310(db) {
|
|
|
28617
28609
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_summary_jobs_status
|
|
28618
28610
|
ON summary_jobs(status)`);
|
|
28619
28611
|
}
|
|
28620
|
-
function
|
|
28612
|
+
function up1510(db) {
|
|
28621
28613
|
db.exec(`
|
|
28622
28614
|
CREATE TABLE IF NOT EXISTS umap_cache (
|
|
28623
28615
|
id INTEGER PRIMARY KEY,
|
|
@@ -28628,7 +28620,7 @@ function up1410(db) {
|
|
|
28628
28620
|
)
|
|
28629
28621
|
`);
|
|
28630
28622
|
}
|
|
28631
|
-
function
|
|
28623
|
+
function up162(db) {
|
|
28632
28624
|
db.exec(`
|
|
28633
28625
|
CREATE TABLE IF NOT EXISTS session_scores (
|
|
28634
28626
|
id TEXT PRIMARY KEY,
|
|
@@ -28648,7 +28640,7 @@ function up1510(db) {
|
|
|
28648
28640
|
ON session_scores(session_key);
|
|
28649
28641
|
`);
|
|
28650
28642
|
}
|
|
28651
|
-
function
|
|
28643
|
+
function up172(db) {
|
|
28652
28644
|
db.exec(`
|
|
28653
28645
|
CREATE TABLE IF NOT EXISTS scheduled_tasks (
|
|
28654
28646
|
id TEXT PRIMARY KEY,
|
|
@@ -28689,7 +28681,7 @@ function addColumnIfMissing62(db, table, column, definition) {
|
|
|
28689
28681
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
28690
28682
|
}
|
|
28691
28683
|
}
|
|
28692
|
-
function
|
|
28684
|
+
function up182(db) {
|
|
28693
28685
|
db.exec(`
|
|
28694
28686
|
CREATE TABLE IF NOT EXISTS ingestion_jobs (
|
|
28695
28687
|
id TEXT PRIMARY KEY,
|
|
@@ -28715,7 +28707,7 @@ function up172(db) {
|
|
|
28715
28707
|
addColumnIfMissing62(db, "memories", "source_path", "TEXT");
|
|
28716
28708
|
addColumnIfMissing62(db, "memories", "source_section", "TEXT");
|
|
28717
28709
|
}
|
|
28718
|
-
function
|
|
28710
|
+
function up192(db) {
|
|
28719
28711
|
db.exec(`
|
|
28720
28712
|
CREATE TABLE IF NOT EXISTS telemetry_events (
|
|
28721
28713
|
id TEXT PRIMARY KEY,
|
|
@@ -28740,7 +28732,7 @@ function addColumnIfMissing72(db, table, column, definition) {
|
|
|
28740
28732
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
28741
28733
|
}
|
|
28742
28734
|
}
|
|
28743
|
-
function
|
|
28735
|
+
function up202(db) {
|
|
28744
28736
|
db.exec(`
|
|
28745
28737
|
CREATE TABLE IF NOT EXISTS session_memories (
|
|
28746
28738
|
id TEXT PRIMARY KEY,
|
|
@@ -28767,7 +28759,7 @@ function up192(db) {
|
|
|
28767
28759
|
addColumnIfMissing72(db, "session_scores", "confidence", "REAL");
|
|
28768
28760
|
addColumnIfMissing72(db, "session_scores", "continuity_reasoning", "TEXT");
|
|
28769
28761
|
}
|
|
28770
|
-
function
|
|
28762
|
+
function up212(db) {
|
|
28771
28763
|
db.exec(`
|
|
28772
28764
|
CREATE TABLE IF NOT EXISTS session_checkpoints (
|
|
28773
28765
|
id TEXT PRIMARY KEY,
|
|
@@ -28789,7 +28781,7 @@ function up202(db) {
|
|
|
28789
28781
|
ON session_checkpoints(project_normalized, created_at DESC);
|
|
28790
28782
|
`);
|
|
28791
28783
|
}
|
|
28792
|
-
function
|
|
28784
|
+
function up222(db) {
|
|
28793
28785
|
const cols = db.prepare("PRAGMA table_info(scheduled_tasks)").all();
|
|
28794
28786
|
const colNames = new Set(cols.flatMap((c22) => typeof c22.name === "string" ? [c22.name] : []));
|
|
28795
28787
|
if (!colNames.has("skill_name")) {
|
|
@@ -28800,7 +28792,7 @@ function up212(db) {
|
|
|
28800
28792
|
CHECK (skill_mode IN ('inject', 'slash') OR skill_mode IS NULL)`);
|
|
28801
28793
|
}
|
|
28802
28794
|
}
|
|
28803
|
-
function
|
|
28795
|
+
function up232(db) {
|
|
28804
28796
|
const existing = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='skill_meta'").get();
|
|
28805
28797
|
if (existing)
|
|
28806
28798
|
return;
|
|
@@ -28832,7 +28824,7 @@ function up222(db) {
|
|
|
28832
28824
|
CREATE INDEX idx_skill_meta_source ON skill_meta(source);
|
|
28833
28825
|
`);
|
|
28834
28826
|
}
|
|
28835
|
-
function
|
|
28827
|
+
function up242(db) {
|
|
28836
28828
|
const entityCols = db.prepare("PRAGMA table_info(entities)").all();
|
|
28837
28829
|
const entityColNames = new Set(entityCols.flatMap((c22) => typeof c22.name === "string" ? [c22.name] : []));
|
|
28838
28830
|
if (!entityColNames.has("agent_id")) {
|
|
@@ -28917,13 +28909,13 @@ function addColumnIfMissing82(db, table, column, definition) {
|
|
|
28917
28909
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
28918
28910
|
}
|
|
28919
28911
|
}
|
|
28920
|
-
function
|
|
28912
|
+
function up252(db) {
|
|
28921
28913
|
addColumnIfMissing82(db, "session_memories", "entity_slot", "INTEGER");
|
|
28922
28914
|
addColumnIfMissing82(db, "session_memories", "aspect_slot", "INTEGER");
|
|
28923
28915
|
addColumnIfMissing82(db, "session_memories", "is_constraint", "INTEGER NOT NULL DEFAULT 0");
|
|
28924
28916
|
addColumnIfMissing82(db, "session_memories", "structural_density", "INTEGER");
|
|
28925
28917
|
}
|
|
28926
|
-
function
|
|
28918
|
+
function up262(db) {
|
|
28927
28919
|
const columns = db.prepare("PRAGMA table_info(session_checkpoints)").all();
|
|
28928
28920
|
const columnNames = new Set(columns.flatMap((column) => typeof column.name === "string" ? [column.name] : []));
|
|
28929
28921
|
if (!columnNames.has("focal_entity_ids")) {
|
|
@@ -28948,25 +28940,25 @@ function addColumnIfMissing92(db, table, column, definition) {
|
|
|
28948
28940
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
28949
28941
|
}
|
|
28950
28942
|
}
|
|
28951
|
-
function
|
|
28943
|
+
function up272(db) {
|
|
28952
28944
|
addColumnIfMissing92(db, "entities", "pinned", "INTEGER NOT NULL DEFAULT 0");
|
|
28953
28945
|
addColumnIfMissing92(db, "entities", "pinned_at", "TEXT");
|
|
28954
28946
|
db.exec("CREATE INDEX IF NOT EXISTS idx_entities_pinned ON entities(agent_id, pinned, pinned_at DESC)");
|
|
28955
28947
|
}
|
|
28956
|
-
function up272(_db) {}
|
|
28957
28948
|
function up282(_db) {}
|
|
28949
|
+
function up292(_db) {}
|
|
28958
28950
|
function addColumnIfMissing102(db, table, column, definition) {
|
|
28959
28951
|
const cols = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
28960
28952
|
if (!cols.some((c22) => c22.name === column)) {
|
|
28961
28953
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
28962
28954
|
}
|
|
28963
28955
|
}
|
|
28964
|
-
function
|
|
28956
|
+
function up302(db) {
|
|
28965
28957
|
addColumnIfMissing102(db, "session_memories", "agent_relevance_score", "REAL");
|
|
28966
28958
|
addColumnIfMissing102(db, "session_memories", "agent_feedback_count", "INTEGER DEFAULT 0");
|
|
28967
28959
|
}
|
|
28968
|
-
function
|
|
28969
|
-
function
|
|
28960
|
+
function up312(_db) {}
|
|
28961
|
+
function up322(db) {
|
|
28970
28962
|
db.exec(`
|
|
28971
28963
|
UPDATE entities
|
|
28972
28964
|
SET canonical_name = REPLACE(REPLACE(REPLACE(
|
|
@@ -28975,7 +28967,7 @@ function up312(db) {
|
|
|
28975
28967
|
WHERE canonical_name IS NULL
|
|
28976
28968
|
`);
|
|
28977
28969
|
}
|
|
28978
|
-
function
|
|
28970
|
+
function up332(db) {
|
|
28979
28971
|
db.exec(`
|
|
28980
28972
|
CREATE TABLE IF NOT EXISTS memories_cold (
|
|
28981
28973
|
archive_id TEXT PRIMARY KEY,
|
|
@@ -29012,7 +29004,7 @@ function up322(db) {
|
|
|
29012
29004
|
CREATE INDEX IF NOT EXISTS idx_cold_source ON memories_cold(cold_source_id);
|
|
29013
29005
|
`);
|
|
29014
29006
|
}
|
|
29015
|
-
function
|
|
29007
|
+
function up342(db) {
|
|
29016
29008
|
db.exec(`
|
|
29017
29009
|
CREATE TABLE IF NOT EXISTS session_summaries (
|
|
29018
29010
|
id TEXT PRIMARY KEY,
|
|
@@ -29057,7 +29049,7 @@ function up332(db) {
|
|
|
29057
29049
|
WHERE session_key IS NOT NULL;
|
|
29058
29050
|
`);
|
|
29059
29051
|
}
|
|
29060
|
-
function
|
|
29052
|
+
function up352(db) {
|
|
29061
29053
|
db.exec(`
|
|
29062
29054
|
CREATE TABLE IF NOT EXISTS memory_jobs_new (
|
|
29063
29055
|
id TEXT PRIMARY KEY,
|
|
@@ -29102,7 +29094,7 @@ function up342(db) {
|
|
|
29102
29094
|
ON memory_jobs(failed_at);
|
|
29103
29095
|
`);
|
|
29104
29096
|
}
|
|
29105
|
-
function
|
|
29097
|
+
function up362(db) {
|
|
29106
29098
|
const depCols = db.prepare("PRAGMA table_info(entity_dependencies)").all();
|
|
29107
29099
|
if (!depCols.some((c22) => c22.name === "reason")) {
|
|
29108
29100
|
db.exec("ALTER TABLE entity_dependencies ADD COLUMN reason TEXT");
|
|
@@ -29112,7 +29104,7 @@ function up352(db) {
|
|
|
29112
29104
|
db.exec("ALTER TABLE entities ADD COLUMN last_synthesized_at TEXT");
|
|
29113
29105
|
}
|
|
29114
29106
|
}
|
|
29115
|
-
function
|
|
29107
|
+
function up372(db) {
|
|
29116
29108
|
const cols = db.prepare("PRAGMA table_info(embeddings)").all();
|
|
29117
29109
|
if (cols.length === 0)
|
|
29118
29110
|
return;
|
|
@@ -29120,14 +29112,14 @@ function up362(db) {
|
|
|
29120
29112
|
db.exec("ALTER TABLE embeddings ADD COLUMN vector BLOB");
|
|
29121
29113
|
}
|
|
29122
29114
|
}
|
|
29123
|
-
function
|
|
29115
|
+
function up382(db) {
|
|
29124
29116
|
const cols = db.prepare("PRAGMA table_info(memories)").all();
|
|
29125
29117
|
if (!cols.some((c22) => c22.name === "scope")) {
|
|
29126
29118
|
db.exec("ALTER TABLE memories ADD COLUMN scope TEXT DEFAULT NULL");
|
|
29127
29119
|
}
|
|
29128
29120
|
db.exec("CREATE INDEX IF NOT EXISTS idx_memories_scope ON memories(scope) WHERE scope IS NOT NULL");
|
|
29129
29121
|
}
|
|
29130
|
-
function
|
|
29122
|
+
function up392(db) {
|
|
29131
29123
|
db.exec("DROP INDEX IF EXISTS idx_memories_content_hash_unique");
|
|
29132
29124
|
db.exec(`
|
|
29133
29125
|
CREATE UNIQUE INDEX idx_memories_content_hash_unique
|
|
@@ -29135,7 +29127,7 @@ function up382(db) {
|
|
|
29135
29127
|
WHERE content_hash IS NOT NULL AND is_deleted = 0
|
|
29136
29128
|
`);
|
|
29137
29129
|
}
|
|
29138
|
-
function
|
|
29130
|
+
function up402(db) {
|
|
29139
29131
|
db.exec(`
|
|
29140
29132
|
CREATE VIRTUAL TABLE IF NOT EXISTS entities_fts USING fts5(
|
|
29141
29133
|
name, canonical_name,
|
|
@@ -29167,13 +29159,13 @@ function up392(db) {
|
|
|
29167
29159
|
END
|
|
29168
29160
|
`);
|
|
29169
29161
|
}
|
|
29170
|
-
function
|
|
29162
|
+
function up412(db) {
|
|
29171
29163
|
const cols = db.prepare("PRAGMA table_info(entity_dependencies)").all();
|
|
29172
29164
|
if (!cols.some((c22) => c22.name === "confidence")) {
|
|
29173
29165
|
db.exec("ALTER TABLE entity_dependencies ADD COLUMN confidence REAL DEFAULT 0.7");
|
|
29174
29166
|
}
|
|
29175
29167
|
}
|
|
29176
|
-
function
|
|
29168
|
+
function up422(db) {
|
|
29177
29169
|
db.exec(`
|
|
29178
29170
|
CREATE TABLE IF NOT EXISTS entity_communities (
|
|
29179
29171
|
id TEXT PRIMARY KEY,
|
|
@@ -29191,7 +29183,7 @@ function up412(db) {
|
|
|
29191
29183
|
db.exec("ALTER TABLE entities ADD COLUMN community_id TEXT REFERENCES entity_communities(id)");
|
|
29192
29184
|
}
|
|
29193
29185
|
}
|
|
29194
|
-
function
|
|
29186
|
+
function up432(db) {
|
|
29195
29187
|
db.exec(`
|
|
29196
29188
|
CREATE TABLE IF NOT EXISTS memory_hints (
|
|
29197
29189
|
id TEXT PRIMARY KEY,
|
|
@@ -29231,7 +29223,7 @@ function up422(db) {
|
|
|
29231
29223
|
END
|
|
29232
29224
|
`);
|
|
29233
29225
|
}
|
|
29234
|
-
function
|
|
29226
|
+
function up442(db) {
|
|
29235
29227
|
db.exec(`
|
|
29236
29228
|
DELETE FROM entity_dependencies
|
|
29237
29229
|
WHERE id NOT IN (
|
|
@@ -29249,7 +29241,7 @@ function up432(db) {
|
|
|
29249
29241
|
)
|
|
29250
29242
|
`);
|
|
29251
29243
|
}
|
|
29252
|
-
function
|
|
29244
|
+
function up452(db) {
|
|
29253
29245
|
db.exec(`
|
|
29254
29246
|
CREATE TABLE IF NOT EXISTS session_transcripts (
|
|
29255
29247
|
session_key TEXT PRIMARY KEY,
|
|
@@ -29272,7 +29264,7 @@ function addColumnIfMissing112(db, table, column, definition) {
|
|
|
29272
29264
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
29273
29265
|
}
|
|
29274
29266
|
}
|
|
29275
|
-
function
|
|
29267
|
+
function up462(db) {
|
|
29276
29268
|
addColumnIfMissing112(db, "session_memories", "path_json", "TEXT");
|
|
29277
29269
|
db.exec(`
|
|
29278
29270
|
CREATE TABLE IF NOT EXISTS path_feedback_events (
|
|
@@ -29347,7 +29339,7 @@ function addColumnIfMissing122(db, table, column, definition) {
|
|
|
29347
29339
|
return;
|
|
29348
29340
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
29349
29341
|
}
|
|
29350
|
-
function
|
|
29342
|
+
function up472(db) {
|
|
29351
29343
|
addColumnIfMissing122(db, "session_memories", "entity_slot", "INTEGER");
|
|
29352
29344
|
addColumnIfMissing122(db, "session_memories", "aspect_slot", "INTEGER");
|
|
29353
29345
|
addColumnIfMissing122(db, "session_memories", "is_constraint", "INTEGER NOT NULL DEFAULT 0");
|
|
@@ -29435,7 +29427,7 @@ function addColumnIfMissing132(db, table, column, definition) {
|
|
|
29435
29427
|
return;
|
|
29436
29428
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
29437
29429
|
}
|
|
29438
|
-
function
|
|
29430
|
+
function up482(db) {
|
|
29439
29431
|
db.exec(`
|
|
29440
29432
|
CREATE TABLE IF NOT EXISTS agents (
|
|
29441
29433
|
id TEXT PRIMARY KEY,
|
|
@@ -29464,7 +29456,7 @@ function addColumnIfMissing142(db, table, column, definition) {
|
|
|
29464
29456
|
return;
|
|
29465
29457
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
29466
29458
|
}
|
|
29467
|
-
function
|
|
29459
|
+
function up492(db) {
|
|
29468
29460
|
addColumnIfMissing142(db, "session_summaries", "source_type", "TEXT");
|
|
29469
29461
|
addColumnIfMissing142(db, "session_summaries", "source_ref", "TEXT");
|
|
29470
29462
|
addColumnIfMissing142(db, "session_summaries", "meta_json", "TEXT");
|
|
@@ -29490,7 +29482,7 @@ function addColumnIfMissing152(db, table, column, definition) {
|
|
|
29490
29482
|
return;
|
|
29491
29483
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
29492
29484
|
}
|
|
29493
|
-
function
|
|
29485
|
+
function up502(db) {
|
|
29494
29486
|
addColumnIfMissing152(db, "session_transcripts", "updated_at", "TEXT");
|
|
29495
29487
|
addColumnIfMissing152(db, "summary_jobs", "agent_id", "TEXT NOT NULL DEFAULT 'default'");
|
|
29496
29488
|
addColumnIfMissing152(db, "session_scores", "agent_id", "TEXT NOT NULL DEFAULT 'default'");
|
|
@@ -29561,7 +29553,7 @@ function up492(db) {
|
|
|
29561
29553
|
ON memory_md_heads(lease_expires_at);
|
|
29562
29554
|
`);
|
|
29563
29555
|
}
|
|
29564
|
-
function
|
|
29556
|
+
function up512(db) {
|
|
29565
29557
|
db.exec(`
|
|
29566
29558
|
DROP INDEX IF EXISTS idx_summaries_session_depth;
|
|
29567
29559
|
|
|
@@ -29622,7 +29614,7 @@ function up502(db) {
|
|
|
29622
29614
|
AND COALESCE(source_type, 'summary') = 'summary';
|
|
29623
29615
|
`);
|
|
29624
29616
|
}
|
|
29625
|
-
function
|
|
29617
|
+
function up522(db) {
|
|
29626
29618
|
db.exec(`
|
|
29627
29619
|
DROP TRIGGER IF EXISTS session_transcripts_fts_ai;
|
|
29628
29620
|
DROP TRIGGER IF EXISTS session_transcripts_fts_ad;
|
|
@@ -29720,7 +29712,7 @@ function up512(db) {
|
|
|
29720
29712
|
AND COALESCE(source_type, 'summary') = 'summary';
|
|
29721
29713
|
`);
|
|
29722
29714
|
}
|
|
29723
|
-
function
|
|
29715
|
+
function up532(db) {
|
|
29724
29716
|
db.exec(`
|
|
29725
29717
|
CREATE TABLE IF NOT EXISTS memory_thread_heads (
|
|
29726
29718
|
agent_id TEXT NOT NULL DEFAULT 'default',
|
|
@@ -29838,7 +29830,7 @@ function up522(db) {
|
|
|
29838
29830
|
WHERE excluded.latest_at >= memory_thread_heads.latest_at;
|
|
29839
29831
|
`);
|
|
29840
29832
|
}
|
|
29841
|
-
function
|
|
29833
|
+
function up542(db) {
|
|
29842
29834
|
db.exec(`
|
|
29843
29835
|
CREATE TABLE IF NOT EXISTS session_extract_cursors (
|
|
29844
29836
|
session_key TEXT NOT NULL,
|
|
@@ -29855,7 +29847,7 @@ function hasTable5(db, name) {
|
|
|
29855
29847
|
WHERE type = 'table' AND name = ?
|
|
29856
29848
|
LIMIT 1`).get(name) !== undefined;
|
|
29857
29849
|
}
|
|
29858
|
-
function
|
|
29850
|
+
function up552(db) {
|
|
29859
29851
|
db.exec(`
|
|
29860
29852
|
CREATE TABLE IF NOT EXISTS entity_dependency_history (
|
|
29861
29853
|
id TEXT PRIMARY KEY,
|
|
@@ -30025,7 +30017,7 @@ function addColumnIfMissing162(db, table, column, definition) {
|
|
|
30025
30017
|
return;
|
|
30026
30018
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
30027
30019
|
}
|
|
30028
|
-
function
|
|
30020
|
+
function up562(db) {
|
|
30029
30021
|
addColumnIfMissing162(db, "summary_jobs", "session_id", "TEXT");
|
|
30030
30022
|
addColumnIfMissing162(db, "summary_jobs", "trigger", "TEXT NOT NULL DEFAULT 'session_end'");
|
|
30031
30023
|
addColumnIfMissing162(db, "summary_jobs", "captured_at", "TEXT");
|
|
@@ -30117,24 +30109,8 @@ function up552(db) {
|
|
|
30117
30109
|
VALUES ('rebuild');
|
|
30118
30110
|
`);
|
|
30119
30111
|
}
|
|
30120
|
-
function
|
|
30121
|
-
|
|
30122
|
-
CREATE TABLE IF NOT EXISTS mcp_invocations (
|
|
30123
|
-
id TEXT PRIMARY KEY,
|
|
30124
|
-
server_id TEXT NOT NULL,
|
|
30125
|
-
tool_name TEXT NOT NULL,
|
|
30126
|
-
agent_id TEXT NOT NULL DEFAULT 'default',
|
|
30127
|
-
source TEXT NOT NULL CHECK(source IN ('cli','agent','mcp','dashboard')),
|
|
30128
|
-
latency_ms INTEGER NOT NULL,
|
|
30129
|
-
success INTEGER NOT NULL DEFAULT 1,
|
|
30130
|
-
error_text TEXT,
|
|
30131
|
-
created_at TEXT NOT NULL DEFAULT (datetime('now'))
|
|
30132
|
-
);
|
|
30133
|
-
CREATE INDEX IF NOT EXISTS idx_mcp_inv_server ON mcp_invocations(server_id, created_at);
|
|
30134
|
-
CREATE INDEX IF NOT EXISTS idx_mcp_inv_agent ON mcp_invocations(agent_id, created_at);
|
|
30135
|
-
`);
|
|
30136
|
-
}
|
|
30137
|
-
function up572(db) {
|
|
30112
|
+
function up572(_db) {}
|
|
30113
|
+
function up582(db) {
|
|
30138
30114
|
db.exec(`
|
|
30139
30115
|
CREATE TABLE IF NOT EXISTS skill_invocations (
|
|
30140
30116
|
id TEXT PRIMARY KEY,
|
|
@@ -30150,7 +30126,7 @@ function up572(db) {
|
|
|
30150
30126
|
CREATE INDEX IF NOT EXISTS idx_skill_inv_agent ON skill_invocations(agent_id, created_at);
|
|
30151
30127
|
`);
|
|
30152
30128
|
}
|
|
30153
|
-
function
|
|
30129
|
+
function up592(db) {
|
|
30154
30130
|
db.exec(`
|
|
30155
30131
|
CREATE TABLE IF NOT EXISTS task_scope_hints (
|
|
30156
30132
|
task_id TEXT PRIMARY KEY REFERENCES scheduled_tasks(id) ON DELETE CASCADE,
|
|
@@ -30181,7 +30157,7 @@ function up582(db) {
|
|
|
30181
30157
|
ON task_scope_hints(agent_id, updated_at);
|
|
30182
30158
|
`);
|
|
30183
30159
|
}
|
|
30184
|
-
function
|
|
30160
|
+
function up602(db) {
|
|
30185
30161
|
db.exec(`
|
|
30186
30162
|
CREATE TABLE IF NOT EXISTS dreaming_state (
|
|
30187
30163
|
agent_id TEXT PRIMARY KEY NOT NULL,
|
|
@@ -30224,7 +30200,7 @@ function ensureMemoriesScopeColumns3(db) {
|
|
|
30224
30200
|
if (!names.has("scope"))
|
|
30225
30201
|
db.exec("ALTER TABLE memories ADD COLUMN scope TEXT");
|
|
30226
30202
|
}
|
|
30227
|
-
function
|
|
30203
|
+
function up612(db) {
|
|
30228
30204
|
ensureMemoriesScopeColumns3(db);
|
|
30229
30205
|
db.exec("DROP INDEX IF EXISTS idx_memories_content_hash_unique");
|
|
30230
30206
|
db.exec(`
|
|
@@ -30237,20 +30213,20 @@ function up602(db) {
|
|
|
30237
30213
|
WHERE content_hash IS NOT NULL AND is_deleted = 0
|
|
30238
30214
|
`);
|
|
30239
30215
|
}
|
|
30240
|
-
function
|
|
30216
|
+
function up622(db) {
|
|
30241
30217
|
const sql = readMemoriesFtsSql2(db);
|
|
30242
30218
|
if (sql !== null && !memoriesFtsNeedsTokenizerRepair2(sql))
|
|
30243
30219
|
return;
|
|
30244
30220
|
recreateMemoriesFts2(db);
|
|
30245
30221
|
}
|
|
30246
|
-
function
|
|
30222
|
+
function up632(db) {
|
|
30247
30223
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_entities_order
|
|
30248
30224
|
ON entities(agent_id, pinned DESC, pinned_at DESC, mentions DESC, updated_at DESC, name)`);
|
|
30249
30225
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_entities_extracted_mentions
|
|
30250
30226
|
ON entities(entity_type, mentions)
|
|
30251
30227
|
WHERE entity_type = 'extracted'`);
|
|
30252
30228
|
}
|
|
30253
|
-
function
|
|
30229
|
+
function up642(db) {
|
|
30254
30230
|
const cols = db.prepare("PRAGMA table_info(entity_attributes)").all();
|
|
30255
30231
|
if (!cols.some((col) => col.name === "claim_key")) {
|
|
30256
30232
|
db.exec("ALTER TABLE entity_attributes ADD COLUMN claim_key TEXT");
|
|
@@ -30259,7 +30235,7 @@ function up632(db) {
|
|
|
30259
30235
|
ON entity_attributes(agent_id, aspect_id, claim_key, status)
|
|
30260
30236
|
WHERE claim_key IS NOT NULL`);
|
|
30261
30237
|
}
|
|
30262
|
-
function
|
|
30238
|
+
function up652(db) {
|
|
30263
30239
|
const cols = db.prepare("PRAGMA table_info(entity_attributes)").all();
|
|
30264
30240
|
if (!cols.some((col) => col.name === "group_key")) {
|
|
30265
30241
|
db.exec("ALTER TABLE entity_attributes ADD COLUMN group_key TEXT");
|
|
@@ -30271,13 +30247,13 @@ function up642(db) {
|
|
|
30271
30247
|
ON entity_attributes(agent_id, aspect_id, group_key, claim_key, status)
|
|
30272
30248
|
WHERE claim_key IS NOT NULL`);
|
|
30273
30249
|
}
|
|
30274
|
-
function
|
|
30250
|
+
function up662(db) {
|
|
30275
30251
|
const cols = db.prepare("PRAGMA table_info(memory_artifacts)").all();
|
|
30276
30252
|
if (cols.some((col) => col.name === "source_mtime_ms"))
|
|
30277
30253
|
return;
|
|
30278
30254
|
db.exec("ALTER TABLE memory_artifacts ADD COLUMN source_mtime_ms REAL");
|
|
30279
30255
|
}
|
|
30280
|
-
function
|
|
30256
|
+
function up672(db) {
|
|
30281
30257
|
const cols = db.prepare("PRAGMA table_info(memory_artifacts)").all();
|
|
30282
30258
|
const names = new Set(cols.map((col) => col.name));
|
|
30283
30259
|
if (!names.has("is_deleted")) {
|
|
@@ -30291,7 +30267,7 @@ function up662(db) {
|
|
|
30291
30267
|
ON memory_artifacts(agent_id, is_deleted, deleted_at)
|
|
30292
30268
|
`);
|
|
30293
30269
|
}
|
|
30294
|
-
function
|
|
30270
|
+
function up682(db) {
|
|
30295
30271
|
db.exec("DROP TRIGGER IF EXISTS memories_au");
|
|
30296
30272
|
db.exec(`
|
|
30297
30273
|
CREATE TRIGGER IF NOT EXISTS memories_au AFTER UPDATE OF content ON memories BEGIN
|
|
@@ -30309,7 +30285,7 @@ function addColumnIfMissing172(db, table, column, definition) {
|
|
|
30309
30285
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
30310
30286
|
}
|
|
30311
30287
|
}
|
|
30312
|
-
function
|
|
30288
|
+
function up692(db) {
|
|
30313
30289
|
for (const table of ["entities", "entity_communities", "entity_attributes", "entity_dependencies"]) {
|
|
30314
30290
|
addColumnIfMissing172(db, table, "source_id", "TEXT");
|
|
30315
30291
|
addColumnIfMissing172(db, table, "source_kind", "TEXT");
|
|
@@ -30329,7 +30305,7 @@ function hasColumn72(db, table, column) {
|
|
|
30329
30305
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
30330
30306
|
return rows.some((row) => row.name === column);
|
|
30331
30307
|
}
|
|
30332
|
-
function
|
|
30308
|
+
function up702(db) {
|
|
30333
30309
|
if (!hasTable22(db, "embeddings"))
|
|
30334
30310
|
return;
|
|
30335
30311
|
if (!hasColumn72(db, "embeddings", "agent_id")) {
|
|
@@ -30337,7 +30313,7 @@ function up692(db) {
|
|
|
30337
30313
|
}
|
|
30338
30314
|
db.exec("CREATE INDEX IF NOT EXISTS idx_embeddings_agent_source ON embeddings(agent_id, source_type, source_id)");
|
|
30339
30315
|
}
|
|
30340
|
-
function
|
|
30316
|
+
function up712(db) {
|
|
30341
30317
|
db.exec(`
|
|
30342
30318
|
CREATE TABLE IF NOT EXISTS memory_search_telemetry (
|
|
30343
30319
|
id TEXT PRIMARY KEY,
|
|
@@ -30378,7 +30354,7 @@ function addColumnIfMissing182(db, table, column, definition) {
|
|
|
30378
30354
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
30379
30355
|
}
|
|
30380
30356
|
}
|
|
30381
|
-
function
|
|
30357
|
+
function up722(db) {
|
|
30382
30358
|
db.exec(`
|
|
30383
30359
|
CREATE TABLE IF NOT EXISTS ontology_proposals (
|
|
30384
30360
|
id TEXT PRIMARY KEY,
|
|
@@ -30421,7 +30397,7 @@ function up712(db) {
|
|
|
30421
30397
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_${table}_proposal ON ${table}(agent_id, proposal_id)`);
|
|
30422
30398
|
}
|
|
30423
30399
|
}
|
|
30424
|
-
function
|
|
30400
|
+
function up732(db) {
|
|
30425
30401
|
db.exec(`
|
|
30426
30402
|
CREATE TABLE IF NOT EXISTS daily_reflections (
|
|
30427
30403
|
id TEXT PRIMARY KEY,
|
|
@@ -30448,7 +30424,7 @@ function up722(db) {
|
|
|
30448
30424
|
WHERE content_key IS NOT NULL;
|
|
30449
30425
|
`);
|
|
30450
30426
|
}
|
|
30451
|
-
function
|
|
30427
|
+
function up742(db) {
|
|
30452
30428
|
const cols = db.prepare("PRAGMA table_info(daily_reflections)").all();
|
|
30453
30429
|
const colNames = new Set(cols.flatMap((c22) => typeof c22.name === "string" ? [c22.name] : []));
|
|
30454
30430
|
if (!colNames.has("content_key")) {
|
|
@@ -30485,7 +30461,7 @@ function backfillVersionRoots2(db) {
|
|
|
30485
30461
|
WHERE version_root_id IS NULL
|
|
30486
30462
|
`);
|
|
30487
30463
|
}
|
|
30488
|
-
function
|
|
30464
|
+
function up752(db) {
|
|
30489
30465
|
for (const table of ["entities", "entity_aspects", "entity_dependencies"]) {
|
|
30490
30466
|
addColumnIfMissing192(db, table, "status", "TEXT NOT NULL DEFAULT 'active'");
|
|
30491
30467
|
addColumnIfMissing192(db, table, "archived_at", "TEXT");
|
|
@@ -30520,7 +30496,7 @@ function up742(db) {
|
|
|
30520
30496
|
ON entity_aspects(agent_id, proposal_id);
|
|
30521
30497
|
`);
|
|
30522
30498
|
}
|
|
30523
|
-
function
|
|
30499
|
+
function up762(db) {
|
|
30524
30500
|
db.exec(`
|
|
30525
30501
|
CREATE TABLE IF NOT EXISTS epistemic_assertions (
|
|
30526
30502
|
id TEXT PRIMARY KEY,
|
|
@@ -30576,7 +30552,7 @@ function ensureMemoriesScopeColumns22(db) {
|
|
|
30576
30552
|
if (!names.has("runtime_path"))
|
|
30577
30553
|
db.exec("ALTER TABLE memories ADD COLUMN runtime_path TEXT");
|
|
30578
30554
|
}
|
|
30579
|
-
function
|
|
30555
|
+
function up772(db) {
|
|
30580
30556
|
ensureMemoriesScopeColumns22(db);
|
|
30581
30557
|
db.exec("DROP INDEX IF EXISTS idx_memories_idempotency_key");
|
|
30582
30558
|
db.exec(`
|
|
@@ -30590,7 +30566,7 @@ function up762(db) {
|
|
|
30590
30566
|
WHERE idempotency_key IS NOT NULL AND is_deleted = 0
|
|
30591
30567
|
`);
|
|
30592
30568
|
}
|
|
30593
|
-
function
|
|
30569
|
+
function up782(db) {
|
|
30594
30570
|
db.exec(`
|
|
30595
30571
|
CREATE TABLE IF NOT EXISTS session_context_epochs (
|
|
30596
30572
|
session_key TEXT NOT NULL,
|
|
@@ -30625,7 +30601,7 @@ function up772(db) {
|
|
|
30625
30601
|
ON session_recall_events(item_kind, item_id, created_at DESC);
|
|
30626
30602
|
`);
|
|
30627
30603
|
}
|
|
30628
|
-
function
|
|
30604
|
+
function up792(db) {
|
|
30629
30605
|
db.exec(`
|
|
30630
30606
|
CREATE TABLE IF NOT EXISTS aggregate_memory_sources (
|
|
30631
30607
|
aggregate_memory_id TEXT NOT NULL,
|
|
@@ -30644,7 +30620,7 @@ function addColumnIfMissing202(db, table, column, definition) {
|
|
|
30644
30620
|
return;
|
|
30645
30621
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
30646
30622
|
}
|
|
30647
|
-
function
|
|
30623
|
+
function up802(db) {
|
|
30648
30624
|
addColumnIfMissing202(db, "memory_artifacts", "source_id", "TEXT");
|
|
30649
30625
|
addColumnIfMissing202(db, "memory_artifacts", "source_root", "TEXT");
|
|
30650
30626
|
addColumnIfMissing202(db, "memory_artifacts", "source_external_id", "TEXT");
|
|
@@ -30657,7 +30633,7 @@ function up792(db) {
|
|
|
30657
30633
|
ON memory_artifacts(agent_id, source_id, source_root);
|
|
30658
30634
|
`);
|
|
30659
30635
|
}
|
|
30660
|
-
function
|
|
30636
|
+
function up812(db) {
|
|
30661
30637
|
db.exec(`
|
|
30662
30638
|
CREATE TABLE IF NOT EXISTS temporal_edges (
|
|
30663
30639
|
id TEXT PRIMARY KEY,
|
|
@@ -30680,7 +30656,7 @@ function up802(db) {
|
|
|
30680
30656
|
ON temporal_edges(agent_id, subject_type, subject_id);
|
|
30681
30657
|
`);
|
|
30682
30658
|
}
|
|
30683
|
-
function
|
|
30659
|
+
function up822(db) {
|
|
30684
30660
|
db.exec(`
|
|
30685
30661
|
CREATE TABLE IF NOT EXISTS entity_aliases (
|
|
30686
30662
|
id TEXT PRIMARY KEY,
|
|
@@ -30704,7 +30680,7 @@ function up812(db) {
|
|
|
30704
30680
|
ON entity_aliases(agent_id, canonical_alias, status);
|
|
30705
30681
|
`);
|
|
30706
30682
|
}
|
|
30707
|
-
function
|
|
30683
|
+
function up832(db) {
|
|
30708
30684
|
db.exec(`
|
|
30709
30685
|
CREATE TABLE IF NOT EXISTS api_keys (
|
|
30710
30686
|
id TEXT PRIMARY KEY,
|
|
@@ -30732,7 +30708,7 @@ function up822(db) {
|
|
|
30732
30708
|
ON api_keys(connector, harness);
|
|
30733
30709
|
`);
|
|
30734
30710
|
}
|
|
30735
|
-
function
|
|
30711
|
+
function up842(db) {
|
|
30736
30712
|
db.exec(`
|
|
30737
30713
|
CREATE TABLE IF NOT EXISTS transcript_capture_jobs (
|
|
30738
30714
|
id TEXT PRIMARY KEY,
|
|
@@ -30767,7 +30743,7 @@ function hasColumn102(db, table, column) {
|
|
|
30767
30743
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
30768
30744
|
return rows.some((row) => row.name === column);
|
|
30769
30745
|
}
|
|
30770
|
-
function
|
|
30746
|
+
function up852(db) {
|
|
30771
30747
|
if (!hasColumn102(db, "documents", "agent_id")) {
|
|
30772
30748
|
db.exec("ALTER TABLE documents ADD COLUMN agent_id TEXT NOT NULL DEFAULT 'default'");
|
|
30773
30749
|
}
|
|
@@ -30853,7 +30829,7 @@ function up842(db) {
|
|
|
30853
30829
|
db.exec("CREATE INDEX IF NOT EXISTS idx_documents_agent_project ON documents(agent_id, project)");
|
|
30854
30830
|
db.exec("CREATE INDEX IF NOT EXISTS idx_documents_source_scope ON documents(source_url, agent_id, project)");
|
|
30855
30831
|
}
|
|
30856
|
-
function
|
|
30832
|
+
function up862(db) {
|
|
30857
30833
|
db.exec(`
|
|
30858
30834
|
CREATE TABLE IF NOT EXISTS aggregate_evidence_sources (
|
|
30859
30835
|
aggregate_memory_id TEXT NOT NULL,
|
|
@@ -30875,7 +30851,7 @@ function hasColumn112(db, table, column) {
|
|
|
30875
30851
|
return rows.some((row) => row.name === column);
|
|
30876
30852
|
}
|
|
30877
30853
|
var COLUMNS3 = ["harness", "session_id", "tool_use_id", "cwd", "origin", "args"];
|
|
30878
|
-
function
|
|
30854
|
+
function up872(db) {
|
|
30879
30855
|
for (const column of COLUMNS3) {
|
|
30880
30856
|
if (!hasColumn112(db, "skill_invocations", column)) {
|
|
30881
30857
|
db.exec(`ALTER TABLE skill_invocations ADD COLUMN ${column} TEXT`);
|
|
@@ -30956,7 +30932,7 @@ function documentScopeColumnsPreservingExisting2(db) {
|
|
|
30956
30932
|
`);
|
|
30957
30933
|
}
|
|
30958
30934
|
try {
|
|
30959
|
-
|
|
30935
|
+
up852(db);
|
|
30960
30936
|
if (preserveAgentId) {
|
|
30961
30937
|
db.exec(`
|
|
30962
30938
|
UPDATE documents
|
|
@@ -30976,12 +30952,12 @@ function documentScopeColumnsPreservingExisting2(db) {
|
|
|
30976
30952
|
db.exec("DROP TABLE IF EXISTS temp.__signet_doc_project_guard");
|
|
30977
30953
|
}
|
|
30978
30954
|
}
|
|
30979
|
-
function
|
|
30980
|
-
|
|
30955
|
+
function up882(db) {
|
|
30956
|
+
up842(db);
|
|
30981
30957
|
if (hasTable32(db, "documents")) {
|
|
30982
30958
|
documentScopeColumnsPreservingExisting2(db);
|
|
30983
30959
|
}
|
|
30984
|
-
|
|
30960
|
+
up862(db);
|
|
30985
30961
|
addColumnIfMissing212(db, "memories", "superseded_by", "TEXT");
|
|
30986
30962
|
addColumnIfMissing212(db, "memories", "superseded_at", "TEXT");
|
|
30987
30963
|
addColumnIfMissing212(db, "memories", "superseded_reason", "TEXT");
|
|
@@ -31038,7 +31014,7 @@ function up872(db) {
|
|
|
31038
31014
|
AND ${sourceAgentId} = ${targetAgentId}
|
|
31039
31015
|
`);
|
|
31040
31016
|
}
|
|
31041
|
-
function
|
|
31017
|
+
function up892(db) {
|
|
31042
31018
|
db.exec(`
|
|
31043
31019
|
CREATE TABLE IF NOT EXISTS legacy_markdown_imports (
|
|
31044
31020
|
path TEXT PRIMARY KEY,
|
|
@@ -31068,7 +31044,7 @@ function up882(db) {
|
|
|
31068
31044
|
ON legacy_markdown_chunks(memory_id);
|
|
31069
31045
|
`);
|
|
31070
31046
|
}
|
|
31071
|
-
function
|
|
31047
|
+
function up902(db) {
|
|
31072
31048
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name IN ('relations', 'entity_dependencies')").all();
|
|
31073
31049
|
const tableNames = new Set(tables.map((r22) => String(r22.name)));
|
|
31074
31050
|
if (!tableNames.has("relations") || !tableNames.has("entity_dependencies"))
|
|
@@ -31127,7 +31103,7 @@ function addColumnIfMissing222(db, table, column, definition) {
|
|
|
31127
31103
|
return;
|
|
31128
31104
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
31129
31105
|
}
|
|
31130
|
-
function
|
|
31106
|
+
function up912(db) {
|
|
31131
31107
|
addColumnIfMissing222(db, "summary_jobs", "content_hash", "TEXT");
|
|
31132
31108
|
db.exec(`
|
|
31133
31109
|
CREATE INDEX IF NOT EXISTS idx_summary_jobs_agent_session_content_hash
|
|
@@ -31140,14 +31116,14 @@ function addColumnIfMissing232(db, table, column, definition) {
|
|
|
31140
31116
|
return;
|
|
31141
31117
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
31142
31118
|
}
|
|
31143
|
-
function
|
|
31119
|
+
function up922(db) {
|
|
31144
31120
|
addColumnIfMissing232(db, "summary_jobs", "boundary_reason", "TEXT");
|
|
31145
31121
|
db.exec(`
|
|
31146
31122
|
CREATE INDEX IF NOT EXISTS idx_summary_jobs_boundary_reason
|
|
31147
31123
|
ON summary_jobs(agent_id, session_key, boundary_reason)
|
|
31148
31124
|
`);
|
|
31149
31125
|
}
|
|
31150
|
-
function
|
|
31126
|
+
function up932(db) {
|
|
31151
31127
|
db.exec(`
|
|
31152
31128
|
CREATE TABLE IF NOT EXISTS transcript_recovery_files (
|
|
31153
31129
|
agent_id TEXT NOT NULL,
|
|
@@ -31165,7 +31141,7 @@ function up922(db) {
|
|
|
31165
31141
|
ON transcript_capture_jobs(agent_id, session_id, status);
|
|
31166
31142
|
`);
|
|
31167
31143
|
}
|
|
31168
|
-
function
|
|
31144
|
+
function up942(db) {
|
|
31169
31145
|
db.exec(`
|
|
31170
31146
|
CREATE TABLE IF NOT EXISTS job_cancellations (
|
|
31171
31147
|
id TEXT PRIMARY KEY,
|
|
@@ -31193,7 +31169,7 @@ function indexExists3(db, table, indexName) {
|
|
|
31193
31169
|
const rows = db.prepare(`PRAGMA index_list(${table})`).all();
|
|
31194
31170
|
return rows.some((row) => row.name === indexName);
|
|
31195
31171
|
}
|
|
31196
|
-
function
|
|
31172
|
+
function up952(db) {
|
|
31197
31173
|
db.exec(`
|
|
31198
31174
|
CREATE TABLE IF NOT EXISTS job_archive (
|
|
31199
31175
|
id TEXT PRIMARY KEY,
|
|
@@ -31220,7 +31196,7 @@ function indexExists22(db, table, indexName) {
|
|
|
31220
31196
|
const rows = db.prepare(`PRAGMA index_list(${table})`).all();
|
|
31221
31197
|
return rows.some((row) => row.name === indexName);
|
|
31222
31198
|
}
|
|
31223
|
-
function
|
|
31199
|
+
function up962(db) {
|
|
31224
31200
|
db.exec(`
|
|
31225
31201
|
CREATE TABLE IF NOT EXISTS embedding_index_state (
|
|
31226
31202
|
id INTEGER PRIMARY KEY CHECK (id = 1),
|
|
@@ -31233,7 +31209,7 @@ function up952(db) {
|
|
|
31233
31209
|
)
|
|
31234
31210
|
`);
|
|
31235
31211
|
}
|
|
31236
|
-
function
|
|
31212
|
+
function up972(db) {
|
|
31237
31213
|
db.exec(`
|
|
31238
31214
|
CREATE TABLE IF NOT EXISTS embeddings_staging (
|
|
31239
31215
|
id TEXT PRIMARY KEY,
|
|
@@ -31252,7 +31228,7 @@ function up962(db) {
|
|
|
31252
31228
|
ON embeddings_staging(agent_id, source_type, source_id);
|
|
31253
31229
|
`);
|
|
31254
31230
|
}
|
|
31255
|
-
function
|
|
31231
|
+
function up982(db) {
|
|
31256
31232
|
const columns = db.prepare("PRAGMA table_info(dreaming_state)").all();
|
|
31257
31233
|
if (!columns.some((column) => column.name === "evidence_cursor")) {
|
|
31258
31234
|
db.exec("ALTER TABLE dreaming_state ADD COLUMN evidence_cursor TEXT");
|
|
@@ -31263,7 +31239,7 @@ function hasColumn132(db, table, column) {
|
|
|
31263
31239
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
31264
31240
|
return rows.some((r22) => r22.name === column);
|
|
31265
31241
|
}
|
|
31266
|
-
function
|
|
31242
|
+
function up992(db) {
|
|
31267
31243
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name = 'memories'").all();
|
|
31268
31244
|
if (tables.length === 0)
|
|
31269
31245
|
return;
|
|
@@ -31288,23 +31264,23 @@ function up982(db) {
|
|
|
31288
31264
|
function hasColumn142(db, table, column) {
|
|
31289
31265
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
31290
31266
|
}
|
|
31291
|
-
function
|
|
31267
|
+
function up1002(db) {
|
|
31292
31268
|
const hasMemories = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'memories'").get();
|
|
31293
31269
|
if (!hasMemories || !hasColumn142(db, "memories", "memory_kind") || !hasColumn142(db, "memories", "type"))
|
|
31294
31270
|
return;
|
|
31295
31271
|
db.exec("UPDATE memories SET memory_kind = NULL WHERE type = 'session_summary'");
|
|
31296
31272
|
}
|
|
31297
|
-
function
|
|
31273
|
+
function up1012(db) {
|
|
31298
31274
|
db.exec("DROP TABLE IF EXISTS ingestion_jobs");
|
|
31299
31275
|
}
|
|
31300
|
-
function
|
|
31276
|
+
function up1022(db) {
|
|
31301
31277
|
const columns = db.prepare("PRAGMA table_info(dreaming_state)").all();
|
|
31302
31278
|
if (!columns.some((column) => column.name === "last_failure_at")) {
|
|
31303
31279
|
db.exec("ALTER TABLE dreaming_state ADD COLUMN last_failure_at TEXT");
|
|
31304
31280
|
}
|
|
31305
31281
|
db.exec("UPDATE dreaming_state SET last_failure_at = updated_at WHERE consecutive_failures > 0 AND last_failure_at IS NULL");
|
|
31306
31282
|
}
|
|
31307
|
-
function
|
|
31283
|
+
function up1032(db) {
|
|
31308
31284
|
db.exec(`
|
|
31309
31285
|
CREATE TABLE IF NOT EXISTS dreaming_evidence_exclusions (
|
|
31310
31286
|
agent_id TEXT NOT NULL,
|
|
@@ -31321,7 +31297,7 @@ function up1022(db) {
|
|
|
31321
31297
|
ON dreaming_evidence_exclusions (agent_id, resolved_at, requeue_requested_at, excluded_at DESC);
|
|
31322
31298
|
`);
|
|
31323
31299
|
}
|
|
31324
|
-
function
|
|
31300
|
+
function up1042(db) {
|
|
31325
31301
|
db.exec(`
|
|
31326
31302
|
CREATE TABLE IF NOT EXISTS dreaming_tool_calls (
|
|
31327
31303
|
id TEXT PRIMARY KEY,
|
|
@@ -31341,7 +31317,7 @@ function up1032(db) {
|
|
|
31341
31317
|
ON dreaming_tool_calls (agent_id, pass_id, sequence ASC);
|
|
31342
31318
|
`);
|
|
31343
31319
|
}
|
|
31344
|
-
function
|
|
31320
|
+
function up1052(db) {
|
|
31345
31321
|
const columns = db.prepare("PRAGMA table_info(dreaming_passes)").all();
|
|
31346
31322
|
if (!columns.some((column) => column.name === "evidence_window_json")) {
|
|
31347
31323
|
db.exec("ALTER TABLE dreaming_passes ADD COLUMN evidence_window_json TEXT");
|
|
@@ -31350,7 +31326,7 @@ function up1042(db) {
|
|
|
31350
31326
|
db.exec("ALTER TABLE dreaming_passes ADD COLUMN runbook_json TEXT");
|
|
31351
31327
|
}
|
|
31352
31328
|
}
|
|
31353
|
-
function
|
|
31329
|
+
function up1062(db) {
|
|
31354
31330
|
db.exec(`
|
|
31355
31331
|
CREATE TABLE IF NOT EXISTS dreaming_attention (
|
|
31356
31332
|
id TEXT PRIMARY KEY,
|
|
@@ -31372,7 +31348,7 @@ function up1052(db) {
|
|
|
31372
31348
|
function hasColumn152(db, table, column) {
|
|
31373
31349
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
31374
31350
|
}
|
|
31375
|
-
function
|
|
31351
|
+
function up1072(db) {
|
|
31376
31352
|
const requiredMemoryColumns = [
|
|
31377
31353
|
"content_hash",
|
|
31378
31354
|
"normalized_content",
|
|
@@ -31423,7 +31399,7 @@ function up1062(db) {
|
|
|
31423
31399
|
WHERE EXISTS (SELECT 1 FROM memory_entity_mentions WHERE entity_id = entities.id)
|
|
31424
31400
|
`);
|
|
31425
31401
|
}
|
|
31426
|
-
function
|
|
31402
|
+
function up1082(db) {
|
|
31427
31403
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name IN ('memories', 'entity_attributes')").all();
|
|
31428
31404
|
if (tables.length !== 2)
|
|
31429
31405
|
return;
|
|
@@ -31446,7 +31422,7 @@ function tableExists4(db, table) {
|
|
|
31446
31422
|
function hasColumn162(db, table, column) {
|
|
31447
31423
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
31448
31424
|
}
|
|
31449
|
-
function
|
|
31425
|
+
function up1092(db) {
|
|
31450
31426
|
db.exec(`
|
|
31451
31427
|
CREATE TABLE IF NOT EXISTS derived_memory_sources (
|
|
31452
31428
|
derived_memory_id TEXT NOT NULL,
|
|
@@ -31489,7 +31465,7 @@ function up1082(db) {
|
|
|
31489
31465
|
`);
|
|
31490
31466
|
}
|
|
31491
31467
|
}
|
|
31492
|
-
function
|
|
31468
|
+
function up1102(db) {
|
|
31493
31469
|
db.exec(`
|
|
31494
31470
|
DROP TRIGGER IF EXISTS entities_fts_ai;
|
|
31495
31471
|
DROP TRIGGER IF EXISTS entities_fts_ad;
|
|
@@ -31578,7 +31554,7 @@ function up1092(db) {
|
|
|
31578
31554
|
function hasColumn172(db, table, column) {
|
|
31579
31555
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
31580
31556
|
}
|
|
31581
|
-
function
|
|
31557
|
+
function up1112(db) {
|
|
31582
31558
|
if (!hasColumn172(db, "memories", "review_after")) {
|
|
31583
31559
|
db.exec("ALTER TABLE memories ADD COLUMN review_after TEXT;");
|
|
31584
31560
|
}
|
|
@@ -31594,14 +31570,14 @@ var TOKEN_COLUMNS2 = [
|
|
|
31594
31570
|
["tokens_cache_write", "INTEGER"],
|
|
31595
31571
|
["tokens_cost", "REAL"]
|
|
31596
31572
|
];
|
|
31597
|
-
function
|
|
31573
|
+
function up1122(db) {
|
|
31598
31574
|
for (const [column, type] of TOKEN_COLUMNS2) {
|
|
31599
31575
|
if (!hasColumn182(db, "dreaming_passes", column)) {
|
|
31600
31576
|
db.exec(`ALTER TABLE dreaming_passes ADD COLUMN ${column} ${type};`);
|
|
31601
31577
|
}
|
|
31602
31578
|
}
|
|
31603
31579
|
}
|
|
31604
|
-
function
|
|
31580
|
+
function up1132(db) {
|
|
31605
31581
|
db.exec(`
|
|
31606
31582
|
CREATE TABLE IF NOT EXISTS embedding_usage (
|
|
31607
31583
|
day TEXT NOT NULL,
|
|
@@ -31614,7 +31590,7 @@ function up1122(db) {
|
|
|
31614
31590
|
);
|
|
31615
31591
|
`);
|
|
31616
31592
|
}
|
|
31617
|
-
function
|
|
31593
|
+
function up1142(db) {
|
|
31618
31594
|
db.exec(`
|
|
31619
31595
|
CREATE TABLE IF NOT EXISTS telemetry_install (
|
|
31620
31596
|
id TEXT PRIMARY KEY,
|
|
@@ -31622,7 +31598,7 @@ function up1132(db) {
|
|
|
31622
31598
|
);
|
|
31623
31599
|
`);
|
|
31624
31600
|
}
|
|
31625
|
-
function
|
|
31601
|
+
function up1152(db) {
|
|
31626
31602
|
db.exec(`
|
|
31627
31603
|
CREATE INDEX IF NOT EXISTS idx_memory_entity_mentions_entity_memory
|
|
31628
31604
|
ON memory_entity_mentions(entity_id, memory_id);
|
|
@@ -31633,7 +31609,7 @@ function hasColumn192(db, table, column) {
|
|
|
31633
31609
|
return rows.some((row) => row.name === column);
|
|
31634
31610
|
}
|
|
31635
31611
|
var COLUMNS22 = ["first_remember_at", "first_recall_at"];
|
|
31636
|
-
function
|
|
31612
|
+
function up1162(db) {
|
|
31637
31613
|
for (const column of COLUMNS22) {
|
|
31638
31614
|
if (!hasColumn192(db, "telemetry_install", column)) {
|
|
31639
31615
|
db.exec(`ALTER TABLE telemetry_install ADD COLUMN ${column} TEXT`);
|
|
@@ -31649,7 +31625,7 @@ function addColumnIfMissing242(db, column, definition) {
|
|
|
31649
31625
|
db.exec(`ALTER TABLE telemetry_events ADD COLUMN ${column} ${definition}`);
|
|
31650
31626
|
}
|
|
31651
31627
|
}
|
|
31652
|
-
function
|
|
31628
|
+
function up1172(db) {
|
|
31653
31629
|
addColumnIfMissing242(db, "source", "TEXT NOT NULL DEFAULT 'daemon'");
|
|
31654
31630
|
addColumnIfMissing242(db, "claim_token", "TEXT");
|
|
31655
31631
|
addColumnIfMissing242(db, "claimed_at", "TEXT");
|
|
@@ -31658,7 +31634,7 @@ function up1162(db) {
|
|
|
31658
31634
|
ON telemetry_events(source, sent_to_posthog, claimed_at, timestamp);
|
|
31659
31635
|
`);
|
|
31660
31636
|
}
|
|
31661
|
-
function
|
|
31637
|
+
function up1182(db) {
|
|
31662
31638
|
db.exec(`
|
|
31663
31639
|
CREATE TABLE IF NOT EXISTS session_claims (
|
|
31664
31640
|
session_key TEXT NOT NULL,
|
|
@@ -31679,7 +31655,7 @@ function up1172(db) {
|
|
|
31679
31655
|
ON session_claims(agent_id, state, expires_at);
|
|
31680
31656
|
`);
|
|
31681
31657
|
}
|
|
31682
|
-
function
|
|
31658
|
+
function up1192(db) {
|
|
31683
31659
|
const table = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'entity_attributes'").get();
|
|
31684
31660
|
if (table == null)
|
|
31685
31661
|
return;
|
|
@@ -31688,7 +31664,7 @@ function up1182(db) {
|
|
|
31688
31664
|
ON entity_attributes(memory_id, agent_id, status, importance);
|
|
31689
31665
|
`);
|
|
31690
31666
|
}
|
|
31691
|
-
function
|
|
31667
|
+
function up1202(db) {
|
|
31692
31668
|
db.exec(`
|
|
31693
31669
|
CREATE TABLE IF NOT EXISTS cross_agent_messages (
|
|
31694
31670
|
id TEXT PRIMARY KEY,
|
|
@@ -31745,7 +31721,7 @@ function addColumnIfMissing252(db, column, definition) {
|
|
|
31745
31721
|
db.exec(`ALTER TABLE cross_agent_messages ADD COLUMN ${column} ${definition}`);
|
|
31746
31722
|
}
|
|
31747
31723
|
}
|
|
31748
|
-
function
|
|
31724
|
+
function up1212(db) {
|
|
31749
31725
|
const table = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'cross_agent_messages'").get();
|
|
31750
31726
|
if (table == null)
|
|
31751
31727
|
return;
|
|
@@ -31946,7 +31922,7 @@ function backfillTranscriptsFromSummaryJobs2(db) {
|
|
|
31946
31922
|
insert.run(...values);
|
|
31947
31923
|
}
|
|
31948
31924
|
}
|
|
31949
|
-
function
|
|
31925
|
+
function up1222(db) {
|
|
31950
31926
|
if (!hasTable42(db, "session_transcripts"))
|
|
31951
31927
|
return;
|
|
31952
31928
|
addColumnIfMissing262(db, "session_transcripts", "completed_at", "TEXT");
|
|
@@ -31999,7 +31975,7 @@ function up1212(db) {
|
|
|
31999
31975
|
ON session_transcripts(agent_id, content_hash);
|
|
32000
31976
|
`);
|
|
32001
31977
|
}
|
|
32002
|
-
function
|
|
31978
|
+
function up1232(db) {
|
|
32003
31979
|
db.exec(`
|
|
32004
31980
|
CREATE INDEX IF NOT EXISTS idx_memory_jobs_pressure_status
|
|
32005
31981
|
ON memory_jobs(status)
|
|
@@ -32018,12 +31994,12 @@ function up1222(db) {
|
|
|
32018
31994
|
function hasColumn222(db, table, column) {
|
|
32019
31995
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
32020
31996
|
}
|
|
32021
|
-
function
|
|
31997
|
+
function up1242(db) {
|
|
32022
31998
|
if (!hasColumn222(db, "telemetry_install", "last_seen_version")) {
|
|
32023
31999
|
db.exec("ALTER TABLE telemetry_install ADD COLUMN last_seen_version TEXT");
|
|
32024
32000
|
}
|
|
32025
32001
|
}
|
|
32026
|
-
function
|
|
32002
|
+
function up1252(db) {
|
|
32027
32003
|
db.exec(`
|
|
32028
32004
|
CREATE TABLE IF NOT EXISTS source_lifecycle_state (
|
|
32029
32005
|
agent_id TEXT NOT NULL,
|
|
@@ -32052,7 +32028,7 @@ function addColumnIfMissing272(db, column, definition) {
|
|
|
32052
32028
|
db.exec(`ALTER TABLE telemetry_events ADD COLUMN ${column} ${definition}`);
|
|
32053
32029
|
}
|
|
32054
32030
|
}
|
|
32055
|
-
function
|
|
32031
|
+
function up1262(db) {
|
|
32056
32032
|
addColumnIfMissing272(db, "delivery_attempts", "INTEGER NOT NULL DEFAULT 0");
|
|
32057
32033
|
addColumnIfMissing272(db, "last_attempt_at", "TEXT");
|
|
32058
32034
|
addColumnIfMissing272(db, "sent_at", "TEXT");
|
|
@@ -32073,7 +32049,7 @@ function up1252(db) {
|
|
|
32073
32049
|
VALUES (1, CURRENT_TIMESTAMP);
|
|
32074
32050
|
`);
|
|
32075
32051
|
}
|
|
32076
|
-
function
|
|
32052
|
+
function up1272(db) {
|
|
32077
32053
|
const columns = db.prepare("PRAGMA table_info(dreaming_evidence_exclusions)").all();
|
|
32078
32054
|
const names = new Set(columns.map((column) => column.name));
|
|
32079
32055
|
if (!names.has("failure_class")) {
|
|
@@ -32090,7 +32066,7 @@ function up1262(db) {
|
|
|
32090
32066
|
}
|
|
32091
32067
|
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)");
|
|
32092
32068
|
}
|
|
32093
|
-
function
|
|
32069
|
+
function up1282(db) {
|
|
32094
32070
|
db.exec(`
|
|
32095
32071
|
CREATE TABLE IF NOT EXISTS embedding_index_failures (
|
|
32096
32072
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
@@ -32114,7 +32090,7 @@ function up1272(db) {
|
|
|
32114
32090
|
ON embedding_index_failures(source_type, source_id);
|
|
32115
32091
|
`);
|
|
32116
32092
|
}
|
|
32117
|
-
function
|
|
32093
|
+
function up1292(db) {
|
|
32118
32094
|
db.exec(`
|
|
32119
32095
|
CREATE TABLE IF NOT EXISTS imported_source_lifecycle (
|
|
32120
32096
|
id TEXT PRIMARY KEY,
|
|
@@ -32164,7 +32140,7 @@ function backfillTable2(db, params) {
|
|
|
32164
32140
|
FROM ${params.table}${params.where ? ` WHERE ${params.where}` : ""}`).all();
|
|
32165
32141
|
backfill2(db, rows, params.sourceKind, params.scannedAt);
|
|
32166
32142
|
}
|
|
32167
|
-
function
|
|
32143
|
+
function up1302(db) {
|
|
32168
32144
|
db.exec(`
|
|
32169
32145
|
CREATE TABLE IF NOT EXISTS memory_content_safety (
|
|
32170
32146
|
agent_id TEXT NOT NULL,
|
|
@@ -32221,7 +32197,7 @@ function up1292(db) {
|
|
|
32221
32197
|
scannedAt
|
|
32222
32198
|
});
|
|
32223
32199
|
}
|
|
32224
|
-
function
|
|
32200
|
+
function up1312(db) {
|
|
32225
32201
|
const table = db.prepare("SELECT sql FROM sqlite_master WHERE type = 'table' AND name = 'dreaming_attention'").get();
|
|
32226
32202
|
if (!table)
|
|
32227
32203
|
return;
|
|
@@ -32255,7 +32231,7 @@ function up1302(db) {
|
|
|
32255
32231
|
ON dreaming_attention (agent_id, resolved_at, priority DESC, created_at ASC);
|
|
32256
32232
|
`);
|
|
32257
32233
|
}
|
|
32258
|
-
function
|
|
32234
|
+
function up1322(db) {
|
|
32259
32235
|
db.exec(`
|
|
32260
32236
|
CREATE TABLE IF NOT EXISTS ontology_contradictions (
|
|
32261
32237
|
id TEXT PRIMARY KEY,
|
|
@@ -32311,7 +32287,7 @@ function up1312(db) {
|
|
|
32311
32287
|
ON ontology_contradictions(agent_id, left_source_id, right_source_id);
|
|
32312
32288
|
`);
|
|
32313
32289
|
}
|
|
32314
|
-
function
|
|
32290
|
+
function up1332(db) {
|
|
32315
32291
|
db.exec(`
|
|
32316
32292
|
CREATE INDEX IF NOT EXISTS idx_memory_jobs_diagnostics_status_created_at
|
|
32317
32293
|
ON memory_jobs(status, created_at)
|
|
@@ -32326,7 +32302,7 @@ function up1322(db) {
|
|
|
32326
32302
|
function tableExists32(db, table) {
|
|
32327
32303
|
return db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = ?").get(table) != null;
|
|
32328
32304
|
}
|
|
32329
|
-
function
|
|
32305
|
+
function up1342(db) {
|
|
32330
32306
|
if (!tableExists32(db, "memory_jobs"))
|
|
32331
32307
|
return;
|
|
32332
32308
|
if (!tableExists32(db, "job_cancellations")) {
|
|
@@ -32375,7 +32351,7 @@ function up1332(db) {
|
|
|
32375
32351
|
AND status IN ('pending', 'leased');
|
|
32376
32352
|
`);
|
|
32377
32353
|
}
|
|
32378
|
-
function
|
|
32354
|
+
function up1352(db) {
|
|
32379
32355
|
db.exec(`
|
|
32380
32356
|
CREATE TABLE IF NOT EXISTS embedding_repair_budget (
|
|
32381
32357
|
id INTEGER PRIMARY KEY CHECK (id = 1),
|
|
@@ -32415,7 +32391,7 @@ function up1342(db) {
|
|
|
32415
32391
|
END;
|
|
32416
32392
|
`);
|
|
32417
32393
|
}
|
|
32418
|
-
function
|
|
32394
|
+
function up1362(db) {
|
|
32419
32395
|
db.exec(`
|
|
32420
32396
|
CREATE TABLE IF NOT EXISTS dreaming_evidence_consumption (
|
|
32421
32397
|
agent_id TEXT NOT NULL,
|
|
@@ -32438,13 +32414,13 @@ function up1352(db) {
|
|
|
32438
32414
|
ON dreaming_evidence_consumption(agent_id, pass_id, delivered_offset, source_length);
|
|
32439
32415
|
`);
|
|
32440
32416
|
}
|
|
32441
|
-
function
|
|
32417
|
+
function up1372(db) {
|
|
32442
32418
|
db.exec(`
|
|
32443
32419
|
CREATE INDEX IF NOT EXISTS idx_epistemic_assertions_observer_entity
|
|
32444
32420
|
ON epistemic_assertions(agent_id, subject_entity_id, status, asserted_at DESC, created_at DESC);
|
|
32445
32421
|
`);
|
|
32446
32422
|
}
|
|
32447
|
-
function
|
|
32423
|
+
function up1382(db) {
|
|
32448
32424
|
db.exec(`
|
|
32449
32425
|
CREATE TABLE IF NOT EXISTS memory_head_revisions (
|
|
32450
32426
|
id TEXT PRIMARY KEY,
|
|
@@ -32496,7 +32472,7 @@ function up1372(db) {
|
|
|
32496
32472
|
if (!names.has("format_version"))
|
|
32497
32473
|
db.exec("ALTER TABLE memory_md_heads ADD COLUMN format_version INTEGER NOT NULL DEFAULT 1");
|
|
32498
32474
|
}
|
|
32499
|
-
function
|
|
32475
|
+
function up1392(db) {
|
|
32500
32476
|
db.exec(`
|
|
32501
32477
|
CREATE TABLE memory_head_entries_v134 (
|
|
32502
32478
|
entry_id TEXT NOT NULL, agent_id TEXT NOT NULL, canonical_text TEXT NOT NULL,
|
|
@@ -32514,7 +32490,7 @@ function up1382(db) {
|
|
|
32514
32490
|
ON memory_head_entries(agent_id, entry_id, last_revision DESC);
|
|
32515
32491
|
`);
|
|
32516
32492
|
}
|
|
32517
|
-
function
|
|
32493
|
+
function up1402(db) {
|
|
32518
32494
|
db.exec(`
|
|
32519
32495
|
CREATE TABLE IF NOT EXISTS memory_head_publications (
|
|
32520
32496
|
agent_id TEXT NOT NULL,
|
|
@@ -32530,7 +32506,7 @@ function up1392(db) {
|
|
|
32530
32506
|
ON memory_head_publications(agent_id, status, revision DESC);
|
|
32531
32507
|
`);
|
|
32532
32508
|
}
|
|
32533
|
-
function
|
|
32509
|
+
function up1412(db) {
|
|
32534
32510
|
const cols = new Set(db.prepare("PRAGMA table_info(memory_head_revisions)").all().map((r22) => r22.name));
|
|
32535
32511
|
for (const [name, type] of [
|
|
32536
32512
|
["entry_id", "TEXT"],
|
|
@@ -32544,7 +32520,7 @@ function up1402(db) {
|
|
|
32544
32520
|
}
|
|
32545
32521
|
db.exec("CREATE UNIQUE INDEX IF NOT EXISTS idx_memory_head_revisions_entry ON memory_head_revisions(agent_id, revision, entry_id)");
|
|
32546
32522
|
}
|
|
32547
|
-
function
|
|
32523
|
+
function up1422(db) {
|
|
32548
32524
|
const cols = new Set(db.prepare("PRAGMA table_info(dreaming_passes)").all().map((r22) => r22.name));
|
|
32549
32525
|
for (const [name, type] of [
|
|
32550
32526
|
["head_revision", "INTEGER"],
|
|
@@ -32566,7 +32542,7 @@ function addColumnIfMissing282(db, table, column, definition) {
|
|
|
32566
32542
|
if (!hasColumn252(db, table, column))
|
|
32567
32543
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
32568
32544
|
}
|
|
32569
|
-
function
|
|
32545
|
+
function up1432(db) {
|
|
32570
32546
|
addColumnIfMissing282(db, "memories", "manual_override", "INTEGER DEFAULT 0");
|
|
32571
32547
|
db.exec(`
|
|
32572
32548
|
CREATE TABLE IF NOT EXISTS transcript_capture_status (
|
|
@@ -32871,7 +32847,7 @@ function up1422(db) {
|
|
|
32871
32847
|
GROUP BY j.agent_id;
|
|
32872
32848
|
`);
|
|
32873
32849
|
}
|
|
32874
|
-
function
|
|
32850
|
+
function up1442(db) {
|
|
32875
32851
|
db.exec(`
|
|
32876
32852
|
CREATE TABLE IF NOT EXISTS native_source_sync_state (
|
|
32877
32853
|
agent_id TEXT NOT NULL,
|
|
@@ -32887,7 +32863,7 @@ function up1432(db) {
|
|
|
32887
32863
|
ON native_source_sync_state(agent_id, status);
|
|
32888
32864
|
`);
|
|
32889
32865
|
}
|
|
32890
|
-
function
|
|
32866
|
+
function up1452(db) {
|
|
32891
32867
|
db.exec(`
|
|
32892
32868
|
CREATE TABLE IF NOT EXISTS transcript_recovery_frontiers (
|
|
32893
32869
|
agent_id TEXT NOT NULL,
|
|
@@ -32899,7 +32875,7 @@ function up1442(db) {
|
|
|
32899
32875
|
);
|
|
32900
32876
|
`);
|
|
32901
32877
|
}
|
|
32902
|
-
function
|
|
32878
|
+
function up1462(db) {
|
|
32903
32879
|
db.exec(`
|
|
32904
32880
|
CREATE TABLE IF NOT EXISTS source_sync_checkpoints (
|
|
32905
32881
|
agent_id TEXT NOT NULL,
|
|
@@ -32913,13 +32889,13 @@ function up1452(db) {
|
|
|
32913
32889
|
);
|
|
32914
32890
|
`);
|
|
32915
32891
|
}
|
|
32916
|
-
function
|
|
32892
|
+
function up1472(db) {
|
|
32917
32893
|
const columns = db.prepare("PRAGMA table_info(source_sync_checkpoints)").all();
|
|
32918
32894
|
if (!columns.some((column) => column.name === "frontier")) {
|
|
32919
32895
|
db.exec("ALTER TABLE source_sync_checkpoints ADD COLUMN frontier TEXT");
|
|
32920
32896
|
}
|
|
32921
32897
|
}
|
|
32922
|
-
function
|
|
32898
|
+
function up1482(db) {
|
|
32923
32899
|
const columns = new Set(db.prepare("PRAGMA table_info(embedding_index_state)").all().map((row) => row.name).filter((name) => typeof name === "string"));
|
|
32924
32900
|
const additions = [
|
|
32925
32901
|
["migration_phase", "TEXT"],
|
|
@@ -32954,13 +32930,13 @@ function up1472(db) {
|
|
|
32954
32930
|
`);
|
|
32955
32931
|
}
|
|
32956
32932
|
}
|
|
32957
|
-
function
|
|
32933
|
+
function up1492(db) {
|
|
32958
32934
|
const columns = new Set(db.prepare("PRAGMA table_info(memory_jobs)").all().map((row) => row.name).filter((name) => typeof name === "string"));
|
|
32959
32935
|
if (!columns.has("lease_token")) {
|
|
32960
32936
|
db.exec("ALTER TABLE memory_jobs ADD COLUMN lease_token TEXT");
|
|
32961
32937
|
}
|
|
32962
32938
|
}
|
|
32963
|
-
function
|
|
32939
|
+
function up1502(db) {
|
|
32964
32940
|
db.exec(`
|
|
32965
32941
|
CREATE TABLE IF NOT EXISTS dreaming_evidence_reviews (
|
|
32966
32942
|
agent_id TEXT NOT NULL,
|
|
@@ -32978,7 +32954,7 @@ function up1492(db) {
|
|
|
32978
32954
|
ON dreaming_evidence_reviews (agent_id, reviewed_at DESC);
|
|
32979
32955
|
`);
|
|
32980
32956
|
}
|
|
32981
|
-
function
|
|
32957
|
+
function up1512(db) {
|
|
32982
32958
|
db.exec(`
|
|
32983
32959
|
CREATE TABLE IF NOT EXISTS source_import_jobs (
|
|
32984
32960
|
id TEXT PRIMARY KEY, kind TEXT NOT NULL CHECK (kind = 'import'), agent_id TEXT NOT NULL,
|
|
@@ -33045,16 +33021,16 @@ function up1502(db) {
|
|
|
33045
33021
|
}
|
|
33046
33022
|
db.exec("CREATE INDEX IF NOT EXISTS idx_session_transcripts_agent_source ON session_transcripts(agent_id, source_id)");
|
|
33047
33023
|
}
|
|
33048
|
-
function
|
|
33024
|
+
function up1522(db) {
|
|
33049
33025
|
db.exec("CREATE INDEX IF NOT EXISTS idx_source_import_files_job_state ON source_import_files(job_id, state)");
|
|
33050
33026
|
}
|
|
33051
|
-
function
|
|
33027
|
+
function up1532(db) {
|
|
33052
33028
|
const columns = db.prepare("PRAGMA table_info(source_import_record_attempts)").all();
|
|
33053
33029
|
if (!columns.some((column) => column.name === "source_id")) {
|
|
33054
33030
|
db.exec("ALTER TABLE source_import_record_attempts ADD COLUMN source_id TEXT");
|
|
33055
33031
|
}
|
|
33056
33032
|
}
|
|
33057
|
-
function
|
|
33033
|
+
function up1542(db) {
|
|
33058
33034
|
const addColumn = (table, column, definition) => {
|
|
33059
33035
|
const statement = db.prepare("SELECT 1 AS found FROM pragma_table_info(?) WHERE name = ?");
|
|
33060
33036
|
let exists;
|
|
@@ -33075,7 +33051,7 @@ function addColumnIfMissing292(db, table, column, definition) {
|
|
|
33075
33051
|
if (!columns.some((row) => row.name === column))
|
|
33076
33052
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
33077
33053
|
}
|
|
33078
|
-
function
|
|
33054
|
+
function up1552(db) {
|
|
33079
33055
|
addColumnIfMissing292(db, "memory_md_heads", "is_current", "INTEGER NOT NULL DEFAULT 0");
|
|
33080
33056
|
addColumnIfMissing292(db, "dreaming_passes", "head_base_revision", "INTEGER");
|
|
33081
33057
|
db.exec("CREATE INDEX IF NOT EXISTS idx_memory_head_revisions_content_hash ON memory_head_revisions(content_hash)");
|
|
@@ -33225,7 +33201,7 @@ function up1542(db) {
|
|
|
33225
33201
|
`);
|
|
33226
33202
|
}
|
|
33227
33203
|
}
|
|
33228
|
-
function
|
|
33204
|
+
function up1562(db) {
|
|
33229
33205
|
db.exec(`
|
|
33230
33206
|
CREATE TABLE IF NOT EXISTS vector_repair_checkpoints (
|
|
33231
33207
|
operation TEXT NOT NULL CHECK (operation IN ('resync', 'clean-orphans')),
|
|
@@ -33250,7 +33226,7 @@ function up1552(db) {
|
|
|
33250
33226
|
ON vector_repair_checkpoints(status, updated_at);
|
|
33251
33227
|
`);
|
|
33252
33228
|
}
|
|
33253
|
-
function
|
|
33229
|
+
function up1572(db) {
|
|
33254
33230
|
db.exec(`
|
|
33255
33231
|
CREATE TABLE IF NOT EXISTS embedding_repair_checkpoints (
|
|
33256
33232
|
checkpoint_id TEXT PRIMARY KEY,
|
|
@@ -33271,7 +33247,7 @@ function up1562(db) {
|
|
|
33271
33247
|
ON embedding_repair_checkpoints(status, updated_at);
|
|
33272
33248
|
`);
|
|
33273
33249
|
}
|
|
33274
|
-
function
|
|
33250
|
+
function up1582(db) {
|
|
33275
33251
|
const columns = new Set(db.prepare("PRAGMA table_info(embedding_repair_checkpoints)").all().map((row) => row.name));
|
|
33276
33252
|
if (!columns.has("profile_fingerprint")) {
|
|
33277
33253
|
db.exec("ALTER TABLE embedding_repair_checkpoints ADD COLUMN profile_fingerprint TEXT");
|
|
@@ -33286,7 +33262,7 @@ function up1572(db) {
|
|
|
33286
33262
|
);
|
|
33287
33263
|
`);
|
|
33288
33264
|
}
|
|
33289
|
-
function
|
|
33265
|
+
function up1592(db) {
|
|
33290
33266
|
db.exec(`
|
|
33291
33267
|
CREATE INDEX IF NOT EXISTS idx_memories_agent_kind
|
|
33292
33268
|
ON memories(agent_id, memory_kind);
|
|
@@ -33296,13 +33272,13 @@ var MIGRATIONS2 = [
|
|
|
33296
33272
|
{
|
|
33297
33273
|
version: 1,
|
|
33298
33274
|
name: "baseline",
|
|
33299
|
-
up:
|
|
33275
|
+
up: up610,
|
|
33300
33276
|
artifacts: { tables: ["memories", "conversations", "embeddings"] }
|
|
33301
33277
|
},
|
|
33302
33278
|
{
|
|
33303
33279
|
version: 2,
|
|
33304
33280
|
name: "pipeline-v2",
|
|
33305
|
-
up:
|
|
33281
|
+
up: up710,
|
|
33306
33282
|
artifacts: {
|
|
33307
33283
|
tables: ["memory_history", "memory_jobs", "entities", "relations", "memory_entity_mentions"]
|
|
33308
33284
|
}
|
|
@@ -33310,12 +33286,12 @@ var MIGRATIONS2 = [
|
|
|
33310
33286
|
{
|
|
33311
33287
|
version: 3,
|
|
33312
33288
|
name: "unique-content-hash",
|
|
33313
|
-
up:
|
|
33289
|
+
up: up810
|
|
33314
33290
|
},
|
|
33315
33291
|
{
|
|
33316
33292
|
version: 4,
|
|
33317
33293
|
name: "history-actor-and-retention",
|
|
33318
|
-
up:
|
|
33294
|
+
up: up910,
|
|
33319
33295
|
artifacts: {
|
|
33320
33296
|
columns: [{ table: "memory_history", column: "actor_type" }]
|
|
33321
33297
|
}
|
|
@@ -33323,7 +33299,7 @@ var MIGRATIONS2 = [
|
|
|
33323
33299
|
{
|
|
33324
33300
|
version: 5,
|
|
33325
33301
|
name: "graph-extended",
|
|
33326
|
-
up:
|
|
33302
|
+
up: up1010,
|
|
33327
33303
|
artifacts: {
|
|
33328
33304
|
columns: [{ table: "entities", column: "canonical_name" }]
|
|
33329
33305
|
}
|
|
@@ -33331,7 +33307,7 @@ var MIGRATIONS2 = [
|
|
|
33331
33307
|
{
|
|
33332
33308
|
version: 6,
|
|
33333
33309
|
name: "idempotency-key",
|
|
33334
|
-
up:
|
|
33310
|
+
up: up1110,
|
|
33335
33311
|
artifacts: {
|
|
33336
33312
|
columns: [{ table: "memories", column: "idempotency_key" }]
|
|
33337
33313
|
}
|
|
@@ -33339,42 +33315,42 @@ var MIGRATIONS2 = [
|
|
|
33339
33315
|
{
|
|
33340
33316
|
version: 7,
|
|
33341
33317
|
name: "documents-and-connectors",
|
|
33342
|
-
up:
|
|
33318
|
+
up: up1210,
|
|
33343
33319
|
artifacts: { tables: ["documents", "document_memories", "connectors"] }
|
|
33344
33320
|
},
|
|
33345
33321
|
{
|
|
33346
33322
|
version: 8,
|
|
33347
33323
|
name: "embeddings-unique-hash",
|
|
33348
|
-
up:
|
|
33324
|
+
up: up1310
|
|
33349
33325
|
},
|
|
33350
33326
|
{
|
|
33351
33327
|
version: 9,
|
|
33352
33328
|
name: "summary-jobs",
|
|
33353
|
-
up:
|
|
33329
|
+
up: up1410,
|
|
33354
33330
|
artifacts: { tables: ["summary_jobs"] }
|
|
33355
33331
|
},
|
|
33356
33332
|
{
|
|
33357
33333
|
version: 10,
|
|
33358
33334
|
name: "umap-cache",
|
|
33359
|
-
up:
|
|
33335
|
+
up: up1510,
|
|
33360
33336
|
artifacts: { tables: ["umap_cache"] }
|
|
33361
33337
|
},
|
|
33362
33338
|
{
|
|
33363
33339
|
version: 11,
|
|
33364
33340
|
name: "session-scores",
|
|
33365
|
-
up:
|
|
33341
|
+
up: up162,
|
|
33366
33342
|
artifacts: { tables: ["session_scores"] }
|
|
33367
33343
|
},
|
|
33368
33344
|
{
|
|
33369
33345
|
version: 12,
|
|
33370
33346
|
name: "scheduled-tasks",
|
|
33371
|
-
up:
|
|
33347
|
+
up: up172,
|
|
33372
33348
|
artifacts: { tables: ["scheduled_tasks", "task_runs"] }
|
|
33373
33349
|
},
|
|
33374
33350
|
{
|
|
33375
33351
|
version: 13,
|
|
33376
33352
|
name: "ingestion-tracking",
|
|
33377
|
-
up:
|
|
33353
|
+
up: up182,
|
|
33378
33354
|
artifacts: {
|
|
33379
33355
|
columns: [
|
|
33380
33356
|
{ table: "memories", column: "source_path" },
|
|
@@ -33385,13 +33361,13 @@ var MIGRATIONS2 = [
|
|
|
33385
33361
|
{
|
|
33386
33362
|
version: 14,
|
|
33387
33363
|
name: "telemetry",
|
|
33388
|
-
up:
|
|
33364
|
+
up: up192,
|
|
33389
33365
|
artifacts: { tables: ["telemetry_events"] }
|
|
33390
33366
|
},
|
|
33391
33367
|
{
|
|
33392
33368
|
version: 15,
|
|
33393
33369
|
name: "session-memories",
|
|
33394
|
-
up:
|
|
33370
|
+
up: up202,
|
|
33395
33371
|
artifacts: {
|
|
33396
33372
|
tables: ["session_memories"],
|
|
33397
33373
|
columns: [
|
|
@@ -33403,13 +33379,13 @@ var MIGRATIONS2 = [
|
|
|
33403
33379
|
{
|
|
33404
33380
|
version: 16,
|
|
33405
33381
|
name: "session-checkpoints",
|
|
33406
|
-
up:
|
|
33382
|
+
up: up212,
|
|
33407
33383
|
artifacts: { tables: ["session_checkpoints"] }
|
|
33408
33384
|
},
|
|
33409
33385
|
{
|
|
33410
33386
|
version: 17,
|
|
33411
33387
|
name: "task-skills",
|
|
33412
|
-
up:
|
|
33388
|
+
up: up222,
|
|
33413
33389
|
artifacts: {
|
|
33414
33390
|
columns: [{ table: "scheduled_tasks", column: "skill_name" }]
|
|
33415
33391
|
}
|
|
@@ -33417,13 +33393,13 @@ var MIGRATIONS2 = [
|
|
|
33417
33393
|
{
|
|
33418
33394
|
version: 18,
|
|
33419
33395
|
name: "skill-meta",
|
|
33420
|
-
up:
|
|
33396
|
+
up: up232,
|
|
33421
33397
|
artifacts: { tables: ["skill_meta"] }
|
|
33422
33398
|
},
|
|
33423
33399
|
{
|
|
33424
33400
|
version: 19,
|
|
33425
33401
|
name: "knowledge-structure",
|
|
33426
|
-
up:
|
|
33402
|
+
up: up242,
|
|
33427
33403
|
artifacts: {
|
|
33428
33404
|
tables: ["entity_aspects", "entity_attributes", "entity_dependencies", "task_meta"],
|
|
33429
33405
|
columns: [{ table: "entities", column: "agent_id" }]
|
|
@@ -33432,7 +33408,7 @@ var MIGRATIONS2 = [
|
|
|
33432
33408
|
{
|
|
33433
33409
|
version: 20,
|
|
33434
33410
|
name: "session-structural-columns",
|
|
33435
|
-
up:
|
|
33411
|
+
up: up252,
|
|
33436
33412
|
artifacts: {
|
|
33437
33413
|
columns: [
|
|
33438
33414
|
{ table: "session_memories", column: "entity_slot" },
|
|
@@ -33445,7 +33421,7 @@ var MIGRATIONS2 = [
|
|
|
33445
33421
|
{
|
|
33446
33422
|
version: 21,
|
|
33447
33423
|
name: "checkpoint-structural",
|
|
33448
|
-
up:
|
|
33424
|
+
up: up262,
|
|
33449
33425
|
artifacts: {
|
|
33450
33426
|
columns: [{ table: "session_checkpoints", column: "focal_entity_ids" }]
|
|
33451
33427
|
}
|
|
@@ -33453,7 +33429,7 @@ var MIGRATIONS2 = [
|
|
|
33453
33429
|
{
|
|
33454
33430
|
version: 22,
|
|
33455
33431
|
name: "entity-pinning",
|
|
33456
|
-
up:
|
|
33432
|
+
up: up272,
|
|
33457
33433
|
artifacts: {
|
|
33458
33434
|
columns: [
|
|
33459
33435
|
{ table: "entities", column: "pinned" },
|
|
@@ -33464,17 +33440,17 @@ var MIGRATIONS2 = [
|
|
|
33464
33440
|
{
|
|
33465
33441
|
version: 23,
|
|
33466
33442
|
name: "retired-scorer-gap",
|
|
33467
|
-
up:
|
|
33443
|
+
up: up282
|
|
33468
33444
|
},
|
|
33469
33445
|
{
|
|
33470
33446
|
version: 24,
|
|
33471
33447
|
name: "retired-scorer-gap",
|
|
33472
|
-
up:
|
|
33448
|
+
up: up292
|
|
33473
33449
|
},
|
|
33474
33450
|
{
|
|
33475
33451
|
version: 25,
|
|
33476
33452
|
name: "agent-feedback",
|
|
33477
|
-
up:
|
|
33453
|
+
up: up302,
|
|
33478
33454
|
artifacts: {
|
|
33479
33455
|
columns: [{ table: "session_memories", column: "agent_relevance_score" }]
|
|
33480
33456
|
}
|
|
@@ -33482,32 +33458,32 @@ var MIGRATIONS2 = [
|
|
|
33482
33458
|
{
|
|
33483
33459
|
version: 26,
|
|
33484
33460
|
name: "retired-scorer-gap",
|
|
33485
|
-
up:
|
|
33461
|
+
up: up312
|
|
33486
33462
|
},
|
|
33487
33463
|
{
|
|
33488
33464
|
version: 27,
|
|
33489
33465
|
name: "backfill-canonical-names",
|
|
33490
|
-
up:
|
|
33466
|
+
up: up322
|
|
33491
33467
|
},
|
|
33492
33468
|
{
|
|
33493
33469
|
version: 28,
|
|
33494
33470
|
name: "lossless-retention",
|
|
33495
|
-
up:
|
|
33471
|
+
up: up332
|
|
33496
33472
|
},
|
|
33497
33473
|
{
|
|
33498
33474
|
version: 29,
|
|
33499
33475
|
name: "session-summary-dag",
|
|
33500
|
-
up:
|
|
33476
|
+
up: up342
|
|
33501
33477
|
},
|
|
33502
33478
|
{
|
|
33503
33479
|
version: 30,
|
|
33504
33480
|
name: "nullable-memory-job-memory-id",
|
|
33505
|
-
up:
|
|
33481
|
+
up: up352
|
|
33506
33482
|
},
|
|
33507
33483
|
{
|
|
33508
33484
|
version: 31,
|
|
33509
33485
|
name: "dependency-reason",
|
|
33510
|
-
up:
|
|
33486
|
+
up: up362,
|
|
33511
33487
|
artifacts: {
|
|
33512
33488
|
columns: [
|
|
33513
33489
|
{ table: "entity_dependencies", column: "reason" },
|
|
@@ -33518,7 +33494,7 @@ var MIGRATIONS2 = [
|
|
|
33518
33494
|
{
|
|
33519
33495
|
version: 32,
|
|
33520
33496
|
name: "embeddings-vector-column",
|
|
33521
|
-
up:
|
|
33497
|
+
up: up372,
|
|
33522
33498
|
artifacts: {
|
|
33523
33499
|
columns: [{ table: "embeddings", column: "vector", optional: true }]
|
|
33524
33500
|
}
|
|
@@ -33526,7 +33502,7 @@ var MIGRATIONS2 = [
|
|
|
33526
33502
|
{
|
|
33527
33503
|
version: 33,
|
|
33528
33504
|
name: "scope",
|
|
33529
|
-
up:
|
|
33505
|
+
up: up382,
|
|
33530
33506
|
artifacts: {
|
|
33531
33507
|
columns: [{ table: "memories", column: "scope" }]
|
|
33532
33508
|
}
|
|
@@ -33534,17 +33510,17 @@ var MIGRATIONS2 = [
|
|
|
33534
33510
|
{
|
|
33535
33511
|
version: 34,
|
|
33536
33512
|
name: "scope-aware-dedup",
|
|
33537
|
-
up:
|
|
33513
|
+
up: up392
|
|
33538
33514
|
},
|
|
33539
33515
|
{
|
|
33540
33516
|
version: 35,
|
|
33541
33517
|
name: "entity-fts",
|
|
33542
|
-
up:
|
|
33518
|
+
up: up402
|
|
33543
33519
|
},
|
|
33544
33520
|
{
|
|
33545
33521
|
version: 36,
|
|
33546
33522
|
name: "dependency-confidence",
|
|
33547
|
-
up:
|
|
33523
|
+
up: up412,
|
|
33548
33524
|
artifacts: {
|
|
33549
33525
|
columns: [{ table: "entity_dependencies", column: "confidence" }]
|
|
33550
33526
|
}
|
|
@@ -33552,7 +33528,7 @@ var MIGRATIONS2 = [
|
|
|
33552
33528
|
{
|
|
33553
33529
|
version: 37,
|
|
33554
33530
|
name: "entity-communities",
|
|
33555
|
-
up:
|
|
33531
|
+
up: up422,
|
|
33556
33532
|
artifacts: {
|
|
33557
33533
|
tables: ["entity_communities"],
|
|
33558
33534
|
columns: [{ table: "entities", column: "community_id" }]
|
|
@@ -33561,24 +33537,24 @@ var MIGRATIONS2 = [
|
|
|
33561
33537
|
{
|
|
33562
33538
|
version: 38,
|
|
33563
33539
|
name: "memory-hints",
|
|
33564
|
-
up:
|
|
33540
|
+
up: up432,
|
|
33565
33541
|
artifacts: { tables: ["memory_hints"] }
|
|
33566
33542
|
},
|
|
33567
33543
|
{
|
|
33568
33544
|
version: 39,
|
|
33569
33545
|
name: "dedup-entity-dependencies",
|
|
33570
|
-
up:
|
|
33546
|
+
up: up442
|
|
33571
33547
|
},
|
|
33572
33548
|
{
|
|
33573
33549
|
version: 40,
|
|
33574
33550
|
name: "session-transcripts",
|
|
33575
|
-
up:
|
|
33551
|
+
up: up452,
|
|
33576
33552
|
artifacts: { tables: ["session_transcripts"] }
|
|
33577
33553
|
},
|
|
33578
33554
|
{
|
|
33579
33555
|
version: 41,
|
|
33580
33556
|
name: "path-feedback",
|
|
33581
|
-
up:
|
|
33557
|
+
up: up462,
|
|
33582
33558
|
artifacts: {
|
|
33583
33559
|
tables: [
|
|
33584
33560
|
"path_feedback_events",
|
|
@@ -33593,7 +33569,7 @@ var MIGRATIONS2 = [
|
|
|
33593
33569
|
{
|
|
33594
33570
|
version: 42,
|
|
33595
33571
|
name: "session-memories-agent-id",
|
|
33596
|
-
up:
|
|
33572
|
+
up: up472,
|
|
33597
33573
|
artifacts: {
|
|
33598
33574
|
columns: [{ table: "session_memories", column: "agent_id" }]
|
|
33599
33575
|
}
|
|
@@ -33601,7 +33577,7 @@ var MIGRATIONS2 = [
|
|
|
33601
33577
|
{
|
|
33602
33578
|
version: 43,
|
|
33603
33579
|
name: "agents-table",
|
|
33604
|
-
up:
|
|
33580
|
+
up: up482,
|
|
33605
33581
|
artifacts: {
|
|
33606
33582
|
tables: ["agents"],
|
|
33607
33583
|
columns: [
|
|
@@ -33613,7 +33589,7 @@ var MIGRATIONS2 = [
|
|
|
33613
33589
|
{
|
|
33614
33590
|
version: 44,
|
|
33615
33591
|
name: "memory-md-temporal-head",
|
|
33616
|
-
up:
|
|
33592
|
+
up: up492,
|
|
33617
33593
|
artifacts: {
|
|
33618
33594
|
columns: [
|
|
33619
33595
|
{ table: "session_summaries", column: "source_type" },
|
|
@@ -33625,7 +33601,7 @@ var MIGRATIONS2 = [
|
|
|
33625
33601
|
{
|
|
33626
33602
|
version: 45,
|
|
33627
33603
|
name: "lossless-working-memory-hardening",
|
|
33628
|
-
up:
|
|
33604
|
+
up: up502,
|
|
33629
33605
|
artifacts: {
|
|
33630
33606
|
tables: ["session_transcripts_fts", "memory_md_heads"],
|
|
33631
33607
|
columns: [
|
|
@@ -33638,17 +33614,17 @@ var MIGRATIONS2 = [
|
|
|
33638
33614
|
{
|
|
33639
33615
|
version: 46,
|
|
33640
33616
|
name: "session-summary-uniqueness",
|
|
33641
|
-
up:
|
|
33617
|
+
up: up512
|
|
33642
33618
|
},
|
|
33643
33619
|
{
|
|
33644
33620
|
version: 47,
|
|
33645
33621
|
name: "agent-scoped-temporal-uniqueness",
|
|
33646
|
-
up:
|
|
33622
|
+
up: up522
|
|
33647
33623
|
},
|
|
33648
33624
|
{
|
|
33649
33625
|
version: 48,
|
|
33650
33626
|
name: "thread-heads",
|
|
33651
|
-
up:
|
|
33627
|
+
up: up532,
|
|
33652
33628
|
artifacts: {
|
|
33653
33629
|
tables: ["memory_thread_heads"]
|
|
33654
33630
|
}
|
|
@@ -33656,7 +33632,7 @@ var MIGRATIONS2 = [
|
|
|
33656
33632
|
{
|
|
33657
33633
|
version: 49,
|
|
33658
33634
|
name: "session-extract-cursors",
|
|
33659
|
-
up:
|
|
33635
|
+
up: up542,
|
|
33660
33636
|
artifacts: {
|
|
33661
33637
|
tables: ["session_extract_cursors"]
|
|
33662
33638
|
}
|
|
@@ -33664,7 +33640,7 @@ var MIGRATIONS2 = [
|
|
|
33664
33640
|
{
|
|
33665
33641
|
version: 50,
|
|
33666
33642
|
name: "related-to-audit",
|
|
33667
|
-
up:
|
|
33643
|
+
up: up552,
|
|
33668
33644
|
artifacts: {
|
|
33669
33645
|
tables: ["entity_dependency_history"]
|
|
33670
33646
|
}
|
|
@@ -33672,7 +33648,7 @@ var MIGRATIONS2 = [
|
|
|
33672
33648
|
{
|
|
33673
33649
|
version: 51,
|
|
33674
33650
|
name: "memory-md-rolling-window-lineage",
|
|
33675
|
-
up:
|
|
33651
|
+
up: up562,
|
|
33676
33652
|
artifacts: {
|
|
33677
33653
|
tables: ["memory_artifacts", "memory_artifact_tombstones", "memory_artifacts_fts"],
|
|
33678
33654
|
columns: [
|
|
@@ -33687,15 +33663,12 @@ var MIGRATIONS2 = [
|
|
|
33687
33663
|
{
|
|
33688
33664
|
version: 52,
|
|
33689
33665
|
name: "mcp-invocations",
|
|
33690
|
-
up:
|
|
33691
|
-
artifacts: {
|
|
33692
|
-
tables: ["mcp_invocations"]
|
|
33693
|
-
}
|
|
33666
|
+
up: up572
|
|
33694
33667
|
},
|
|
33695
33668
|
{
|
|
33696
33669
|
version: 53,
|
|
33697
33670
|
name: "skill-invocations",
|
|
33698
|
-
up:
|
|
33671
|
+
up: up582,
|
|
33699
33672
|
artifacts: {
|
|
33700
33673
|
tables: ["skill_invocations"]
|
|
33701
33674
|
}
|
|
@@ -33703,7 +33676,7 @@ var MIGRATIONS2 = [
|
|
|
33703
33676
|
{
|
|
33704
33677
|
version: 54,
|
|
33705
33678
|
name: "task-agent-scope",
|
|
33706
|
-
up:
|
|
33679
|
+
up: up592,
|
|
33707
33680
|
artifacts: {
|
|
33708
33681
|
tables: ["task_scope_hints"]
|
|
33709
33682
|
}
|
|
@@ -33711,7 +33684,7 @@ var MIGRATIONS2 = [
|
|
|
33711
33684
|
{
|
|
33712
33685
|
version: 55,
|
|
33713
33686
|
name: "dreaming-state",
|
|
33714
|
-
up:
|
|
33687
|
+
up: up602,
|
|
33715
33688
|
artifacts: {
|
|
33716
33689
|
tables: ["dreaming_state", "dreaming_passes"]
|
|
33717
33690
|
}
|
|
@@ -33719,22 +33692,22 @@ var MIGRATIONS2 = [
|
|
|
33719
33692
|
{
|
|
33720
33693
|
version: 56,
|
|
33721
33694
|
name: "agent-scoped-content-hash",
|
|
33722
|
-
up:
|
|
33695
|
+
up: up612
|
|
33723
33696
|
},
|
|
33724
33697
|
{
|
|
33725
33698
|
version: 57,
|
|
33726
33699
|
name: "memories-fts-tokenizer-repair",
|
|
33727
|
-
up:
|
|
33700
|
+
up: up622
|
|
33728
33701
|
},
|
|
33729
33702
|
{
|
|
33730
33703
|
version: 58,
|
|
33731
33704
|
name: "knowledge-graph-indices",
|
|
33732
|
-
up:
|
|
33705
|
+
up: up632
|
|
33733
33706
|
},
|
|
33734
33707
|
{
|
|
33735
33708
|
version: 59,
|
|
33736
33709
|
name: "entity-attribute-claim-key",
|
|
33737
|
-
up:
|
|
33710
|
+
up: up642,
|
|
33738
33711
|
artifacts: {
|
|
33739
33712
|
columns: [{ table: "entity_attributes", column: "claim_key" }]
|
|
33740
33713
|
}
|
|
@@ -33742,7 +33715,7 @@ var MIGRATIONS2 = [
|
|
|
33742
33715
|
{
|
|
33743
33716
|
version: 60,
|
|
33744
33717
|
name: "entity-attribute-group-key",
|
|
33745
|
-
up:
|
|
33718
|
+
up: up652,
|
|
33746
33719
|
artifacts: {
|
|
33747
33720
|
columns: [{ table: "entity_attributes", column: "group_key" }]
|
|
33748
33721
|
}
|
|
@@ -33750,7 +33723,7 @@ var MIGRATIONS2 = [
|
|
|
33750
33723
|
{
|
|
33751
33724
|
version: 61,
|
|
33752
33725
|
name: "memory-artifact-source-mtime",
|
|
33753
|
-
up:
|
|
33726
|
+
up: up662,
|
|
33754
33727
|
artifacts: {
|
|
33755
33728
|
columns: [{ table: "memory_artifacts", column: "source_mtime_ms" }]
|
|
33756
33729
|
}
|
|
@@ -33758,7 +33731,7 @@ var MIGRATIONS2 = [
|
|
|
33758
33731
|
{
|
|
33759
33732
|
version: 62,
|
|
33760
33733
|
name: "memory-artifact-soft-delete",
|
|
33761
|
-
up:
|
|
33734
|
+
up: up672,
|
|
33762
33735
|
artifacts: {
|
|
33763
33736
|
columns: [
|
|
33764
33737
|
{ table: "memory_artifacts", column: "is_deleted" },
|
|
@@ -33769,12 +33742,12 @@ var MIGRATIONS2 = [
|
|
|
33769
33742
|
{
|
|
33770
33743
|
version: 63,
|
|
33771
33744
|
name: "content-only-memories-fts-update",
|
|
33772
|
-
up:
|
|
33745
|
+
up: up682
|
|
33773
33746
|
},
|
|
33774
33747
|
{
|
|
33775
33748
|
version: 64,
|
|
33776
33749
|
name: "source-graph-provenance",
|
|
33777
|
-
up:
|
|
33750
|
+
up: up692,
|
|
33778
33751
|
artifacts: {
|
|
33779
33752
|
columns: [
|
|
33780
33753
|
{ table: "entities", column: "source_path" },
|
|
@@ -33787,7 +33760,7 @@ var MIGRATIONS2 = [
|
|
|
33787
33760
|
{
|
|
33788
33761
|
version: 65,
|
|
33789
33762
|
name: "source-embedding-agent-scope",
|
|
33790
|
-
up:
|
|
33763
|
+
up: up702,
|
|
33791
33764
|
artifacts: {
|
|
33792
33765
|
columns: [{ table: "embeddings", column: "agent_id", optional: true }]
|
|
33793
33766
|
}
|
|
@@ -33795,7 +33768,7 @@ var MIGRATIONS2 = [
|
|
|
33795
33768
|
{
|
|
33796
33769
|
version: 66,
|
|
33797
33770
|
name: "memory-search-telemetry",
|
|
33798
|
-
up:
|
|
33771
|
+
up: up712,
|
|
33799
33772
|
artifacts: {
|
|
33800
33773
|
tables: ["memory_search_telemetry"]
|
|
33801
33774
|
}
|
|
@@ -33803,7 +33776,7 @@ var MIGRATIONS2 = [
|
|
|
33803
33776
|
{
|
|
33804
33777
|
version: 67,
|
|
33805
33778
|
name: "ontology-proposals",
|
|
33806
|
-
up:
|
|
33779
|
+
up: up722,
|
|
33807
33780
|
artifacts: {
|
|
33808
33781
|
tables: ["ontology_proposals"],
|
|
33809
33782
|
columns: [
|
|
@@ -33817,7 +33790,7 @@ var MIGRATIONS2 = [
|
|
|
33817
33790
|
{
|
|
33818
33791
|
version: 68,
|
|
33819
33792
|
name: "daily-reflections",
|
|
33820
|
-
up:
|
|
33793
|
+
up: up732,
|
|
33821
33794
|
artifacts: {
|
|
33822
33795
|
tables: ["daily_reflections"]
|
|
33823
33796
|
}
|
|
@@ -33825,7 +33798,7 @@ var MIGRATIONS2 = [
|
|
|
33825
33798
|
{
|
|
33826
33799
|
version: 69,
|
|
33827
33800
|
name: "daily-reflections-multiple-insights",
|
|
33828
|
-
up:
|
|
33801
|
+
up: up742,
|
|
33829
33802
|
artifacts: {
|
|
33830
33803
|
tables: ["daily_reflections"]
|
|
33831
33804
|
}
|
|
@@ -33833,7 +33806,7 @@ var MIGRATIONS2 = [
|
|
|
33833
33806
|
{
|
|
33834
33807
|
version: 70,
|
|
33835
33808
|
name: "ontology-control-plane-state",
|
|
33836
|
-
up:
|
|
33809
|
+
up: up752,
|
|
33837
33810
|
artifacts: {
|
|
33838
33811
|
columns: [
|
|
33839
33812
|
{ table: "entities", column: "status" },
|
|
@@ -33848,7 +33821,7 @@ var MIGRATIONS2 = [
|
|
|
33848
33821
|
{
|
|
33849
33822
|
version: 71,
|
|
33850
33823
|
name: "epistemic-assertions",
|
|
33851
|
-
up:
|
|
33824
|
+
up: up762,
|
|
33852
33825
|
artifacts: {
|
|
33853
33826
|
tables: ["epistemic_assertions"]
|
|
33854
33827
|
}
|
|
@@ -33856,7 +33829,7 @@ var MIGRATIONS2 = [
|
|
|
33856
33829
|
{
|
|
33857
33830
|
version: 72,
|
|
33858
33831
|
name: "agent-scoped-idempotency-key",
|
|
33859
|
-
up:
|
|
33832
|
+
up: up772,
|
|
33860
33833
|
artifacts: {
|
|
33861
33834
|
columns: [
|
|
33862
33835
|
{ table: "memories", column: "idempotency_key" },
|
|
@@ -33867,7 +33840,7 @@ var MIGRATIONS2 = [
|
|
|
33867
33840
|
{
|
|
33868
33841
|
version: 73,
|
|
33869
33842
|
name: "recall-context-dedupe",
|
|
33870
|
-
up:
|
|
33843
|
+
up: up782,
|
|
33871
33844
|
artifacts: {
|
|
33872
33845
|
tables: ["session_context_epochs", "session_recall_events"]
|
|
33873
33846
|
}
|
|
@@ -33875,7 +33848,7 @@ var MIGRATIONS2 = [
|
|
|
33875
33848
|
{
|
|
33876
33849
|
version: 74,
|
|
33877
33850
|
name: "aggregate-memory-links",
|
|
33878
|
-
up:
|
|
33851
|
+
up: up792,
|
|
33879
33852
|
artifacts: {
|
|
33880
33853
|
tables: ["aggregate_memory_sources"]
|
|
33881
33854
|
}
|
|
@@ -33883,7 +33856,7 @@ var MIGRATIONS2 = [
|
|
|
33883
33856
|
{
|
|
33884
33857
|
version: 75,
|
|
33885
33858
|
name: "memory-artifact-source-provenance",
|
|
33886
|
-
up:
|
|
33859
|
+
up: up802,
|
|
33887
33860
|
artifacts: {
|
|
33888
33861
|
columns: [
|
|
33889
33862
|
{ table: "memory_artifacts", column: "source_id" },
|
|
@@ -33897,7 +33870,7 @@ var MIGRATIONS2 = [
|
|
|
33897
33870
|
{
|
|
33898
33871
|
version: 76,
|
|
33899
33872
|
name: "temporal-edges",
|
|
33900
|
-
up:
|
|
33873
|
+
up: up812,
|
|
33901
33874
|
artifacts: {
|
|
33902
33875
|
tables: ["temporal_edges"]
|
|
33903
33876
|
}
|
|
@@ -33905,7 +33878,7 @@ var MIGRATIONS2 = [
|
|
|
33905
33878
|
{
|
|
33906
33879
|
version: 77,
|
|
33907
33880
|
name: "entity-aliases",
|
|
33908
|
-
up:
|
|
33881
|
+
up: up822,
|
|
33909
33882
|
artifacts: {
|
|
33910
33883
|
tables: ["entity_aliases"]
|
|
33911
33884
|
}
|
|
@@ -33913,7 +33886,7 @@ var MIGRATIONS2 = [
|
|
|
33913
33886
|
{
|
|
33914
33887
|
version: 78,
|
|
33915
33888
|
name: "api-keys",
|
|
33916
|
-
up:
|
|
33889
|
+
up: up832,
|
|
33917
33890
|
artifacts: {
|
|
33918
33891
|
tables: ["api_keys"]
|
|
33919
33892
|
}
|
|
@@ -33921,7 +33894,7 @@ var MIGRATIONS2 = [
|
|
|
33921
33894
|
{
|
|
33922
33895
|
version: 79,
|
|
33923
33896
|
name: "transcript-capture-jobs",
|
|
33924
|
-
up:
|
|
33897
|
+
up: up842,
|
|
33925
33898
|
artifacts: {
|
|
33926
33899
|
tables: ["transcript_capture_jobs"]
|
|
33927
33900
|
}
|
|
@@ -33929,7 +33902,7 @@ var MIGRATIONS2 = [
|
|
|
33929
33902
|
{
|
|
33930
33903
|
version: 80,
|
|
33931
33904
|
name: "document-scope-columns",
|
|
33932
|
-
up:
|
|
33905
|
+
up: up852,
|
|
33933
33906
|
artifacts: {
|
|
33934
33907
|
columns: [
|
|
33935
33908
|
{ table: "documents", column: "agent_id" },
|
|
@@ -33940,7 +33913,7 @@ var MIGRATIONS2 = [
|
|
|
33940
33913
|
{
|
|
33941
33914
|
version: 81,
|
|
33942
33915
|
name: "aggregate-evidence-sources",
|
|
33943
|
-
up:
|
|
33916
|
+
up: up862,
|
|
33944
33917
|
artifacts: {
|
|
33945
33918
|
tables: ["aggregate_evidence_sources"]
|
|
33946
33919
|
}
|
|
@@ -33948,7 +33921,7 @@ var MIGRATIONS2 = [
|
|
|
33948
33921
|
{
|
|
33949
33922
|
version: 82,
|
|
33950
33923
|
name: "skill-invocations-harness",
|
|
33951
|
-
up:
|
|
33924
|
+
up: up872,
|
|
33952
33925
|
artifacts: {
|
|
33953
33926
|
columns: [
|
|
33954
33927
|
{ table: "skill_invocations", column: "harness" },
|
|
@@ -33959,7 +33932,7 @@ var MIGRATIONS2 = [
|
|
|
33959
33932
|
{
|
|
33960
33933
|
version: 83,
|
|
33961
33934
|
name: "memory-lifecycle-repair",
|
|
33962
|
-
up:
|
|
33935
|
+
up: up882,
|
|
33963
33936
|
artifacts: {
|
|
33964
33937
|
tables: ["transcript_capture_jobs", "aggregate_evidence_sources", "entity_dependencies"],
|
|
33965
33938
|
columns: [
|
|
@@ -33974,7 +33947,7 @@ var MIGRATIONS2 = [
|
|
|
33974
33947
|
{
|
|
33975
33948
|
version: 84,
|
|
33976
33949
|
name: "legacy-markdown-import-state",
|
|
33977
|
-
up:
|
|
33950
|
+
up: up892,
|
|
33978
33951
|
artifacts: {
|
|
33979
33952
|
tables: ["legacy_markdown_imports", "legacy_markdown_chunks"]
|
|
33980
33953
|
}
|
|
@@ -33982,7 +33955,7 @@ var MIGRATIONS2 = [
|
|
|
33982
33955
|
{
|
|
33983
33956
|
version: 85,
|
|
33984
33957
|
name: "backfill-relations-to-dependencies",
|
|
33985
|
-
up:
|
|
33958
|
+
up: up902,
|
|
33986
33959
|
artifacts: {
|
|
33987
33960
|
tables: ["entity_dependencies"]
|
|
33988
33961
|
}
|
|
@@ -33990,7 +33963,7 @@ var MIGRATIONS2 = [
|
|
|
33990
33963
|
{
|
|
33991
33964
|
version: 86,
|
|
33992
33965
|
name: "summary-jobs-content-hash",
|
|
33993
|
-
up:
|
|
33966
|
+
up: up912,
|
|
33994
33967
|
artifacts: {
|
|
33995
33968
|
columns: [{ table: "summary_jobs", column: "content_hash" }]
|
|
33996
33969
|
}
|
|
@@ -33998,7 +33971,7 @@ var MIGRATIONS2 = [
|
|
|
33998
33971
|
{
|
|
33999
33972
|
version: 87,
|
|
34000
33973
|
name: "summary-jobs-boundary-reason",
|
|
34001
|
-
up:
|
|
33974
|
+
up: up922,
|
|
34002
33975
|
artifacts: {
|
|
34003
33976
|
columns: [{ table: "summary_jobs", column: "boundary_reason" }]
|
|
34004
33977
|
}
|
|
@@ -34006,7 +33979,7 @@ var MIGRATIONS2 = [
|
|
|
34006
33979
|
{
|
|
34007
33980
|
version: 88,
|
|
34008
33981
|
name: "transcript-recovery-files",
|
|
34009
|
-
up:
|
|
33982
|
+
up: up932,
|
|
34010
33983
|
artifacts: {
|
|
34011
33984
|
tables: ["transcript_recovery_files"]
|
|
34012
33985
|
}
|
|
@@ -34014,7 +33987,7 @@ var MIGRATIONS2 = [
|
|
|
34014
33987
|
{
|
|
34015
33988
|
version: 89,
|
|
34016
33989
|
name: "job-cancellations",
|
|
34017
|
-
up:
|
|
33990
|
+
up: up942,
|
|
34018
33991
|
artifacts: {
|
|
34019
33992
|
tables: ["job_cancellations"]
|
|
34020
33993
|
}
|
|
@@ -34022,7 +33995,7 @@ var MIGRATIONS2 = [
|
|
|
34022
33995
|
{
|
|
34023
33996
|
version: 90,
|
|
34024
33997
|
name: "job-archive",
|
|
34025
|
-
up:
|
|
33998
|
+
up: up952,
|
|
34026
33999
|
artifacts: {
|
|
34027
34000
|
tables: ["job_archive"]
|
|
34028
34001
|
}
|
|
@@ -34030,25 +34003,25 @@ var MIGRATIONS2 = [
|
|
|
34030
34003
|
{
|
|
34031
34004
|
version: 91,
|
|
34032
34005
|
name: "embedding-index-generations",
|
|
34033
|
-
up:
|
|
34006
|
+
up: up962,
|
|
34034
34007
|
artifacts: { tables: ["embedding_index_state"] }
|
|
34035
34008
|
},
|
|
34036
34009
|
{
|
|
34037
34010
|
version: 92,
|
|
34038
34011
|
name: "embedding-staging-store",
|
|
34039
|
-
up:
|
|
34012
|
+
up: up972,
|
|
34040
34013
|
artifacts: { tables: ["embeddings_staging"] }
|
|
34041
34014
|
},
|
|
34042
34015
|
{
|
|
34043
34016
|
version: 93,
|
|
34044
34017
|
name: "dreaming-evidence-cursor",
|
|
34045
|
-
up:
|
|
34018
|
+
up: up982,
|
|
34046
34019
|
artifacts: { columns: [{ table: "dreaming_state", column: "evidence_cursor" }] }
|
|
34047
34020
|
},
|
|
34048
34021
|
{
|
|
34049
34022
|
version: 94,
|
|
34050
34023
|
name: "memory-kind",
|
|
34051
|
-
up:
|
|
34024
|
+
up: up992,
|
|
34052
34025
|
artifacts: {
|
|
34053
34026
|
columns: [
|
|
34054
34027
|
{ table: "memories", column: "memory_kind" },
|
|
@@ -34059,35 +34032,35 @@ var MIGRATIONS2 = [
|
|
|
34059
34032
|
{
|
|
34060
34033
|
version: 95,
|
|
34061
34034
|
name: "compaction-recall-projections",
|
|
34062
|
-
up:
|
|
34035
|
+
up: up1002
|
|
34063
34036
|
},
|
|
34064
34037
|
{
|
|
34065
34038
|
version: 96,
|
|
34066
34039
|
name: "retire-legacy-ingestion",
|
|
34067
|
-
up:
|
|
34040
|
+
up: up1012
|
|
34068
34041
|
},
|
|
34069
34042
|
{
|
|
34070
34043
|
version: 97,
|
|
34071
34044
|
name: "dreaming-failure-backoff",
|
|
34072
|
-
up:
|
|
34045
|
+
up: up1022,
|
|
34073
34046
|
artifacts: { columns: [{ table: "dreaming_state", column: "last_failure_at" }] }
|
|
34074
34047
|
},
|
|
34075
34048
|
{
|
|
34076
34049
|
version: 98,
|
|
34077
34050
|
name: "dreaming-evidence-exclusions",
|
|
34078
|
-
up:
|
|
34051
|
+
up: up1032,
|
|
34079
34052
|
artifacts: { tables: ["dreaming_evidence_exclusions"] }
|
|
34080
34053
|
},
|
|
34081
34054
|
{
|
|
34082
34055
|
version: 99,
|
|
34083
34056
|
name: "dreaming-tool-calls",
|
|
34084
|
-
up:
|
|
34057
|
+
up: up1042,
|
|
34085
34058
|
artifacts: { tables: ["dreaming_tool_calls"] }
|
|
34086
34059
|
},
|
|
34087
34060
|
{
|
|
34088
34061
|
version: 100,
|
|
34089
34062
|
name: "dreaming-runbook",
|
|
34090
|
-
up:
|
|
34063
|
+
up: up1052,
|
|
34091
34064
|
artifacts: {
|
|
34092
34065
|
columns: [
|
|
34093
34066
|
{ table: "dreaming_passes", column: "evidence_window_json" },
|
|
@@ -34098,23 +34071,23 @@ var MIGRATIONS2 = [
|
|
|
34098
34071
|
{
|
|
34099
34072
|
version: 101,
|
|
34100
34073
|
name: "dreaming-attention",
|
|
34101
|
-
up:
|
|
34074
|
+
up: up1062,
|
|
34102
34075
|
artifacts: { tables: ["dreaming_attention"] }
|
|
34103
34076
|
},
|
|
34104
34077
|
{
|
|
34105
34078
|
version: 102,
|
|
34106
34079
|
name: "attribute-semantic-memories",
|
|
34107
|
-
up:
|
|
34080
|
+
up: up1072
|
|
34108
34081
|
},
|
|
34109
34082
|
{
|
|
34110
34083
|
version: 103,
|
|
34111
34084
|
name: "semantic-memory-kind",
|
|
34112
|
-
up:
|
|
34085
|
+
up: up1082
|
|
34113
34086
|
},
|
|
34114
34087
|
{
|
|
34115
34088
|
version: 104,
|
|
34116
34089
|
name: "derived-memory-provenance",
|
|
34117
|
-
up:
|
|
34090
|
+
up: up1092,
|
|
34118
34091
|
artifacts: {
|
|
34119
34092
|
tables: ["derived_memory_sources"],
|
|
34120
34093
|
columns: [{ table: "memories", column: "stale_at" }]
|
|
@@ -34123,12 +34096,12 @@ var MIGRATIONS2 = [
|
|
|
34123
34096
|
{
|
|
34124
34097
|
version: 105,
|
|
34125
34098
|
name: "agent-scoped-entity-name",
|
|
34126
|
-
up:
|
|
34099
|
+
up: up1102
|
|
34127
34100
|
},
|
|
34128
34101
|
{
|
|
34129
34102
|
version: 106,
|
|
34130
34103
|
name: "memory-review-after",
|
|
34131
|
-
up:
|
|
34104
|
+
up: up1112,
|
|
34132
34105
|
artifacts: {
|
|
34133
34106
|
columns: [{ table: "memories", column: "review_after" }]
|
|
34134
34107
|
}
|
|
@@ -34136,7 +34109,7 @@ var MIGRATIONS2 = [
|
|
|
34136
34109
|
{
|
|
34137
34110
|
version: 107,
|
|
34138
34111
|
name: "dreaming-pass-usage",
|
|
34139
|
-
up:
|
|
34112
|
+
up: up1122,
|
|
34140
34113
|
artifacts: {
|
|
34141
34114
|
columns: [
|
|
34142
34115
|
{ table: "dreaming_passes", column: "tokens_input" },
|
|
@@ -34150,7 +34123,7 @@ var MIGRATIONS2 = [
|
|
|
34150
34123
|
{
|
|
34151
34124
|
version: 108,
|
|
34152
34125
|
name: "embedding-usage",
|
|
34153
|
-
up:
|
|
34126
|
+
up: up1132,
|
|
34154
34127
|
artifacts: {
|
|
34155
34128
|
tables: ["embedding_usage"]
|
|
34156
34129
|
}
|
|
@@ -34158,7 +34131,7 @@ var MIGRATIONS2 = [
|
|
|
34158
34131
|
{
|
|
34159
34132
|
version: 109,
|
|
34160
34133
|
name: "telemetry-install",
|
|
34161
|
-
up:
|
|
34134
|
+
up: up1142,
|
|
34162
34135
|
artifacts: {
|
|
34163
34136
|
tables: ["telemetry_install"]
|
|
34164
34137
|
}
|
|
@@ -34166,12 +34139,12 @@ var MIGRATIONS2 = [
|
|
|
34166
34139
|
{
|
|
34167
34140
|
version: 110,
|
|
34168
34141
|
name: "memory-mention-join-index",
|
|
34169
|
-
up:
|
|
34142
|
+
up: up1152
|
|
34170
34143
|
},
|
|
34171
34144
|
{
|
|
34172
34145
|
version: 111,
|
|
34173
34146
|
name: "telemetry-first-use",
|
|
34174
|
-
up:
|
|
34147
|
+
up: up1162,
|
|
34175
34148
|
artifacts: {
|
|
34176
34149
|
columns: [
|
|
34177
34150
|
{ table: "telemetry_install", column: "first_remember_at" },
|
|
@@ -34182,7 +34155,7 @@ var MIGRATIONS2 = [
|
|
|
34182
34155
|
{
|
|
34183
34156
|
version: 112,
|
|
34184
34157
|
name: "telemetry-queue-ownership",
|
|
34185
|
-
up:
|
|
34158
|
+
up: up1172,
|
|
34186
34159
|
artifacts: {
|
|
34187
34160
|
columns: [
|
|
34188
34161
|
{ table: "telemetry_events", column: "source" },
|
|
@@ -34194,7 +34167,7 @@ var MIGRATIONS2 = [
|
|
|
34194
34167
|
{
|
|
34195
34168
|
version: 113,
|
|
34196
34169
|
name: "session-claims",
|
|
34197
|
-
up:
|
|
34170
|
+
up: up1182,
|
|
34198
34171
|
artifacts: {
|
|
34199
34172
|
tables: ["session_claims"],
|
|
34200
34173
|
columns: [
|
|
@@ -34208,12 +34181,12 @@ var MIGRATIONS2 = [
|
|
|
34208
34181
|
{
|
|
34209
34182
|
version: 114,
|
|
34210
34183
|
name: "memory-traversal-hydration-index",
|
|
34211
|
-
up:
|
|
34184
|
+
up: up1192
|
|
34212
34185
|
},
|
|
34213
34186
|
{
|
|
34214
34187
|
version: 115,
|
|
34215
34188
|
name: "cross-agent-message-notifications",
|
|
34216
|
-
up:
|
|
34189
|
+
up: up1202,
|
|
34217
34190
|
artifacts: {
|
|
34218
34191
|
tables: ["cross_agent_messages", "cross_agent_message_receipts"]
|
|
34219
34192
|
}
|
|
@@ -34221,7 +34194,7 @@ var MIGRATIONS2 = [
|
|
|
34221
34194
|
{
|
|
34222
34195
|
version: 116,
|
|
34223
34196
|
name: "acp-delivery-reconciliation",
|
|
34224
|
-
up:
|
|
34197
|
+
up: up1212,
|
|
34225
34198
|
artifacts: {
|
|
34226
34199
|
columns: [
|
|
34227
34200
|
{ table: "cross_agent_messages", column: "delivery_state" },
|
|
@@ -34235,7 +34208,7 @@ var MIGRATIONS2 = [
|
|
|
34235
34208
|
{
|
|
34236
34209
|
version: 117,
|
|
34237
34210
|
name: "retire-summary-worker",
|
|
34238
|
-
up:
|
|
34211
|
+
up: up1222,
|
|
34239
34212
|
artifacts: {
|
|
34240
34213
|
columns: [
|
|
34241
34214
|
{ table: "session_transcripts", column: "completed_at" },
|
|
@@ -34246,24 +34219,24 @@ var MIGRATIONS2 = [
|
|
|
34246
34219
|
{
|
|
34247
34220
|
version: 118,
|
|
34248
34221
|
name: "queue-pressure-indices",
|
|
34249
|
-
up:
|
|
34222
|
+
up: up1232
|
|
34250
34223
|
},
|
|
34251
34224
|
{
|
|
34252
34225
|
version: 119,
|
|
34253
34226
|
name: "telemetry-version-observation",
|
|
34254
|
-
up:
|
|
34227
|
+
up: up1242,
|
|
34255
34228
|
artifacts: { columns: [{ table: "telemetry_install", column: "last_seen_version" }] }
|
|
34256
34229
|
},
|
|
34257
34230
|
{
|
|
34258
34231
|
version: 120,
|
|
34259
34232
|
name: "source-lifecycle-telemetry",
|
|
34260
|
-
up:
|
|
34233
|
+
up: up1252,
|
|
34261
34234
|
artifacts: { tables: ["source_lifecycle_state"] }
|
|
34262
34235
|
},
|
|
34263
34236
|
{
|
|
34264
34237
|
version: 121,
|
|
34265
34238
|
name: "telemetry-delivery-health",
|
|
34266
|
-
up:
|
|
34239
|
+
up: up1262,
|
|
34267
34240
|
artifacts: {
|
|
34268
34241
|
tables: ["telemetry_delivery_state"],
|
|
34269
34242
|
columns: [
|
|
@@ -34277,7 +34250,7 @@ var MIGRATIONS2 = [
|
|
|
34277
34250
|
{
|
|
34278
34251
|
version: 122,
|
|
34279
34252
|
name: "dreaming-evidence-retry",
|
|
34280
|
-
up:
|
|
34253
|
+
up: up1272,
|
|
34281
34254
|
artifacts: {
|
|
34282
34255
|
columns: [
|
|
34283
34256
|
{ table: "dreaming_evidence_exclusions", column: "failure_class" },
|
|
@@ -34290,13 +34263,13 @@ var MIGRATIONS2 = [
|
|
|
34290
34263
|
{
|
|
34291
34264
|
version: 123,
|
|
34292
34265
|
name: "embedding-index-failures",
|
|
34293
|
-
up:
|
|
34266
|
+
up: up1282,
|
|
34294
34267
|
artifacts: { tables: ["embedding_index_failures"] }
|
|
34295
34268
|
},
|
|
34296
34269
|
{
|
|
34297
34270
|
version: 124,
|
|
34298
34271
|
name: "import-derived-lifecycle",
|
|
34299
|
-
up:
|
|
34272
|
+
up: up1292,
|
|
34300
34273
|
artifacts: {
|
|
34301
34274
|
tables: ["imported_source_lifecycle"]
|
|
34302
34275
|
}
|
|
@@ -34304,77 +34277,77 @@ var MIGRATIONS2 = [
|
|
|
34304
34277
|
{
|
|
34305
34278
|
version: 125,
|
|
34306
34279
|
name: "memory-content-safety",
|
|
34307
|
-
up:
|
|
34280
|
+
up: up1302,
|
|
34308
34281
|
artifacts: { tables: ["memory_content_safety"] }
|
|
34309
34282
|
},
|
|
34310
34283
|
{
|
|
34311
34284
|
version: 126,
|
|
34312
34285
|
name: "dreaming-surprisal-attention",
|
|
34313
|
-
up:
|
|
34286
|
+
up: up1312,
|
|
34314
34287
|
artifacts: { tables: ["dreaming_attention"] }
|
|
34315
34288
|
},
|
|
34316
34289
|
{
|
|
34317
34290
|
version: 127,
|
|
34318
34291
|
name: "ontology-contradictions",
|
|
34319
|
-
up:
|
|
34292
|
+
up: up1322,
|
|
34320
34293
|
artifacts: { tables: ["ontology_contradictions"] }
|
|
34321
34294
|
},
|
|
34322
34295
|
{
|
|
34323
34296
|
version: 128,
|
|
34324
34297
|
name: "bounded-queue-diagnostics",
|
|
34325
|
-
up:
|
|
34298
|
+
up: up1332
|
|
34326
34299
|
},
|
|
34327
34300
|
{
|
|
34328
34301
|
version: 129,
|
|
34329
34302
|
name: "retire-structural-jobs",
|
|
34330
|
-
up:
|
|
34303
|
+
up: up1342
|
|
34331
34304
|
},
|
|
34332
34305
|
{
|
|
34333
34306
|
version: 130,
|
|
34334
34307
|
name: "embedding-repair-state",
|
|
34335
|
-
up:
|
|
34308
|
+
up: up1352,
|
|
34336
34309
|
artifacts: { tables: ["embedding_repair_budget", "embedding_repair_backoff"] }
|
|
34337
34310
|
},
|
|
34338
34311
|
{
|
|
34339
34312
|
version: 131,
|
|
34340
34313
|
name: "dreaming-evidence-consumption",
|
|
34341
|
-
up:
|
|
34314
|
+
up: up1362,
|
|
34342
34315
|
artifacts: { tables: ["dreaming_evidence_consumption"] }
|
|
34343
34316
|
},
|
|
34344
34317
|
{
|
|
34345
34318
|
version: 132,
|
|
34346
34319
|
name: "observer-scoped-epistemic-assertions",
|
|
34347
|
-
up:
|
|
34320
|
+
up: up1372,
|
|
34348
34321
|
artifacts: { tables: ["epistemic_assertions"] }
|
|
34349
34322
|
},
|
|
34350
34323
|
{
|
|
34351
34324
|
version: 133,
|
|
34352
34325
|
name: "dreaming-memory-head",
|
|
34353
|
-
up:
|
|
34326
|
+
up: up1382,
|
|
34354
34327
|
artifacts: { tables: ["memory_head_revisions", "memory_head_entries", "memory_head_revision_entries"] }
|
|
34355
34328
|
},
|
|
34356
34329
|
{
|
|
34357
34330
|
version: 134,
|
|
34358
34331
|
name: "scope-memory-head-entries",
|
|
34359
|
-
up:
|
|
34332
|
+
up: up1392,
|
|
34360
34333
|
artifacts: { tables: ["memory_head_entries"] }
|
|
34361
34334
|
},
|
|
34362
34335
|
{
|
|
34363
34336
|
version: 135,
|
|
34364
34337
|
name: "memory-head-publication",
|
|
34365
|
-
up:
|
|
34338
|
+
up: up1402,
|
|
34366
34339
|
artifacts: { tables: ["memory_head_publications"] }
|
|
34367
34340
|
},
|
|
34368
34341
|
{
|
|
34369
34342
|
version: 136,
|
|
34370
34343
|
name: "memory-head-revisions",
|
|
34371
|
-
up:
|
|
34344
|
+
up: up1412,
|
|
34372
34345
|
artifacts: { tables: ["memory_head_revisions"] }
|
|
34373
34346
|
},
|
|
34374
34347
|
{
|
|
34375
34348
|
version: 137,
|
|
34376
34349
|
name: "dreaming-head-manifest",
|
|
34377
|
-
up:
|
|
34350
|
+
up: up1422,
|
|
34378
34351
|
artifacts: {
|
|
34379
34352
|
columns: [
|
|
34380
34353
|
{ table: "dreaming_passes", column: "head_revision" },
|
|
@@ -34385,7 +34358,7 @@ var MIGRATIONS2 = [
|
|
|
34385
34358
|
{
|
|
34386
34359
|
version: 138,
|
|
34387
34360
|
name: "bounded-status-projections",
|
|
34388
|
-
up:
|
|
34361
|
+
up: up1432,
|
|
34389
34362
|
artifacts: {
|
|
34390
34363
|
tables: ["transcript_capture_status", "memories_duplicate_hash_counts", "memories_diagnostics_state"]
|
|
34391
34364
|
}
|
|
@@ -34393,31 +34366,31 @@ var MIGRATIONS2 = [
|
|
|
34393
34366
|
{
|
|
34394
34367
|
version: 139,
|
|
34395
34368
|
name: "native-source-sync-state",
|
|
34396
|
-
up:
|
|
34369
|
+
up: up1442,
|
|
34397
34370
|
artifacts: { tables: ["native_source_sync_state"] }
|
|
34398
34371
|
},
|
|
34399
34372
|
{
|
|
34400
34373
|
version: 140,
|
|
34401
34374
|
name: "transcript-recovery-frontier",
|
|
34402
|
-
up:
|
|
34375
|
+
up: up1452,
|
|
34403
34376
|
artifacts: { tables: ["transcript_recovery_frontiers"] }
|
|
34404
34377
|
},
|
|
34405
34378
|
{
|
|
34406
34379
|
version: 141,
|
|
34407
34380
|
name: "source-sync-checkpoints",
|
|
34408
|
-
up:
|
|
34381
|
+
up: up1462,
|
|
34409
34382
|
artifacts: { tables: ["source_sync_checkpoints"] }
|
|
34410
34383
|
},
|
|
34411
34384
|
{
|
|
34412
34385
|
version: 142,
|
|
34413
34386
|
name: "source-sync-frontier",
|
|
34414
|
-
up:
|
|
34387
|
+
up: up1472,
|
|
34415
34388
|
artifacts: { columns: [{ table: "source_sync_checkpoints", column: "frontier" }] }
|
|
34416
34389
|
},
|
|
34417
34390
|
{
|
|
34418
34391
|
version: 143,
|
|
34419
34392
|
name: "embedding-index-progress",
|
|
34420
|
-
up:
|
|
34393
|
+
up: up1482,
|
|
34421
34394
|
artifacts: {
|
|
34422
34395
|
columns: [
|
|
34423
34396
|
{ table: "embedding_index_state", column: "migration_phase" },
|
|
@@ -34433,19 +34406,19 @@ var MIGRATIONS2 = [
|
|
|
34433
34406
|
{
|
|
34434
34407
|
version: 144,
|
|
34435
34408
|
name: "memory-job-lease-token",
|
|
34436
|
-
up:
|
|
34409
|
+
up: up1492,
|
|
34437
34410
|
artifacts: { columns: [{ table: "memory_jobs", column: "lease_token" }] }
|
|
34438
34411
|
},
|
|
34439
34412
|
{
|
|
34440
34413
|
version: 145,
|
|
34441
34414
|
name: "dreaming-evidence-reviews",
|
|
34442
|
-
up:
|
|
34415
|
+
up: up1502,
|
|
34443
34416
|
artifacts: { tables: ["dreaming_evidence_reviews"] }
|
|
34444
34417
|
},
|
|
34445
34418
|
{
|
|
34446
34419
|
version: 146,
|
|
34447
34420
|
name: "source-transcript-import",
|
|
34448
|
-
up:
|
|
34421
|
+
up: up1512,
|
|
34449
34422
|
artifacts: {
|
|
34450
34423
|
tables: [
|
|
34451
34424
|
"source_import_jobs",
|
|
@@ -34464,19 +34437,19 @@ var MIGRATIONS2 = [
|
|
|
34464
34437
|
{
|
|
34465
34438
|
version: 147,
|
|
34466
34439
|
name: "source-import-replay-file-slots",
|
|
34467
|
-
up:
|
|
34440
|
+
up: up1522,
|
|
34468
34441
|
artifacts: { tables: ["source_import_files"] }
|
|
34469
34442
|
},
|
|
34470
34443
|
{
|
|
34471
34444
|
version: 148,
|
|
34472
34445
|
name: "source-import-attempt-provenance",
|
|
34473
|
-
up:
|
|
34446
|
+
up: up1532,
|
|
34474
34447
|
artifacts: { columns: [{ table: "source_import_record_attempts", column: "source_id" }] }
|
|
34475
34448
|
},
|
|
34476
34449
|
{
|
|
34477
34450
|
version: 149,
|
|
34478
34451
|
name: "transcript-import-state-machine",
|
|
34479
|
-
up:
|
|
34452
|
+
up: up1542,
|
|
34480
34453
|
artifacts: {
|
|
34481
34454
|
columns: [
|
|
34482
34455
|
{ table: "source_import_jobs", column: "duplicate_mode" },
|
|
@@ -34488,7 +34461,7 @@ var MIGRATIONS2 = [
|
|
|
34488
34461
|
{
|
|
34489
34462
|
version: 150,
|
|
34490
34463
|
name: "memory-head-freshness",
|
|
34491
|
-
up:
|
|
34464
|
+
up: up1552,
|
|
34492
34465
|
artifacts: {
|
|
34493
34466
|
columns: [
|
|
34494
34467
|
{ table: "memory_md_heads", column: "is_current" },
|
|
@@ -34499,7 +34472,7 @@ var MIGRATIONS2 = [
|
|
|
34499
34472
|
{
|
|
34500
34473
|
version: 151,
|
|
34501
34474
|
name: "transcript-import-bytes",
|
|
34502
|
-
up:
|
|
34475
|
+
up: up160,
|
|
34503
34476
|
artifacts: {
|
|
34504
34477
|
tables: [
|
|
34505
34478
|
"source_import_chunks",
|
|
@@ -34534,7 +34507,7 @@ var MIGRATIONS2 = [
|
|
|
34534
34507
|
{
|
|
34535
34508
|
version: 153,
|
|
34536
34509
|
name: "vector-repair-checkpoints",
|
|
34537
|
-
up:
|
|
34510
|
+
up: up1562,
|
|
34538
34511
|
artifacts: { tables: ["vector_repair_checkpoints"] }
|
|
34539
34512
|
},
|
|
34540
34513
|
{
|
|
@@ -34561,13 +34534,13 @@ var MIGRATIONS2 = [
|
|
|
34561
34534
|
{
|
|
34562
34535
|
version: 156,
|
|
34563
34536
|
name: "embedding-repair-checkpoints",
|
|
34564
|
-
up:
|
|
34537
|
+
up: up1572,
|
|
34565
34538
|
artifacts: { tables: ["embedding_repair_checkpoints"] }
|
|
34566
34539
|
},
|
|
34567
34540
|
{
|
|
34568
34541
|
version: 157,
|
|
34569
34542
|
name: "embedding-repair-progress",
|
|
34570
|
-
up:
|
|
34543
|
+
up: up1582,
|
|
34571
34544
|
artifacts: {
|
|
34572
34545
|
tables: ["embedding_repair_progress"],
|
|
34573
34546
|
columns: [{ table: "embedding_repair_checkpoints", column: "profile_fingerprint" }]
|
|
@@ -34576,8 +34549,13 @@ var MIGRATIONS2 = [
|
|
|
34576
34549
|
{
|
|
34577
34550
|
version: 158,
|
|
34578
34551
|
name: "dreaming-candidate-scan-index",
|
|
34579
|
-
up:
|
|
34552
|
+
up: up1592,
|
|
34580
34553
|
artifacts: { indexes: ["idx_memories_agent_kind"] }
|
|
34554
|
+
},
|
|
34555
|
+
{
|
|
34556
|
+
version: 159,
|
|
34557
|
+
name: "retire-obsolete-invocation-ledger",
|
|
34558
|
+
up: up510
|
|
34581
34559
|
}
|
|
34582
34560
|
];
|
|
34583
34561
|
var LATEST_SCHEMA_VERSION2 = MIGRATIONS2[MIGRATIONS2.length - 1]?.version ?? 0;
|