@signetai/connector-base 0.221.10 → 0.222.0
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/agent-dir.js +314 -302
- package/dist/index.js +314 -302
- package/package.json +2 -2
package/dist/agent-dir.js
CHANGED
|
@@ -11407,6 +11407,12 @@ function up(db) {
|
|
|
11407
11407
|
CREATE INDEX IF NOT EXISTS idx_transcript_import_harness ON transcript_import_conversations(agent_id,harness);
|
|
11408
11408
|
`);
|
|
11409
11409
|
}
|
|
11410
|
+
function up2(db) {
|
|
11411
|
+
db.exec(`
|
|
11412
|
+
DROP INDEX IF EXISTS idx_memory_artifacts_agent_sha;
|
|
11413
|
+
CREATE INDEX idx_memory_artifacts_agent_sha ON memory_artifacts(agent_id, source_sha256, COALESCE(source_id, ''), COALESCE(is_deleted, 0), captured_at DESC, source_path)
|
|
11414
|
+
`);
|
|
11415
|
+
}
|
|
11410
11416
|
var MEMORIES_FTS_TOKENIZER = "unicode61";
|
|
11411
11417
|
var FTS_STATE_TABLE = "memories_fts_state";
|
|
11412
11418
|
function normalizeSql(sql) {
|
|
@@ -11522,7 +11528,7 @@ function memoriesFtsNeedsTokenizerRepair(sql) {
|
|
|
11522
11528
|
return true;
|
|
11523
11529
|
return !normalized.includes(`tokenize='${MEMORIES_FTS_TOKENIZER}'`);
|
|
11524
11530
|
}
|
|
11525
|
-
function
|
|
11531
|
+
function up3(db) {
|
|
11526
11532
|
db.exec(`
|
|
11527
11533
|
CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
11528
11534
|
version INTEGER PRIMARY KEY,
|
|
@@ -11620,7 +11626,7 @@ function addColumnIfMissing(db, table, column, definition) {
|
|
|
11620
11626
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11621
11627
|
}
|
|
11622
11628
|
}
|
|
11623
|
-
function
|
|
11629
|
+
function up4(db) {
|
|
11624
11630
|
addColumnIfMissing(db, "memories", "content_hash", "TEXT");
|
|
11625
11631
|
addColumnIfMissing(db, "memories", "normalized_content", "TEXT");
|
|
11626
11632
|
addColumnIfMissing(db, "memories", "is_deleted", "INTEGER DEFAULT 0");
|
|
@@ -11738,7 +11744,7 @@ function addColumnIfMissing2(db, table, column, definition) {
|
|
|
11738
11744
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11739
11745
|
return true;
|
|
11740
11746
|
}
|
|
11741
|
-
function
|
|
11747
|
+
function up5(db) {
|
|
11742
11748
|
addColumnIfMissing2(db, "memories", "why", "TEXT");
|
|
11743
11749
|
addColumnIfMissing2(db, "memories", "project", "TEXT");
|
|
11744
11750
|
db.exec(`DROP INDEX IF EXISTS idx_memories_content_hash`);
|
|
@@ -11775,7 +11781,7 @@ function addColumnIfMissing3(db, table, column, definition) {
|
|
|
11775
11781
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11776
11782
|
}
|
|
11777
11783
|
}
|
|
11778
|
-
function
|
|
11784
|
+
function up6(db) {
|
|
11779
11785
|
addColumnIfMissing3(db, "memory_history", "actor_type", "TEXT");
|
|
11780
11786
|
addColumnIfMissing3(db, "memory_history", "session_id", "TEXT");
|
|
11781
11787
|
addColumnIfMissing3(db, "memory_history", "request_id", "TEXT");
|
|
@@ -11808,7 +11814,7 @@ function addColumnIfMissing4(db, table, column, definition) {
|
|
|
11808
11814
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11809
11815
|
}
|
|
11810
11816
|
}
|
|
11811
|
-
function
|
|
11817
|
+
function up7(db) {
|
|
11812
11818
|
addColumnIfMissing4(db, "entities", "canonical_name", "TEXT");
|
|
11813
11819
|
addColumnIfMissing4(db, "entities", "mentions", "INTEGER DEFAULT 0");
|
|
11814
11820
|
addColumnIfMissing4(db, "entities", "embedding", "BLOB");
|
|
@@ -11825,7 +11831,7 @@ function hasColumn4(db, table, column) {
|
|
|
11825
11831
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
11826
11832
|
return rows.some((r2) => r2.name === column);
|
|
11827
11833
|
}
|
|
11828
|
-
function
|
|
11834
|
+
function up8(db) {
|
|
11829
11835
|
if (!hasColumn4(db, "memories", "idempotency_key")) {
|
|
11830
11836
|
db.exec("ALTER TABLE memories ADD COLUMN idempotency_key TEXT");
|
|
11831
11837
|
}
|
|
@@ -11840,7 +11846,7 @@ function hasColumn5(db, table, column) {
|
|
|
11840
11846
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
11841
11847
|
return rows.some((r2) => r2.name === column);
|
|
11842
11848
|
}
|
|
11843
|
-
function
|
|
11849
|
+
function up9(db) {
|
|
11844
11850
|
db.exec(`
|
|
11845
11851
|
CREATE TABLE IF NOT EXISTS documents (
|
|
11846
11852
|
id TEXT PRIMARY KEY,
|
|
@@ -11897,7 +11903,7 @@ function up8(db) {
|
|
|
11897
11903
|
db.exec("ALTER TABLE memory_jobs ADD COLUMN document_id TEXT");
|
|
11898
11904
|
}
|
|
11899
11905
|
}
|
|
11900
|
-
function
|
|
11906
|
+
function up10(db) {
|
|
11901
11907
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='embeddings'").all();
|
|
11902
11908
|
if (tables.length === 0)
|
|
11903
11909
|
return;
|
|
@@ -11914,7 +11920,7 @@ function up9(db) {
|
|
|
11914
11920
|
ON embeddings(content_hash)
|
|
11915
11921
|
`);
|
|
11916
11922
|
}
|
|
11917
|
-
function
|
|
11923
|
+
function up11(db) {
|
|
11918
11924
|
db.exec(`
|
|
11919
11925
|
CREATE TABLE IF NOT EXISTS summary_jobs (
|
|
11920
11926
|
id TEXT PRIMARY KEY,
|
|
@@ -11934,7 +11940,7 @@ function up10(db) {
|
|
|
11934
11940
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_summary_jobs_status
|
|
11935
11941
|
ON summary_jobs(status)`);
|
|
11936
11942
|
}
|
|
11937
|
-
function
|
|
11943
|
+
function up12(db) {
|
|
11938
11944
|
db.exec(`
|
|
11939
11945
|
CREATE TABLE IF NOT EXISTS umap_cache (
|
|
11940
11946
|
id INTEGER PRIMARY KEY,
|
|
@@ -11945,7 +11951,7 @@ function up11(db) {
|
|
|
11945
11951
|
)
|
|
11946
11952
|
`);
|
|
11947
11953
|
}
|
|
11948
|
-
function
|
|
11954
|
+
function up13(db) {
|
|
11949
11955
|
db.exec(`
|
|
11950
11956
|
CREATE TABLE IF NOT EXISTS session_scores (
|
|
11951
11957
|
id TEXT PRIMARY KEY,
|
|
@@ -11965,7 +11971,7 @@ function up12(db) {
|
|
|
11965
11971
|
ON session_scores(session_key);
|
|
11966
11972
|
`);
|
|
11967
11973
|
}
|
|
11968
|
-
function
|
|
11974
|
+
function up14(db) {
|
|
11969
11975
|
db.exec(`
|
|
11970
11976
|
CREATE TABLE IF NOT EXISTS scheduled_tasks (
|
|
11971
11977
|
id TEXT PRIMARY KEY,
|
|
@@ -12006,7 +12012,7 @@ function addColumnIfMissing5(db, table, column, definition) {
|
|
|
12006
12012
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12007
12013
|
}
|
|
12008
12014
|
}
|
|
12009
|
-
function
|
|
12015
|
+
function up15(db) {
|
|
12010
12016
|
db.exec(`
|
|
12011
12017
|
CREATE TABLE IF NOT EXISTS ingestion_jobs (
|
|
12012
12018
|
id TEXT PRIMARY KEY,
|
|
@@ -12032,7 +12038,7 @@ function up14(db) {
|
|
|
12032
12038
|
addColumnIfMissing5(db, "memories", "source_path", "TEXT");
|
|
12033
12039
|
addColumnIfMissing5(db, "memories", "source_section", "TEXT");
|
|
12034
12040
|
}
|
|
12035
|
-
function
|
|
12041
|
+
function up16(db) {
|
|
12036
12042
|
db.exec(`
|
|
12037
12043
|
CREATE TABLE IF NOT EXISTS telemetry_events (
|
|
12038
12044
|
id TEXT PRIMARY KEY,
|
|
@@ -12057,7 +12063,7 @@ function addColumnIfMissing6(db, table, column, definition) {
|
|
|
12057
12063
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12058
12064
|
}
|
|
12059
12065
|
}
|
|
12060
|
-
function
|
|
12066
|
+
function up17(db) {
|
|
12061
12067
|
db.exec(`
|
|
12062
12068
|
CREATE TABLE IF NOT EXISTS session_memories (
|
|
12063
12069
|
id TEXT PRIMARY KEY,
|
|
@@ -12084,7 +12090,7 @@ function up16(db) {
|
|
|
12084
12090
|
addColumnIfMissing6(db, "session_scores", "confidence", "REAL");
|
|
12085
12091
|
addColumnIfMissing6(db, "session_scores", "continuity_reasoning", "TEXT");
|
|
12086
12092
|
}
|
|
12087
|
-
function
|
|
12093
|
+
function up18(db) {
|
|
12088
12094
|
db.exec(`
|
|
12089
12095
|
CREATE TABLE IF NOT EXISTS session_checkpoints (
|
|
12090
12096
|
id TEXT PRIMARY KEY,
|
|
@@ -12106,7 +12112,7 @@ function up17(db) {
|
|
|
12106
12112
|
ON session_checkpoints(project_normalized, created_at DESC);
|
|
12107
12113
|
`);
|
|
12108
12114
|
}
|
|
12109
|
-
function
|
|
12115
|
+
function up19(db) {
|
|
12110
12116
|
const cols = db.prepare("PRAGMA table_info(scheduled_tasks)").all();
|
|
12111
12117
|
const colNames = new Set(cols.flatMap((c2) => typeof c2.name === "string" ? [c2.name] : []));
|
|
12112
12118
|
if (!colNames.has("skill_name")) {
|
|
@@ -12117,7 +12123,7 @@ function up18(db) {
|
|
|
12117
12123
|
CHECK (skill_mode IN ('inject', 'slash') OR skill_mode IS NULL)`);
|
|
12118
12124
|
}
|
|
12119
12125
|
}
|
|
12120
|
-
function
|
|
12126
|
+
function up20(db) {
|
|
12121
12127
|
const existing = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='skill_meta'").get();
|
|
12122
12128
|
if (existing)
|
|
12123
12129
|
return;
|
|
@@ -12149,7 +12155,7 @@ function up19(db) {
|
|
|
12149
12155
|
CREATE INDEX idx_skill_meta_source ON skill_meta(source);
|
|
12150
12156
|
`);
|
|
12151
12157
|
}
|
|
12152
|
-
function
|
|
12158
|
+
function up21(db) {
|
|
12153
12159
|
const entityCols = db.prepare("PRAGMA table_info(entities)").all();
|
|
12154
12160
|
const entityColNames = new Set(entityCols.flatMap((c2) => typeof c2.name === "string" ? [c2.name] : []));
|
|
12155
12161
|
if (!entityColNames.has("agent_id")) {
|
|
@@ -12234,13 +12240,13 @@ function addColumnIfMissing7(db, table, column, definition) {
|
|
|
12234
12240
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12235
12241
|
}
|
|
12236
12242
|
}
|
|
12237
|
-
function
|
|
12243
|
+
function up22(db) {
|
|
12238
12244
|
addColumnIfMissing7(db, "session_memories", "entity_slot", "INTEGER");
|
|
12239
12245
|
addColumnIfMissing7(db, "session_memories", "aspect_slot", "INTEGER");
|
|
12240
12246
|
addColumnIfMissing7(db, "session_memories", "is_constraint", "INTEGER NOT NULL DEFAULT 0");
|
|
12241
12247
|
addColumnIfMissing7(db, "session_memories", "structural_density", "INTEGER");
|
|
12242
12248
|
}
|
|
12243
|
-
function
|
|
12249
|
+
function up23(db) {
|
|
12244
12250
|
const columns = db.prepare("PRAGMA table_info(session_checkpoints)").all();
|
|
12245
12251
|
const columnNames = new Set(columns.flatMap((column) => typeof column.name === "string" ? [column.name] : []));
|
|
12246
12252
|
if (!columnNames.has("focal_entity_ids")) {
|
|
@@ -12265,25 +12271,25 @@ function addColumnIfMissing8(db, table, column, definition) {
|
|
|
12265
12271
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12266
12272
|
}
|
|
12267
12273
|
}
|
|
12268
|
-
function
|
|
12274
|
+
function up24(db) {
|
|
12269
12275
|
addColumnIfMissing8(db, "entities", "pinned", "INTEGER NOT NULL DEFAULT 0");
|
|
12270
12276
|
addColumnIfMissing8(db, "entities", "pinned_at", "TEXT");
|
|
12271
12277
|
db.exec("CREATE INDEX IF NOT EXISTS idx_entities_pinned ON entities(agent_id, pinned, pinned_at DESC)");
|
|
12272
12278
|
}
|
|
12273
|
-
function up24(_db) {}
|
|
12274
12279
|
function up25(_db) {}
|
|
12280
|
+
function up26(_db) {}
|
|
12275
12281
|
function addColumnIfMissing9(db, table, column, definition) {
|
|
12276
12282
|
const cols = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
12277
12283
|
if (!cols.some((c2) => c2.name === column)) {
|
|
12278
12284
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12279
12285
|
}
|
|
12280
12286
|
}
|
|
12281
|
-
function
|
|
12287
|
+
function up27(db) {
|
|
12282
12288
|
addColumnIfMissing9(db, "session_memories", "agent_relevance_score", "REAL");
|
|
12283
12289
|
addColumnIfMissing9(db, "session_memories", "agent_feedback_count", "INTEGER DEFAULT 0");
|
|
12284
12290
|
}
|
|
12285
|
-
function
|
|
12286
|
-
function
|
|
12291
|
+
function up28(_db) {}
|
|
12292
|
+
function up29(db) {
|
|
12287
12293
|
db.exec(`
|
|
12288
12294
|
UPDATE entities
|
|
12289
12295
|
SET canonical_name = REPLACE(REPLACE(REPLACE(
|
|
@@ -12292,7 +12298,7 @@ function up28(db) {
|
|
|
12292
12298
|
WHERE canonical_name IS NULL
|
|
12293
12299
|
`);
|
|
12294
12300
|
}
|
|
12295
|
-
function
|
|
12301
|
+
function up30(db) {
|
|
12296
12302
|
db.exec(`
|
|
12297
12303
|
CREATE TABLE IF NOT EXISTS memories_cold (
|
|
12298
12304
|
archive_id TEXT PRIMARY KEY,
|
|
@@ -12329,7 +12335,7 @@ function up29(db) {
|
|
|
12329
12335
|
CREATE INDEX IF NOT EXISTS idx_cold_source ON memories_cold(cold_source_id);
|
|
12330
12336
|
`);
|
|
12331
12337
|
}
|
|
12332
|
-
function
|
|
12338
|
+
function up31(db) {
|
|
12333
12339
|
db.exec(`
|
|
12334
12340
|
CREATE TABLE IF NOT EXISTS session_summaries (
|
|
12335
12341
|
id TEXT PRIMARY KEY,
|
|
@@ -12374,7 +12380,7 @@ function up30(db) {
|
|
|
12374
12380
|
WHERE session_key IS NOT NULL;
|
|
12375
12381
|
`);
|
|
12376
12382
|
}
|
|
12377
|
-
function
|
|
12383
|
+
function up32(db) {
|
|
12378
12384
|
db.exec(`
|
|
12379
12385
|
CREATE TABLE IF NOT EXISTS memory_jobs_new (
|
|
12380
12386
|
id TEXT PRIMARY KEY,
|
|
@@ -12419,7 +12425,7 @@ function up31(db) {
|
|
|
12419
12425
|
ON memory_jobs(failed_at);
|
|
12420
12426
|
`);
|
|
12421
12427
|
}
|
|
12422
|
-
function
|
|
12428
|
+
function up33(db) {
|
|
12423
12429
|
const depCols = db.prepare("PRAGMA table_info(entity_dependencies)").all();
|
|
12424
12430
|
if (!depCols.some((c2) => c2.name === "reason")) {
|
|
12425
12431
|
db.exec("ALTER TABLE entity_dependencies ADD COLUMN reason TEXT");
|
|
@@ -12429,7 +12435,7 @@ function up32(db) {
|
|
|
12429
12435
|
db.exec("ALTER TABLE entities ADD COLUMN last_synthesized_at TEXT");
|
|
12430
12436
|
}
|
|
12431
12437
|
}
|
|
12432
|
-
function
|
|
12438
|
+
function up34(db) {
|
|
12433
12439
|
const cols = db.prepare("PRAGMA table_info(embeddings)").all();
|
|
12434
12440
|
if (cols.length === 0)
|
|
12435
12441
|
return;
|
|
@@ -12437,14 +12443,14 @@ function up33(db) {
|
|
|
12437
12443
|
db.exec("ALTER TABLE embeddings ADD COLUMN vector BLOB");
|
|
12438
12444
|
}
|
|
12439
12445
|
}
|
|
12440
|
-
function
|
|
12446
|
+
function up35(db) {
|
|
12441
12447
|
const cols = db.prepare("PRAGMA table_info(memories)").all();
|
|
12442
12448
|
if (!cols.some((c2) => c2.name === "scope")) {
|
|
12443
12449
|
db.exec("ALTER TABLE memories ADD COLUMN scope TEXT DEFAULT NULL");
|
|
12444
12450
|
}
|
|
12445
12451
|
db.exec("CREATE INDEX IF NOT EXISTS idx_memories_scope ON memories(scope) WHERE scope IS NOT NULL");
|
|
12446
12452
|
}
|
|
12447
|
-
function
|
|
12453
|
+
function up36(db) {
|
|
12448
12454
|
db.exec("DROP INDEX IF EXISTS idx_memories_content_hash_unique");
|
|
12449
12455
|
db.exec(`
|
|
12450
12456
|
CREATE UNIQUE INDEX idx_memories_content_hash_unique
|
|
@@ -12452,7 +12458,7 @@ function up35(db) {
|
|
|
12452
12458
|
WHERE content_hash IS NOT NULL AND is_deleted = 0
|
|
12453
12459
|
`);
|
|
12454
12460
|
}
|
|
12455
|
-
function
|
|
12461
|
+
function up37(db) {
|
|
12456
12462
|
db.exec(`
|
|
12457
12463
|
CREATE VIRTUAL TABLE IF NOT EXISTS entities_fts USING fts5(
|
|
12458
12464
|
name, canonical_name,
|
|
@@ -12484,13 +12490,13 @@ function up36(db) {
|
|
|
12484
12490
|
END
|
|
12485
12491
|
`);
|
|
12486
12492
|
}
|
|
12487
|
-
function
|
|
12493
|
+
function up38(db) {
|
|
12488
12494
|
const cols = db.prepare("PRAGMA table_info(entity_dependencies)").all();
|
|
12489
12495
|
if (!cols.some((c2) => c2.name === "confidence")) {
|
|
12490
12496
|
db.exec("ALTER TABLE entity_dependencies ADD COLUMN confidence REAL DEFAULT 0.7");
|
|
12491
12497
|
}
|
|
12492
12498
|
}
|
|
12493
|
-
function
|
|
12499
|
+
function up39(db) {
|
|
12494
12500
|
db.exec(`
|
|
12495
12501
|
CREATE TABLE IF NOT EXISTS entity_communities (
|
|
12496
12502
|
id TEXT PRIMARY KEY,
|
|
@@ -12508,7 +12514,7 @@ function up38(db) {
|
|
|
12508
12514
|
db.exec("ALTER TABLE entities ADD COLUMN community_id TEXT REFERENCES entity_communities(id)");
|
|
12509
12515
|
}
|
|
12510
12516
|
}
|
|
12511
|
-
function
|
|
12517
|
+
function up40(db) {
|
|
12512
12518
|
db.exec(`
|
|
12513
12519
|
CREATE TABLE IF NOT EXISTS memory_hints (
|
|
12514
12520
|
id TEXT PRIMARY KEY,
|
|
@@ -12548,7 +12554,7 @@ function up39(db) {
|
|
|
12548
12554
|
END
|
|
12549
12555
|
`);
|
|
12550
12556
|
}
|
|
12551
|
-
function
|
|
12557
|
+
function up41(db) {
|
|
12552
12558
|
db.exec(`
|
|
12553
12559
|
DELETE FROM entity_dependencies
|
|
12554
12560
|
WHERE id NOT IN (
|
|
@@ -12566,7 +12572,7 @@ function up40(db) {
|
|
|
12566
12572
|
)
|
|
12567
12573
|
`);
|
|
12568
12574
|
}
|
|
12569
|
-
function
|
|
12575
|
+
function up42(db) {
|
|
12570
12576
|
db.exec(`
|
|
12571
12577
|
CREATE TABLE IF NOT EXISTS session_transcripts (
|
|
12572
12578
|
session_key TEXT PRIMARY KEY,
|
|
@@ -12589,7 +12595,7 @@ function addColumnIfMissing10(db, table, column, definition) {
|
|
|
12589
12595
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12590
12596
|
}
|
|
12591
12597
|
}
|
|
12592
|
-
function
|
|
12598
|
+
function up43(db) {
|
|
12593
12599
|
addColumnIfMissing10(db, "session_memories", "path_json", "TEXT");
|
|
12594
12600
|
db.exec(`
|
|
12595
12601
|
CREATE TABLE IF NOT EXISTS path_feedback_events (
|
|
@@ -12664,7 +12670,7 @@ function addColumnIfMissing11(db, table, column, definition) {
|
|
|
12664
12670
|
return;
|
|
12665
12671
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12666
12672
|
}
|
|
12667
|
-
function
|
|
12673
|
+
function up44(db) {
|
|
12668
12674
|
addColumnIfMissing11(db, "session_memories", "entity_slot", "INTEGER");
|
|
12669
12675
|
addColumnIfMissing11(db, "session_memories", "aspect_slot", "INTEGER");
|
|
12670
12676
|
addColumnIfMissing11(db, "session_memories", "is_constraint", "INTEGER NOT NULL DEFAULT 0");
|
|
@@ -12752,7 +12758,7 @@ function addColumnIfMissing12(db, table, column, definition) {
|
|
|
12752
12758
|
return;
|
|
12753
12759
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12754
12760
|
}
|
|
12755
|
-
function
|
|
12761
|
+
function up45(db) {
|
|
12756
12762
|
db.exec(`
|
|
12757
12763
|
CREATE TABLE IF NOT EXISTS agents (
|
|
12758
12764
|
id TEXT PRIMARY KEY,
|
|
@@ -12781,7 +12787,7 @@ function addColumnIfMissing13(db, table, column, definition) {
|
|
|
12781
12787
|
return;
|
|
12782
12788
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12783
12789
|
}
|
|
12784
|
-
function
|
|
12790
|
+
function up46(db) {
|
|
12785
12791
|
addColumnIfMissing13(db, "session_summaries", "source_type", "TEXT");
|
|
12786
12792
|
addColumnIfMissing13(db, "session_summaries", "source_ref", "TEXT");
|
|
12787
12793
|
addColumnIfMissing13(db, "session_summaries", "meta_json", "TEXT");
|
|
@@ -12807,7 +12813,7 @@ function addColumnIfMissing14(db, table, column, definition) {
|
|
|
12807
12813
|
return;
|
|
12808
12814
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12809
12815
|
}
|
|
12810
|
-
function
|
|
12816
|
+
function up47(db) {
|
|
12811
12817
|
addColumnIfMissing14(db, "session_transcripts", "updated_at", "TEXT");
|
|
12812
12818
|
addColumnIfMissing14(db, "summary_jobs", "agent_id", "TEXT NOT NULL DEFAULT 'default'");
|
|
12813
12819
|
addColumnIfMissing14(db, "session_scores", "agent_id", "TEXT NOT NULL DEFAULT 'default'");
|
|
@@ -12878,7 +12884,7 @@ function up46(db) {
|
|
|
12878
12884
|
ON memory_md_heads(lease_expires_at);
|
|
12879
12885
|
`);
|
|
12880
12886
|
}
|
|
12881
|
-
function
|
|
12887
|
+
function up48(db) {
|
|
12882
12888
|
db.exec(`
|
|
12883
12889
|
DROP INDEX IF EXISTS idx_summaries_session_depth;
|
|
12884
12890
|
|
|
@@ -12939,7 +12945,7 @@ function up47(db) {
|
|
|
12939
12945
|
AND COALESCE(source_type, 'summary') = 'summary';
|
|
12940
12946
|
`);
|
|
12941
12947
|
}
|
|
12942
|
-
function
|
|
12948
|
+
function up49(db) {
|
|
12943
12949
|
db.exec(`
|
|
12944
12950
|
DROP TRIGGER IF EXISTS session_transcripts_fts_ai;
|
|
12945
12951
|
DROP TRIGGER IF EXISTS session_transcripts_fts_ad;
|
|
@@ -13037,7 +13043,7 @@ function up48(db) {
|
|
|
13037
13043
|
AND COALESCE(source_type, 'summary') = 'summary';
|
|
13038
13044
|
`);
|
|
13039
13045
|
}
|
|
13040
|
-
function
|
|
13046
|
+
function up50(db) {
|
|
13041
13047
|
db.exec(`
|
|
13042
13048
|
CREATE TABLE IF NOT EXISTS memory_thread_heads (
|
|
13043
13049
|
agent_id TEXT NOT NULL DEFAULT 'default',
|
|
@@ -13155,7 +13161,7 @@ function up49(db) {
|
|
|
13155
13161
|
WHERE excluded.latest_at >= memory_thread_heads.latest_at;
|
|
13156
13162
|
`);
|
|
13157
13163
|
}
|
|
13158
|
-
function
|
|
13164
|
+
function up51(db) {
|
|
13159
13165
|
db.exec(`
|
|
13160
13166
|
CREATE TABLE IF NOT EXISTS session_extract_cursors (
|
|
13161
13167
|
session_key TEXT NOT NULL,
|
|
@@ -13172,7 +13178,7 @@ function hasTable(db, name) {
|
|
|
13172
13178
|
WHERE type = 'table' AND name = ?
|
|
13173
13179
|
LIMIT 1`).get(name) !== undefined;
|
|
13174
13180
|
}
|
|
13175
|
-
function
|
|
13181
|
+
function up52(db) {
|
|
13176
13182
|
db.exec(`
|
|
13177
13183
|
CREATE TABLE IF NOT EXISTS entity_dependency_history (
|
|
13178
13184
|
id TEXT PRIMARY KEY,
|
|
@@ -13342,7 +13348,7 @@ function addColumnIfMissing15(db, table, column, definition) {
|
|
|
13342
13348
|
return;
|
|
13343
13349
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
13344
13350
|
}
|
|
13345
|
-
function
|
|
13351
|
+
function up53(db) {
|
|
13346
13352
|
addColumnIfMissing15(db, "summary_jobs", "session_id", "TEXT");
|
|
13347
13353
|
addColumnIfMissing15(db, "summary_jobs", "trigger", "TEXT NOT NULL DEFAULT 'session_end'");
|
|
13348
13354
|
addColumnIfMissing15(db, "summary_jobs", "captured_at", "TEXT");
|
|
@@ -13434,7 +13440,7 @@ function up52(db) {
|
|
|
13434
13440
|
VALUES ('rebuild');
|
|
13435
13441
|
`);
|
|
13436
13442
|
}
|
|
13437
|
-
function
|
|
13443
|
+
function up54(db) {
|
|
13438
13444
|
db.exec(`
|
|
13439
13445
|
CREATE TABLE IF NOT EXISTS mcp_invocations (
|
|
13440
13446
|
id TEXT PRIMARY KEY,
|
|
@@ -13451,7 +13457,7 @@ function up53(db) {
|
|
|
13451
13457
|
CREATE INDEX IF NOT EXISTS idx_mcp_inv_agent ON mcp_invocations(agent_id, created_at);
|
|
13452
13458
|
`);
|
|
13453
13459
|
}
|
|
13454
|
-
function
|
|
13460
|
+
function up55(db) {
|
|
13455
13461
|
db.exec(`
|
|
13456
13462
|
CREATE TABLE IF NOT EXISTS skill_invocations (
|
|
13457
13463
|
id TEXT PRIMARY KEY,
|
|
@@ -13467,7 +13473,7 @@ function up54(db) {
|
|
|
13467
13473
|
CREATE INDEX IF NOT EXISTS idx_skill_inv_agent ON skill_invocations(agent_id, created_at);
|
|
13468
13474
|
`);
|
|
13469
13475
|
}
|
|
13470
|
-
function
|
|
13476
|
+
function up56(db) {
|
|
13471
13477
|
db.exec(`
|
|
13472
13478
|
CREATE TABLE IF NOT EXISTS task_scope_hints (
|
|
13473
13479
|
task_id TEXT PRIMARY KEY REFERENCES scheduled_tasks(id) ON DELETE CASCADE,
|
|
@@ -13498,7 +13504,7 @@ function up55(db) {
|
|
|
13498
13504
|
ON task_scope_hints(agent_id, updated_at);
|
|
13499
13505
|
`);
|
|
13500
13506
|
}
|
|
13501
|
-
function
|
|
13507
|
+
function up57(db) {
|
|
13502
13508
|
db.exec(`
|
|
13503
13509
|
CREATE TABLE IF NOT EXISTS dreaming_state (
|
|
13504
13510
|
agent_id TEXT PRIMARY KEY NOT NULL,
|
|
@@ -13541,7 +13547,7 @@ function ensureMemoriesScopeColumns(db) {
|
|
|
13541
13547
|
if (!names.has("scope"))
|
|
13542
13548
|
db.exec("ALTER TABLE memories ADD COLUMN scope TEXT");
|
|
13543
13549
|
}
|
|
13544
|
-
function
|
|
13550
|
+
function up58(db) {
|
|
13545
13551
|
ensureMemoriesScopeColumns(db);
|
|
13546
13552
|
db.exec("DROP INDEX IF EXISTS idx_memories_content_hash_unique");
|
|
13547
13553
|
db.exec(`
|
|
@@ -13554,20 +13560,20 @@ function up57(db) {
|
|
|
13554
13560
|
WHERE content_hash IS NOT NULL AND is_deleted = 0
|
|
13555
13561
|
`);
|
|
13556
13562
|
}
|
|
13557
|
-
function
|
|
13563
|
+
function up59(db) {
|
|
13558
13564
|
const sql = readMemoriesFtsSql(db);
|
|
13559
13565
|
if (sql !== null && !memoriesFtsNeedsTokenizerRepair(sql))
|
|
13560
13566
|
return;
|
|
13561
13567
|
recreateMemoriesFts(db);
|
|
13562
13568
|
}
|
|
13563
|
-
function
|
|
13569
|
+
function up60(db) {
|
|
13564
13570
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_entities_order
|
|
13565
13571
|
ON entities(agent_id, pinned DESC, pinned_at DESC, mentions DESC, updated_at DESC, name)`);
|
|
13566
13572
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_entities_extracted_mentions
|
|
13567
13573
|
ON entities(entity_type, mentions)
|
|
13568
13574
|
WHERE entity_type = 'extracted'`);
|
|
13569
13575
|
}
|
|
13570
|
-
function
|
|
13576
|
+
function up61(db) {
|
|
13571
13577
|
const cols = db.prepare("PRAGMA table_info(entity_attributes)").all();
|
|
13572
13578
|
if (!cols.some((col) => col.name === "claim_key")) {
|
|
13573
13579
|
db.exec("ALTER TABLE entity_attributes ADD COLUMN claim_key TEXT");
|
|
@@ -13576,7 +13582,7 @@ function up60(db) {
|
|
|
13576
13582
|
ON entity_attributes(agent_id, aspect_id, claim_key, status)
|
|
13577
13583
|
WHERE claim_key IS NOT NULL`);
|
|
13578
13584
|
}
|
|
13579
|
-
function
|
|
13585
|
+
function up62(db) {
|
|
13580
13586
|
const cols = db.prepare("PRAGMA table_info(entity_attributes)").all();
|
|
13581
13587
|
if (!cols.some((col) => col.name === "group_key")) {
|
|
13582
13588
|
db.exec("ALTER TABLE entity_attributes ADD COLUMN group_key TEXT");
|
|
@@ -13588,13 +13594,13 @@ function up61(db) {
|
|
|
13588
13594
|
ON entity_attributes(agent_id, aspect_id, group_key, claim_key, status)
|
|
13589
13595
|
WHERE claim_key IS NOT NULL`);
|
|
13590
13596
|
}
|
|
13591
|
-
function
|
|
13597
|
+
function up63(db) {
|
|
13592
13598
|
const cols = db.prepare("PRAGMA table_info(memory_artifacts)").all();
|
|
13593
13599
|
if (cols.some((col) => col.name === "source_mtime_ms"))
|
|
13594
13600
|
return;
|
|
13595
13601
|
db.exec("ALTER TABLE memory_artifacts ADD COLUMN source_mtime_ms REAL");
|
|
13596
13602
|
}
|
|
13597
|
-
function
|
|
13603
|
+
function up64(db) {
|
|
13598
13604
|
const cols = db.prepare("PRAGMA table_info(memory_artifacts)").all();
|
|
13599
13605
|
const names = new Set(cols.map((col) => col.name));
|
|
13600
13606
|
if (!names.has("is_deleted")) {
|
|
@@ -13608,7 +13614,7 @@ function up63(db) {
|
|
|
13608
13614
|
ON memory_artifacts(agent_id, is_deleted, deleted_at)
|
|
13609
13615
|
`);
|
|
13610
13616
|
}
|
|
13611
|
-
function
|
|
13617
|
+
function up65(db) {
|
|
13612
13618
|
db.exec("DROP TRIGGER IF EXISTS memories_au");
|
|
13613
13619
|
db.exec(`
|
|
13614
13620
|
CREATE TRIGGER IF NOT EXISTS memories_au AFTER UPDATE OF content ON memories BEGIN
|
|
@@ -13626,7 +13632,7 @@ function addColumnIfMissing16(db, table, column, definition) {
|
|
|
13626
13632
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
13627
13633
|
}
|
|
13628
13634
|
}
|
|
13629
|
-
function
|
|
13635
|
+
function up66(db) {
|
|
13630
13636
|
for (const table of ["entities", "entity_communities", "entity_attributes", "entity_dependencies"]) {
|
|
13631
13637
|
addColumnIfMissing16(db, table, "source_id", "TEXT");
|
|
13632
13638
|
addColumnIfMissing16(db, table, "source_kind", "TEXT");
|
|
@@ -13646,7 +13652,7 @@ function hasColumn7(db, table, column) {
|
|
|
13646
13652
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
13647
13653
|
return rows.some((row) => row.name === column);
|
|
13648
13654
|
}
|
|
13649
|
-
function
|
|
13655
|
+
function up67(db) {
|
|
13650
13656
|
if (!hasTable2(db, "embeddings"))
|
|
13651
13657
|
return;
|
|
13652
13658
|
if (!hasColumn7(db, "embeddings", "agent_id")) {
|
|
@@ -13654,7 +13660,7 @@ function up66(db) {
|
|
|
13654
13660
|
}
|
|
13655
13661
|
db.exec("CREATE INDEX IF NOT EXISTS idx_embeddings_agent_source ON embeddings(agent_id, source_type, source_id)");
|
|
13656
13662
|
}
|
|
13657
|
-
function
|
|
13663
|
+
function up68(db) {
|
|
13658
13664
|
db.exec(`
|
|
13659
13665
|
CREATE TABLE IF NOT EXISTS memory_search_telemetry (
|
|
13660
13666
|
id TEXT PRIMARY KEY,
|
|
@@ -13695,7 +13701,7 @@ function addColumnIfMissing17(db, table, column, definition) {
|
|
|
13695
13701
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
13696
13702
|
}
|
|
13697
13703
|
}
|
|
13698
|
-
function
|
|
13704
|
+
function up69(db) {
|
|
13699
13705
|
db.exec(`
|
|
13700
13706
|
CREATE TABLE IF NOT EXISTS ontology_proposals (
|
|
13701
13707
|
id TEXT PRIMARY KEY,
|
|
@@ -13738,7 +13744,7 @@ function up68(db) {
|
|
|
13738
13744
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_${table}_proposal ON ${table}(agent_id, proposal_id)`);
|
|
13739
13745
|
}
|
|
13740
13746
|
}
|
|
13741
|
-
function
|
|
13747
|
+
function up70(db) {
|
|
13742
13748
|
db.exec(`
|
|
13743
13749
|
CREATE TABLE IF NOT EXISTS daily_reflections (
|
|
13744
13750
|
id TEXT PRIMARY KEY,
|
|
@@ -13765,7 +13771,7 @@ function up69(db) {
|
|
|
13765
13771
|
WHERE content_key IS NOT NULL;
|
|
13766
13772
|
`);
|
|
13767
13773
|
}
|
|
13768
|
-
function
|
|
13774
|
+
function up71(db) {
|
|
13769
13775
|
const cols = db.prepare("PRAGMA table_info(daily_reflections)").all();
|
|
13770
13776
|
const colNames = new Set(cols.flatMap((c2) => typeof c2.name === "string" ? [c2.name] : []));
|
|
13771
13777
|
if (!colNames.has("content_key")) {
|
|
@@ -13802,7 +13808,7 @@ function backfillVersionRoots(db) {
|
|
|
13802
13808
|
WHERE version_root_id IS NULL
|
|
13803
13809
|
`);
|
|
13804
13810
|
}
|
|
13805
|
-
function
|
|
13811
|
+
function up72(db) {
|
|
13806
13812
|
for (const table of ["entities", "entity_aspects", "entity_dependencies"]) {
|
|
13807
13813
|
addColumnIfMissing18(db, table, "status", "TEXT NOT NULL DEFAULT 'active'");
|
|
13808
13814
|
addColumnIfMissing18(db, table, "archived_at", "TEXT");
|
|
@@ -13837,7 +13843,7 @@ function up71(db) {
|
|
|
13837
13843
|
ON entity_aspects(agent_id, proposal_id);
|
|
13838
13844
|
`);
|
|
13839
13845
|
}
|
|
13840
|
-
function
|
|
13846
|
+
function up73(db) {
|
|
13841
13847
|
db.exec(`
|
|
13842
13848
|
CREATE TABLE IF NOT EXISTS epistemic_assertions (
|
|
13843
13849
|
id TEXT PRIMARY KEY,
|
|
@@ -13893,7 +13899,7 @@ function ensureMemoriesScopeColumns2(db) {
|
|
|
13893
13899
|
if (!names.has("runtime_path"))
|
|
13894
13900
|
db.exec("ALTER TABLE memories ADD COLUMN runtime_path TEXT");
|
|
13895
13901
|
}
|
|
13896
|
-
function
|
|
13902
|
+
function up74(db) {
|
|
13897
13903
|
ensureMemoriesScopeColumns2(db);
|
|
13898
13904
|
db.exec("DROP INDEX IF EXISTS idx_memories_idempotency_key");
|
|
13899
13905
|
db.exec(`
|
|
@@ -13907,7 +13913,7 @@ function up73(db) {
|
|
|
13907
13913
|
WHERE idempotency_key IS NOT NULL AND is_deleted = 0
|
|
13908
13914
|
`);
|
|
13909
13915
|
}
|
|
13910
|
-
function
|
|
13916
|
+
function up75(db) {
|
|
13911
13917
|
db.exec(`
|
|
13912
13918
|
CREATE TABLE IF NOT EXISTS session_context_epochs (
|
|
13913
13919
|
session_key TEXT NOT NULL,
|
|
@@ -13942,7 +13948,7 @@ function up74(db) {
|
|
|
13942
13948
|
ON session_recall_events(item_kind, item_id, created_at DESC);
|
|
13943
13949
|
`);
|
|
13944
13950
|
}
|
|
13945
|
-
function
|
|
13951
|
+
function up76(db) {
|
|
13946
13952
|
db.exec(`
|
|
13947
13953
|
CREATE TABLE IF NOT EXISTS aggregate_memory_sources (
|
|
13948
13954
|
aggregate_memory_id TEXT NOT NULL,
|
|
@@ -13961,7 +13967,7 @@ function addColumnIfMissing19(db, table, column, definition) {
|
|
|
13961
13967
|
return;
|
|
13962
13968
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
13963
13969
|
}
|
|
13964
|
-
function
|
|
13970
|
+
function up77(db) {
|
|
13965
13971
|
addColumnIfMissing19(db, "memory_artifacts", "source_id", "TEXT");
|
|
13966
13972
|
addColumnIfMissing19(db, "memory_artifacts", "source_root", "TEXT");
|
|
13967
13973
|
addColumnIfMissing19(db, "memory_artifacts", "source_external_id", "TEXT");
|
|
@@ -13974,7 +13980,7 @@ function up76(db) {
|
|
|
13974
13980
|
ON memory_artifacts(agent_id, source_id, source_root);
|
|
13975
13981
|
`);
|
|
13976
13982
|
}
|
|
13977
|
-
function
|
|
13983
|
+
function up78(db) {
|
|
13978
13984
|
db.exec(`
|
|
13979
13985
|
CREATE TABLE IF NOT EXISTS temporal_edges (
|
|
13980
13986
|
id TEXT PRIMARY KEY,
|
|
@@ -13997,7 +14003,7 @@ function up77(db) {
|
|
|
13997
14003
|
ON temporal_edges(agent_id, subject_type, subject_id);
|
|
13998
14004
|
`);
|
|
13999
14005
|
}
|
|
14000
|
-
function
|
|
14006
|
+
function up79(db) {
|
|
14001
14007
|
db.exec(`
|
|
14002
14008
|
CREATE TABLE IF NOT EXISTS entity_aliases (
|
|
14003
14009
|
id TEXT PRIMARY KEY,
|
|
@@ -14021,7 +14027,7 @@ function up78(db) {
|
|
|
14021
14027
|
ON entity_aliases(agent_id, canonical_alias, status);
|
|
14022
14028
|
`);
|
|
14023
14029
|
}
|
|
14024
|
-
function
|
|
14030
|
+
function up80(db) {
|
|
14025
14031
|
db.exec(`
|
|
14026
14032
|
CREATE TABLE IF NOT EXISTS api_keys (
|
|
14027
14033
|
id TEXT PRIMARY KEY,
|
|
@@ -14049,7 +14055,7 @@ function up79(db) {
|
|
|
14049
14055
|
ON api_keys(connector, harness);
|
|
14050
14056
|
`);
|
|
14051
14057
|
}
|
|
14052
|
-
function
|
|
14058
|
+
function up81(db) {
|
|
14053
14059
|
db.exec(`
|
|
14054
14060
|
CREATE TABLE IF NOT EXISTS transcript_capture_jobs (
|
|
14055
14061
|
id TEXT PRIMARY KEY,
|
|
@@ -14084,7 +14090,7 @@ function hasColumn10(db, table, column) {
|
|
|
14084
14090
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
14085
14091
|
return rows.some((row) => row.name === column);
|
|
14086
14092
|
}
|
|
14087
|
-
function
|
|
14093
|
+
function up82(db) {
|
|
14088
14094
|
if (!hasColumn10(db, "documents", "agent_id")) {
|
|
14089
14095
|
db.exec("ALTER TABLE documents ADD COLUMN agent_id TEXT NOT NULL DEFAULT 'default'");
|
|
14090
14096
|
}
|
|
@@ -14170,7 +14176,7 @@ function up81(db) {
|
|
|
14170
14176
|
db.exec("CREATE INDEX IF NOT EXISTS idx_documents_agent_project ON documents(agent_id, project)");
|
|
14171
14177
|
db.exec("CREATE INDEX IF NOT EXISTS idx_documents_source_scope ON documents(source_url, agent_id, project)");
|
|
14172
14178
|
}
|
|
14173
|
-
function
|
|
14179
|
+
function up83(db) {
|
|
14174
14180
|
db.exec(`
|
|
14175
14181
|
CREATE TABLE IF NOT EXISTS aggregate_evidence_sources (
|
|
14176
14182
|
aggregate_memory_id TEXT NOT NULL,
|
|
@@ -14192,7 +14198,7 @@ function hasColumn11(db, table, column) {
|
|
|
14192
14198
|
return rows.some((row) => row.name === column);
|
|
14193
14199
|
}
|
|
14194
14200
|
var COLUMNS = ["harness", "session_id", "tool_use_id", "cwd", "origin", "args"];
|
|
14195
|
-
function
|
|
14201
|
+
function up84(db) {
|
|
14196
14202
|
for (const column of COLUMNS) {
|
|
14197
14203
|
if (!hasColumn11(db, "skill_invocations", column)) {
|
|
14198
14204
|
db.exec(`ALTER TABLE skill_invocations ADD COLUMN ${column} TEXT`);
|
|
@@ -14273,7 +14279,7 @@ function documentScopeColumnsPreservingExisting(db) {
|
|
|
14273
14279
|
`);
|
|
14274
14280
|
}
|
|
14275
14281
|
try {
|
|
14276
|
-
|
|
14282
|
+
up82(db);
|
|
14277
14283
|
if (preserveAgentId) {
|
|
14278
14284
|
db.exec(`
|
|
14279
14285
|
UPDATE documents
|
|
@@ -14293,12 +14299,12 @@ function documentScopeColumnsPreservingExisting(db) {
|
|
|
14293
14299
|
db.exec("DROP TABLE IF EXISTS temp.__signet_doc_project_guard");
|
|
14294
14300
|
}
|
|
14295
14301
|
}
|
|
14296
|
-
function
|
|
14297
|
-
|
|
14302
|
+
function up85(db) {
|
|
14303
|
+
up81(db);
|
|
14298
14304
|
if (hasTable3(db, "documents")) {
|
|
14299
14305
|
documentScopeColumnsPreservingExisting(db);
|
|
14300
14306
|
}
|
|
14301
|
-
|
|
14307
|
+
up83(db);
|
|
14302
14308
|
addColumnIfMissing20(db, "memories", "superseded_by", "TEXT");
|
|
14303
14309
|
addColumnIfMissing20(db, "memories", "superseded_at", "TEXT");
|
|
14304
14310
|
addColumnIfMissing20(db, "memories", "superseded_reason", "TEXT");
|
|
@@ -14355,7 +14361,7 @@ function up84(db) {
|
|
|
14355
14361
|
AND ${sourceAgentId} = ${targetAgentId}
|
|
14356
14362
|
`);
|
|
14357
14363
|
}
|
|
14358
|
-
function
|
|
14364
|
+
function up86(db) {
|
|
14359
14365
|
db.exec(`
|
|
14360
14366
|
CREATE TABLE IF NOT EXISTS legacy_markdown_imports (
|
|
14361
14367
|
path TEXT PRIMARY KEY,
|
|
@@ -14385,7 +14391,7 @@ function up85(db) {
|
|
|
14385
14391
|
ON legacy_markdown_chunks(memory_id);
|
|
14386
14392
|
`);
|
|
14387
14393
|
}
|
|
14388
|
-
function
|
|
14394
|
+
function up87(db) {
|
|
14389
14395
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name IN ('relations', 'entity_dependencies')").all();
|
|
14390
14396
|
const tableNames = new Set(tables.map((r2) => String(r2.name)));
|
|
14391
14397
|
if (!tableNames.has("relations") || !tableNames.has("entity_dependencies"))
|
|
@@ -14444,7 +14450,7 @@ function addColumnIfMissing21(db, table, column, definition) {
|
|
|
14444
14450
|
return;
|
|
14445
14451
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
14446
14452
|
}
|
|
14447
|
-
function
|
|
14453
|
+
function up88(db) {
|
|
14448
14454
|
addColumnIfMissing21(db, "summary_jobs", "content_hash", "TEXT");
|
|
14449
14455
|
db.exec(`
|
|
14450
14456
|
CREATE INDEX IF NOT EXISTS idx_summary_jobs_agent_session_content_hash
|
|
@@ -14457,14 +14463,14 @@ function addColumnIfMissing22(db, table, column, definition) {
|
|
|
14457
14463
|
return;
|
|
14458
14464
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
14459
14465
|
}
|
|
14460
|
-
function
|
|
14466
|
+
function up89(db) {
|
|
14461
14467
|
addColumnIfMissing22(db, "summary_jobs", "boundary_reason", "TEXT");
|
|
14462
14468
|
db.exec(`
|
|
14463
14469
|
CREATE INDEX IF NOT EXISTS idx_summary_jobs_boundary_reason
|
|
14464
14470
|
ON summary_jobs(agent_id, session_key, boundary_reason)
|
|
14465
14471
|
`);
|
|
14466
14472
|
}
|
|
14467
|
-
function
|
|
14473
|
+
function up90(db) {
|
|
14468
14474
|
db.exec(`
|
|
14469
14475
|
CREATE TABLE IF NOT EXISTS transcript_recovery_files (
|
|
14470
14476
|
agent_id TEXT NOT NULL,
|
|
@@ -14482,7 +14488,7 @@ function up89(db) {
|
|
|
14482
14488
|
ON transcript_capture_jobs(agent_id, session_id, status);
|
|
14483
14489
|
`);
|
|
14484
14490
|
}
|
|
14485
|
-
function
|
|
14491
|
+
function up91(db) {
|
|
14486
14492
|
db.exec(`
|
|
14487
14493
|
CREATE TABLE IF NOT EXISTS job_cancellations (
|
|
14488
14494
|
id TEXT PRIMARY KEY,
|
|
@@ -14510,7 +14516,7 @@ function indexExists(db, table, indexName) {
|
|
|
14510
14516
|
const rows = db.prepare(`PRAGMA index_list(${table})`).all();
|
|
14511
14517
|
return rows.some((row) => row.name === indexName);
|
|
14512
14518
|
}
|
|
14513
|
-
function
|
|
14519
|
+
function up92(db) {
|
|
14514
14520
|
db.exec(`
|
|
14515
14521
|
CREATE TABLE IF NOT EXISTS job_archive (
|
|
14516
14522
|
id TEXT PRIMARY KEY,
|
|
@@ -14537,7 +14543,7 @@ function indexExists2(db, table, indexName) {
|
|
|
14537
14543
|
const rows = db.prepare(`PRAGMA index_list(${table})`).all();
|
|
14538
14544
|
return rows.some((row) => row.name === indexName);
|
|
14539
14545
|
}
|
|
14540
|
-
function
|
|
14546
|
+
function up93(db) {
|
|
14541
14547
|
db.exec(`
|
|
14542
14548
|
CREATE TABLE IF NOT EXISTS embedding_index_state (
|
|
14543
14549
|
id INTEGER PRIMARY KEY CHECK (id = 1),
|
|
@@ -14550,7 +14556,7 @@ function up92(db) {
|
|
|
14550
14556
|
)
|
|
14551
14557
|
`);
|
|
14552
14558
|
}
|
|
14553
|
-
function
|
|
14559
|
+
function up94(db) {
|
|
14554
14560
|
db.exec(`
|
|
14555
14561
|
CREATE TABLE IF NOT EXISTS embeddings_staging (
|
|
14556
14562
|
id TEXT PRIMARY KEY,
|
|
@@ -14569,7 +14575,7 @@ function up93(db) {
|
|
|
14569
14575
|
ON embeddings_staging(agent_id, source_type, source_id);
|
|
14570
14576
|
`);
|
|
14571
14577
|
}
|
|
14572
|
-
function
|
|
14578
|
+
function up95(db) {
|
|
14573
14579
|
const columns = db.prepare("PRAGMA table_info(dreaming_state)").all();
|
|
14574
14580
|
if (!columns.some((column) => column.name === "evidence_cursor")) {
|
|
14575
14581
|
db.exec("ALTER TABLE dreaming_state ADD COLUMN evidence_cursor TEXT");
|
|
@@ -14580,7 +14586,7 @@ function hasColumn13(db, table, column) {
|
|
|
14580
14586
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
14581
14587
|
return rows.some((r2) => r2.name === column);
|
|
14582
14588
|
}
|
|
14583
|
-
function
|
|
14589
|
+
function up96(db) {
|
|
14584
14590
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name = 'memories'").all();
|
|
14585
14591
|
if (tables.length === 0)
|
|
14586
14592
|
return;
|
|
@@ -14605,23 +14611,23 @@ function up95(db) {
|
|
|
14605
14611
|
function hasColumn14(db, table, column) {
|
|
14606
14612
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
14607
14613
|
}
|
|
14608
|
-
function
|
|
14614
|
+
function up97(db) {
|
|
14609
14615
|
const hasMemories = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'memories'").get();
|
|
14610
14616
|
if (!hasMemories || !hasColumn14(db, "memories", "memory_kind") || !hasColumn14(db, "memories", "type"))
|
|
14611
14617
|
return;
|
|
14612
14618
|
db.exec("UPDATE memories SET memory_kind = NULL WHERE type = 'session_summary'");
|
|
14613
14619
|
}
|
|
14614
|
-
function
|
|
14620
|
+
function up98(db) {
|
|
14615
14621
|
db.exec("DROP TABLE IF EXISTS ingestion_jobs");
|
|
14616
14622
|
}
|
|
14617
|
-
function
|
|
14623
|
+
function up99(db) {
|
|
14618
14624
|
const columns = db.prepare("PRAGMA table_info(dreaming_state)").all();
|
|
14619
14625
|
if (!columns.some((column) => column.name === "last_failure_at")) {
|
|
14620
14626
|
db.exec("ALTER TABLE dreaming_state ADD COLUMN last_failure_at TEXT");
|
|
14621
14627
|
}
|
|
14622
14628
|
db.exec("UPDATE dreaming_state SET last_failure_at = updated_at WHERE consecutive_failures > 0 AND last_failure_at IS NULL");
|
|
14623
14629
|
}
|
|
14624
|
-
function
|
|
14630
|
+
function up100(db) {
|
|
14625
14631
|
db.exec(`
|
|
14626
14632
|
CREATE TABLE IF NOT EXISTS dreaming_evidence_exclusions (
|
|
14627
14633
|
agent_id TEXT NOT NULL,
|
|
@@ -14638,7 +14644,7 @@ function up99(db) {
|
|
|
14638
14644
|
ON dreaming_evidence_exclusions (agent_id, resolved_at, requeue_requested_at, excluded_at DESC);
|
|
14639
14645
|
`);
|
|
14640
14646
|
}
|
|
14641
|
-
function
|
|
14647
|
+
function up101(db) {
|
|
14642
14648
|
db.exec(`
|
|
14643
14649
|
CREATE TABLE IF NOT EXISTS dreaming_tool_calls (
|
|
14644
14650
|
id TEXT PRIMARY KEY,
|
|
@@ -14658,7 +14664,7 @@ function up100(db) {
|
|
|
14658
14664
|
ON dreaming_tool_calls (agent_id, pass_id, sequence ASC);
|
|
14659
14665
|
`);
|
|
14660
14666
|
}
|
|
14661
|
-
function
|
|
14667
|
+
function up102(db) {
|
|
14662
14668
|
const columns = db.prepare("PRAGMA table_info(dreaming_passes)").all();
|
|
14663
14669
|
if (!columns.some((column) => column.name === "evidence_window_json")) {
|
|
14664
14670
|
db.exec("ALTER TABLE dreaming_passes ADD COLUMN evidence_window_json TEXT");
|
|
@@ -14667,7 +14673,7 @@ function up101(db) {
|
|
|
14667
14673
|
db.exec("ALTER TABLE dreaming_passes ADD COLUMN runbook_json TEXT");
|
|
14668
14674
|
}
|
|
14669
14675
|
}
|
|
14670
|
-
function
|
|
14676
|
+
function up103(db) {
|
|
14671
14677
|
db.exec(`
|
|
14672
14678
|
CREATE TABLE IF NOT EXISTS dreaming_attention (
|
|
14673
14679
|
id TEXT PRIMARY KEY,
|
|
@@ -14689,7 +14695,7 @@ function up102(db) {
|
|
|
14689
14695
|
function hasColumn15(db, table, column) {
|
|
14690
14696
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
14691
14697
|
}
|
|
14692
|
-
function
|
|
14698
|
+
function up104(db) {
|
|
14693
14699
|
const requiredMemoryColumns = [
|
|
14694
14700
|
"content_hash",
|
|
14695
14701
|
"normalized_content",
|
|
@@ -14740,7 +14746,7 @@ function up103(db) {
|
|
|
14740
14746
|
WHERE EXISTS (SELECT 1 FROM memory_entity_mentions WHERE entity_id = entities.id)
|
|
14741
14747
|
`);
|
|
14742
14748
|
}
|
|
14743
|
-
function
|
|
14749
|
+
function up105(db) {
|
|
14744
14750
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name IN ('memories', 'entity_attributes')").all();
|
|
14745
14751
|
if (tables.length !== 2)
|
|
14746
14752
|
return;
|
|
@@ -14763,7 +14769,7 @@ function tableExists(db, table) {
|
|
|
14763
14769
|
function hasColumn16(db, table, column) {
|
|
14764
14770
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
14765
14771
|
}
|
|
14766
|
-
function
|
|
14772
|
+
function up106(db) {
|
|
14767
14773
|
db.exec(`
|
|
14768
14774
|
CREATE TABLE IF NOT EXISTS derived_memory_sources (
|
|
14769
14775
|
derived_memory_id TEXT NOT NULL,
|
|
@@ -14806,7 +14812,7 @@ function up105(db) {
|
|
|
14806
14812
|
`);
|
|
14807
14813
|
}
|
|
14808
14814
|
}
|
|
14809
|
-
function
|
|
14815
|
+
function up107(db) {
|
|
14810
14816
|
db.exec(`
|
|
14811
14817
|
DROP TRIGGER IF EXISTS entities_fts_ai;
|
|
14812
14818
|
DROP TRIGGER IF EXISTS entities_fts_ad;
|
|
@@ -14895,7 +14901,7 @@ function up106(db) {
|
|
|
14895
14901
|
function hasColumn17(db, table, column) {
|
|
14896
14902
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
14897
14903
|
}
|
|
14898
|
-
function
|
|
14904
|
+
function up108(db) {
|
|
14899
14905
|
if (!hasColumn17(db, "memories", "review_after")) {
|
|
14900
14906
|
db.exec("ALTER TABLE memories ADD COLUMN review_after TEXT;");
|
|
14901
14907
|
}
|
|
@@ -14911,14 +14917,14 @@ var TOKEN_COLUMNS = [
|
|
|
14911
14917
|
["tokens_cache_write", "INTEGER"],
|
|
14912
14918
|
["tokens_cost", "REAL"]
|
|
14913
14919
|
];
|
|
14914
|
-
function
|
|
14920
|
+
function up109(db) {
|
|
14915
14921
|
for (const [column, type] of TOKEN_COLUMNS) {
|
|
14916
14922
|
if (!hasColumn18(db, "dreaming_passes", column)) {
|
|
14917
14923
|
db.exec(`ALTER TABLE dreaming_passes ADD COLUMN ${column} ${type};`);
|
|
14918
14924
|
}
|
|
14919
14925
|
}
|
|
14920
14926
|
}
|
|
14921
|
-
function
|
|
14927
|
+
function up110(db) {
|
|
14922
14928
|
db.exec(`
|
|
14923
14929
|
CREATE TABLE IF NOT EXISTS embedding_usage (
|
|
14924
14930
|
day TEXT NOT NULL,
|
|
@@ -14931,7 +14937,7 @@ function up109(db) {
|
|
|
14931
14937
|
);
|
|
14932
14938
|
`);
|
|
14933
14939
|
}
|
|
14934
|
-
function
|
|
14940
|
+
function up111(db) {
|
|
14935
14941
|
db.exec(`
|
|
14936
14942
|
CREATE TABLE IF NOT EXISTS telemetry_install (
|
|
14937
14943
|
id TEXT PRIMARY KEY,
|
|
@@ -14939,7 +14945,7 @@ function up110(db) {
|
|
|
14939
14945
|
);
|
|
14940
14946
|
`);
|
|
14941
14947
|
}
|
|
14942
|
-
function
|
|
14948
|
+
function up112(db) {
|
|
14943
14949
|
db.exec(`
|
|
14944
14950
|
CREATE INDEX IF NOT EXISTS idx_memory_entity_mentions_entity_memory
|
|
14945
14951
|
ON memory_entity_mentions(entity_id, memory_id);
|
|
@@ -14950,7 +14956,7 @@ function hasColumn19(db, table, column) {
|
|
|
14950
14956
|
return rows.some((row) => row.name === column);
|
|
14951
14957
|
}
|
|
14952
14958
|
var COLUMNS2 = ["first_remember_at", "first_recall_at"];
|
|
14953
|
-
function
|
|
14959
|
+
function up113(db) {
|
|
14954
14960
|
for (const column of COLUMNS2) {
|
|
14955
14961
|
if (!hasColumn19(db, "telemetry_install", column)) {
|
|
14956
14962
|
db.exec(`ALTER TABLE telemetry_install ADD COLUMN ${column} TEXT`);
|
|
@@ -14966,7 +14972,7 @@ function addColumnIfMissing23(db, column, definition) {
|
|
|
14966
14972
|
db.exec(`ALTER TABLE telemetry_events ADD COLUMN ${column} ${definition}`);
|
|
14967
14973
|
}
|
|
14968
14974
|
}
|
|
14969
|
-
function
|
|
14975
|
+
function up114(db) {
|
|
14970
14976
|
addColumnIfMissing23(db, "source", "TEXT NOT NULL DEFAULT 'daemon'");
|
|
14971
14977
|
addColumnIfMissing23(db, "claim_token", "TEXT");
|
|
14972
14978
|
addColumnIfMissing23(db, "claimed_at", "TEXT");
|
|
@@ -14975,7 +14981,7 @@ function up113(db) {
|
|
|
14975
14981
|
ON telemetry_events(source, sent_to_posthog, claimed_at, timestamp);
|
|
14976
14982
|
`);
|
|
14977
14983
|
}
|
|
14978
|
-
function
|
|
14984
|
+
function up115(db) {
|
|
14979
14985
|
db.exec(`
|
|
14980
14986
|
CREATE TABLE IF NOT EXISTS session_claims (
|
|
14981
14987
|
session_key TEXT NOT NULL,
|
|
@@ -14996,7 +15002,7 @@ function up114(db) {
|
|
|
14996
15002
|
ON session_claims(agent_id, state, expires_at);
|
|
14997
15003
|
`);
|
|
14998
15004
|
}
|
|
14999
|
-
function
|
|
15005
|
+
function up116(db) {
|
|
15000
15006
|
const table = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'entity_attributes'").get();
|
|
15001
15007
|
if (table == null)
|
|
15002
15008
|
return;
|
|
@@ -15005,7 +15011,7 @@ function up115(db) {
|
|
|
15005
15011
|
ON entity_attributes(memory_id, agent_id, status, importance);
|
|
15006
15012
|
`);
|
|
15007
15013
|
}
|
|
15008
|
-
function
|
|
15014
|
+
function up117(db) {
|
|
15009
15015
|
db.exec(`
|
|
15010
15016
|
CREATE TABLE IF NOT EXISTS cross_agent_messages (
|
|
15011
15017
|
id TEXT PRIMARY KEY,
|
|
@@ -15062,7 +15068,7 @@ function addColumnIfMissing24(db, column, definition) {
|
|
|
15062
15068
|
db.exec(`ALTER TABLE cross_agent_messages ADD COLUMN ${column} ${definition}`);
|
|
15063
15069
|
}
|
|
15064
15070
|
}
|
|
15065
|
-
function
|
|
15071
|
+
function up118(db) {
|
|
15066
15072
|
const table = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'cross_agent_messages'").get();
|
|
15067
15073
|
if (table == null)
|
|
15068
15074
|
return;
|
|
@@ -15263,7 +15269,7 @@ function backfillTranscriptsFromSummaryJobs(db) {
|
|
|
15263
15269
|
insert.run(...values);
|
|
15264
15270
|
}
|
|
15265
15271
|
}
|
|
15266
|
-
function
|
|
15272
|
+
function up119(db) {
|
|
15267
15273
|
if (!hasTable4(db, "session_transcripts"))
|
|
15268
15274
|
return;
|
|
15269
15275
|
addColumnIfMissing25(db, "session_transcripts", "completed_at", "TEXT");
|
|
@@ -15316,7 +15322,7 @@ function up118(db) {
|
|
|
15316
15322
|
ON session_transcripts(agent_id, content_hash);
|
|
15317
15323
|
`);
|
|
15318
15324
|
}
|
|
15319
|
-
function
|
|
15325
|
+
function up120(db) {
|
|
15320
15326
|
db.exec(`
|
|
15321
15327
|
CREATE INDEX IF NOT EXISTS idx_memory_jobs_pressure_status
|
|
15322
15328
|
ON memory_jobs(status)
|
|
@@ -15335,12 +15341,12 @@ function up119(db) {
|
|
|
15335
15341
|
function hasColumn22(db, table, column) {
|
|
15336
15342
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
15337
15343
|
}
|
|
15338
|
-
function
|
|
15344
|
+
function up121(db) {
|
|
15339
15345
|
if (!hasColumn22(db, "telemetry_install", "last_seen_version")) {
|
|
15340
15346
|
db.exec("ALTER TABLE telemetry_install ADD COLUMN last_seen_version TEXT");
|
|
15341
15347
|
}
|
|
15342
15348
|
}
|
|
15343
|
-
function
|
|
15349
|
+
function up122(db) {
|
|
15344
15350
|
db.exec(`
|
|
15345
15351
|
CREATE TABLE IF NOT EXISTS source_lifecycle_state (
|
|
15346
15352
|
agent_id TEXT NOT NULL,
|
|
@@ -15369,7 +15375,7 @@ function addColumnIfMissing26(db, column, definition) {
|
|
|
15369
15375
|
db.exec(`ALTER TABLE telemetry_events ADD COLUMN ${column} ${definition}`);
|
|
15370
15376
|
}
|
|
15371
15377
|
}
|
|
15372
|
-
function
|
|
15378
|
+
function up123(db) {
|
|
15373
15379
|
addColumnIfMissing26(db, "delivery_attempts", "INTEGER NOT NULL DEFAULT 0");
|
|
15374
15380
|
addColumnIfMissing26(db, "last_attempt_at", "TEXT");
|
|
15375
15381
|
addColumnIfMissing26(db, "sent_at", "TEXT");
|
|
@@ -15390,7 +15396,7 @@ function up122(db) {
|
|
|
15390
15396
|
VALUES (1, CURRENT_TIMESTAMP);
|
|
15391
15397
|
`);
|
|
15392
15398
|
}
|
|
15393
|
-
function
|
|
15399
|
+
function up124(db) {
|
|
15394
15400
|
const columns = db.prepare("PRAGMA table_info(dreaming_evidence_exclusions)").all();
|
|
15395
15401
|
const names = new Set(columns.map((column) => column.name));
|
|
15396
15402
|
if (!names.has("failure_class")) {
|
|
@@ -15407,7 +15413,7 @@ function up123(db) {
|
|
|
15407
15413
|
}
|
|
15408
15414
|
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)");
|
|
15409
15415
|
}
|
|
15410
|
-
function
|
|
15416
|
+
function up125(db) {
|
|
15411
15417
|
db.exec(`
|
|
15412
15418
|
CREATE TABLE IF NOT EXISTS embedding_index_failures (
|
|
15413
15419
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
@@ -15431,7 +15437,7 @@ function up124(db) {
|
|
|
15431
15437
|
ON embedding_index_failures(source_type, source_id);
|
|
15432
15438
|
`);
|
|
15433
15439
|
}
|
|
15434
|
-
function
|
|
15440
|
+
function up126(db) {
|
|
15435
15441
|
db.exec(`
|
|
15436
15442
|
CREATE TABLE IF NOT EXISTS imported_source_lifecycle (
|
|
15437
15443
|
id TEXT PRIMARY KEY,
|
|
@@ -15481,7 +15487,7 @@ function backfillTable(db, params) {
|
|
|
15481
15487
|
FROM ${params.table}${params.where ? ` WHERE ${params.where}` : ""}`).all();
|
|
15482
15488
|
backfill(db, rows, params.sourceKind, params.scannedAt);
|
|
15483
15489
|
}
|
|
15484
|
-
function
|
|
15490
|
+
function up127(db) {
|
|
15485
15491
|
db.exec(`
|
|
15486
15492
|
CREATE TABLE IF NOT EXISTS memory_content_safety (
|
|
15487
15493
|
agent_id TEXT NOT NULL,
|
|
@@ -15538,7 +15544,7 @@ function up126(db) {
|
|
|
15538
15544
|
scannedAt
|
|
15539
15545
|
});
|
|
15540
15546
|
}
|
|
15541
|
-
function
|
|
15547
|
+
function up128(db) {
|
|
15542
15548
|
const table = db.prepare("SELECT sql FROM sqlite_master WHERE type = 'table' AND name = 'dreaming_attention'").get();
|
|
15543
15549
|
if (!table)
|
|
15544
15550
|
return;
|
|
@@ -15572,7 +15578,7 @@ function up127(db) {
|
|
|
15572
15578
|
ON dreaming_attention (agent_id, resolved_at, priority DESC, created_at ASC);
|
|
15573
15579
|
`);
|
|
15574
15580
|
}
|
|
15575
|
-
function
|
|
15581
|
+
function up129(db) {
|
|
15576
15582
|
db.exec(`
|
|
15577
15583
|
CREATE TABLE IF NOT EXISTS ontology_contradictions (
|
|
15578
15584
|
id TEXT PRIMARY KEY,
|
|
@@ -15628,7 +15634,7 @@ function up128(db) {
|
|
|
15628
15634
|
ON ontology_contradictions(agent_id, left_source_id, right_source_id);
|
|
15629
15635
|
`);
|
|
15630
15636
|
}
|
|
15631
|
-
function
|
|
15637
|
+
function up130(db) {
|
|
15632
15638
|
db.exec(`
|
|
15633
15639
|
CREATE INDEX IF NOT EXISTS idx_memory_jobs_diagnostics_status_created_at
|
|
15634
15640
|
ON memory_jobs(status, created_at)
|
|
@@ -15643,7 +15649,7 @@ function up129(db) {
|
|
|
15643
15649
|
function tableExists3(db, table) {
|
|
15644
15650
|
return db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = ?").get(table) != null;
|
|
15645
15651
|
}
|
|
15646
|
-
function
|
|
15652
|
+
function up131(db) {
|
|
15647
15653
|
if (!tableExists3(db, "memory_jobs"))
|
|
15648
15654
|
return;
|
|
15649
15655
|
if (!tableExists3(db, "job_cancellations")) {
|
|
@@ -15692,7 +15698,7 @@ function up130(db) {
|
|
|
15692
15698
|
AND status IN ('pending', 'leased');
|
|
15693
15699
|
`);
|
|
15694
15700
|
}
|
|
15695
|
-
function
|
|
15701
|
+
function up132(db) {
|
|
15696
15702
|
db.exec(`
|
|
15697
15703
|
CREATE TABLE IF NOT EXISTS embedding_repair_budget (
|
|
15698
15704
|
id INTEGER PRIMARY KEY CHECK (id = 1),
|
|
@@ -15732,7 +15738,7 @@ function up131(db) {
|
|
|
15732
15738
|
END;
|
|
15733
15739
|
`);
|
|
15734
15740
|
}
|
|
15735
|
-
function
|
|
15741
|
+
function up133(db) {
|
|
15736
15742
|
db.exec(`
|
|
15737
15743
|
CREATE TABLE IF NOT EXISTS dreaming_evidence_consumption (
|
|
15738
15744
|
agent_id TEXT NOT NULL,
|
|
@@ -15755,13 +15761,13 @@ function up132(db) {
|
|
|
15755
15761
|
ON dreaming_evidence_consumption(agent_id, pass_id, delivered_offset, source_length);
|
|
15756
15762
|
`);
|
|
15757
15763
|
}
|
|
15758
|
-
function
|
|
15764
|
+
function up134(db) {
|
|
15759
15765
|
db.exec(`
|
|
15760
15766
|
CREATE INDEX IF NOT EXISTS idx_epistemic_assertions_observer_entity
|
|
15761
15767
|
ON epistemic_assertions(agent_id, subject_entity_id, status, asserted_at DESC, created_at DESC);
|
|
15762
15768
|
`);
|
|
15763
15769
|
}
|
|
15764
|
-
function
|
|
15770
|
+
function up135(db) {
|
|
15765
15771
|
db.exec(`
|
|
15766
15772
|
CREATE TABLE IF NOT EXISTS memory_head_revisions (
|
|
15767
15773
|
id TEXT PRIMARY KEY,
|
|
@@ -15813,7 +15819,7 @@ function up134(db) {
|
|
|
15813
15819
|
if (!names.has("format_version"))
|
|
15814
15820
|
db.exec("ALTER TABLE memory_md_heads ADD COLUMN format_version INTEGER NOT NULL DEFAULT 1");
|
|
15815
15821
|
}
|
|
15816
|
-
function
|
|
15822
|
+
function up136(db) {
|
|
15817
15823
|
db.exec(`
|
|
15818
15824
|
CREATE TABLE memory_head_entries_v134 (
|
|
15819
15825
|
entry_id TEXT NOT NULL, agent_id TEXT NOT NULL, canonical_text TEXT NOT NULL,
|
|
@@ -15831,7 +15837,7 @@ function up135(db) {
|
|
|
15831
15837
|
ON memory_head_entries(agent_id, entry_id, last_revision DESC);
|
|
15832
15838
|
`);
|
|
15833
15839
|
}
|
|
15834
|
-
function
|
|
15840
|
+
function up137(db) {
|
|
15835
15841
|
db.exec(`
|
|
15836
15842
|
CREATE TABLE IF NOT EXISTS memory_head_publications (
|
|
15837
15843
|
agent_id TEXT NOT NULL,
|
|
@@ -15847,7 +15853,7 @@ function up136(db) {
|
|
|
15847
15853
|
ON memory_head_publications(agent_id, status, revision DESC);
|
|
15848
15854
|
`);
|
|
15849
15855
|
}
|
|
15850
|
-
function
|
|
15856
|
+
function up138(db) {
|
|
15851
15857
|
const cols = new Set(db.prepare("PRAGMA table_info(memory_head_revisions)").all().map((r2) => r2.name));
|
|
15852
15858
|
for (const [name, type] of [
|
|
15853
15859
|
["entry_id", "TEXT"],
|
|
@@ -15861,7 +15867,7 @@ function up137(db) {
|
|
|
15861
15867
|
}
|
|
15862
15868
|
db.exec("CREATE UNIQUE INDEX IF NOT EXISTS idx_memory_head_revisions_entry ON memory_head_revisions(agent_id, revision, entry_id)");
|
|
15863
15869
|
}
|
|
15864
|
-
function
|
|
15870
|
+
function up139(db) {
|
|
15865
15871
|
const cols = new Set(db.prepare("PRAGMA table_info(dreaming_passes)").all().map((r2) => r2.name));
|
|
15866
15872
|
for (const [name, type] of [
|
|
15867
15873
|
["head_revision", "INTEGER"],
|
|
@@ -15883,7 +15889,7 @@ function addColumnIfMissing27(db, table, column, definition) {
|
|
|
15883
15889
|
if (!hasColumn25(db, table, column))
|
|
15884
15890
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
15885
15891
|
}
|
|
15886
|
-
function
|
|
15892
|
+
function up140(db) {
|
|
15887
15893
|
addColumnIfMissing27(db, "memories", "manual_override", "INTEGER DEFAULT 0");
|
|
15888
15894
|
db.exec(`
|
|
15889
15895
|
CREATE TABLE IF NOT EXISTS transcript_capture_status (
|
|
@@ -16188,7 +16194,7 @@ function up139(db) {
|
|
|
16188
16194
|
GROUP BY j.agent_id;
|
|
16189
16195
|
`);
|
|
16190
16196
|
}
|
|
16191
|
-
function
|
|
16197
|
+
function up141(db) {
|
|
16192
16198
|
db.exec(`
|
|
16193
16199
|
CREATE TABLE IF NOT EXISTS native_source_sync_state (
|
|
16194
16200
|
agent_id TEXT NOT NULL,
|
|
@@ -16204,7 +16210,7 @@ function up140(db) {
|
|
|
16204
16210
|
ON native_source_sync_state(agent_id, status);
|
|
16205
16211
|
`);
|
|
16206
16212
|
}
|
|
16207
|
-
function
|
|
16213
|
+
function up142(db) {
|
|
16208
16214
|
db.exec(`
|
|
16209
16215
|
CREATE TABLE IF NOT EXISTS transcript_recovery_frontiers (
|
|
16210
16216
|
agent_id TEXT NOT NULL,
|
|
@@ -16216,7 +16222,7 @@ function up141(db) {
|
|
|
16216
16222
|
);
|
|
16217
16223
|
`);
|
|
16218
16224
|
}
|
|
16219
|
-
function
|
|
16225
|
+
function up143(db) {
|
|
16220
16226
|
db.exec(`
|
|
16221
16227
|
CREATE TABLE IF NOT EXISTS source_sync_checkpoints (
|
|
16222
16228
|
agent_id TEXT NOT NULL,
|
|
@@ -16230,13 +16236,13 @@ function up142(db) {
|
|
|
16230
16236
|
);
|
|
16231
16237
|
`);
|
|
16232
16238
|
}
|
|
16233
|
-
function
|
|
16239
|
+
function up144(db) {
|
|
16234
16240
|
const columns = db.prepare("PRAGMA table_info(source_sync_checkpoints)").all();
|
|
16235
16241
|
if (!columns.some((column) => column.name === "frontier")) {
|
|
16236
16242
|
db.exec("ALTER TABLE source_sync_checkpoints ADD COLUMN frontier TEXT");
|
|
16237
16243
|
}
|
|
16238
16244
|
}
|
|
16239
|
-
function
|
|
16245
|
+
function up145(db) {
|
|
16240
16246
|
const columns = new Set(db.prepare("PRAGMA table_info(embedding_index_state)").all().map((row) => row.name).filter((name) => typeof name === "string"));
|
|
16241
16247
|
const additions = [
|
|
16242
16248
|
["migration_phase", "TEXT"],
|
|
@@ -16271,13 +16277,13 @@ function up144(db) {
|
|
|
16271
16277
|
`);
|
|
16272
16278
|
}
|
|
16273
16279
|
}
|
|
16274
|
-
function
|
|
16280
|
+
function up146(db) {
|
|
16275
16281
|
const columns = new Set(db.prepare("PRAGMA table_info(memory_jobs)").all().map((row) => row.name).filter((name) => typeof name === "string"));
|
|
16276
16282
|
if (!columns.has("lease_token")) {
|
|
16277
16283
|
db.exec("ALTER TABLE memory_jobs ADD COLUMN lease_token TEXT");
|
|
16278
16284
|
}
|
|
16279
16285
|
}
|
|
16280
|
-
function
|
|
16286
|
+
function up147(db) {
|
|
16281
16287
|
db.exec(`
|
|
16282
16288
|
CREATE TABLE IF NOT EXISTS dreaming_evidence_reviews (
|
|
16283
16289
|
agent_id TEXT NOT NULL,
|
|
@@ -16295,7 +16301,7 @@ function up146(db) {
|
|
|
16295
16301
|
ON dreaming_evidence_reviews (agent_id, reviewed_at DESC);
|
|
16296
16302
|
`);
|
|
16297
16303
|
}
|
|
16298
|
-
function
|
|
16304
|
+
function up148(db) {
|
|
16299
16305
|
db.exec(`
|
|
16300
16306
|
CREATE TABLE IF NOT EXISTS source_import_jobs (
|
|
16301
16307
|
id TEXT PRIMARY KEY, kind TEXT NOT NULL CHECK (kind = 'import'), agent_id TEXT NOT NULL,
|
|
@@ -16362,16 +16368,16 @@ function up147(db) {
|
|
|
16362
16368
|
}
|
|
16363
16369
|
db.exec("CREATE INDEX IF NOT EXISTS idx_session_transcripts_agent_source ON session_transcripts(agent_id, source_id)");
|
|
16364
16370
|
}
|
|
16365
|
-
function
|
|
16371
|
+
function up149(db) {
|
|
16366
16372
|
db.exec("CREATE INDEX IF NOT EXISTS idx_source_import_files_job_state ON source_import_files(job_id, state)");
|
|
16367
16373
|
}
|
|
16368
|
-
function
|
|
16374
|
+
function up150(db) {
|
|
16369
16375
|
const columns = db.prepare("PRAGMA table_info(source_import_record_attempts)").all();
|
|
16370
16376
|
if (!columns.some((column) => column.name === "source_id")) {
|
|
16371
16377
|
db.exec("ALTER TABLE source_import_record_attempts ADD COLUMN source_id TEXT");
|
|
16372
16378
|
}
|
|
16373
16379
|
}
|
|
16374
|
-
function
|
|
16380
|
+
function up151(db) {
|
|
16375
16381
|
const addColumn = (table, column, definition) => {
|
|
16376
16382
|
const statement = db.prepare("SELECT 1 AS found FROM pragma_table_info(?) WHERE name = ?");
|
|
16377
16383
|
let exists;
|
|
@@ -16392,7 +16398,7 @@ function addColumnIfMissing28(db, table, column, definition) {
|
|
|
16392
16398
|
if (!columns.some((row) => row.name === column))
|
|
16393
16399
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
16394
16400
|
}
|
|
16395
|
-
function
|
|
16401
|
+
function up152(db) {
|
|
16396
16402
|
addColumnIfMissing28(db, "memory_md_heads", "is_current", "INTEGER NOT NULL DEFAULT 0");
|
|
16397
16403
|
addColumnIfMissing28(db, "dreaming_passes", "head_base_revision", "INTEGER");
|
|
16398
16404
|
db.exec("CREATE INDEX IF NOT EXISTS idx_memory_head_revisions_content_hash ON memory_head_revisions(content_hash)");
|
|
@@ -16546,13 +16552,13 @@ var MIGRATIONS = [
|
|
|
16546
16552
|
{
|
|
16547
16553
|
version: 1,
|
|
16548
16554
|
name: "baseline",
|
|
16549
|
-
up:
|
|
16555
|
+
up: up3,
|
|
16550
16556
|
artifacts: { tables: ["memories", "conversations", "embeddings"] }
|
|
16551
16557
|
},
|
|
16552
16558
|
{
|
|
16553
16559
|
version: 2,
|
|
16554
16560
|
name: "pipeline-v2",
|
|
16555
|
-
up:
|
|
16561
|
+
up: up4,
|
|
16556
16562
|
artifacts: {
|
|
16557
16563
|
tables: ["memory_history", "memory_jobs", "entities", "relations", "memory_entity_mentions"]
|
|
16558
16564
|
}
|
|
@@ -16560,12 +16566,12 @@ var MIGRATIONS = [
|
|
|
16560
16566
|
{
|
|
16561
16567
|
version: 3,
|
|
16562
16568
|
name: "unique-content-hash",
|
|
16563
|
-
up:
|
|
16569
|
+
up: up5
|
|
16564
16570
|
},
|
|
16565
16571
|
{
|
|
16566
16572
|
version: 4,
|
|
16567
16573
|
name: "history-actor-and-retention",
|
|
16568
|
-
up:
|
|
16574
|
+
up: up6,
|
|
16569
16575
|
artifacts: {
|
|
16570
16576
|
columns: [{ table: "memory_history", column: "actor_type" }]
|
|
16571
16577
|
}
|
|
@@ -16573,7 +16579,7 @@ var MIGRATIONS = [
|
|
|
16573
16579
|
{
|
|
16574
16580
|
version: 5,
|
|
16575
16581
|
name: "graph-extended",
|
|
16576
|
-
up:
|
|
16582
|
+
up: up7,
|
|
16577
16583
|
artifacts: {
|
|
16578
16584
|
columns: [{ table: "entities", column: "canonical_name" }]
|
|
16579
16585
|
}
|
|
@@ -16581,7 +16587,7 @@ var MIGRATIONS = [
|
|
|
16581
16587
|
{
|
|
16582
16588
|
version: 6,
|
|
16583
16589
|
name: "idempotency-key",
|
|
16584
|
-
up:
|
|
16590
|
+
up: up8,
|
|
16585
16591
|
artifacts: {
|
|
16586
16592
|
columns: [{ table: "memories", column: "idempotency_key" }]
|
|
16587
16593
|
}
|
|
@@ -16589,42 +16595,42 @@ var MIGRATIONS = [
|
|
|
16589
16595
|
{
|
|
16590
16596
|
version: 7,
|
|
16591
16597
|
name: "documents-and-connectors",
|
|
16592
|
-
up:
|
|
16598
|
+
up: up9,
|
|
16593
16599
|
artifacts: { tables: ["documents", "document_memories", "connectors"] }
|
|
16594
16600
|
},
|
|
16595
16601
|
{
|
|
16596
16602
|
version: 8,
|
|
16597
16603
|
name: "embeddings-unique-hash",
|
|
16598
|
-
up:
|
|
16604
|
+
up: up10
|
|
16599
16605
|
},
|
|
16600
16606
|
{
|
|
16601
16607
|
version: 9,
|
|
16602
16608
|
name: "summary-jobs",
|
|
16603
|
-
up:
|
|
16609
|
+
up: up11,
|
|
16604
16610
|
artifacts: { tables: ["summary_jobs"] }
|
|
16605
16611
|
},
|
|
16606
16612
|
{
|
|
16607
16613
|
version: 10,
|
|
16608
16614
|
name: "umap-cache",
|
|
16609
|
-
up:
|
|
16615
|
+
up: up12,
|
|
16610
16616
|
artifacts: { tables: ["umap_cache"] }
|
|
16611
16617
|
},
|
|
16612
16618
|
{
|
|
16613
16619
|
version: 11,
|
|
16614
16620
|
name: "session-scores",
|
|
16615
|
-
up:
|
|
16621
|
+
up: up13,
|
|
16616
16622
|
artifacts: { tables: ["session_scores"] }
|
|
16617
16623
|
},
|
|
16618
16624
|
{
|
|
16619
16625
|
version: 12,
|
|
16620
16626
|
name: "scheduled-tasks",
|
|
16621
|
-
up:
|
|
16627
|
+
up: up14,
|
|
16622
16628
|
artifacts: { tables: ["scheduled_tasks", "task_runs"] }
|
|
16623
16629
|
},
|
|
16624
16630
|
{
|
|
16625
16631
|
version: 13,
|
|
16626
16632
|
name: "ingestion-tracking",
|
|
16627
|
-
up:
|
|
16633
|
+
up: up15,
|
|
16628
16634
|
artifacts: {
|
|
16629
16635
|
columns: [
|
|
16630
16636
|
{ table: "memories", column: "source_path" },
|
|
@@ -16635,13 +16641,13 @@ var MIGRATIONS = [
|
|
|
16635
16641
|
{
|
|
16636
16642
|
version: 14,
|
|
16637
16643
|
name: "telemetry",
|
|
16638
|
-
up:
|
|
16644
|
+
up: up16,
|
|
16639
16645
|
artifacts: { tables: ["telemetry_events"] }
|
|
16640
16646
|
},
|
|
16641
16647
|
{
|
|
16642
16648
|
version: 15,
|
|
16643
16649
|
name: "session-memories",
|
|
16644
|
-
up:
|
|
16650
|
+
up: up17,
|
|
16645
16651
|
artifacts: {
|
|
16646
16652
|
tables: ["session_memories"],
|
|
16647
16653
|
columns: [
|
|
@@ -16653,13 +16659,13 @@ var MIGRATIONS = [
|
|
|
16653
16659
|
{
|
|
16654
16660
|
version: 16,
|
|
16655
16661
|
name: "session-checkpoints",
|
|
16656
|
-
up:
|
|
16662
|
+
up: up18,
|
|
16657
16663
|
artifacts: { tables: ["session_checkpoints"] }
|
|
16658
16664
|
},
|
|
16659
16665
|
{
|
|
16660
16666
|
version: 17,
|
|
16661
16667
|
name: "task-skills",
|
|
16662
|
-
up:
|
|
16668
|
+
up: up19,
|
|
16663
16669
|
artifacts: {
|
|
16664
16670
|
columns: [{ table: "scheduled_tasks", column: "skill_name" }]
|
|
16665
16671
|
}
|
|
@@ -16667,13 +16673,13 @@ var MIGRATIONS = [
|
|
|
16667
16673
|
{
|
|
16668
16674
|
version: 18,
|
|
16669
16675
|
name: "skill-meta",
|
|
16670
|
-
up:
|
|
16676
|
+
up: up20,
|
|
16671
16677
|
artifacts: { tables: ["skill_meta"] }
|
|
16672
16678
|
},
|
|
16673
16679
|
{
|
|
16674
16680
|
version: 19,
|
|
16675
16681
|
name: "knowledge-structure",
|
|
16676
|
-
up:
|
|
16682
|
+
up: up21,
|
|
16677
16683
|
artifacts: {
|
|
16678
16684
|
tables: ["entity_aspects", "entity_attributes", "entity_dependencies", "task_meta"],
|
|
16679
16685
|
columns: [{ table: "entities", column: "agent_id" }]
|
|
@@ -16682,7 +16688,7 @@ var MIGRATIONS = [
|
|
|
16682
16688
|
{
|
|
16683
16689
|
version: 20,
|
|
16684
16690
|
name: "session-structural-columns",
|
|
16685
|
-
up:
|
|
16691
|
+
up: up22,
|
|
16686
16692
|
artifacts: {
|
|
16687
16693
|
columns: [
|
|
16688
16694
|
{ table: "session_memories", column: "entity_slot" },
|
|
@@ -16695,7 +16701,7 @@ var MIGRATIONS = [
|
|
|
16695
16701
|
{
|
|
16696
16702
|
version: 21,
|
|
16697
16703
|
name: "checkpoint-structural",
|
|
16698
|
-
up:
|
|
16704
|
+
up: up23,
|
|
16699
16705
|
artifacts: {
|
|
16700
16706
|
columns: [{ table: "session_checkpoints", column: "focal_entity_ids" }]
|
|
16701
16707
|
}
|
|
@@ -16703,7 +16709,7 @@ var MIGRATIONS = [
|
|
|
16703
16709
|
{
|
|
16704
16710
|
version: 22,
|
|
16705
16711
|
name: "entity-pinning",
|
|
16706
|
-
up:
|
|
16712
|
+
up: up24,
|
|
16707
16713
|
artifacts: {
|
|
16708
16714
|
columns: [
|
|
16709
16715
|
{ table: "entities", column: "pinned" },
|
|
@@ -16714,17 +16720,17 @@ var MIGRATIONS = [
|
|
|
16714
16720
|
{
|
|
16715
16721
|
version: 23,
|
|
16716
16722
|
name: "retired-scorer-gap",
|
|
16717
|
-
up:
|
|
16723
|
+
up: up25
|
|
16718
16724
|
},
|
|
16719
16725
|
{
|
|
16720
16726
|
version: 24,
|
|
16721
16727
|
name: "retired-scorer-gap",
|
|
16722
|
-
up:
|
|
16728
|
+
up: up26
|
|
16723
16729
|
},
|
|
16724
16730
|
{
|
|
16725
16731
|
version: 25,
|
|
16726
16732
|
name: "agent-feedback",
|
|
16727
|
-
up:
|
|
16733
|
+
up: up27,
|
|
16728
16734
|
artifacts: {
|
|
16729
16735
|
columns: [{ table: "session_memories", column: "agent_relevance_score" }]
|
|
16730
16736
|
}
|
|
@@ -16732,32 +16738,32 @@ var MIGRATIONS = [
|
|
|
16732
16738
|
{
|
|
16733
16739
|
version: 26,
|
|
16734
16740
|
name: "retired-scorer-gap",
|
|
16735
|
-
up:
|
|
16741
|
+
up: up28
|
|
16736
16742
|
},
|
|
16737
16743
|
{
|
|
16738
16744
|
version: 27,
|
|
16739
16745
|
name: "backfill-canonical-names",
|
|
16740
|
-
up:
|
|
16746
|
+
up: up29
|
|
16741
16747
|
},
|
|
16742
16748
|
{
|
|
16743
16749
|
version: 28,
|
|
16744
16750
|
name: "lossless-retention",
|
|
16745
|
-
up:
|
|
16751
|
+
up: up30
|
|
16746
16752
|
},
|
|
16747
16753
|
{
|
|
16748
16754
|
version: 29,
|
|
16749
16755
|
name: "session-summary-dag",
|
|
16750
|
-
up:
|
|
16756
|
+
up: up31
|
|
16751
16757
|
},
|
|
16752
16758
|
{
|
|
16753
16759
|
version: 30,
|
|
16754
16760
|
name: "nullable-memory-job-memory-id",
|
|
16755
|
-
up:
|
|
16761
|
+
up: up32
|
|
16756
16762
|
},
|
|
16757
16763
|
{
|
|
16758
16764
|
version: 31,
|
|
16759
16765
|
name: "dependency-reason",
|
|
16760
|
-
up:
|
|
16766
|
+
up: up33,
|
|
16761
16767
|
artifacts: {
|
|
16762
16768
|
columns: [
|
|
16763
16769
|
{ table: "entity_dependencies", column: "reason" },
|
|
@@ -16768,7 +16774,7 @@ var MIGRATIONS = [
|
|
|
16768
16774
|
{
|
|
16769
16775
|
version: 32,
|
|
16770
16776
|
name: "embeddings-vector-column",
|
|
16771
|
-
up:
|
|
16777
|
+
up: up34,
|
|
16772
16778
|
artifacts: {
|
|
16773
16779
|
columns: [{ table: "embeddings", column: "vector", optional: true }]
|
|
16774
16780
|
}
|
|
@@ -16776,7 +16782,7 @@ var MIGRATIONS = [
|
|
|
16776
16782
|
{
|
|
16777
16783
|
version: 33,
|
|
16778
16784
|
name: "scope",
|
|
16779
|
-
up:
|
|
16785
|
+
up: up35,
|
|
16780
16786
|
artifacts: {
|
|
16781
16787
|
columns: [{ table: "memories", column: "scope" }]
|
|
16782
16788
|
}
|
|
@@ -16784,17 +16790,17 @@ var MIGRATIONS = [
|
|
|
16784
16790
|
{
|
|
16785
16791
|
version: 34,
|
|
16786
16792
|
name: "scope-aware-dedup",
|
|
16787
|
-
up:
|
|
16793
|
+
up: up36
|
|
16788
16794
|
},
|
|
16789
16795
|
{
|
|
16790
16796
|
version: 35,
|
|
16791
16797
|
name: "entity-fts",
|
|
16792
|
-
up:
|
|
16798
|
+
up: up37
|
|
16793
16799
|
},
|
|
16794
16800
|
{
|
|
16795
16801
|
version: 36,
|
|
16796
16802
|
name: "dependency-confidence",
|
|
16797
|
-
up:
|
|
16803
|
+
up: up38,
|
|
16798
16804
|
artifacts: {
|
|
16799
16805
|
columns: [{ table: "entity_dependencies", column: "confidence" }]
|
|
16800
16806
|
}
|
|
@@ -16802,7 +16808,7 @@ var MIGRATIONS = [
|
|
|
16802
16808
|
{
|
|
16803
16809
|
version: 37,
|
|
16804
16810
|
name: "entity-communities",
|
|
16805
|
-
up:
|
|
16811
|
+
up: up39,
|
|
16806
16812
|
artifacts: {
|
|
16807
16813
|
tables: ["entity_communities"],
|
|
16808
16814
|
columns: [{ table: "entities", column: "community_id" }]
|
|
@@ -16811,24 +16817,24 @@ var MIGRATIONS = [
|
|
|
16811
16817
|
{
|
|
16812
16818
|
version: 38,
|
|
16813
16819
|
name: "memory-hints",
|
|
16814
|
-
up:
|
|
16820
|
+
up: up40,
|
|
16815
16821
|
artifacts: { tables: ["memory_hints"] }
|
|
16816
16822
|
},
|
|
16817
16823
|
{
|
|
16818
16824
|
version: 39,
|
|
16819
16825
|
name: "dedup-entity-dependencies",
|
|
16820
|
-
up:
|
|
16826
|
+
up: up41
|
|
16821
16827
|
},
|
|
16822
16828
|
{
|
|
16823
16829
|
version: 40,
|
|
16824
16830
|
name: "session-transcripts",
|
|
16825
|
-
up:
|
|
16831
|
+
up: up42,
|
|
16826
16832
|
artifacts: { tables: ["session_transcripts"] }
|
|
16827
16833
|
},
|
|
16828
16834
|
{
|
|
16829
16835
|
version: 41,
|
|
16830
16836
|
name: "path-feedback",
|
|
16831
|
-
up:
|
|
16837
|
+
up: up43,
|
|
16832
16838
|
artifacts: {
|
|
16833
16839
|
tables: [
|
|
16834
16840
|
"path_feedback_events",
|
|
@@ -16843,7 +16849,7 @@ var MIGRATIONS = [
|
|
|
16843
16849
|
{
|
|
16844
16850
|
version: 42,
|
|
16845
16851
|
name: "session-memories-agent-id",
|
|
16846
|
-
up:
|
|
16852
|
+
up: up44,
|
|
16847
16853
|
artifacts: {
|
|
16848
16854
|
columns: [{ table: "session_memories", column: "agent_id" }]
|
|
16849
16855
|
}
|
|
@@ -16851,7 +16857,7 @@ var MIGRATIONS = [
|
|
|
16851
16857
|
{
|
|
16852
16858
|
version: 43,
|
|
16853
16859
|
name: "agents-table",
|
|
16854
|
-
up:
|
|
16860
|
+
up: up45,
|
|
16855
16861
|
artifacts: {
|
|
16856
16862
|
tables: ["agents"],
|
|
16857
16863
|
columns: [
|
|
@@ -16863,7 +16869,7 @@ var MIGRATIONS = [
|
|
|
16863
16869
|
{
|
|
16864
16870
|
version: 44,
|
|
16865
16871
|
name: "memory-md-temporal-head",
|
|
16866
|
-
up:
|
|
16872
|
+
up: up46,
|
|
16867
16873
|
artifacts: {
|
|
16868
16874
|
columns: [
|
|
16869
16875
|
{ table: "session_summaries", column: "source_type" },
|
|
@@ -16875,7 +16881,7 @@ var MIGRATIONS = [
|
|
|
16875
16881
|
{
|
|
16876
16882
|
version: 45,
|
|
16877
16883
|
name: "lossless-working-memory-hardening",
|
|
16878
|
-
up:
|
|
16884
|
+
up: up47,
|
|
16879
16885
|
artifacts: {
|
|
16880
16886
|
tables: ["session_transcripts_fts", "memory_md_heads"],
|
|
16881
16887
|
columns: [
|
|
@@ -16888,17 +16894,17 @@ var MIGRATIONS = [
|
|
|
16888
16894
|
{
|
|
16889
16895
|
version: 46,
|
|
16890
16896
|
name: "session-summary-uniqueness",
|
|
16891
|
-
up:
|
|
16897
|
+
up: up48
|
|
16892
16898
|
},
|
|
16893
16899
|
{
|
|
16894
16900
|
version: 47,
|
|
16895
16901
|
name: "agent-scoped-temporal-uniqueness",
|
|
16896
|
-
up:
|
|
16902
|
+
up: up49
|
|
16897
16903
|
},
|
|
16898
16904
|
{
|
|
16899
16905
|
version: 48,
|
|
16900
16906
|
name: "thread-heads",
|
|
16901
|
-
up:
|
|
16907
|
+
up: up50,
|
|
16902
16908
|
artifacts: {
|
|
16903
16909
|
tables: ["memory_thread_heads"]
|
|
16904
16910
|
}
|
|
@@ -16906,7 +16912,7 @@ var MIGRATIONS = [
|
|
|
16906
16912
|
{
|
|
16907
16913
|
version: 49,
|
|
16908
16914
|
name: "session-extract-cursors",
|
|
16909
|
-
up:
|
|
16915
|
+
up: up51,
|
|
16910
16916
|
artifacts: {
|
|
16911
16917
|
tables: ["session_extract_cursors"]
|
|
16912
16918
|
}
|
|
@@ -16914,7 +16920,7 @@ var MIGRATIONS = [
|
|
|
16914
16920
|
{
|
|
16915
16921
|
version: 50,
|
|
16916
16922
|
name: "related-to-audit",
|
|
16917
|
-
up:
|
|
16923
|
+
up: up52,
|
|
16918
16924
|
artifacts: {
|
|
16919
16925
|
tables: ["entity_dependency_history"]
|
|
16920
16926
|
}
|
|
@@ -16922,7 +16928,7 @@ var MIGRATIONS = [
|
|
|
16922
16928
|
{
|
|
16923
16929
|
version: 51,
|
|
16924
16930
|
name: "memory-md-rolling-window-lineage",
|
|
16925
|
-
up:
|
|
16931
|
+
up: up53,
|
|
16926
16932
|
artifacts: {
|
|
16927
16933
|
tables: ["memory_artifacts", "memory_artifact_tombstones", "memory_artifacts_fts"],
|
|
16928
16934
|
columns: [
|
|
@@ -16937,7 +16943,7 @@ var MIGRATIONS = [
|
|
|
16937
16943
|
{
|
|
16938
16944
|
version: 52,
|
|
16939
16945
|
name: "mcp-invocations",
|
|
16940
|
-
up:
|
|
16946
|
+
up: up54,
|
|
16941
16947
|
artifacts: {
|
|
16942
16948
|
tables: ["mcp_invocations"]
|
|
16943
16949
|
}
|
|
@@ -16945,7 +16951,7 @@ var MIGRATIONS = [
|
|
|
16945
16951
|
{
|
|
16946
16952
|
version: 53,
|
|
16947
16953
|
name: "skill-invocations",
|
|
16948
|
-
up:
|
|
16954
|
+
up: up55,
|
|
16949
16955
|
artifacts: {
|
|
16950
16956
|
tables: ["skill_invocations"]
|
|
16951
16957
|
}
|
|
@@ -16953,7 +16959,7 @@ var MIGRATIONS = [
|
|
|
16953
16959
|
{
|
|
16954
16960
|
version: 54,
|
|
16955
16961
|
name: "task-agent-scope",
|
|
16956
|
-
up:
|
|
16962
|
+
up: up56,
|
|
16957
16963
|
artifacts: {
|
|
16958
16964
|
tables: ["task_scope_hints"]
|
|
16959
16965
|
}
|
|
@@ -16961,7 +16967,7 @@ var MIGRATIONS = [
|
|
|
16961
16967
|
{
|
|
16962
16968
|
version: 55,
|
|
16963
16969
|
name: "dreaming-state",
|
|
16964
|
-
up:
|
|
16970
|
+
up: up57,
|
|
16965
16971
|
artifacts: {
|
|
16966
16972
|
tables: ["dreaming_state", "dreaming_passes"]
|
|
16967
16973
|
}
|
|
@@ -16969,22 +16975,22 @@ var MIGRATIONS = [
|
|
|
16969
16975
|
{
|
|
16970
16976
|
version: 56,
|
|
16971
16977
|
name: "agent-scoped-content-hash",
|
|
16972
|
-
up:
|
|
16978
|
+
up: up58
|
|
16973
16979
|
},
|
|
16974
16980
|
{
|
|
16975
16981
|
version: 57,
|
|
16976
16982
|
name: "memories-fts-tokenizer-repair",
|
|
16977
|
-
up:
|
|
16983
|
+
up: up59
|
|
16978
16984
|
},
|
|
16979
16985
|
{
|
|
16980
16986
|
version: 58,
|
|
16981
16987
|
name: "knowledge-graph-indices",
|
|
16982
|
-
up:
|
|
16988
|
+
up: up60
|
|
16983
16989
|
},
|
|
16984
16990
|
{
|
|
16985
16991
|
version: 59,
|
|
16986
16992
|
name: "entity-attribute-claim-key",
|
|
16987
|
-
up:
|
|
16993
|
+
up: up61,
|
|
16988
16994
|
artifacts: {
|
|
16989
16995
|
columns: [{ table: "entity_attributes", column: "claim_key" }]
|
|
16990
16996
|
}
|
|
@@ -16992,7 +16998,7 @@ var MIGRATIONS = [
|
|
|
16992
16998
|
{
|
|
16993
16999
|
version: 60,
|
|
16994
17000
|
name: "entity-attribute-group-key",
|
|
16995
|
-
up:
|
|
17001
|
+
up: up62,
|
|
16996
17002
|
artifacts: {
|
|
16997
17003
|
columns: [{ table: "entity_attributes", column: "group_key" }]
|
|
16998
17004
|
}
|
|
@@ -17000,7 +17006,7 @@ var MIGRATIONS = [
|
|
|
17000
17006
|
{
|
|
17001
17007
|
version: 61,
|
|
17002
17008
|
name: "memory-artifact-source-mtime",
|
|
17003
|
-
up:
|
|
17009
|
+
up: up63,
|
|
17004
17010
|
artifacts: {
|
|
17005
17011
|
columns: [{ table: "memory_artifacts", column: "source_mtime_ms" }]
|
|
17006
17012
|
}
|
|
@@ -17008,7 +17014,7 @@ var MIGRATIONS = [
|
|
|
17008
17014
|
{
|
|
17009
17015
|
version: 62,
|
|
17010
17016
|
name: "memory-artifact-soft-delete",
|
|
17011
|
-
up:
|
|
17017
|
+
up: up64,
|
|
17012
17018
|
artifacts: {
|
|
17013
17019
|
columns: [
|
|
17014
17020
|
{ table: "memory_artifacts", column: "is_deleted" },
|
|
@@ -17019,12 +17025,12 @@ var MIGRATIONS = [
|
|
|
17019
17025
|
{
|
|
17020
17026
|
version: 63,
|
|
17021
17027
|
name: "content-only-memories-fts-update",
|
|
17022
|
-
up:
|
|
17028
|
+
up: up65
|
|
17023
17029
|
},
|
|
17024
17030
|
{
|
|
17025
17031
|
version: 64,
|
|
17026
17032
|
name: "source-graph-provenance",
|
|
17027
|
-
up:
|
|
17033
|
+
up: up66,
|
|
17028
17034
|
artifacts: {
|
|
17029
17035
|
columns: [
|
|
17030
17036
|
{ table: "entities", column: "source_path" },
|
|
@@ -17037,7 +17043,7 @@ var MIGRATIONS = [
|
|
|
17037
17043
|
{
|
|
17038
17044
|
version: 65,
|
|
17039
17045
|
name: "source-embedding-agent-scope",
|
|
17040
|
-
up:
|
|
17046
|
+
up: up67,
|
|
17041
17047
|
artifacts: {
|
|
17042
17048
|
columns: [{ table: "embeddings", column: "agent_id", optional: true }]
|
|
17043
17049
|
}
|
|
@@ -17045,7 +17051,7 @@ var MIGRATIONS = [
|
|
|
17045
17051
|
{
|
|
17046
17052
|
version: 66,
|
|
17047
17053
|
name: "memory-search-telemetry",
|
|
17048
|
-
up:
|
|
17054
|
+
up: up68,
|
|
17049
17055
|
artifacts: {
|
|
17050
17056
|
tables: ["memory_search_telemetry"]
|
|
17051
17057
|
}
|
|
@@ -17053,7 +17059,7 @@ var MIGRATIONS = [
|
|
|
17053
17059
|
{
|
|
17054
17060
|
version: 67,
|
|
17055
17061
|
name: "ontology-proposals",
|
|
17056
|
-
up:
|
|
17062
|
+
up: up69,
|
|
17057
17063
|
artifacts: {
|
|
17058
17064
|
tables: ["ontology_proposals"],
|
|
17059
17065
|
columns: [
|
|
@@ -17067,7 +17073,7 @@ var MIGRATIONS = [
|
|
|
17067
17073
|
{
|
|
17068
17074
|
version: 68,
|
|
17069
17075
|
name: "daily-reflections",
|
|
17070
|
-
up:
|
|
17076
|
+
up: up70,
|
|
17071
17077
|
artifacts: {
|
|
17072
17078
|
tables: ["daily_reflections"]
|
|
17073
17079
|
}
|
|
@@ -17075,7 +17081,7 @@ var MIGRATIONS = [
|
|
|
17075
17081
|
{
|
|
17076
17082
|
version: 69,
|
|
17077
17083
|
name: "daily-reflections-multiple-insights",
|
|
17078
|
-
up:
|
|
17084
|
+
up: up71,
|
|
17079
17085
|
artifacts: {
|
|
17080
17086
|
tables: ["daily_reflections"]
|
|
17081
17087
|
}
|
|
@@ -17083,7 +17089,7 @@ var MIGRATIONS = [
|
|
|
17083
17089
|
{
|
|
17084
17090
|
version: 70,
|
|
17085
17091
|
name: "ontology-control-plane-state",
|
|
17086
|
-
up:
|
|
17092
|
+
up: up72,
|
|
17087
17093
|
artifacts: {
|
|
17088
17094
|
columns: [
|
|
17089
17095
|
{ table: "entities", column: "status" },
|
|
@@ -17098,7 +17104,7 @@ var MIGRATIONS = [
|
|
|
17098
17104
|
{
|
|
17099
17105
|
version: 71,
|
|
17100
17106
|
name: "epistemic-assertions",
|
|
17101
|
-
up:
|
|
17107
|
+
up: up73,
|
|
17102
17108
|
artifacts: {
|
|
17103
17109
|
tables: ["epistemic_assertions"]
|
|
17104
17110
|
}
|
|
@@ -17106,7 +17112,7 @@ var MIGRATIONS = [
|
|
|
17106
17112
|
{
|
|
17107
17113
|
version: 72,
|
|
17108
17114
|
name: "agent-scoped-idempotency-key",
|
|
17109
|
-
up:
|
|
17115
|
+
up: up74,
|
|
17110
17116
|
artifacts: {
|
|
17111
17117
|
columns: [
|
|
17112
17118
|
{ table: "memories", column: "idempotency_key" },
|
|
@@ -17117,7 +17123,7 @@ var MIGRATIONS = [
|
|
|
17117
17123
|
{
|
|
17118
17124
|
version: 73,
|
|
17119
17125
|
name: "recall-context-dedupe",
|
|
17120
|
-
up:
|
|
17126
|
+
up: up75,
|
|
17121
17127
|
artifacts: {
|
|
17122
17128
|
tables: ["session_context_epochs", "session_recall_events"]
|
|
17123
17129
|
}
|
|
@@ -17125,7 +17131,7 @@ var MIGRATIONS = [
|
|
|
17125
17131
|
{
|
|
17126
17132
|
version: 74,
|
|
17127
17133
|
name: "aggregate-memory-links",
|
|
17128
|
-
up:
|
|
17134
|
+
up: up76,
|
|
17129
17135
|
artifacts: {
|
|
17130
17136
|
tables: ["aggregate_memory_sources"]
|
|
17131
17137
|
}
|
|
@@ -17133,7 +17139,7 @@ var MIGRATIONS = [
|
|
|
17133
17139
|
{
|
|
17134
17140
|
version: 75,
|
|
17135
17141
|
name: "memory-artifact-source-provenance",
|
|
17136
|
-
up:
|
|
17142
|
+
up: up77,
|
|
17137
17143
|
artifacts: {
|
|
17138
17144
|
columns: [
|
|
17139
17145
|
{ table: "memory_artifacts", column: "source_id" },
|
|
@@ -17147,7 +17153,7 @@ var MIGRATIONS = [
|
|
|
17147
17153
|
{
|
|
17148
17154
|
version: 76,
|
|
17149
17155
|
name: "temporal-edges",
|
|
17150
|
-
up:
|
|
17156
|
+
up: up78,
|
|
17151
17157
|
artifacts: {
|
|
17152
17158
|
tables: ["temporal_edges"]
|
|
17153
17159
|
}
|
|
@@ -17155,7 +17161,7 @@ var MIGRATIONS = [
|
|
|
17155
17161
|
{
|
|
17156
17162
|
version: 77,
|
|
17157
17163
|
name: "entity-aliases",
|
|
17158
|
-
up:
|
|
17164
|
+
up: up79,
|
|
17159
17165
|
artifacts: {
|
|
17160
17166
|
tables: ["entity_aliases"]
|
|
17161
17167
|
}
|
|
@@ -17163,7 +17169,7 @@ var MIGRATIONS = [
|
|
|
17163
17169
|
{
|
|
17164
17170
|
version: 78,
|
|
17165
17171
|
name: "api-keys",
|
|
17166
|
-
up:
|
|
17172
|
+
up: up80,
|
|
17167
17173
|
artifacts: {
|
|
17168
17174
|
tables: ["api_keys"]
|
|
17169
17175
|
}
|
|
@@ -17171,7 +17177,7 @@ var MIGRATIONS = [
|
|
|
17171
17177
|
{
|
|
17172
17178
|
version: 79,
|
|
17173
17179
|
name: "transcript-capture-jobs",
|
|
17174
|
-
up:
|
|
17180
|
+
up: up81,
|
|
17175
17181
|
artifacts: {
|
|
17176
17182
|
tables: ["transcript_capture_jobs"]
|
|
17177
17183
|
}
|
|
@@ -17179,7 +17185,7 @@ var MIGRATIONS = [
|
|
|
17179
17185
|
{
|
|
17180
17186
|
version: 80,
|
|
17181
17187
|
name: "document-scope-columns",
|
|
17182
|
-
up:
|
|
17188
|
+
up: up82,
|
|
17183
17189
|
artifacts: {
|
|
17184
17190
|
columns: [
|
|
17185
17191
|
{ table: "documents", column: "agent_id" },
|
|
@@ -17190,7 +17196,7 @@ var MIGRATIONS = [
|
|
|
17190
17196
|
{
|
|
17191
17197
|
version: 81,
|
|
17192
17198
|
name: "aggregate-evidence-sources",
|
|
17193
|
-
up:
|
|
17199
|
+
up: up83,
|
|
17194
17200
|
artifacts: {
|
|
17195
17201
|
tables: ["aggregate_evidence_sources"]
|
|
17196
17202
|
}
|
|
@@ -17198,7 +17204,7 @@ var MIGRATIONS = [
|
|
|
17198
17204
|
{
|
|
17199
17205
|
version: 82,
|
|
17200
17206
|
name: "skill-invocations-harness",
|
|
17201
|
-
up:
|
|
17207
|
+
up: up84,
|
|
17202
17208
|
artifacts: {
|
|
17203
17209
|
columns: [
|
|
17204
17210
|
{ table: "skill_invocations", column: "harness" },
|
|
@@ -17209,7 +17215,7 @@ var MIGRATIONS = [
|
|
|
17209
17215
|
{
|
|
17210
17216
|
version: 83,
|
|
17211
17217
|
name: "memory-lifecycle-repair",
|
|
17212
|
-
up:
|
|
17218
|
+
up: up85,
|
|
17213
17219
|
artifacts: {
|
|
17214
17220
|
tables: ["transcript_capture_jobs", "aggregate_evidence_sources", "entity_dependencies"],
|
|
17215
17221
|
columns: [
|
|
@@ -17224,7 +17230,7 @@ var MIGRATIONS = [
|
|
|
17224
17230
|
{
|
|
17225
17231
|
version: 84,
|
|
17226
17232
|
name: "legacy-markdown-import-state",
|
|
17227
|
-
up:
|
|
17233
|
+
up: up86,
|
|
17228
17234
|
artifacts: {
|
|
17229
17235
|
tables: ["legacy_markdown_imports", "legacy_markdown_chunks"]
|
|
17230
17236
|
}
|
|
@@ -17232,7 +17238,7 @@ var MIGRATIONS = [
|
|
|
17232
17238
|
{
|
|
17233
17239
|
version: 85,
|
|
17234
17240
|
name: "backfill-relations-to-dependencies",
|
|
17235
|
-
up:
|
|
17241
|
+
up: up87,
|
|
17236
17242
|
artifacts: {
|
|
17237
17243
|
tables: ["entity_dependencies"]
|
|
17238
17244
|
}
|
|
@@ -17240,7 +17246,7 @@ var MIGRATIONS = [
|
|
|
17240
17246
|
{
|
|
17241
17247
|
version: 86,
|
|
17242
17248
|
name: "summary-jobs-content-hash",
|
|
17243
|
-
up:
|
|
17249
|
+
up: up88,
|
|
17244
17250
|
artifacts: {
|
|
17245
17251
|
columns: [{ table: "summary_jobs", column: "content_hash" }]
|
|
17246
17252
|
}
|
|
@@ -17248,7 +17254,7 @@ var MIGRATIONS = [
|
|
|
17248
17254
|
{
|
|
17249
17255
|
version: 87,
|
|
17250
17256
|
name: "summary-jobs-boundary-reason",
|
|
17251
|
-
up:
|
|
17257
|
+
up: up89,
|
|
17252
17258
|
artifacts: {
|
|
17253
17259
|
columns: [{ table: "summary_jobs", column: "boundary_reason" }]
|
|
17254
17260
|
}
|
|
@@ -17256,7 +17262,7 @@ var MIGRATIONS = [
|
|
|
17256
17262
|
{
|
|
17257
17263
|
version: 88,
|
|
17258
17264
|
name: "transcript-recovery-files",
|
|
17259
|
-
up:
|
|
17265
|
+
up: up90,
|
|
17260
17266
|
artifacts: {
|
|
17261
17267
|
tables: ["transcript_recovery_files"]
|
|
17262
17268
|
}
|
|
@@ -17264,7 +17270,7 @@ var MIGRATIONS = [
|
|
|
17264
17270
|
{
|
|
17265
17271
|
version: 89,
|
|
17266
17272
|
name: "job-cancellations",
|
|
17267
|
-
up:
|
|
17273
|
+
up: up91,
|
|
17268
17274
|
artifacts: {
|
|
17269
17275
|
tables: ["job_cancellations"]
|
|
17270
17276
|
}
|
|
@@ -17272,7 +17278,7 @@ var MIGRATIONS = [
|
|
|
17272
17278
|
{
|
|
17273
17279
|
version: 90,
|
|
17274
17280
|
name: "job-archive",
|
|
17275
|
-
up:
|
|
17281
|
+
up: up92,
|
|
17276
17282
|
artifacts: {
|
|
17277
17283
|
tables: ["job_archive"]
|
|
17278
17284
|
}
|
|
@@ -17280,25 +17286,25 @@ var MIGRATIONS = [
|
|
|
17280
17286
|
{
|
|
17281
17287
|
version: 91,
|
|
17282
17288
|
name: "embedding-index-generations",
|
|
17283
|
-
up:
|
|
17289
|
+
up: up93,
|
|
17284
17290
|
artifacts: { tables: ["embedding_index_state"] }
|
|
17285
17291
|
},
|
|
17286
17292
|
{
|
|
17287
17293
|
version: 92,
|
|
17288
17294
|
name: "embedding-staging-store",
|
|
17289
|
-
up:
|
|
17295
|
+
up: up94,
|
|
17290
17296
|
artifacts: { tables: ["embeddings_staging"] }
|
|
17291
17297
|
},
|
|
17292
17298
|
{
|
|
17293
17299
|
version: 93,
|
|
17294
17300
|
name: "dreaming-evidence-cursor",
|
|
17295
|
-
up:
|
|
17301
|
+
up: up95,
|
|
17296
17302
|
artifacts: { columns: [{ table: "dreaming_state", column: "evidence_cursor" }] }
|
|
17297
17303
|
},
|
|
17298
17304
|
{
|
|
17299
17305
|
version: 94,
|
|
17300
17306
|
name: "memory-kind",
|
|
17301
|
-
up:
|
|
17307
|
+
up: up96,
|
|
17302
17308
|
artifacts: {
|
|
17303
17309
|
columns: [
|
|
17304
17310
|
{ table: "memories", column: "memory_kind" },
|
|
@@ -17309,35 +17315,35 @@ var MIGRATIONS = [
|
|
|
17309
17315
|
{
|
|
17310
17316
|
version: 95,
|
|
17311
17317
|
name: "compaction-recall-projections",
|
|
17312
|
-
up:
|
|
17318
|
+
up: up97
|
|
17313
17319
|
},
|
|
17314
17320
|
{
|
|
17315
17321
|
version: 96,
|
|
17316
17322
|
name: "retire-legacy-ingestion",
|
|
17317
|
-
up:
|
|
17323
|
+
up: up98
|
|
17318
17324
|
},
|
|
17319
17325
|
{
|
|
17320
17326
|
version: 97,
|
|
17321
17327
|
name: "dreaming-failure-backoff",
|
|
17322
|
-
up:
|
|
17328
|
+
up: up99,
|
|
17323
17329
|
artifacts: { columns: [{ table: "dreaming_state", column: "last_failure_at" }] }
|
|
17324
17330
|
},
|
|
17325
17331
|
{
|
|
17326
17332
|
version: 98,
|
|
17327
17333
|
name: "dreaming-evidence-exclusions",
|
|
17328
|
-
up:
|
|
17334
|
+
up: up100,
|
|
17329
17335
|
artifacts: { tables: ["dreaming_evidence_exclusions"] }
|
|
17330
17336
|
},
|
|
17331
17337
|
{
|
|
17332
17338
|
version: 99,
|
|
17333
17339
|
name: "dreaming-tool-calls",
|
|
17334
|
-
up:
|
|
17340
|
+
up: up101,
|
|
17335
17341
|
artifacts: { tables: ["dreaming_tool_calls"] }
|
|
17336
17342
|
},
|
|
17337
17343
|
{
|
|
17338
17344
|
version: 100,
|
|
17339
17345
|
name: "dreaming-runbook",
|
|
17340
|
-
up:
|
|
17346
|
+
up: up102,
|
|
17341
17347
|
artifacts: {
|
|
17342
17348
|
columns: [
|
|
17343
17349
|
{ table: "dreaming_passes", column: "evidence_window_json" },
|
|
@@ -17348,23 +17354,23 @@ var MIGRATIONS = [
|
|
|
17348
17354
|
{
|
|
17349
17355
|
version: 101,
|
|
17350
17356
|
name: "dreaming-attention",
|
|
17351
|
-
up:
|
|
17357
|
+
up: up103,
|
|
17352
17358
|
artifacts: { tables: ["dreaming_attention"] }
|
|
17353
17359
|
},
|
|
17354
17360
|
{
|
|
17355
17361
|
version: 102,
|
|
17356
17362
|
name: "attribute-semantic-memories",
|
|
17357
|
-
up:
|
|
17363
|
+
up: up104
|
|
17358
17364
|
},
|
|
17359
17365
|
{
|
|
17360
17366
|
version: 103,
|
|
17361
17367
|
name: "semantic-memory-kind",
|
|
17362
|
-
up:
|
|
17368
|
+
up: up105
|
|
17363
17369
|
},
|
|
17364
17370
|
{
|
|
17365
17371
|
version: 104,
|
|
17366
17372
|
name: "derived-memory-provenance",
|
|
17367
|
-
up:
|
|
17373
|
+
up: up106,
|
|
17368
17374
|
artifacts: {
|
|
17369
17375
|
tables: ["derived_memory_sources"],
|
|
17370
17376
|
columns: [{ table: "memories", column: "stale_at" }]
|
|
@@ -17373,12 +17379,12 @@ var MIGRATIONS = [
|
|
|
17373
17379
|
{
|
|
17374
17380
|
version: 105,
|
|
17375
17381
|
name: "agent-scoped-entity-name",
|
|
17376
|
-
up:
|
|
17382
|
+
up: up107
|
|
17377
17383
|
},
|
|
17378
17384
|
{
|
|
17379
17385
|
version: 106,
|
|
17380
17386
|
name: "memory-review-after",
|
|
17381
|
-
up:
|
|
17387
|
+
up: up108,
|
|
17382
17388
|
artifacts: {
|
|
17383
17389
|
columns: [{ table: "memories", column: "review_after" }]
|
|
17384
17390
|
}
|
|
@@ -17386,7 +17392,7 @@ var MIGRATIONS = [
|
|
|
17386
17392
|
{
|
|
17387
17393
|
version: 107,
|
|
17388
17394
|
name: "dreaming-pass-usage",
|
|
17389
|
-
up:
|
|
17395
|
+
up: up109,
|
|
17390
17396
|
artifacts: {
|
|
17391
17397
|
columns: [
|
|
17392
17398
|
{ table: "dreaming_passes", column: "tokens_input" },
|
|
@@ -17400,7 +17406,7 @@ var MIGRATIONS = [
|
|
|
17400
17406
|
{
|
|
17401
17407
|
version: 108,
|
|
17402
17408
|
name: "embedding-usage",
|
|
17403
|
-
up:
|
|
17409
|
+
up: up110,
|
|
17404
17410
|
artifacts: {
|
|
17405
17411
|
tables: ["embedding_usage"]
|
|
17406
17412
|
}
|
|
@@ -17408,7 +17414,7 @@ var MIGRATIONS = [
|
|
|
17408
17414
|
{
|
|
17409
17415
|
version: 109,
|
|
17410
17416
|
name: "telemetry-install",
|
|
17411
|
-
up:
|
|
17417
|
+
up: up111,
|
|
17412
17418
|
artifacts: {
|
|
17413
17419
|
tables: ["telemetry_install"]
|
|
17414
17420
|
}
|
|
@@ -17416,12 +17422,12 @@ var MIGRATIONS = [
|
|
|
17416
17422
|
{
|
|
17417
17423
|
version: 110,
|
|
17418
17424
|
name: "memory-mention-join-index",
|
|
17419
|
-
up:
|
|
17425
|
+
up: up112
|
|
17420
17426
|
},
|
|
17421
17427
|
{
|
|
17422
17428
|
version: 111,
|
|
17423
17429
|
name: "telemetry-first-use",
|
|
17424
|
-
up:
|
|
17430
|
+
up: up113,
|
|
17425
17431
|
artifacts: {
|
|
17426
17432
|
columns: [
|
|
17427
17433
|
{ table: "telemetry_install", column: "first_remember_at" },
|
|
@@ -17432,7 +17438,7 @@ var MIGRATIONS = [
|
|
|
17432
17438
|
{
|
|
17433
17439
|
version: 112,
|
|
17434
17440
|
name: "telemetry-queue-ownership",
|
|
17435
|
-
up:
|
|
17441
|
+
up: up114,
|
|
17436
17442
|
artifacts: {
|
|
17437
17443
|
columns: [
|
|
17438
17444
|
{ table: "telemetry_events", column: "source" },
|
|
@@ -17444,7 +17450,7 @@ var MIGRATIONS = [
|
|
|
17444
17450
|
{
|
|
17445
17451
|
version: 113,
|
|
17446
17452
|
name: "session-claims",
|
|
17447
|
-
up:
|
|
17453
|
+
up: up115,
|
|
17448
17454
|
artifacts: {
|
|
17449
17455
|
tables: ["session_claims"],
|
|
17450
17456
|
columns: [
|
|
@@ -17458,12 +17464,12 @@ var MIGRATIONS = [
|
|
|
17458
17464
|
{
|
|
17459
17465
|
version: 114,
|
|
17460
17466
|
name: "memory-traversal-hydration-index",
|
|
17461
|
-
up:
|
|
17467
|
+
up: up116
|
|
17462
17468
|
},
|
|
17463
17469
|
{
|
|
17464
17470
|
version: 115,
|
|
17465
17471
|
name: "cross-agent-message-notifications",
|
|
17466
|
-
up:
|
|
17472
|
+
up: up117,
|
|
17467
17473
|
artifacts: {
|
|
17468
17474
|
tables: ["cross_agent_messages", "cross_agent_message_receipts"]
|
|
17469
17475
|
}
|
|
@@ -17471,7 +17477,7 @@ var MIGRATIONS = [
|
|
|
17471
17477
|
{
|
|
17472
17478
|
version: 116,
|
|
17473
17479
|
name: "acp-delivery-reconciliation",
|
|
17474
|
-
up:
|
|
17480
|
+
up: up118,
|
|
17475
17481
|
artifacts: {
|
|
17476
17482
|
columns: [
|
|
17477
17483
|
{ table: "cross_agent_messages", column: "delivery_state" },
|
|
@@ -17485,7 +17491,7 @@ var MIGRATIONS = [
|
|
|
17485
17491
|
{
|
|
17486
17492
|
version: 117,
|
|
17487
17493
|
name: "retire-summary-worker",
|
|
17488
|
-
up:
|
|
17494
|
+
up: up119,
|
|
17489
17495
|
artifacts: {
|
|
17490
17496
|
columns: [
|
|
17491
17497
|
{ table: "session_transcripts", column: "completed_at" },
|
|
@@ -17496,24 +17502,24 @@ var MIGRATIONS = [
|
|
|
17496
17502
|
{
|
|
17497
17503
|
version: 118,
|
|
17498
17504
|
name: "queue-pressure-indices",
|
|
17499
|
-
up:
|
|
17505
|
+
up: up120
|
|
17500
17506
|
},
|
|
17501
17507
|
{
|
|
17502
17508
|
version: 119,
|
|
17503
17509
|
name: "telemetry-version-observation",
|
|
17504
|
-
up:
|
|
17510
|
+
up: up121,
|
|
17505
17511
|
artifacts: { columns: [{ table: "telemetry_install", column: "last_seen_version" }] }
|
|
17506
17512
|
},
|
|
17507
17513
|
{
|
|
17508
17514
|
version: 120,
|
|
17509
17515
|
name: "source-lifecycle-telemetry",
|
|
17510
|
-
up:
|
|
17516
|
+
up: up122,
|
|
17511
17517
|
artifacts: { tables: ["source_lifecycle_state"] }
|
|
17512
17518
|
},
|
|
17513
17519
|
{
|
|
17514
17520
|
version: 121,
|
|
17515
17521
|
name: "telemetry-delivery-health",
|
|
17516
|
-
up:
|
|
17522
|
+
up: up123,
|
|
17517
17523
|
artifacts: {
|
|
17518
17524
|
tables: ["telemetry_delivery_state"],
|
|
17519
17525
|
columns: [
|
|
@@ -17527,7 +17533,7 @@ var MIGRATIONS = [
|
|
|
17527
17533
|
{
|
|
17528
17534
|
version: 122,
|
|
17529
17535
|
name: "dreaming-evidence-retry",
|
|
17530
|
-
up:
|
|
17536
|
+
up: up124,
|
|
17531
17537
|
artifacts: {
|
|
17532
17538
|
columns: [
|
|
17533
17539
|
{ table: "dreaming_evidence_exclusions", column: "failure_class" },
|
|
@@ -17540,13 +17546,13 @@ var MIGRATIONS = [
|
|
|
17540
17546
|
{
|
|
17541
17547
|
version: 123,
|
|
17542
17548
|
name: "embedding-index-failures",
|
|
17543
|
-
up:
|
|
17549
|
+
up: up125,
|
|
17544
17550
|
artifacts: { tables: ["embedding_index_failures"] }
|
|
17545
17551
|
},
|
|
17546
17552
|
{
|
|
17547
17553
|
version: 124,
|
|
17548
17554
|
name: "import-derived-lifecycle",
|
|
17549
|
-
up:
|
|
17555
|
+
up: up126,
|
|
17550
17556
|
artifacts: {
|
|
17551
17557
|
tables: ["imported_source_lifecycle"]
|
|
17552
17558
|
}
|
|
@@ -17554,77 +17560,77 @@ var MIGRATIONS = [
|
|
|
17554
17560
|
{
|
|
17555
17561
|
version: 125,
|
|
17556
17562
|
name: "memory-content-safety",
|
|
17557
|
-
up:
|
|
17563
|
+
up: up127,
|
|
17558
17564
|
artifacts: { tables: ["memory_content_safety"] }
|
|
17559
17565
|
},
|
|
17560
17566
|
{
|
|
17561
17567
|
version: 126,
|
|
17562
17568
|
name: "dreaming-surprisal-attention",
|
|
17563
|
-
up:
|
|
17569
|
+
up: up128,
|
|
17564
17570
|
artifacts: { tables: ["dreaming_attention"] }
|
|
17565
17571
|
},
|
|
17566
17572
|
{
|
|
17567
17573
|
version: 127,
|
|
17568
17574
|
name: "ontology-contradictions",
|
|
17569
|
-
up:
|
|
17575
|
+
up: up129,
|
|
17570
17576
|
artifacts: { tables: ["ontology_contradictions"] }
|
|
17571
17577
|
},
|
|
17572
17578
|
{
|
|
17573
17579
|
version: 128,
|
|
17574
17580
|
name: "bounded-queue-diagnostics",
|
|
17575
|
-
up:
|
|
17581
|
+
up: up130
|
|
17576
17582
|
},
|
|
17577
17583
|
{
|
|
17578
17584
|
version: 129,
|
|
17579
17585
|
name: "retire-structural-jobs",
|
|
17580
|
-
up:
|
|
17586
|
+
up: up131
|
|
17581
17587
|
},
|
|
17582
17588
|
{
|
|
17583
17589
|
version: 130,
|
|
17584
17590
|
name: "embedding-repair-state",
|
|
17585
|
-
up:
|
|
17591
|
+
up: up132,
|
|
17586
17592
|
artifacts: { tables: ["embedding_repair_budget", "embedding_repair_backoff"] }
|
|
17587
17593
|
},
|
|
17588
17594
|
{
|
|
17589
17595
|
version: 131,
|
|
17590
17596
|
name: "dreaming-evidence-consumption",
|
|
17591
|
-
up:
|
|
17597
|
+
up: up133,
|
|
17592
17598
|
artifacts: { tables: ["dreaming_evidence_consumption"] }
|
|
17593
17599
|
},
|
|
17594
17600
|
{
|
|
17595
17601
|
version: 132,
|
|
17596
17602
|
name: "observer-scoped-epistemic-assertions",
|
|
17597
|
-
up:
|
|
17603
|
+
up: up134,
|
|
17598
17604
|
artifacts: { tables: ["epistemic_assertions"] }
|
|
17599
17605
|
},
|
|
17600
17606
|
{
|
|
17601
17607
|
version: 133,
|
|
17602
17608
|
name: "dreaming-memory-head",
|
|
17603
|
-
up:
|
|
17609
|
+
up: up135,
|
|
17604
17610
|
artifacts: { tables: ["memory_head_revisions", "memory_head_entries", "memory_head_revision_entries"] }
|
|
17605
17611
|
},
|
|
17606
17612
|
{
|
|
17607
17613
|
version: 134,
|
|
17608
17614
|
name: "scope-memory-head-entries",
|
|
17609
|
-
up:
|
|
17615
|
+
up: up136,
|
|
17610
17616
|
artifacts: { tables: ["memory_head_entries"] }
|
|
17611
17617
|
},
|
|
17612
17618
|
{
|
|
17613
17619
|
version: 135,
|
|
17614
17620
|
name: "memory-head-publication",
|
|
17615
|
-
up:
|
|
17621
|
+
up: up137,
|
|
17616
17622
|
artifacts: { tables: ["memory_head_publications"] }
|
|
17617
17623
|
},
|
|
17618
17624
|
{
|
|
17619
17625
|
version: 136,
|
|
17620
17626
|
name: "memory-head-revisions",
|
|
17621
|
-
up:
|
|
17627
|
+
up: up138,
|
|
17622
17628
|
artifacts: { tables: ["memory_head_revisions"] }
|
|
17623
17629
|
},
|
|
17624
17630
|
{
|
|
17625
17631
|
version: 137,
|
|
17626
17632
|
name: "dreaming-head-manifest",
|
|
17627
|
-
up:
|
|
17633
|
+
up: up139,
|
|
17628
17634
|
artifacts: {
|
|
17629
17635
|
columns: [
|
|
17630
17636
|
{ table: "dreaming_passes", column: "head_revision" },
|
|
@@ -17635,7 +17641,7 @@ var MIGRATIONS = [
|
|
|
17635
17641
|
{
|
|
17636
17642
|
version: 138,
|
|
17637
17643
|
name: "bounded-status-projections",
|
|
17638
|
-
up:
|
|
17644
|
+
up: up140,
|
|
17639
17645
|
artifacts: {
|
|
17640
17646
|
tables: ["transcript_capture_status", "memories_duplicate_hash_counts", "memories_diagnostics_state"]
|
|
17641
17647
|
}
|
|
@@ -17643,31 +17649,31 @@ var MIGRATIONS = [
|
|
|
17643
17649
|
{
|
|
17644
17650
|
version: 139,
|
|
17645
17651
|
name: "native-source-sync-state",
|
|
17646
|
-
up:
|
|
17652
|
+
up: up141,
|
|
17647
17653
|
artifacts: { tables: ["native_source_sync_state"] }
|
|
17648
17654
|
},
|
|
17649
17655
|
{
|
|
17650
17656
|
version: 140,
|
|
17651
17657
|
name: "transcript-recovery-frontier",
|
|
17652
|
-
up:
|
|
17658
|
+
up: up142,
|
|
17653
17659
|
artifacts: { tables: ["transcript_recovery_frontiers"] }
|
|
17654
17660
|
},
|
|
17655
17661
|
{
|
|
17656
17662
|
version: 141,
|
|
17657
17663
|
name: "source-sync-checkpoints",
|
|
17658
|
-
up:
|
|
17664
|
+
up: up143,
|
|
17659
17665
|
artifacts: { tables: ["source_sync_checkpoints"] }
|
|
17660
17666
|
},
|
|
17661
17667
|
{
|
|
17662
17668
|
version: 142,
|
|
17663
17669
|
name: "source-sync-frontier",
|
|
17664
|
-
up:
|
|
17670
|
+
up: up144,
|
|
17665
17671
|
artifacts: { columns: [{ table: "source_sync_checkpoints", column: "frontier" }] }
|
|
17666
17672
|
},
|
|
17667
17673
|
{
|
|
17668
17674
|
version: 143,
|
|
17669
17675
|
name: "embedding-index-progress",
|
|
17670
|
-
up:
|
|
17676
|
+
up: up145,
|
|
17671
17677
|
artifacts: {
|
|
17672
17678
|
columns: [
|
|
17673
17679
|
{ table: "embedding_index_state", column: "migration_phase" },
|
|
@@ -17683,19 +17689,19 @@ var MIGRATIONS = [
|
|
|
17683
17689
|
{
|
|
17684
17690
|
version: 144,
|
|
17685
17691
|
name: "memory-job-lease-token",
|
|
17686
|
-
up:
|
|
17692
|
+
up: up146,
|
|
17687
17693
|
artifacts: { columns: [{ table: "memory_jobs", column: "lease_token" }] }
|
|
17688
17694
|
},
|
|
17689
17695
|
{
|
|
17690
17696
|
version: 145,
|
|
17691
17697
|
name: "dreaming-evidence-reviews",
|
|
17692
|
-
up:
|
|
17698
|
+
up: up147,
|
|
17693
17699
|
artifacts: { tables: ["dreaming_evidence_reviews"] }
|
|
17694
17700
|
},
|
|
17695
17701
|
{
|
|
17696
17702
|
version: 146,
|
|
17697
17703
|
name: "source-transcript-import",
|
|
17698
|
-
up:
|
|
17704
|
+
up: up148,
|
|
17699
17705
|
artifacts: {
|
|
17700
17706
|
tables: [
|
|
17701
17707
|
"source_import_jobs",
|
|
@@ -17714,19 +17720,19 @@ var MIGRATIONS = [
|
|
|
17714
17720
|
{
|
|
17715
17721
|
version: 147,
|
|
17716
17722
|
name: "source-import-replay-file-slots",
|
|
17717
|
-
up:
|
|
17723
|
+
up: up149,
|
|
17718
17724
|
artifacts: { tables: ["source_import_files"] }
|
|
17719
17725
|
},
|
|
17720
17726
|
{
|
|
17721
17727
|
version: 148,
|
|
17722
17728
|
name: "source-import-attempt-provenance",
|
|
17723
|
-
up:
|
|
17729
|
+
up: up150,
|
|
17724
17730
|
artifacts: { columns: [{ table: "source_import_record_attempts", column: "source_id" }] }
|
|
17725
17731
|
},
|
|
17726
17732
|
{
|
|
17727
17733
|
version: 149,
|
|
17728
17734
|
name: "transcript-import-state-machine",
|
|
17729
|
-
up:
|
|
17735
|
+
up: up151,
|
|
17730
17736
|
artifacts: {
|
|
17731
17737
|
columns: [
|
|
17732
17738
|
{ table: "source_import_jobs", column: "duplicate_mode" },
|
|
@@ -17738,7 +17744,7 @@ var MIGRATIONS = [
|
|
|
17738
17744
|
{
|
|
17739
17745
|
version: 150,
|
|
17740
17746
|
name: "memory-head-freshness",
|
|
17741
|
-
up:
|
|
17747
|
+
up: up152,
|
|
17742
17748
|
artifacts: {
|
|
17743
17749
|
columns: [
|
|
17744
17750
|
{ table: "memory_md_heads", column: "is_current" },
|
|
@@ -17774,6 +17780,12 @@ var MIGRATIONS = [
|
|
|
17774
17780
|
}))
|
|
17775
17781
|
]
|
|
17776
17782
|
}
|
|
17783
|
+
},
|
|
17784
|
+
{
|
|
17785
|
+
version: 152,
|
|
17786
|
+
name: "memory-artifact-sha-index",
|
|
17787
|
+
up: up2,
|
|
17788
|
+
artifacts: { indexes: ["idx_memory_artifacts_agent_sha"] }
|
|
17777
17789
|
}
|
|
17778
17790
|
];
|
|
17779
17791
|
var LATEST_SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1]?.version ?? 0;
|