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