@signetai/connector-base 0.221.8 → 0.221.10
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 +405 -304
- package/dist/index.js +405 -304
- package/package.json +2 -2
package/dist/agent-dir.js
CHANGED
|
@@ -11347,6 +11347,66 @@ var DAEMON_DERIVED_MEMORY_SOURCE_TYPES = [
|
|
|
11347
11347
|
"checkpoint",
|
|
11348
11348
|
"dreaming"
|
|
11349
11349
|
];
|
|
11350
|
+
function up(db) {
|
|
11351
|
+
const hasColumn = (table, column) => {
|
|
11352
|
+
const statement = db.prepare(`SELECT 1 FROM pragma_table_info('${table}') WHERE name = ?`);
|
|
11353
|
+
try {
|
|
11354
|
+
return statement.get(column) != null;
|
|
11355
|
+
} finally {
|
|
11356
|
+
statement.finalize?.();
|
|
11357
|
+
}
|
|
11358
|
+
};
|
|
11359
|
+
for (const [column, definition] of [
|
|
11360
|
+
["upload_generation", "INTEGER NOT NULL DEFAULT 0"],
|
|
11361
|
+
["upload_offset", "INTEGER NOT NULL DEFAULT 0"],
|
|
11362
|
+
["upload_size", "INTEGER"],
|
|
11363
|
+
["upload_digest", "TEXT NOT NULL DEFAULT ''"],
|
|
11364
|
+
["checkpoint_line_number", "INTEGER NOT NULL DEFAULT 0"],
|
|
11365
|
+
["reserved_bytes", "INTEGER NOT NULL DEFAULT 0"],
|
|
11366
|
+
["original_path", "TEXT"],
|
|
11367
|
+
[
|
|
11368
|
+
"storage_state",
|
|
11369
|
+
"TEXT NOT NULL DEFAULT 'legacy' CHECK (storage_state IN ('legacy','uploading','sealed','purging','purged'))"
|
|
11370
|
+
]
|
|
11371
|
+
]) {
|
|
11372
|
+
if (!hasColumn("source_import_files", column))
|
|
11373
|
+
db.exec(`ALTER TABLE source_import_files ADD COLUMN ${column} ${definition}`);
|
|
11374
|
+
}
|
|
11375
|
+
if (!hasColumn("source_import_jobs", "retry_count"))
|
|
11376
|
+
db.exec("ALTER TABLE source_import_jobs ADD COLUMN retry_count INTEGER NOT NULL DEFAULT 0");
|
|
11377
|
+
if (!hasColumn("source_import_jobs", "cleanup_state"))
|
|
11378
|
+
db.exec("ALTER TABLE source_import_jobs ADD COLUMN cleanup_state TEXT NOT NULL DEFAULT 'idle'");
|
|
11379
|
+
if (!hasColumn("source_import_jobs", "retry_cursor"))
|
|
11380
|
+
db.exec("ALTER TABLE source_import_jobs ADD COLUMN retry_cursor TEXT NOT NULL DEFAULT ''");
|
|
11381
|
+
if (!hasColumn("source_import_jobs", "retry_requested"))
|
|
11382
|
+
db.exec("ALTER TABLE source_import_jobs ADD COLUMN retry_requested INTEGER NOT NULL DEFAULT 0");
|
|
11383
|
+
db.exec(`
|
|
11384
|
+
CREATE TABLE IF NOT EXISTS source_import_migrations (agent_id TEXT PRIMARY KEY, state TEXT NOT NULL DEFAULT 'pending', cursor TEXT NOT NULL DEFAULT '', error TEXT);
|
|
11385
|
+
CREATE TABLE IF NOT EXISTS source_import_migration_counts (agent_id TEXT NOT NULL, job_id TEXT NOT NULL, total INTEGER NOT NULL DEFAULT 0, imported INTEGER NOT NULL DEFAULT 0, duplicate INTEGER NOT NULL DEFAULT 0, rejected INTEGER NOT NULL DEFAULT 0, pending INTEGER NOT NULL DEFAULT 0, PRIMARY KEY(agent_id,job_id)) WITHOUT ROWID;
|
|
11386
|
+
CREATE TABLE IF NOT EXISTS source_import_migration_streams (agent_id TEXT NOT NULL, stem TEXT NOT NULL, PRIMARY KEY(agent_id,stem)) WITHOUT ROWID;
|
|
11387
|
+
INSERT OR IGNORE INTO source_import_migrations(agent_id) SELECT DISTINCT agent_id FROM source_import_files WHERE storage_state = 'legacy';
|
|
11388
|
+
CREATE TABLE IF NOT EXISTS source_import_capacity (id INTEGER PRIMARY KEY CHECK (id = 1), reserved_bytes INTEGER NOT NULL DEFAULT 0 CHECK (reserved_bytes >= 0));
|
|
11389
|
+
INSERT OR IGNORE INTO source_import_capacity(id) VALUES (1);
|
|
11390
|
+
CREATE TRIGGER IF NOT EXISTS source_import_capacity_update AFTER UPDATE OF reserved_bytes ON source_import_files
|
|
11391
|
+
BEGIN UPDATE source_import_capacity SET reserved_bytes = reserved_bytes - OLD.reserved_bytes + NEW.reserved_bytes WHERE id = 1; END;
|
|
11392
|
+
CREATE TRIGGER IF NOT EXISTS source_import_capacity_delete AFTER DELETE ON source_import_files
|
|
11393
|
+
BEGIN UPDATE source_import_capacity SET reserved_bytes = reserved_bytes - OLD.reserved_bytes WHERE id = 1; END;
|
|
11394
|
+
CREATE TABLE IF NOT EXISTS source_import_chunks (
|
|
11395
|
+
file_id TEXT NOT NULL REFERENCES source_import_files(id),
|
|
11396
|
+
agent_id TEXT NOT NULL, generation INTEGER NOT NULL, byte_offset INTEGER NOT NULL,
|
|
11397
|
+
checksum TEXT NOT NULL, content BLOB NOT NULL CHECK (length(content) BETWEEN 1 AND 65536),
|
|
11398
|
+
PRIMARY KEY (agent_id, file_id, generation, byte_offset)
|
|
11399
|
+
) WITHOUT ROWID;
|
|
11400
|
+
CREATE INDEX IF NOT EXISTS idx_source_import_files_storage ON source_import_files(agent_id, storage_state, id);
|
|
11401
|
+
CREATE INDEX IF NOT EXISTS idx_source_import_cleanup ON source_import_jobs(agent_id,id) WHERE cleanup_state = 'pending';
|
|
11402
|
+
CREATE INDEX IF NOT EXISTS idx_source_import_records_file_pending ON source_import_records(agent_id, file_id, status, ordinal);
|
|
11403
|
+
CREATE INDEX IF NOT EXISTS idx_source_import_records_agent_cursor ON source_import_records(agent_id,id);
|
|
11404
|
+
CREATE INDEX IF NOT EXISTS idx_source_import_records_job_cursor ON source_import_records(job_id,agent_id,status,id);
|
|
11405
|
+
CREATE INDEX IF NOT EXISTS idx_source_import_files_agent_cursor ON source_import_files(agent_id,id);
|
|
11406
|
+
CREATE INDEX IF NOT EXISTS idx_session_transcripts_export ON session_transcripts(agent_id,created_at,session_key);
|
|
11407
|
+
CREATE INDEX IF NOT EXISTS idx_transcript_import_harness ON transcript_import_conversations(agent_id,harness);
|
|
11408
|
+
`);
|
|
11409
|
+
}
|
|
11350
11410
|
var MEMORIES_FTS_TOKENIZER = "unicode61";
|
|
11351
11411
|
var FTS_STATE_TABLE = "memories_fts_state";
|
|
11352
11412
|
function normalizeSql(sql) {
|
|
@@ -11462,7 +11522,7 @@ function memoriesFtsNeedsTokenizerRepair(sql) {
|
|
|
11462
11522
|
return true;
|
|
11463
11523
|
return !normalized.includes(`tokenize='${MEMORIES_FTS_TOKENIZER}'`);
|
|
11464
11524
|
}
|
|
11465
|
-
function
|
|
11525
|
+
function up2(db) {
|
|
11466
11526
|
db.exec(`
|
|
11467
11527
|
CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
11468
11528
|
version INTEGER PRIMARY KEY,
|
|
@@ -11560,7 +11620,7 @@ function addColumnIfMissing(db, table, column, definition) {
|
|
|
11560
11620
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11561
11621
|
}
|
|
11562
11622
|
}
|
|
11563
|
-
function
|
|
11623
|
+
function up3(db) {
|
|
11564
11624
|
addColumnIfMissing(db, "memories", "content_hash", "TEXT");
|
|
11565
11625
|
addColumnIfMissing(db, "memories", "normalized_content", "TEXT");
|
|
11566
11626
|
addColumnIfMissing(db, "memories", "is_deleted", "INTEGER DEFAULT 0");
|
|
@@ -11678,7 +11738,7 @@ function addColumnIfMissing2(db, table, column, definition) {
|
|
|
11678
11738
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11679
11739
|
return true;
|
|
11680
11740
|
}
|
|
11681
|
-
function
|
|
11741
|
+
function up4(db) {
|
|
11682
11742
|
addColumnIfMissing2(db, "memories", "why", "TEXT");
|
|
11683
11743
|
addColumnIfMissing2(db, "memories", "project", "TEXT");
|
|
11684
11744
|
db.exec(`DROP INDEX IF EXISTS idx_memories_content_hash`);
|
|
@@ -11715,7 +11775,7 @@ function addColumnIfMissing3(db, table, column, definition) {
|
|
|
11715
11775
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11716
11776
|
}
|
|
11717
11777
|
}
|
|
11718
|
-
function
|
|
11778
|
+
function up5(db) {
|
|
11719
11779
|
addColumnIfMissing3(db, "memory_history", "actor_type", "TEXT");
|
|
11720
11780
|
addColumnIfMissing3(db, "memory_history", "session_id", "TEXT");
|
|
11721
11781
|
addColumnIfMissing3(db, "memory_history", "request_id", "TEXT");
|
|
@@ -11748,7 +11808,7 @@ function addColumnIfMissing4(db, table, column, definition) {
|
|
|
11748
11808
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11749
11809
|
}
|
|
11750
11810
|
}
|
|
11751
|
-
function
|
|
11811
|
+
function up6(db) {
|
|
11752
11812
|
addColumnIfMissing4(db, "entities", "canonical_name", "TEXT");
|
|
11753
11813
|
addColumnIfMissing4(db, "entities", "mentions", "INTEGER DEFAULT 0");
|
|
11754
11814
|
addColumnIfMissing4(db, "entities", "embedding", "BLOB");
|
|
@@ -11765,7 +11825,7 @@ function hasColumn4(db, table, column) {
|
|
|
11765
11825
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
11766
11826
|
return rows.some((r2) => r2.name === column);
|
|
11767
11827
|
}
|
|
11768
|
-
function
|
|
11828
|
+
function up7(db) {
|
|
11769
11829
|
if (!hasColumn4(db, "memories", "idempotency_key")) {
|
|
11770
11830
|
db.exec("ALTER TABLE memories ADD COLUMN idempotency_key TEXT");
|
|
11771
11831
|
}
|
|
@@ -11780,7 +11840,7 @@ function hasColumn5(db, table, column) {
|
|
|
11780
11840
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
11781
11841
|
return rows.some((r2) => r2.name === column);
|
|
11782
11842
|
}
|
|
11783
|
-
function
|
|
11843
|
+
function up8(db) {
|
|
11784
11844
|
db.exec(`
|
|
11785
11845
|
CREATE TABLE IF NOT EXISTS documents (
|
|
11786
11846
|
id TEXT PRIMARY KEY,
|
|
@@ -11837,7 +11897,7 @@ function up7(db) {
|
|
|
11837
11897
|
db.exec("ALTER TABLE memory_jobs ADD COLUMN document_id TEXT");
|
|
11838
11898
|
}
|
|
11839
11899
|
}
|
|
11840
|
-
function
|
|
11900
|
+
function up9(db) {
|
|
11841
11901
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='embeddings'").all();
|
|
11842
11902
|
if (tables.length === 0)
|
|
11843
11903
|
return;
|
|
@@ -11854,7 +11914,7 @@ function up8(db) {
|
|
|
11854
11914
|
ON embeddings(content_hash)
|
|
11855
11915
|
`);
|
|
11856
11916
|
}
|
|
11857
|
-
function
|
|
11917
|
+
function up10(db) {
|
|
11858
11918
|
db.exec(`
|
|
11859
11919
|
CREATE TABLE IF NOT EXISTS summary_jobs (
|
|
11860
11920
|
id TEXT PRIMARY KEY,
|
|
@@ -11874,7 +11934,7 @@ function up9(db) {
|
|
|
11874
11934
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_summary_jobs_status
|
|
11875
11935
|
ON summary_jobs(status)`);
|
|
11876
11936
|
}
|
|
11877
|
-
function
|
|
11937
|
+
function up11(db) {
|
|
11878
11938
|
db.exec(`
|
|
11879
11939
|
CREATE TABLE IF NOT EXISTS umap_cache (
|
|
11880
11940
|
id INTEGER PRIMARY KEY,
|
|
@@ -11885,7 +11945,7 @@ function up10(db) {
|
|
|
11885
11945
|
)
|
|
11886
11946
|
`);
|
|
11887
11947
|
}
|
|
11888
|
-
function
|
|
11948
|
+
function up12(db) {
|
|
11889
11949
|
db.exec(`
|
|
11890
11950
|
CREATE TABLE IF NOT EXISTS session_scores (
|
|
11891
11951
|
id TEXT PRIMARY KEY,
|
|
@@ -11905,7 +11965,7 @@ function up11(db) {
|
|
|
11905
11965
|
ON session_scores(session_key);
|
|
11906
11966
|
`);
|
|
11907
11967
|
}
|
|
11908
|
-
function
|
|
11968
|
+
function up13(db) {
|
|
11909
11969
|
db.exec(`
|
|
11910
11970
|
CREATE TABLE IF NOT EXISTS scheduled_tasks (
|
|
11911
11971
|
id TEXT PRIMARY KEY,
|
|
@@ -11946,7 +12006,7 @@ function addColumnIfMissing5(db, table, column, definition) {
|
|
|
11946
12006
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11947
12007
|
}
|
|
11948
12008
|
}
|
|
11949
|
-
function
|
|
12009
|
+
function up14(db) {
|
|
11950
12010
|
db.exec(`
|
|
11951
12011
|
CREATE TABLE IF NOT EXISTS ingestion_jobs (
|
|
11952
12012
|
id TEXT PRIMARY KEY,
|
|
@@ -11972,7 +12032,7 @@ function up13(db) {
|
|
|
11972
12032
|
addColumnIfMissing5(db, "memories", "source_path", "TEXT");
|
|
11973
12033
|
addColumnIfMissing5(db, "memories", "source_section", "TEXT");
|
|
11974
12034
|
}
|
|
11975
|
-
function
|
|
12035
|
+
function up15(db) {
|
|
11976
12036
|
db.exec(`
|
|
11977
12037
|
CREATE TABLE IF NOT EXISTS telemetry_events (
|
|
11978
12038
|
id TEXT PRIMARY KEY,
|
|
@@ -11997,7 +12057,7 @@ function addColumnIfMissing6(db, table, column, definition) {
|
|
|
11997
12057
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11998
12058
|
}
|
|
11999
12059
|
}
|
|
12000
|
-
function
|
|
12060
|
+
function up16(db) {
|
|
12001
12061
|
db.exec(`
|
|
12002
12062
|
CREATE TABLE IF NOT EXISTS session_memories (
|
|
12003
12063
|
id TEXT PRIMARY KEY,
|
|
@@ -12024,7 +12084,7 @@ function up15(db) {
|
|
|
12024
12084
|
addColumnIfMissing6(db, "session_scores", "confidence", "REAL");
|
|
12025
12085
|
addColumnIfMissing6(db, "session_scores", "continuity_reasoning", "TEXT");
|
|
12026
12086
|
}
|
|
12027
|
-
function
|
|
12087
|
+
function up17(db) {
|
|
12028
12088
|
db.exec(`
|
|
12029
12089
|
CREATE TABLE IF NOT EXISTS session_checkpoints (
|
|
12030
12090
|
id TEXT PRIMARY KEY,
|
|
@@ -12046,7 +12106,7 @@ function up16(db) {
|
|
|
12046
12106
|
ON session_checkpoints(project_normalized, created_at DESC);
|
|
12047
12107
|
`);
|
|
12048
12108
|
}
|
|
12049
|
-
function
|
|
12109
|
+
function up18(db) {
|
|
12050
12110
|
const cols = db.prepare("PRAGMA table_info(scheduled_tasks)").all();
|
|
12051
12111
|
const colNames = new Set(cols.flatMap((c2) => typeof c2.name === "string" ? [c2.name] : []));
|
|
12052
12112
|
if (!colNames.has("skill_name")) {
|
|
@@ -12057,7 +12117,7 @@ function up17(db) {
|
|
|
12057
12117
|
CHECK (skill_mode IN ('inject', 'slash') OR skill_mode IS NULL)`);
|
|
12058
12118
|
}
|
|
12059
12119
|
}
|
|
12060
|
-
function
|
|
12120
|
+
function up19(db) {
|
|
12061
12121
|
const existing = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='skill_meta'").get();
|
|
12062
12122
|
if (existing)
|
|
12063
12123
|
return;
|
|
@@ -12089,7 +12149,7 @@ function up18(db) {
|
|
|
12089
12149
|
CREATE INDEX idx_skill_meta_source ON skill_meta(source);
|
|
12090
12150
|
`);
|
|
12091
12151
|
}
|
|
12092
|
-
function
|
|
12152
|
+
function up20(db) {
|
|
12093
12153
|
const entityCols = db.prepare("PRAGMA table_info(entities)").all();
|
|
12094
12154
|
const entityColNames = new Set(entityCols.flatMap((c2) => typeof c2.name === "string" ? [c2.name] : []));
|
|
12095
12155
|
if (!entityColNames.has("agent_id")) {
|
|
@@ -12174,13 +12234,13 @@ function addColumnIfMissing7(db, table, column, definition) {
|
|
|
12174
12234
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12175
12235
|
}
|
|
12176
12236
|
}
|
|
12177
|
-
function
|
|
12237
|
+
function up21(db) {
|
|
12178
12238
|
addColumnIfMissing7(db, "session_memories", "entity_slot", "INTEGER");
|
|
12179
12239
|
addColumnIfMissing7(db, "session_memories", "aspect_slot", "INTEGER");
|
|
12180
12240
|
addColumnIfMissing7(db, "session_memories", "is_constraint", "INTEGER NOT NULL DEFAULT 0");
|
|
12181
12241
|
addColumnIfMissing7(db, "session_memories", "structural_density", "INTEGER");
|
|
12182
12242
|
}
|
|
12183
|
-
function
|
|
12243
|
+
function up22(db) {
|
|
12184
12244
|
const columns = db.prepare("PRAGMA table_info(session_checkpoints)").all();
|
|
12185
12245
|
const columnNames = new Set(columns.flatMap((column) => typeof column.name === "string" ? [column.name] : []));
|
|
12186
12246
|
if (!columnNames.has("focal_entity_ids")) {
|
|
@@ -12205,25 +12265,25 @@ function addColumnIfMissing8(db, table, column, definition) {
|
|
|
12205
12265
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12206
12266
|
}
|
|
12207
12267
|
}
|
|
12208
|
-
function
|
|
12268
|
+
function up23(db) {
|
|
12209
12269
|
addColumnIfMissing8(db, "entities", "pinned", "INTEGER NOT NULL DEFAULT 0");
|
|
12210
12270
|
addColumnIfMissing8(db, "entities", "pinned_at", "TEXT");
|
|
12211
12271
|
db.exec("CREATE INDEX IF NOT EXISTS idx_entities_pinned ON entities(agent_id, pinned, pinned_at DESC)");
|
|
12212
12272
|
}
|
|
12213
|
-
function up23(_db) {}
|
|
12214
12273
|
function up24(_db) {}
|
|
12274
|
+
function up25(_db) {}
|
|
12215
12275
|
function addColumnIfMissing9(db, table, column, definition) {
|
|
12216
12276
|
const cols = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
12217
12277
|
if (!cols.some((c2) => c2.name === column)) {
|
|
12218
12278
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12219
12279
|
}
|
|
12220
12280
|
}
|
|
12221
|
-
function
|
|
12281
|
+
function up26(db) {
|
|
12222
12282
|
addColumnIfMissing9(db, "session_memories", "agent_relevance_score", "REAL");
|
|
12223
12283
|
addColumnIfMissing9(db, "session_memories", "agent_feedback_count", "INTEGER DEFAULT 0");
|
|
12224
12284
|
}
|
|
12225
|
-
function
|
|
12226
|
-
function
|
|
12285
|
+
function up27(_db) {}
|
|
12286
|
+
function up28(db) {
|
|
12227
12287
|
db.exec(`
|
|
12228
12288
|
UPDATE entities
|
|
12229
12289
|
SET canonical_name = REPLACE(REPLACE(REPLACE(
|
|
@@ -12232,7 +12292,7 @@ function up27(db) {
|
|
|
12232
12292
|
WHERE canonical_name IS NULL
|
|
12233
12293
|
`);
|
|
12234
12294
|
}
|
|
12235
|
-
function
|
|
12295
|
+
function up29(db) {
|
|
12236
12296
|
db.exec(`
|
|
12237
12297
|
CREATE TABLE IF NOT EXISTS memories_cold (
|
|
12238
12298
|
archive_id TEXT PRIMARY KEY,
|
|
@@ -12269,7 +12329,7 @@ function up28(db) {
|
|
|
12269
12329
|
CREATE INDEX IF NOT EXISTS idx_cold_source ON memories_cold(cold_source_id);
|
|
12270
12330
|
`);
|
|
12271
12331
|
}
|
|
12272
|
-
function
|
|
12332
|
+
function up30(db) {
|
|
12273
12333
|
db.exec(`
|
|
12274
12334
|
CREATE TABLE IF NOT EXISTS session_summaries (
|
|
12275
12335
|
id TEXT PRIMARY KEY,
|
|
@@ -12314,7 +12374,7 @@ function up29(db) {
|
|
|
12314
12374
|
WHERE session_key IS NOT NULL;
|
|
12315
12375
|
`);
|
|
12316
12376
|
}
|
|
12317
|
-
function
|
|
12377
|
+
function up31(db) {
|
|
12318
12378
|
db.exec(`
|
|
12319
12379
|
CREATE TABLE IF NOT EXISTS memory_jobs_new (
|
|
12320
12380
|
id TEXT PRIMARY KEY,
|
|
@@ -12359,7 +12419,7 @@ function up30(db) {
|
|
|
12359
12419
|
ON memory_jobs(failed_at);
|
|
12360
12420
|
`);
|
|
12361
12421
|
}
|
|
12362
|
-
function
|
|
12422
|
+
function up32(db) {
|
|
12363
12423
|
const depCols = db.prepare("PRAGMA table_info(entity_dependencies)").all();
|
|
12364
12424
|
if (!depCols.some((c2) => c2.name === "reason")) {
|
|
12365
12425
|
db.exec("ALTER TABLE entity_dependencies ADD COLUMN reason TEXT");
|
|
@@ -12369,7 +12429,7 @@ function up31(db) {
|
|
|
12369
12429
|
db.exec("ALTER TABLE entities ADD COLUMN last_synthesized_at TEXT");
|
|
12370
12430
|
}
|
|
12371
12431
|
}
|
|
12372
|
-
function
|
|
12432
|
+
function up33(db) {
|
|
12373
12433
|
const cols = db.prepare("PRAGMA table_info(embeddings)").all();
|
|
12374
12434
|
if (cols.length === 0)
|
|
12375
12435
|
return;
|
|
@@ -12377,14 +12437,14 @@ function up32(db) {
|
|
|
12377
12437
|
db.exec("ALTER TABLE embeddings ADD COLUMN vector BLOB");
|
|
12378
12438
|
}
|
|
12379
12439
|
}
|
|
12380
|
-
function
|
|
12440
|
+
function up34(db) {
|
|
12381
12441
|
const cols = db.prepare("PRAGMA table_info(memories)").all();
|
|
12382
12442
|
if (!cols.some((c2) => c2.name === "scope")) {
|
|
12383
12443
|
db.exec("ALTER TABLE memories ADD COLUMN scope TEXT DEFAULT NULL");
|
|
12384
12444
|
}
|
|
12385
12445
|
db.exec("CREATE INDEX IF NOT EXISTS idx_memories_scope ON memories(scope) WHERE scope IS NOT NULL");
|
|
12386
12446
|
}
|
|
12387
|
-
function
|
|
12447
|
+
function up35(db) {
|
|
12388
12448
|
db.exec("DROP INDEX IF EXISTS idx_memories_content_hash_unique");
|
|
12389
12449
|
db.exec(`
|
|
12390
12450
|
CREATE UNIQUE INDEX idx_memories_content_hash_unique
|
|
@@ -12392,7 +12452,7 @@ function up34(db) {
|
|
|
12392
12452
|
WHERE content_hash IS NOT NULL AND is_deleted = 0
|
|
12393
12453
|
`);
|
|
12394
12454
|
}
|
|
12395
|
-
function
|
|
12455
|
+
function up36(db) {
|
|
12396
12456
|
db.exec(`
|
|
12397
12457
|
CREATE VIRTUAL TABLE IF NOT EXISTS entities_fts USING fts5(
|
|
12398
12458
|
name, canonical_name,
|
|
@@ -12424,13 +12484,13 @@ function up35(db) {
|
|
|
12424
12484
|
END
|
|
12425
12485
|
`);
|
|
12426
12486
|
}
|
|
12427
|
-
function
|
|
12487
|
+
function up37(db) {
|
|
12428
12488
|
const cols = db.prepare("PRAGMA table_info(entity_dependencies)").all();
|
|
12429
12489
|
if (!cols.some((c2) => c2.name === "confidence")) {
|
|
12430
12490
|
db.exec("ALTER TABLE entity_dependencies ADD COLUMN confidence REAL DEFAULT 0.7");
|
|
12431
12491
|
}
|
|
12432
12492
|
}
|
|
12433
|
-
function
|
|
12493
|
+
function up38(db) {
|
|
12434
12494
|
db.exec(`
|
|
12435
12495
|
CREATE TABLE IF NOT EXISTS entity_communities (
|
|
12436
12496
|
id TEXT PRIMARY KEY,
|
|
@@ -12448,7 +12508,7 @@ function up37(db) {
|
|
|
12448
12508
|
db.exec("ALTER TABLE entities ADD COLUMN community_id TEXT REFERENCES entity_communities(id)");
|
|
12449
12509
|
}
|
|
12450
12510
|
}
|
|
12451
|
-
function
|
|
12511
|
+
function up39(db) {
|
|
12452
12512
|
db.exec(`
|
|
12453
12513
|
CREATE TABLE IF NOT EXISTS memory_hints (
|
|
12454
12514
|
id TEXT PRIMARY KEY,
|
|
@@ -12488,7 +12548,7 @@ function up38(db) {
|
|
|
12488
12548
|
END
|
|
12489
12549
|
`);
|
|
12490
12550
|
}
|
|
12491
|
-
function
|
|
12551
|
+
function up40(db) {
|
|
12492
12552
|
db.exec(`
|
|
12493
12553
|
DELETE FROM entity_dependencies
|
|
12494
12554
|
WHERE id NOT IN (
|
|
@@ -12506,7 +12566,7 @@ function up39(db) {
|
|
|
12506
12566
|
)
|
|
12507
12567
|
`);
|
|
12508
12568
|
}
|
|
12509
|
-
function
|
|
12569
|
+
function up41(db) {
|
|
12510
12570
|
db.exec(`
|
|
12511
12571
|
CREATE TABLE IF NOT EXISTS session_transcripts (
|
|
12512
12572
|
session_key TEXT PRIMARY KEY,
|
|
@@ -12529,7 +12589,7 @@ function addColumnIfMissing10(db, table, column, definition) {
|
|
|
12529
12589
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12530
12590
|
}
|
|
12531
12591
|
}
|
|
12532
|
-
function
|
|
12592
|
+
function up42(db) {
|
|
12533
12593
|
addColumnIfMissing10(db, "session_memories", "path_json", "TEXT");
|
|
12534
12594
|
db.exec(`
|
|
12535
12595
|
CREATE TABLE IF NOT EXISTS path_feedback_events (
|
|
@@ -12604,7 +12664,7 @@ function addColumnIfMissing11(db, table, column, definition) {
|
|
|
12604
12664
|
return;
|
|
12605
12665
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12606
12666
|
}
|
|
12607
|
-
function
|
|
12667
|
+
function up43(db) {
|
|
12608
12668
|
addColumnIfMissing11(db, "session_memories", "entity_slot", "INTEGER");
|
|
12609
12669
|
addColumnIfMissing11(db, "session_memories", "aspect_slot", "INTEGER");
|
|
12610
12670
|
addColumnIfMissing11(db, "session_memories", "is_constraint", "INTEGER NOT NULL DEFAULT 0");
|
|
@@ -12692,7 +12752,7 @@ function addColumnIfMissing12(db, table, column, definition) {
|
|
|
12692
12752
|
return;
|
|
12693
12753
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12694
12754
|
}
|
|
12695
|
-
function
|
|
12755
|
+
function up44(db) {
|
|
12696
12756
|
db.exec(`
|
|
12697
12757
|
CREATE TABLE IF NOT EXISTS agents (
|
|
12698
12758
|
id TEXT PRIMARY KEY,
|
|
@@ -12721,7 +12781,7 @@ function addColumnIfMissing13(db, table, column, definition) {
|
|
|
12721
12781
|
return;
|
|
12722
12782
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12723
12783
|
}
|
|
12724
|
-
function
|
|
12784
|
+
function up45(db) {
|
|
12725
12785
|
addColumnIfMissing13(db, "session_summaries", "source_type", "TEXT");
|
|
12726
12786
|
addColumnIfMissing13(db, "session_summaries", "source_ref", "TEXT");
|
|
12727
12787
|
addColumnIfMissing13(db, "session_summaries", "meta_json", "TEXT");
|
|
@@ -12747,7 +12807,7 @@ function addColumnIfMissing14(db, table, column, definition) {
|
|
|
12747
12807
|
return;
|
|
12748
12808
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12749
12809
|
}
|
|
12750
|
-
function
|
|
12810
|
+
function up46(db) {
|
|
12751
12811
|
addColumnIfMissing14(db, "session_transcripts", "updated_at", "TEXT");
|
|
12752
12812
|
addColumnIfMissing14(db, "summary_jobs", "agent_id", "TEXT NOT NULL DEFAULT 'default'");
|
|
12753
12813
|
addColumnIfMissing14(db, "session_scores", "agent_id", "TEXT NOT NULL DEFAULT 'default'");
|
|
@@ -12818,7 +12878,7 @@ function up45(db) {
|
|
|
12818
12878
|
ON memory_md_heads(lease_expires_at);
|
|
12819
12879
|
`);
|
|
12820
12880
|
}
|
|
12821
|
-
function
|
|
12881
|
+
function up47(db) {
|
|
12822
12882
|
db.exec(`
|
|
12823
12883
|
DROP INDEX IF EXISTS idx_summaries_session_depth;
|
|
12824
12884
|
|
|
@@ -12879,7 +12939,7 @@ function up46(db) {
|
|
|
12879
12939
|
AND COALESCE(source_type, 'summary') = 'summary';
|
|
12880
12940
|
`);
|
|
12881
12941
|
}
|
|
12882
|
-
function
|
|
12942
|
+
function up48(db) {
|
|
12883
12943
|
db.exec(`
|
|
12884
12944
|
DROP TRIGGER IF EXISTS session_transcripts_fts_ai;
|
|
12885
12945
|
DROP TRIGGER IF EXISTS session_transcripts_fts_ad;
|
|
@@ -12977,7 +13037,7 @@ function up47(db) {
|
|
|
12977
13037
|
AND COALESCE(source_type, 'summary') = 'summary';
|
|
12978
13038
|
`);
|
|
12979
13039
|
}
|
|
12980
|
-
function
|
|
13040
|
+
function up49(db) {
|
|
12981
13041
|
db.exec(`
|
|
12982
13042
|
CREATE TABLE IF NOT EXISTS memory_thread_heads (
|
|
12983
13043
|
agent_id TEXT NOT NULL DEFAULT 'default',
|
|
@@ -13095,7 +13155,7 @@ function up48(db) {
|
|
|
13095
13155
|
WHERE excluded.latest_at >= memory_thread_heads.latest_at;
|
|
13096
13156
|
`);
|
|
13097
13157
|
}
|
|
13098
|
-
function
|
|
13158
|
+
function up50(db) {
|
|
13099
13159
|
db.exec(`
|
|
13100
13160
|
CREATE TABLE IF NOT EXISTS session_extract_cursors (
|
|
13101
13161
|
session_key TEXT NOT NULL,
|
|
@@ -13112,7 +13172,7 @@ function hasTable(db, name) {
|
|
|
13112
13172
|
WHERE type = 'table' AND name = ?
|
|
13113
13173
|
LIMIT 1`).get(name) !== undefined;
|
|
13114
13174
|
}
|
|
13115
|
-
function
|
|
13175
|
+
function up51(db) {
|
|
13116
13176
|
db.exec(`
|
|
13117
13177
|
CREATE TABLE IF NOT EXISTS entity_dependency_history (
|
|
13118
13178
|
id TEXT PRIMARY KEY,
|
|
@@ -13282,7 +13342,7 @@ function addColumnIfMissing15(db, table, column, definition) {
|
|
|
13282
13342
|
return;
|
|
13283
13343
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
13284
13344
|
}
|
|
13285
|
-
function
|
|
13345
|
+
function up52(db) {
|
|
13286
13346
|
addColumnIfMissing15(db, "summary_jobs", "session_id", "TEXT");
|
|
13287
13347
|
addColumnIfMissing15(db, "summary_jobs", "trigger", "TEXT NOT NULL DEFAULT 'session_end'");
|
|
13288
13348
|
addColumnIfMissing15(db, "summary_jobs", "captured_at", "TEXT");
|
|
@@ -13374,7 +13434,7 @@ function up51(db) {
|
|
|
13374
13434
|
VALUES ('rebuild');
|
|
13375
13435
|
`);
|
|
13376
13436
|
}
|
|
13377
|
-
function
|
|
13437
|
+
function up53(db) {
|
|
13378
13438
|
db.exec(`
|
|
13379
13439
|
CREATE TABLE IF NOT EXISTS mcp_invocations (
|
|
13380
13440
|
id TEXT PRIMARY KEY,
|
|
@@ -13391,7 +13451,7 @@ function up52(db) {
|
|
|
13391
13451
|
CREATE INDEX IF NOT EXISTS idx_mcp_inv_agent ON mcp_invocations(agent_id, created_at);
|
|
13392
13452
|
`);
|
|
13393
13453
|
}
|
|
13394
|
-
function
|
|
13454
|
+
function up54(db) {
|
|
13395
13455
|
db.exec(`
|
|
13396
13456
|
CREATE TABLE IF NOT EXISTS skill_invocations (
|
|
13397
13457
|
id TEXT PRIMARY KEY,
|
|
@@ -13407,7 +13467,7 @@ function up53(db) {
|
|
|
13407
13467
|
CREATE INDEX IF NOT EXISTS idx_skill_inv_agent ON skill_invocations(agent_id, created_at);
|
|
13408
13468
|
`);
|
|
13409
13469
|
}
|
|
13410
|
-
function
|
|
13470
|
+
function up55(db) {
|
|
13411
13471
|
db.exec(`
|
|
13412
13472
|
CREATE TABLE IF NOT EXISTS task_scope_hints (
|
|
13413
13473
|
task_id TEXT PRIMARY KEY REFERENCES scheduled_tasks(id) ON DELETE CASCADE,
|
|
@@ -13438,7 +13498,7 @@ function up54(db) {
|
|
|
13438
13498
|
ON task_scope_hints(agent_id, updated_at);
|
|
13439
13499
|
`);
|
|
13440
13500
|
}
|
|
13441
|
-
function
|
|
13501
|
+
function up56(db) {
|
|
13442
13502
|
db.exec(`
|
|
13443
13503
|
CREATE TABLE IF NOT EXISTS dreaming_state (
|
|
13444
13504
|
agent_id TEXT PRIMARY KEY NOT NULL,
|
|
@@ -13481,7 +13541,7 @@ function ensureMemoriesScopeColumns(db) {
|
|
|
13481
13541
|
if (!names.has("scope"))
|
|
13482
13542
|
db.exec("ALTER TABLE memories ADD COLUMN scope TEXT");
|
|
13483
13543
|
}
|
|
13484
|
-
function
|
|
13544
|
+
function up57(db) {
|
|
13485
13545
|
ensureMemoriesScopeColumns(db);
|
|
13486
13546
|
db.exec("DROP INDEX IF EXISTS idx_memories_content_hash_unique");
|
|
13487
13547
|
db.exec(`
|
|
@@ -13494,20 +13554,20 @@ function up56(db) {
|
|
|
13494
13554
|
WHERE content_hash IS NOT NULL AND is_deleted = 0
|
|
13495
13555
|
`);
|
|
13496
13556
|
}
|
|
13497
|
-
function
|
|
13557
|
+
function up58(db) {
|
|
13498
13558
|
const sql = readMemoriesFtsSql(db);
|
|
13499
13559
|
if (sql !== null && !memoriesFtsNeedsTokenizerRepair(sql))
|
|
13500
13560
|
return;
|
|
13501
13561
|
recreateMemoriesFts(db);
|
|
13502
13562
|
}
|
|
13503
|
-
function
|
|
13563
|
+
function up59(db) {
|
|
13504
13564
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_entities_order
|
|
13505
13565
|
ON entities(agent_id, pinned DESC, pinned_at DESC, mentions DESC, updated_at DESC, name)`);
|
|
13506
13566
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_entities_extracted_mentions
|
|
13507
13567
|
ON entities(entity_type, mentions)
|
|
13508
13568
|
WHERE entity_type = 'extracted'`);
|
|
13509
13569
|
}
|
|
13510
|
-
function
|
|
13570
|
+
function up60(db) {
|
|
13511
13571
|
const cols = db.prepare("PRAGMA table_info(entity_attributes)").all();
|
|
13512
13572
|
if (!cols.some((col) => col.name === "claim_key")) {
|
|
13513
13573
|
db.exec("ALTER TABLE entity_attributes ADD COLUMN claim_key TEXT");
|
|
@@ -13516,7 +13576,7 @@ function up59(db) {
|
|
|
13516
13576
|
ON entity_attributes(agent_id, aspect_id, claim_key, status)
|
|
13517
13577
|
WHERE claim_key IS NOT NULL`);
|
|
13518
13578
|
}
|
|
13519
|
-
function
|
|
13579
|
+
function up61(db) {
|
|
13520
13580
|
const cols = db.prepare("PRAGMA table_info(entity_attributes)").all();
|
|
13521
13581
|
if (!cols.some((col) => col.name === "group_key")) {
|
|
13522
13582
|
db.exec("ALTER TABLE entity_attributes ADD COLUMN group_key TEXT");
|
|
@@ -13528,13 +13588,13 @@ function up60(db) {
|
|
|
13528
13588
|
ON entity_attributes(agent_id, aspect_id, group_key, claim_key, status)
|
|
13529
13589
|
WHERE claim_key IS NOT NULL`);
|
|
13530
13590
|
}
|
|
13531
|
-
function
|
|
13591
|
+
function up62(db) {
|
|
13532
13592
|
const cols = db.prepare("PRAGMA table_info(memory_artifacts)").all();
|
|
13533
13593
|
if (cols.some((col) => col.name === "source_mtime_ms"))
|
|
13534
13594
|
return;
|
|
13535
13595
|
db.exec("ALTER TABLE memory_artifacts ADD COLUMN source_mtime_ms REAL");
|
|
13536
13596
|
}
|
|
13537
|
-
function
|
|
13597
|
+
function up63(db) {
|
|
13538
13598
|
const cols = db.prepare("PRAGMA table_info(memory_artifacts)").all();
|
|
13539
13599
|
const names = new Set(cols.map((col) => col.name));
|
|
13540
13600
|
if (!names.has("is_deleted")) {
|
|
@@ -13548,7 +13608,7 @@ function up62(db) {
|
|
|
13548
13608
|
ON memory_artifacts(agent_id, is_deleted, deleted_at)
|
|
13549
13609
|
`);
|
|
13550
13610
|
}
|
|
13551
|
-
function
|
|
13611
|
+
function up64(db) {
|
|
13552
13612
|
db.exec("DROP TRIGGER IF EXISTS memories_au");
|
|
13553
13613
|
db.exec(`
|
|
13554
13614
|
CREATE TRIGGER IF NOT EXISTS memories_au AFTER UPDATE OF content ON memories BEGIN
|
|
@@ -13566,7 +13626,7 @@ function addColumnIfMissing16(db, table, column, definition) {
|
|
|
13566
13626
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
13567
13627
|
}
|
|
13568
13628
|
}
|
|
13569
|
-
function
|
|
13629
|
+
function up65(db) {
|
|
13570
13630
|
for (const table of ["entities", "entity_communities", "entity_attributes", "entity_dependencies"]) {
|
|
13571
13631
|
addColumnIfMissing16(db, table, "source_id", "TEXT");
|
|
13572
13632
|
addColumnIfMissing16(db, table, "source_kind", "TEXT");
|
|
@@ -13586,7 +13646,7 @@ function hasColumn7(db, table, column) {
|
|
|
13586
13646
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
13587
13647
|
return rows.some((row) => row.name === column);
|
|
13588
13648
|
}
|
|
13589
|
-
function
|
|
13649
|
+
function up66(db) {
|
|
13590
13650
|
if (!hasTable2(db, "embeddings"))
|
|
13591
13651
|
return;
|
|
13592
13652
|
if (!hasColumn7(db, "embeddings", "agent_id")) {
|
|
@@ -13594,7 +13654,7 @@ function up65(db) {
|
|
|
13594
13654
|
}
|
|
13595
13655
|
db.exec("CREATE INDEX IF NOT EXISTS idx_embeddings_agent_source ON embeddings(agent_id, source_type, source_id)");
|
|
13596
13656
|
}
|
|
13597
|
-
function
|
|
13657
|
+
function up67(db) {
|
|
13598
13658
|
db.exec(`
|
|
13599
13659
|
CREATE TABLE IF NOT EXISTS memory_search_telemetry (
|
|
13600
13660
|
id TEXT PRIMARY KEY,
|
|
@@ -13635,7 +13695,7 @@ function addColumnIfMissing17(db, table, column, definition) {
|
|
|
13635
13695
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
13636
13696
|
}
|
|
13637
13697
|
}
|
|
13638
|
-
function
|
|
13698
|
+
function up68(db) {
|
|
13639
13699
|
db.exec(`
|
|
13640
13700
|
CREATE TABLE IF NOT EXISTS ontology_proposals (
|
|
13641
13701
|
id TEXT PRIMARY KEY,
|
|
@@ -13678,7 +13738,7 @@ function up67(db) {
|
|
|
13678
13738
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_${table}_proposal ON ${table}(agent_id, proposal_id)`);
|
|
13679
13739
|
}
|
|
13680
13740
|
}
|
|
13681
|
-
function
|
|
13741
|
+
function up69(db) {
|
|
13682
13742
|
db.exec(`
|
|
13683
13743
|
CREATE TABLE IF NOT EXISTS daily_reflections (
|
|
13684
13744
|
id TEXT PRIMARY KEY,
|
|
@@ -13705,7 +13765,7 @@ function up68(db) {
|
|
|
13705
13765
|
WHERE content_key IS NOT NULL;
|
|
13706
13766
|
`);
|
|
13707
13767
|
}
|
|
13708
|
-
function
|
|
13768
|
+
function up70(db) {
|
|
13709
13769
|
const cols = db.prepare("PRAGMA table_info(daily_reflections)").all();
|
|
13710
13770
|
const colNames = new Set(cols.flatMap((c2) => typeof c2.name === "string" ? [c2.name] : []));
|
|
13711
13771
|
if (!colNames.has("content_key")) {
|
|
@@ -13742,7 +13802,7 @@ function backfillVersionRoots(db) {
|
|
|
13742
13802
|
WHERE version_root_id IS NULL
|
|
13743
13803
|
`);
|
|
13744
13804
|
}
|
|
13745
|
-
function
|
|
13805
|
+
function up71(db) {
|
|
13746
13806
|
for (const table of ["entities", "entity_aspects", "entity_dependencies"]) {
|
|
13747
13807
|
addColumnIfMissing18(db, table, "status", "TEXT NOT NULL DEFAULT 'active'");
|
|
13748
13808
|
addColumnIfMissing18(db, table, "archived_at", "TEXT");
|
|
@@ -13777,7 +13837,7 @@ function up70(db) {
|
|
|
13777
13837
|
ON entity_aspects(agent_id, proposal_id);
|
|
13778
13838
|
`);
|
|
13779
13839
|
}
|
|
13780
|
-
function
|
|
13840
|
+
function up72(db) {
|
|
13781
13841
|
db.exec(`
|
|
13782
13842
|
CREATE TABLE IF NOT EXISTS epistemic_assertions (
|
|
13783
13843
|
id TEXT PRIMARY KEY,
|
|
@@ -13833,7 +13893,7 @@ function ensureMemoriesScopeColumns2(db) {
|
|
|
13833
13893
|
if (!names.has("runtime_path"))
|
|
13834
13894
|
db.exec("ALTER TABLE memories ADD COLUMN runtime_path TEXT");
|
|
13835
13895
|
}
|
|
13836
|
-
function
|
|
13896
|
+
function up73(db) {
|
|
13837
13897
|
ensureMemoriesScopeColumns2(db);
|
|
13838
13898
|
db.exec("DROP INDEX IF EXISTS idx_memories_idempotency_key");
|
|
13839
13899
|
db.exec(`
|
|
@@ -13847,7 +13907,7 @@ function up72(db) {
|
|
|
13847
13907
|
WHERE idempotency_key IS NOT NULL AND is_deleted = 0
|
|
13848
13908
|
`);
|
|
13849
13909
|
}
|
|
13850
|
-
function
|
|
13910
|
+
function up74(db) {
|
|
13851
13911
|
db.exec(`
|
|
13852
13912
|
CREATE TABLE IF NOT EXISTS session_context_epochs (
|
|
13853
13913
|
session_key TEXT NOT NULL,
|
|
@@ -13882,7 +13942,7 @@ function up73(db) {
|
|
|
13882
13942
|
ON session_recall_events(item_kind, item_id, created_at DESC);
|
|
13883
13943
|
`);
|
|
13884
13944
|
}
|
|
13885
|
-
function
|
|
13945
|
+
function up75(db) {
|
|
13886
13946
|
db.exec(`
|
|
13887
13947
|
CREATE TABLE IF NOT EXISTS aggregate_memory_sources (
|
|
13888
13948
|
aggregate_memory_id TEXT NOT NULL,
|
|
@@ -13901,7 +13961,7 @@ function addColumnIfMissing19(db, table, column, definition) {
|
|
|
13901
13961
|
return;
|
|
13902
13962
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
13903
13963
|
}
|
|
13904
|
-
function
|
|
13964
|
+
function up76(db) {
|
|
13905
13965
|
addColumnIfMissing19(db, "memory_artifacts", "source_id", "TEXT");
|
|
13906
13966
|
addColumnIfMissing19(db, "memory_artifacts", "source_root", "TEXT");
|
|
13907
13967
|
addColumnIfMissing19(db, "memory_artifacts", "source_external_id", "TEXT");
|
|
@@ -13914,7 +13974,7 @@ function up75(db) {
|
|
|
13914
13974
|
ON memory_artifacts(agent_id, source_id, source_root);
|
|
13915
13975
|
`);
|
|
13916
13976
|
}
|
|
13917
|
-
function
|
|
13977
|
+
function up77(db) {
|
|
13918
13978
|
db.exec(`
|
|
13919
13979
|
CREATE TABLE IF NOT EXISTS temporal_edges (
|
|
13920
13980
|
id TEXT PRIMARY KEY,
|
|
@@ -13937,7 +13997,7 @@ function up76(db) {
|
|
|
13937
13997
|
ON temporal_edges(agent_id, subject_type, subject_id);
|
|
13938
13998
|
`);
|
|
13939
13999
|
}
|
|
13940
|
-
function
|
|
14000
|
+
function up78(db) {
|
|
13941
14001
|
db.exec(`
|
|
13942
14002
|
CREATE TABLE IF NOT EXISTS entity_aliases (
|
|
13943
14003
|
id TEXT PRIMARY KEY,
|
|
@@ -13961,7 +14021,7 @@ function up77(db) {
|
|
|
13961
14021
|
ON entity_aliases(agent_id, canonical_alias, status);
|
|
13962
14022
|
`);
|
|
13963
14023
|
}
|
|
13964
|
-
function
|
|
14024
|
+
function up79(db) {
|
|
13965
14025
|
db.exec(`
|
|
13966
14026
|
CREATE TABLE IF NOT EXISTS api_keys (
|
|
13967
14027
|
id TEXT PRIMARY KEY,
|
|
@@ -13989,7 +14049,7 @@ function up78(db) {
|
|
|
13989
14049
|
ON api_keys(connector, harness);
|
|
13990
14050
|
`);
|
|
13991
14051
|
}
|
|
13992
|
-
function
|
|
14052
|
+
function up80(db) {
|
|
13993
14053
|
db.exec(`
|
|
13994
14054
|
CREATE TABLE IF NOT EXISTS transcript_capture_jobs (
|
|
13995
14055
|
id TEXT PRIMARY KEY,
|
|
@@ -14024,7 +14084,7 @@ function hasColumn10(db, table, column) {
|
|
|
14024
14084
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
14025
14085
|
return rows.some((row) => row.name === column);
|
|
14026
14086
|
}
|
|
14027
|
-
function
|
|
14087
|
+
function up81(db) {
|
|
14028
14088
|
if (!hasColumn10(db, "documents", "agent_id")) {
|
|
14029
14089
|
db.exec("ALTER TABLE documents ADD COLUMN agent_id TEXT NOT NULL DEFAULT 'default'");
|
|
14030
14090
|
}
|
|
@@ -14110,7 +14170,7 @@ function up80(db) {
|
|
|
14110
14170
|
db.exec("CREATE INDEX IF NOT EXISTS idx_documents_agent_project ON documents(agent_id, project)");
|
|
14111
14171
|
db.exec("CREATE INDEX IF NOT EXISTS idx_documents_source_scope ON documents(source_url, agent_id, project)");
|
|
14112
14172
|
}
|
|
14113
|
-
function
|
|
14173
|
+
function up82(db) {
|
|
14114
14174
|
db.exec(`
|
|
14115
14175
|
CREATE TABLE IF NOT EXISTS aggregate_evidence_sources (
|
|
14116
14176
|
aggregate_memory_id TEXT NOT NULL,
|
|
@@ -14132,7 +14192,7 @@ function hasColumn11(db, table, column) {
|
|
|
14132
14192
|
return rows.some((row) => row.name === column);
|
|
14133
14193
|
}
|
|
14134
14194
|
var COLUMNS = ["harness", "session_id", "tool_use_id", "cwd", "origin", "args"];
|
|
14135
|
-
function
|
|
14195
|
+
function up83(db) {
|
|
14136
14196
|
for (const column of COLUMNS) {
|
|
14137
14197
|
if (!hasColumn11(db, "skill_invocations", column)) {
|
|
14138
14198
|
db.exec(`ALTER TABLE skill_invocations ADD COLUMN ${column} TEXT`);
|
|
@@ -14213,7 +14273,7 @@ function documentScopeColumnsPreservingExisting(db) {
|
|
|
14213
14273
|
`);
|
|
14214
14274
|
}
|
|
14215
14275
|
try {
|
|
14216
|
-
|
|
14276
|
+
up81(db);
|
|
14217
14277
|
if (preserveAgentId) {
|
|
14218
14278
|
db.exec(`
|
|
14219
14279
|
UPDATE documents
|
|
@@ -14233,12 +14293,12 @@ function documentScopeColumnsPreservingExisting(db) {
|
|
|
14233
14293
|
db.exec("DROP TABLE IF EXISTS temp.__signet_doc_project_guard");
|
|
14234
14294
|
}
|
|
14235
14295
|
}
|
|
14236
|
-
function
|
|
14237
|
-
|
|
14296
|
+
function up84(db) {
|
|
14297
|
+
up80(db);
|
|
14238
14298
|
if (hasTable3(db, "documents")) {
|
|
14239
14299
|
documentScopeColumnsPreservingExisting(db);
|
|
14240
14300
|
}
|
|
14241
|
-
|
|
14301
|
+
up82(db);
|
|
14242
14302
|
addColumnIfMissing20(db, "memories", "superseded_by", "TEXT");
|
|
14243
14303
|
addColumnIfMissing20(db, "memories", "superseded_at", "TEXT");
|
|
14244
14304
|
addColumnIfMissing20(db, "memories", "superseded_reason", "TEXT");
|
|
@@ -14295,7 +14355,7 @@ function up83(db) {
|
|
|
14295
14355
|
AND ${sourceAgentId} = ${targetAgentId}
|
|
14296
14356
|
`);
|
|
14297
14357
|
}
|
|
14298
|
-
function
|
|
14358
|
+
function up85(db) {
|
|
14299
14359
|
db.exec(`
|
|
14300
14360
|
CREATE TABLE IF NOT EXISTS legacy_markdown_imports (
|
|
14301
14361
|
path TEXT PRIMARY KEY,
|
|
@@ -14325,7 +14385,7 @@ function up84(db) {
|
|
|
14325
14385
|
ON legacy_markdown_chunks(memory_id);
|
|
14326
14386
|
`);
|
|
14327
14387
|
}
|
|
14328
|
-
function
|
|
14388
|
+
function up86(db) {
|
|
14329
14389
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name IN ('relations', 'entity_dependencies')").all();
|
|
14330
14390
|
const tableNames = new Set(tables.map((r2) => String(r2.name)));
|
|
14331
14391
|
if (!tableNames.has("relations") || !tableNames.has("entity_dependencies"))
|
|
@@ -14384,7 +14444,7 @@ function addColumnIfMissing21(db, table, column, definition) {
|
|
|
14384
14444
|
return;
|
|
14385
14445
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
14386
14446
|
}
|
|
14387
|
-
function
|
|
14447
|
+
function up87(db) {
|
|
14388
14448
|
addColumnIfMissing21(db, "summary_jobs", "content_hash", "TEXT");
|
|
14389
14449
|
db.exec(`
|
|
14390
14450
|
CREATE INDEX IF NOT EXISTS idx_summary_jobs_agent_session_content_hash
|
|
@@ -14397,14 +14457,14 @@ function addColumnIfMissing22(db, table, column, definition) {
|
|
|
14397
14457
|
return;
|
|
14398
14458
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
14399
14459
|
}
|
|
14400
|
-
function
|
|
14460
|
+
function up88(db) {
|
|
14401
14461
|
addColumnIfMissing22(db, "summary_jobs", "boundary_reason", "TEXT");
|
|
14402
14462
|
db.exec(`
|
|
14403
14463
|
CREATE INDEX IF NOT EXISTS idx_summary_jobs_boundary_reason
|
|
14404
14464
|
ON summary_jobs(agent_id, session_key, boundary_reason)
|
|
14405
14465
|
`);
|
|
14406
14466
|
}
|
|
14407
|
-
function
|
|
14467
|
+
function up89(db) {
|
|
14408
14468
|
db.exec(`
|
|
14409
14469
|
CREATE TABLE IF NOT EXISTS transcript_recovery_files (
|
|
14410
14470
|
agent_id TEXT NOT NULL,
|
|
@@ -14422,7 +14482,7 @@ function up88(db) {
|
|
|
14422
14482
|
ON transcript_capture_jobs(agent_id, session_id, status);
|
|
14423
14483
|
`);
|
|
14424
14484
|
}
|
|
14425
|
-
function
|
|
14485
|
+
function up90(db) {
|
|
14426
14486
|
db.exec(`
|
|
14427
14487
|
CREATE TABLE IF NOT EXISTS job_cancellations (
|
|
14428
14488
|
id TEXT PRIMARY KEY,
|
|
@@ -14450,7 +14510,7 @@ function indexExists(db, table, indexName) {
|
|
|
14450
14510
|
const rows = db.prepare(`PRAGMA index_list(${table})`).all();
|
|
14451
14511
|
return rows.some((row) => row.name === indexName);
|
|
14452
14512
|
}
|
|
14453
|
-
function
|
|
14513
|
+
function up91(db) {
|
|
14454
14514
|
db.exec(`
|
|
14455
14515
|
CREATE TABLE IF NOT EXISTS job_archive (
|
|
14456
14516
|
id TEXT PRIMARY KEY,
|
|
@@ -14477,7 +14537,7 @@ function indexExists2(db, table, indexName) {
|
|
|
14477
14537
|
const rows = db.prepare(`PRAGMA index_list(${table})`).all();
|
|
14478
14538
|
return rows.some((row) => row.name === indexName);
|
|
14479
14539
|
}
|
|
14480
|
-
function
|
|
14540
|
+
function up92(db) {
|
|
14481
14541
|
db.exec(`
|
|
14482
14542
|
CREATE TABLE IF NOT EXISTS embedding_index_state (
|
|
14483
14543
|
id INTEGER PRIMARY KEY CHECK (id = 1),
|
|
@@ -14490,7 +14550,7 @@ function up91(db) {
|
|
|
14490
14550
|
)
|
|
14491
14551
|
`);
|
|
14492
14552
|
}
|
|
14493
|
-
function
|
|
14553
|
+
function up93(db) {
|
|
14494
14554
|
db.exec(`
|
|
14495
14555
|
CREATE TABLE IF NOT EXISTS embeddings_staging (
|
|
14496
14556
|
id TEXT PRIMARY KEY,
|
|
@@ -14509,7 +14569,7 @@ function up92(db) {
|
|
|
14509
14569
|
ON embeddings_staging(agent_id, source_type, source_id);
|
|
14510
14570
|
`);
|
|
14511
14571
|
}
|
|
14512
|
-
function
|
|
14572
|
+
function up94(db) {
|
|
14513
14573
|
const columns = db.prepare("PRAGMA table_info(dreaming_state)").all();
|
|
14514
14574
|
if (!columns.some((column) => column.name === "evidence_cursor")) {
|
|
14515
14575
|
db.exec("ALTER TABLE dreaming_state ADD COLUMN evidence_cursor TEXT");
|
|
@@ -14520,7 +14580,7 @@ function hasColumn13(db, table, column) {
|
|
|
14520
14580
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
14521
14581
|
return rows.some((r2) => r2.name === column);
|
|
14522
14582
|
}
|
|
14523
|
-
function
|
|
14583
|
+
function up95(db) {
|
|
14524
14584
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name = 'memories'").all();
|
|
14525
14585
|
if (tables.length === 0)
|
|
14526
14586
|
return;
|
|
@@ -14545,23 +14605,23 @@ function up94(db) {
|
|
|
14545
14605
|
function hasColumn14(db, table, column) {
|
|
14546
14606
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
14547
14607
|
}
|
|
14548
|
-
function
|
|
14608
|
+
function up96(db) {
|
|
14549
14609
|
const hasMemories = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'memories'").get();
|
|
14550
14610
|
if (!hasMemories || !hasColumn14(db, "memories", "memory_kind") || !hasColumn14(db, "memories", "type"))
|
|
14551
14611
|
return;
|
|
14552
14612
|
db.exec("UPDATE memories SET memory_kind = NULL WHERE type = 'session_summary'");
|
|
14553
14613
|
}
|
|
14554
|
-
function
|
|
14614
|
+
function up97(db) {
|
|
14555
14615
|
db.exec("DROP TABLE IF EXISTS ingestion_jobs");
|
|
14556
14616
|
}
|
|
14557
|
-
function
|
|
14617
|
+
function up98(db) {
|
|
14558
14618
|
const columns = db.prepare("PRAGMA table_info(dreaming_state)").all();
|
|
14559
14619
|
if (!columns.some((column) => column.name === "last_failure_at")) {
|
|
14560
14620
|
db.exec("ALTER TABLE dreaming_state ADD COLUMN last_failure_at TEXT");
|
|
14561
14621
|
}
|
|
14562
14622
|
db.exec("UPDATE dreaming_state SET last_failure_at = updated_at WHERE consecutive_failures > 0 AND last_failure_at IS NULL");
|
|
14563
14623
|
}
|
|
14564
|
-
function
|
|
14624
|
+
function up99(db) {
|
|
14565
14625
|
db.exec(`
|
|
14566
14626
|
CREATE TABLE IF NOT EXISTS dreaming_evidence_exclusions (
|
|
14567
14627
|
agent_id TEXT NOT NULL,
|
|
@@ -14578,7 +14638,7 @@ function up98(db) {
|
|
|
14578
14638
|
ON dreaming_evidence_exclusions (agent_id, resolved_at, requeue_requested_at, excluded_at DESC);
|
|
14579
14639
|
`);
|
|
14580
14640
|
}
|
|
14581
|
-
function
|
|
14641
|
+
function up100(db) {
|
|
14582
14642
|
db.exec(`
|
|
14583
14643
|
CREATE TABLE IF NOT EXISTS dreaming_tool_calls (
|
|
14584
14644
|
id TEXT PRIMARY KEY,
|
|
@@ -14598,7 +14658,7 @@ function up99(db) {
|
|
|
14598
14658
|
ON dreaming_tool_calls (agent_id, pass_id, sequence ASC);
|
|
14599
14659
|
`);
|
|
14600
14660
|
}
|
|
14601
|
-
function
|
|
14661
|
+
function up101(db) {
|
|
14602
14662
|
const columns = db.prepare("PRAGMA table_info(dreaming_passes)").all();
|
|
14603
14663
|
if (!columns.some((column) => column.name === "evidence_window_json")) {
|
|
14604
14664
|
db.exec("ALTER TABLE dreaming_passes ADD COLUMN evidence_window_json TEXT");
|
|
@@ -14607,7 +14667,7 @@ function up100(db) {
|
|
|
14607
14667
|
db.exec("ALTER TABLE dreaming_passes ADD COLUMN runbook_json TEXT");
|
|
14608
14668
|
}
|
|
14609
14669
|
}
|
|
14610
|
-
function
|
|
14670
|
+
function up102(db) {
|
|
14611
14671
|
db.exec(`
|
|
14612
14672
|
CREATE TABLE IF NOT EXISTS dreaming_attention (
|
|
14613
14673
|
id TEXT PRIMARY KEY,
|
|
@@ -14629,7 +14689,7 @@ function up101(db) {
|
|
|
14629
14689
|
function hasColumn15(db, table, column) {
|
|
14630
14690
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
14631
14691
|
}
|
|
14632
|
-
function
|
|
14692
|
+
function up103(db) {
|
|
14633
14693
|
const requiredMemoryColumns = [
|
|
14634
14694
|
"content_hash",
|
|
14635
14695
|
"normalized_content",
|
|
@@ -14680,7 +14740,7 @@ function up102(db) {
|
|
|
14680
14740
|
WHERE EXISTS (SELECT 1 FROM memory_entity_mentions WHERE entity_id = entities.id)
|
|
14681
14741
|
`);
|
|
14682
14742
|
}
|
|
14683
|
-
function
|
|
14743
|
+
function up104(db) {
|
|
14684
14744
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name IN ('memories', 'entity_attributes')").all();
|
|
14685
14745
|
if (tables.length !== 2)
|
|
14686
14746
|
return;
|
|
@@ -14703,7 +14763,7 @@ function tableExists(db, table) {
|
|
|
14703
14763
|
function hasColumn16(db, table, column) {
|
|
14704
14764
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
14705
14765
|
}
|
|
14706
|
-
function
|
|
14766
|
+
function up105(db) {
|
|
14707
14767
|
db.exec(`
|
|
14708
14768
|
CREATE TABLE IF NOT EXISTS derived_memory_sources (
|
|
14709
14769
|
derived_memory_id TEXT NOT NULL,
|
|
@@ -14746,7 +14806,7 @@ function up104(db) {
|
|
|
14746
14806
|
`);
|
|
14747
14807
|
}
|
|
14748
14808
|
}
|
|
14749
|
-
function
|
|
14809
|
+
function up106(db) {
|
|
14750
14810
|
db.exec(`
|
|
14751
14811
|
DROP TRIGGER IF EXISTS entities_fts_ai;
|
|
14752
14812
|
DROP TRIGGER IF EXISTS entities_fts_ad;
|
|
@@ -14835,7 +14895,7 @@ function up105(db) {
|
|
|
14835
14895
|
function hasColumn17(db, table, column) {
|
|
14836
14896
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
14837
14897
|
}
|
|
14838
|
-
function
|
|
14898
|
+
function up107(db) {
|
|
14839
14899
|
if (!hasColumn17(db, "memories", "review_after")) {
|
|
14840
14900
|
db.exec("ALTER TABLE memories ADD COLUMN review_after TEXT;");
|
|
14841
14901
|
}
|
|
@@ -14851,14 +14911,14 @@ var TOKEN_COLUMNS = [
|
|
|
14851
14911
|
["tokens_cache_write", "INTEGER"],
|
|
14852
14912
|
["tokens_cost", "REAL"]
|
|
14853
14913
|
];
|
|
14854
|
-
function
|
|
14914
|
+
function up108(db) {
|
|
14855
14915
|
for (const [column, type] of TOKEN_COLUMNS) {
|
|
14856
14916
|
if (!hasColumn18(db, "dreaming_passes", column)) {
|
|
14857
14917
|
db.exec(`ALTER TABLE dreaming_passes ADD COLUMN ${column} ${type};`);
|
|
14858
14918
|
}
|
|
14859
14919
|
}
|
|
14860
14920
|
}
|
|
14861
|
-
function
|
|
14921
|
+
function up109(db) {
|
|
14862
14922
|
db.exec(`
|
|
14863
14923
|
CREATE TABLE IF NOT EXISTS embedding_usage (
|
|
14864
14924
|
day TEXT NOT NULL,
|
|
@@ -14871,7 +14931,7 @@ function up108(db) {
|
|
|
14871
14931
|
);
|
|
14872
14932
|
`);
|
|
14873
14933
|
}
|
|
14874
|
-
function
|
|
14934
|
+
function up110(db) {
|
|
14875
14935
|
db.exec(`
|
|
14876
14936
|
CREATE TABLE IF NOT EXISTS telemetry_install (
|
|
14877
14937
|
id TEXT PRIMARY KEY,
|
|
@@ -14879,7 +14939,7 @@ function up109(db) {
|
|
|
14879
14939
|
);
|
|
14880
14940
|
`);
|
|
14881
14941
|
}
|
|
14882
|
-
function
|
|
14942
|
+
function up111(db) {
|
|
14883
14943
|
db.exec(`
|
|
14884
14944
|
CREATE INDEX IF NOT EXISTS idx_memory_entity_mentions_entity_memory
|
|
14885
14945
|
ON memory_entity_mentions(entity_id, memory_id);
|
|
@@ -14890,7 +14950,7 @@ function hasColumn19(db, table, column) {
|
|
|
14890
14950
|
return rows.some((row) => row.name === column);
|
|
14891
14951
|
}
|
|
14892
14952
|
var COLUMNS2 = ["first_remember_at", "first_recall_at"];
|
|
14893
|
-
function
|
|
14953
|
+
function up112(db) {
|
|
14894
14954
|
for (const column of COLUMNS2) {
|
|
14895
14955
|
if (!hasColumn19(db, "telemetry_install", column)) {
|
|
14896
14956
|
db.exec(`ALTER TABLE telemetry_install ADD COLUMN ${column} TEXT`);
|
|
@@ -14906,7 +14966,7 @@ function addColumnIfMissing23(db, column, definition) {
|
|
|
14906
14966
|
db.exec(`ALTER TABLE telemetry_events ADD COLUMN ${column} ${definition}`);
|
|
14907
14967
|
}
|
|
14908
14968
|
}
|
|
14909
|
-
function
|
|
14969
|
+
function up113(db) {
|
|
14910
14970
|
addColumnIfMissing23(db, "source", "TEXT NOT NULL DEFAULT 'daemon'");
|
|
14911
14971
|
addColumnIfMissing23(db, "claim_token", "TEXT");
|
|
14912
14972
|
addColumnIfMissing23(db, "claimed_at", "TEXT");
|
|
@@ -14915,7 +14975,7 @@ function up112(db) {
|
|
|
14915
14975
|
ON telemetry_events(source, sent_to_posthog, claimed_at, timestamp);
|
|
14916
14976
|
`);
|
|
14917
14977
|
}
|
|
14918
|
-
function
|
|
14978
|
+
function up114(db) {
|
|
14919
14979
|
db.exec(`
|
|
14920
14980
|
CREATE TABLE IF NOT EXISTS session_claims (
|
|
14921
14981
|
session_key TEXT NOT NULL,
|
|
@@ -14936,7 +14996,7 @@ function up113(db) {
|
|
|
14936
14996
|
ON session_claims(agent_id, state, expires_at);
|
|
14937
14997
|
`);
|
|
14938
14998
|
}
|
|
14939
|
-
function
|
|
14999
|
+
function up115(db) {
|
|
14940
15000
|
const table = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'entity_attributes'").get();
|
|
14941
15001
|
if (table == null)
|
|
14942
15002
|
return;
|
|
@@ -14945,7 +15005,7 @@ function up114(db) {
|
|
|
14945
15005
|
ON entity_attributes(memory_id, agent_id, status, importance);
|
|
14946
15006
|
`);
|
|
14947
15007
|
}
|
|
14948
|
-
function
|
|
15008
|
+
function up116(db) {
|
|
14949
15009
|
db.exec(`
|
|
14950
15010
|
CREATE TABLE IF NOT EXISTS cross_agent_messages (
|
|
14951
15011
|
id TEXT PRIMARY KEY,
|
|
@@ -15002,7 +15062,7 @@ function addColumnIfMissing24(db, column, definition) {
|
|
|
15002
15062
|
db.exec(`ALTER TABLE cross_agent_messages ADD COLUMN ${column} ${definition}`);
|
|
15003
15063
|
}
|
|
15004
15064
|
}
|
|
15005
|
-
function
|
|
15065
|
+
function up117(db) {
|
|
15006
15066
|
const table = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'cross_agent_messages'").get();
|
|
15007
15067
|
if (table == null)
|
|
15008
15068
|
return;
|
|
@@ -15203,7 +15263,7 @@ function backfillTranscriptsFromSummaryJobs(db) {
|
|
|
15203
15263
|
insert.run(...values);
|
|
15204
15264
|
}
|
|
15205
15265
|
}
|
|
15206
|
-
function
|
|
15266
|
+
function up118(db) {
|
|
15207
15267
|
if (!hasTable4(db, "session_transcripts"))
|
|
15208
15268
|
return;
|
|
15209
15269
|
addColumnIfMissing25(db, "session_transcripts", "completed_at", "TEXT");
|
|
@@ -15256,7 +15316,7 @@ function up117(db) {
|
|
|
15256
15316
|
ON session_transcripts(agent_id, content_hash);
|
|
15257
15317
|
`);
|
|
15258
15318
|
}
|
|
15259
|
-
function
|
|
15319
|
+
function up119(db) {
|
|
15260
15320
|
db.exec(`
|
|
15261
15321
|
CREATE INDEX IF NOT EXISTS idx_memory_jobs_pressure_status
|
|
15262
15322
|
ON memory_jobs(status)
|
|
@@ -15275,12 +15335,12 @@ function up118(db) {
|
|
|
15275
15335
|
function hasColumn22(db, table, column) {
|
|
15276
15336
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
15277
15337
|
}
|
|
15278
|
-
function
|
|
15338
|
+
function up120(db) {
|
|
15279
15339
|
if (!hasColumn22(db, "telemetry_install", "last_seen_version")) {
|
|
15280
15340
|
db.exec("ALTER TABLE telemetry_install ADD COLUMN last_seen_version TEXT");
|
|
15281
15341
|
}
|
|
15282
15342
|
}
|
|
15283
|
-
function
|
|
15343
|
+
function up121(db) {
|
|
15284
15344
|
db.exec(`
|
|
15285
15345
|
CREATE TABLE IF NOT EXISTS source_lifecycle_state (
|
|
15286
15346
|
agent_id TEXT NOT NULL,
|
|
@@ -15309,7 +15369,7 @@ function addColumnIfMissing26(db, column, definition) {
|
|
|
15309
15369
|
db.exec(`ALTER TABLE telemetry_events ADD COLUMN ${column} ${definition}`);
|
|
15310
15370
|
}
|
|
15311
15371
|
}
|
|
15312
|
-
function
|
|
15372
|
+
function up122(db) {
|
|
15313
15373
|
addColumnIfMissing26(db, "delivery_attempts", "INTEGER NOT NULL DEFAULT 0");
|
|
15314
15374
|
addColumnIfMissing26(db, "last_attempt_at", "TEXT");
|
|
15315
15375
|
addColumnIfMissing26(db, "sent_at", "TEXT");
|
|
@@ -15330,7 +15390,7 @@ function up121(db) {
|
|
|
15330
15390
|
VALUES (1, CURRENT_TIMESTAMP);
|
|
15331
15391
|
`);
|
|
15332
15392
|
}
|
|
15333
|
-
function
|
|
15393
|
+
function up123(db) {
|
|
15334
15394
|
const columns = db.prepare("PRAGMA table_info(dreaming_evidence_exclusions)").all();
|
|
15335
15395
|
const names = new Set(columns.map((column) => column.name));
|
|
15336
15396
|
if (!names.has("failure_class")) {
|
|
@@ -15347,7 +15407,7 @@ function up122(db) {
|
|
|
15347
15407
|
}
|
|
15348
15408
|
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)");
|
|
15349
15409
|
}
|
|
15350
|
-
function
|
|
15410
|
+
function up124(db) {
|
|
15351
15411
|
db.exec(`
|
|
15352
15412
|
CREATE TABLE IF NOT EXISTS embedding_index_failures (
|
|
15353
15413
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
@@ -15371,7 +15431,7 @@ function up123(db) {
|
|
|
15371
15431
|
ON embedding_index_failures(source_type, source_id);
|
|
15372
15432
|
`);
|
|
15373
15433
|
}
|
|
15374
|
-
function
|
|
15434
|
+
function up125(db) {
|
|
15375
15435
|
db.exec(`
|
|
15376
15436
|
CREATE TABLE IF NOT EXISTS imported_source_lifecycle (
|
|
15377
15437
|
id TEXT PRIMARY KEY,
|
|
@@ -15421,7 +15481,7 @@ function backfillTable(db, params) {
|
|
|
15421
15481
|
FROM ${params.table}${params.where ? ` WHERE ${params.where}` : ""}`).all();
|
|
15422
15482
|
backfill(db, rows, params.sourceKind, params.scannedAt);
|
|
15423
15483
|
}
|
|
15424
|
-
function
|
|
15484
|
+
function up126(db) {
|
|
15425
15485
|
db.exec(`
|
|
15426
15486
|
CREATE TABLE IF NOT EXISTS memory_content_safety (
|
|
15427
15487
|
agent_id TEXT NOT NULL,
|
|
@@ -15478,7 +15538,7 @@ function up125(db) {
|
|
|
15478
15538
|
scannedAt
|
|
15479
15539
|
});
|
|
15480
15540
|
}
|
|
15481
|
-
function
|
|
15541
|
+
function up127(db) {
|
|
15482
15542
|
const table = db.prepare("SELECT sql FROM sqlite_master WHERE type = 'table' AND name = 'dreaming_attention'").get();
|
|
15483
15543
|
if (!table)
|
|
15484
15544
|
return;
|
|
@@ -15512,7 +15572,7 @@ function up126(db) {
|
|
|
15512
15572
|
ON dreaming_attention (agent_id, resolved_at, priority DESC, created_at ASC);
|
|
15513
15573
|
`);
|
|
15514
15574
|
}
|
|
15515
|
-
function
|
|
15575
|
+
function up128(db) {
|
|
15516
15576
|
db.exec(`
|
|
15517
15577
|
CREATE TABLE IF NOT EXISTS ontology_contradictions (
|
|
15518
15578
|
id TEXT PRIMARY KEY,
|
|
@@ -15568,7 +15628,7 @@ function up127(db) {
|
|
|
15568
15628
|
ON ontology_contradictions(agent_id, left_source_id, right_source_id);
|
|
15569
15629
|
`);
|
|
15570
15630
|
}
|
|
15571
|
-
function
|
|
15631
|
+
function up129(db) {
|
|
15572
15632
|
db.exec(`
|
|
15573
15633
|
CREATE INDEX IF NOT EXISTS idx_memory_jobs_diagnostics_status_created_at
|
|
15574
15634
|
ON memory_jobs(status, created_at)
|
|
@@ -15583,7 +15643,7 @@ function up128(db) {
|
|
|
15583
15643
|
function tableExists3(db, table) {
|
|
15584
15644
|
return db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = ?").get(table) != null;
|
|
15585
15645
|
}
|
|
15586
|
-
function
|
|
15646
|
+
function up130(db) {
|
|
15587
15647
|
if (!tableExists3(db, "memory_jobs"))
|
|
15588
15648
|
return;
|
|
15589
15649
|
if (!tableExists3(db, "job_cancellations")) {
|
|
@@ -15632,7 +15692,7 @@ function up129(db) {
|
|
|
15632
15692
|
AND status IN ('pending', 'leased');
|
|
15633
15693
|
`);
|
|
15634
15694
|
}
|
|
15635
|
-
function
|
|
15695
|
+
function up131(db) {
|
|
15636
15696
|
db.exec(`
|
|
15637
15697
|
CREATE TABLE IF NOT EXISTS embedding_repair_budget (
|
|
15638
15698
|
id INTEGER PRIMARY KEY CHECK (id = 1),
|
|
@@ -15672,7 +15732,7 @@ function up130(db) {
|
|
|
15672
15732
|
END;
|
|
15673
15733
|
`);
|
|
15674
15734
|
}
|
|
15675
|
-
function
|
|
15735
|
+
function up132(db) {
|
|
15676
15736
|
db.exec(`
|
|
15677
15737
|
CREATE TABLE IF NOT EXISTS dreaming_evidence_consumption (
|
|
15678
15738
|
agent_id TEXT NOT NULL,
|
|
@@ -15695,13 +15755,13 @@ function up131(db) {
|
|
|
15695
15755
|
ON dreaming_evidence_consumption(agent_id, pass_id, delivered_offset, source_length);
|
|
15696
15756
|
`);
|
|
15697
15757
|
}
|
|
15698
|
-
function
|
|
15758
|
+
function up133(db) {
|
|
15699
15759
|
db.exec(`
|
|
15700
15760
|
CREATE INDEX IF NOT EXISTS idx_epistemic_assertions_observer_entity
|
|
15701
15761
|
ON epistemic_assertions(agent_id, subject_entity_id, status, asserted_at DESC, created_at DESC);
|
|
15702
15762
|
`);
|
|
15703
15763
|
}
|
|
15704
|
-
function
|
|
15764
|
+
function up134(db) {
|
|
15705
15765
|
db.exec(`
|
|
15706
15766
|
CREATE TABLE IF NOT EXISTS memory_head_revisions (
|
|
15707
15767
|
id TEXT PRIMARY KEY,
|
|
@@ -15753,7 +15813,7 @@ function up133(db) {
|
|
|
15753
15813
|
if (!names.has("format_version"))
|
|
15754
15814
|
db.exec("ALTER TABLE memory_md_heads ADD COLUMN format_version INTEGER NOT NULL DEFAULT 1");
|
|
15755
15815
|
}
|
|
15756
|
-
function
|
|
15816
|
+
function up135(db) {
|
|
15757
15817
|
db.exec(`
|
|
15758
15818
|
CREATE TABLE memory_head_entries_v134 (
|
|
15759
15819
|
entry_id TEXT NOT NULL, agent_id TEXT NOT NULL, canonical_text TEXT NOT NULL,
|
|
@@ -15771,7 +15831,7 @@ function up134(db) {
|
|
|
15771
15831
|
ON memory_head_entries(agent_id, entry_id, last_revision DESC);
|
|
15772
15832
|
`);
|
|
15773
15833
|
}
|
|
15774
|
-
function
|
|
15834
|
+
function up136(db) {
|
|
15775
15835
|
db.exec(`
|
|
15776
15836
|
CREATE TABLE IF NOT EXISTS memory_head_publications (
|
|
15777
15837
|
agent_id TEXT NOT NULL,
|
|
@@ -15787,7 +15847,7 @@ function up135(db) {
|
|
|
15787
15847
|
ON memory_head_publications(agent_id, status, revision DESC);
|
|
15788
15848
|
`);
|
|
15789
15849
|
}
|
|
15790
|
-
function
|
|
15850
|
+
function up137(db) {
|
|
15791
15851
|
const cols = new Set(db.prepare("PRAGMA table_info(memory_head_revisions)").all().map((r2) => r2.name));
|
|
15792
15852
|
for (const [name, type] of [
|
|
15793
15853
|
["entry_id", "TEXT"],
|
|
@@ -15801,7 +15861,7 @@ function up136(db) {
|
|
|
15801
15861
|
}
|
|
15802
15862
|
db.exec("CREATE UNIQUE INDEX IF NOT EXISTS idx_memory_head_revisions_entry ON memory_head_revisions(agent_id, revision, entry_id)");
|
|
15803
15863
|
}
|
|
15804
|
-
function
|
|
15864
|
+
function up138(db) {
|
|
15805
15865
|
const cols = new Set(db.prepare("PRAGMA table_info(dreaming_passes)").all().map((r2) => r2.name));
|
|
15806
15866
|
for (const [name, type] of [
|
|
15807
15867
|
["head_revision", "INTEGER"],
|
|
@@ -15823,7 +15883,7 @@ function addColumnIfMissing27(db, table, column, definition) {
|
|
|
15823
15883
|
if (!hasColumn25(db, table, column))
|
|
15824
15884
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
15825
15885
|
}
|
|
15826
|
-
function
|
|
15886
|
+
function up139(db) {
|
|
15827
15887
|
addColumnIfMissing27(db, "memories", "manual_override", "INTEGER DEFAULT 0");
|
|
15828
15888
|
db.exec(`
|
|
15829
15889
|
CREATE TABLE IF NOT EXISTS transcript_capture_status (
|
|
@@ -16128,7 +16188,7 @@ function up138(db) {
|
|
|
16128
16188
|
GROUP BY j.agent_id;
|
|
16129
16189
|
`);
|
|
16130
16190
|
}
|
|
16131
|
-
function
|
|
16191
|
+
function up140(db) {
|
|
16132
16192
|
db.exec(`
|
|
16133
16193
|
CREATE TABLE IF NOT EXISTS native_source_sync_state (
|
|
16134
16194
|
agent_id TEXT NOT NULL,
|
|
@@ -16144,7 +16204,7 @@ function up139(db) {
|
|
|
16144
16204
|
ON native_source_sync_state(agent_id, status);
|
|
16145
16205
|
`);
|
|
16146
16206
|
}
|
|
16147
|
-
function
|
|
16207
|
+
function up141(db) {
|
|
16148
16208
|
db.exec(`
|
|
16149
16209
|
CREATE TABLE IF NOT EXISTS transcript_recovery_frontiers (
|
|
16150
16210
|
agent_id TEXT NOT NULL,
|
|
@@ -16156,7 +16216,7 @@ function up140(db) {
|
|
|
16156
16216
|
);
|
|
16157
16217
|
`);
|
|
16158
16218
|
}
|
|
16159
|
-
function
|
|
16219
|
+
function up142(db) {
|
|
16160
16220
|
db.exec(`
|
|
16161
16221
|
CREATE TABLE IF NOT EXISTS source_sync_checkpoints (
|
|
16162
16222
|
agent_id TEXT NOT NULL,
|
|
@@ -16170,13 +16230,13 @@ function up141(db) {
|
|
|
16170
16230
|
);
|
|
16171
16231
|
`);
|
|
16172
16232
|
}
|
|
16173
|
-
function
|
|
16233
|
+
function up143(db) {
|
|
16174
16234
|
const columns = db.prepare("PRAGMA table_info(source_sync_checkpoints)").all();
|
|
16175
16235
|
if (!columns.some((column) => column.name === "frontier")) {
|
|
16176
16236
|
db.exec("ALTER TABLE source_sync_checkpoints ADD COLUMN frontier TEXT");
|
|
16177
16237
|
}
|
|
16178
16238
|
}
|
|
16179
|
-
function
|
|
16239
|
+
function up144(db) {
|
|
16180
16240
|
const columns = new Set(db.prepare("PRAGMA table_info(embedding_index_state)").all().map((row) => row.name).filter((name) => typeof name === "string"));
|
|
16181
16241
|
const additions = [
|
|
16182
16242
|
["migration_phase", "TEXT"],
|
|
@@ -16211,13 +16271,13 @@ function up143(db) {
|
|
|
16211
16271
|
`);
|
|
16212
16272
|
}
|
|
16213
16273
|
}
|
|
16214
|
-
function
|
|
16274
|
+
function up145(db) {
|
|
16215
16275
|
const columns = new Set(db.prepare("PRAGMA table_info(memory_jobs)").all().map((row) => row.name).filter((name) => typeof name === "string"));
|
|
16216
16276
|
if (!columns.has("lease_token")) {
|
|
16217
16277
|
db.exec("ALTER TABLE memory_jobs ADD COLUMN lease_token TEXT");
|
|
16218
16278
|
}
|
|
16219
16279
|
}
|
|
16220
|
-
function
|
|
16280
|
+
function up146(db) {
|
|
16221
16281
|
db.exec(`
|
|
16222
16282
|
CREATE TABLE IF NOT EXISTS dreaming_evidence_reviews (
|
|
16223
16283
|
agent_id TEXT NOT NULL,
|
|
@@ -16235,7 +16295,7 @@ function up145(db) {
|
|
|
16235
16295
|
ON dreaming_evidence_reviews (agent_id, reviewed_at DESC);
|
|
16236
16296
|
`);
|
|
16237
16297
|
}
|
|
16238
|
-
function
|
|
16298
|
+
function up147(db) {
|
|
16239
16299
|
db.exec(`
|
|
16240
16300
|
CREATE TABLE IF NOT EXISTS source_import_jobs (
|
|
16241
16301
|
id TEXT PRIMARY KEY, kind TEXT NOT NULL CHECK (kind = 'import'), agent_id TEXT NOT NULL,
|
|
@@ -16290,24 +16350,36 @@ function up146(db) {
|
|
|
16290
16350
|
CREATE INDEX IF NOT EXISTS idx_source_import_attempts_record ON source_import_record_attempts(agent_id, record_id, created_at);
|
|
16291
16351
|
`);
|
|
16292
16352
|
for (const column of ["source_id", "source_record_id", "source_meta_json"]) {
|
|
16293
|
-
const
|
|
16353
|
+
const statement = db.prepare("SELECT 1 AS found FROM pragma_table_info('session_transcripts') WHERE name = ?");
|
|
16354
|
+
let exists;
|
|
16355
|
+
try {
|
|
16356
|
+
exists = statement.get(column);
|
|
16357
|
+
} finally {
|
|
16358
|
+
statement.finalize?.();
|
|
16359
|
+
}
|
|
16294
16360
|
if (exists == null)
|
|
16295
16361
|
db.exec(`ALTER TABLE session_transcripts ADD COLUMN ${column} TEXT`);
|
|
16296
16362
|
}
|
|
16297
16363
|
db.exec("CREATE INDEX IF NOT EXISTS idx_session_transcripts_agent_source ON session_transcripts(agent_id, source_id)");
|
|
16298
16364
|
}
|
|
16299
|
-
function
|
|
16365
|
+
function up148(db) {
|
|
16300
16366
|
db.exec("CREATE INDEX IF NOT EXISTS idx_source_import_files_job_state ON source_import_files(job_id, state)");
|
|
16301
16367
|
}
|
|
16302
|
-
function
|
|
16368
|
+
function up149(db) {
|
|
16303
16369
|
const columns = db.prepare("PRAGMA table_info(source_import_record_attempts)").all();
|
|
16304
16370
|
if (!columns.some((column) => column.name === "source_id")) {
|
|
16305
16371
|
db.exec("ALTER TABLE source_import_record_attempts ADD COLUMN source_id TEXT");
|
|
16306
16372
|
}
|
|
16307
16373
|
}
|
|
16308
|
-
function
|
|
16374
|
+
function up150(db) {
|
|
16309
16375
|
const addColumn = (table, column, definition) => {
|
|
16310
|
-
const
|
|
16376
|
+
const statement = db.prepare("SELECT 1 AS found FROM pragma_table_info(?) WHERE name = ?");
|
|
16377
|
+
let exists;
|
|
16378
|
+
try {
|
|
16379
|
+
exists = statement.get(table, column);
|
|
16380
|
+
} finally {
|
|
16381
|
+
statement.finalize?.();
|
|
16382
|
+
}
|
|
16311
16383
|
if (exists == null)
|
|
16312
16384
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
16313
16385
|
};
|
|
@@ -16320,7 +16392,7 @@ function addColumnIfMissing28(db, table, column, definition) {
|
|
|
16320
16392
|
if (!columns.some((row) => row.name === column))
|
|
16321
16393
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
16322
16394
|
}
|
|
16323
|
-
function
|
|
16395
|
+
function up151(db) {
|
|
16324
16396
|
addColumnIfMissing28(db, "memory_md_heads", "is_current", "INTEGER NOT NULL DEFAULT 0");
|
|
16325
16397
|
addColumnIfMissing28(db, "dreaming_passes", "head_base_revision", "INTEGER");
|
|
16326
16398
|
db.exec("CREATE INDEX IF NOT EXISTS idx_memory_head_revisions_content_hash ON memory_head_revisions(content_hash)");
|
|
@@ -16474,13 +16546,13 @@ var MIGRATIONS = [
|
|
|
16474
16546
|
{
|
|
16475
16547
|
version: 1,
|
|
16476
16548
|
name: "baseline",
|
|
16477
|
-
up,
|
|
16549
|
+
up: up2,
|
|
16478
16550
|
artifacts: { tables: ["memories", "conversations", "embeddings"] }
|
|
16479
16551
|
},
|
|
16480
16552
|
{
|
|
16481
16553
|
version: 2,
|
|
16482
16554
|
name: "pipeline-v2",
|
|
16483
|
-
up:
|
|
16555
|
+
up: up3,
|
|
16484
16556
|
artifacts: {
|
|
16485
16557
|
tables: ["memory_history", "memory_jobs", "entities", "relations", "memory_entity_mentions"]
|
|
16486
16558
|
}
|
|
@@ -16488,12 +16560,12 @@ var MIGRATIONS = [
|
|
|
16488
16560
|
{
|
|
16489
16561
|
version: 3,
|
|
16490
16562
|
name: "unique-content-hash",
|
|
16491
|
-
up:
|
|
16563
|
+
up: up4
|
|
16492
16564
|
},
|
|
16493
16565
|
{
|
|
16494
16566
|
version: 4,
|
|
16495
16567
|
name: "history-actor-and-retention",
|
|
16496
|
-
up:
|
|
16568
|
+
up: up5,
|
|
16497
16569
|
artifacts: {
|
|
16498
16570
|
columns: [{ table: "memory_history", column: "actor_type" }]
|
|
16499
16571
|
}
|
|
@@ -16501,7 +16573,7 @@ var MIGRATIONS = [
|
|
|
16501
16573
|
{
|
|
16502
16574
|
version: 5,
|
|
16503
16575
|
name: "graph-extended",
|
|
16504
|
-
up:
|
|
16576
|
+
up: up6,
|
|
16505
16577
|
artifacts: {
|
|
16506
16578
|
columns: [{ table: "entities", column: "canonical_name" }]
|
|
16507
16579
|
}
|
|
@@ -16509,7 +16581,7 @@ var MIGRATIONS = [
|
|
|
16509
16581
|
{
|
|
16510
16582
|
version: 6,
|
|
16511
16583
|
name: "idempotency-key",
|
|
16512
|
-
up:
|
|
16584
|
+
up: up7,
|
|
16513
16585
|
artifacts: {
|
|
16514
16586
|
columns: [{ table: "memories", column: "idempotency_key" }]
|
|
16515
16587
|
}
|
|
@@ -16517,42 +16589,42 @@ var MIGRATIONS = [
|
|
|
16517
16589
|
{
|
|
16518
16590
|
version: 7,
|
|
16519
16591
|
name: "documents-and-connectors",
|
|
16520
|
-
up:
|
|
16592
|
+
up: up8,
|
|
16521
16593
|
artifacts: { tables: ["documents", "document_memories", "connectors"] }
|
|
16522
16594
|
},
|
|
16523
16595
|
{
|
|
16524
16596
|
version: 8,
|
|
16525
16597
|
name: "embeddings-unique-hash",
|
|
16526
|
-
up:
|
|
16598
|
+
up: up9
|
|
16527
16599
|
},
|
|
16528
16600
|
{
|
|
16529
16601
|
version: 9,
|
|
16530
16602
|
name: "summary-jobs",
|
|
16531
|
-
up:
|
|
16603
|
+
up: up10,
|
|
16532
16604
|
artifacts: { tables: ["summary_jobs"] }
|
|
16533
16605
|
},
|
|
16534
16606
|
{
|
|
16535
16607
|
version: 10,
|
|
16536
16608
|
name: "umap-cache",
|
|
16537
|
-
up:
|
|
16609
|
+
up: up11,
|
|
16538
16610
|
artifacts: { tables: ["umap_cache"] }
|
|
16539
16611
|
},
|
|
16540
16612
|
{
|
|
16541
16613
|
version: 11,
|
|
16542
16614
|
name: "session-scores",
|
|
16543
|
-
up:
|
|
16615
|
+
up: up12,
|
|
16544
16616
|
artifacts: { tables: ["session_scores"] }
|
|
16545
16617
|
},
|
|
16546
16618
|
{
|
|
16547
16619
|
version: 12,
|
|
16548
16620
|
name: "scheduled-tasks",
|
|
16549
|
-
up:
|
|
16621
|
+
up: up13,
|
|
16550
16622
|
artifacts: { tables: ["scheduled_tasks", "task_runs"] }
|
|
16551
16623
|
},
|
|
16552
16624
|
{
|
|
16553
16625
|
version: 13,
|
|
16554
16626
|
name: "ingestion-tracking",
|
|
16555
|
-
up:
|
|
16627
|
+
up: up14,
|
|
16556
16628
|
artifacts: {
|
|
16557
16629
|
columns: [
|
|
16558
16630
|
{ table: "memories", column: "source_path" },
|
|
@@ -16563,13 +16635,13 @@ var MIGRATIONS = [
|
|
|
16563
16635
|
{
|
|
16564
16636
|
version: 14,
|
|
16565
16637
|
name: "telemetry",
|
|
16566
|
-
up:
|
|
16638
|
+
up: up15,
|
|
16567
16639
|
artifacts: { tables: ["telemetry_events"] }
|
|
16568
16640
|
},
|
|
16569
16641
|
{
|
|
16570
16642
|
version: 15,
|
|
16571
16643
|
name: "session-memories",
|
|
16572
|
-
up:
|
|
16644
|
+
up: up16,
|
|
16573
16645
|
artifacts: {
|
|
16574
16646
|
tables: ["session_memories"],
|
|
16575
16647
|
columns: [
|
|
@@ -16581,13 +16653,13 @@ var MIGRATIONS = [
|
|
|
16581
16653
|
{
|
|
16582
16654
|
version: 16,
|
|
16583
16655
|
name: "session-checkpoints",
|
|
16584
|
-
up:
|
|
16656
|
+
up: up17,
|
|
16585
16657
|
artifacts: { tables: ["session_checkpoints"] }
|
|
16586
16658
|
},
|
|
16587
16659
|
{
|
|
16588
16660
|
version: 17,
|
|
16589
16661
|
name: "task-skills",
|
|
16590
|
-
up:
|
|
16662
|
+
up: up18,
|
|
16591
16663
|
artifacts: {
|
|
16592
16664
|
columns: [{ table: "scheduled_tasks", column: "skill_name" }]
|
|
16593
16665
|
}
|
|
@@ -16595,13 +16667,13 @@ var MIGRATIONS = [
|
|
|
16595
16667
|
{
|
|
16596
16668
|
version: 18,
|
|
16597
16669
|
name: "skill-meta",
|
|
16598
|
-
up:
|
|
16670
|
+
up: up19,
|
|
16599
16671
|
artifacts: { tables: ["skill_meta"] }
|
|
16600
16672
|
},
|
|
16601
16673
|
{
|
|
16602
16674
|
version: 19,
|
|
16603
16675
|
name: "knowledge-structure",
|
|
16604
|
-
up:
|
|
16676
|
+
up: up20,
|
|
16605
16677
|
artifacts: {
|
|
16606
16678
|
tables: ["entity_aspects", "entity_attributes", "entity_dependencies", "task_meta"],
|
|
16607
16679
|
columns: [{ table: "entities", column: "agent_id" }]
|
|
@@ -16610,7 +16682,7 @@ var MIGRATIONS = [
|
|
|
16610
16682
|
{
|
|
16611
16683
|
version: 20,
|
|
16612
16684
|
name: "session-structural-columns",
|
|
16613
|
-
up:
|
|
16685
|
+
up: up21,
|
|
16614
16686
|
artifacts: {
|
|
16615
16687
|
columns: [
|
|
16616
16688
|
{ table: "session_memories", column: "entity_slot" },
|
|
@@ -16623,7 +16695,7 @@ var MIGRATIONS = [
|
|
|
16623
16695
|
{
|
|
16624
16696
|
version: 21,
|
|
16625
16697
|
name: "checkpoint-structural",
|
|
16626
|
-
up:
|
|
16698
|
+
up: up22,
|
|
16627
16699
|
artifacts: {
|
|
16628
16700
|
columns: [{ table: "session_checkpoints", column: "focal_entity_ids" }]
|
|
16629
16701
|
}
|
|
@@ -16631,7 +16703,7 @@ var MIGRATIONS = [
|
|
|
16631
16703
|
{
|
|
16632
16704
|
version: 22,
|
|
16633
16705
|
name: "entity-pinning",
|
|
16634
|
-
up:
|
|
16706
|
+
up: up23,
|
|
16635
16707
|
artifacts: {
|
|
16636
16708
|
columns: [
|
|
16637
16709
|
{ table: "entities", column: "pinned" },
|
|
@@ -16642,17 +16714,17 @@ var MIGRATIONS = [
|
|
|
16642
16714
|
{
|
|
16643
16715
|
version: 23,
|
|
16644
16716
|
name: "retired-scorer-gap",
|
|
16645
|
-
up:
|
|
16717
|
+
up: up24
|
|
16646
16718
|
},
|
|
16647
16719
|
{
|
|
16648
16720
|
version: 24,
|
|
16649
16721
|
name: "retired-scorer-gap",
|
|
16650
|
-
up:
|
|
16722
|
+
up: up25
|
|
16651
16723
|
},
|
|
16652
16724
|
{
|
|
16653
16725
|
version: 25,
|
|
16654
16726
|
name: "agent-feedback",
|
|
16655
|
-
up:
|
|
16727
|
+
up: up26,
|
|
16656
16728
|
artifacts: {
|
|
16657
16729
|
columns: [{ table: "session_memories", column: "agent_relevance_score" }]
|
|
16658
16730
|
}
|
|
@@ -16660,32 +16732,32 @@ var MIGRATIONS = [
|
|
|
16660
16732
|
{
|
|
16661
16733
|
version: 26,
|
|
16662
16734
|
name: "retired-scorer-gap",
|
|
16663
|
-
up:
|
|
16735
|
+
up: up27
|
|
16664
16736
|
},
|
|
16665
16737
|
{
|
|
16666
16738
|
version: 27,
|
|
16667
16739
|
name: "backfill-canonical-names",
|
|
16668
|
-
up:
|
|
16740
|
+
up: up28
|
|
16669
16741
|
},
|
|
16670
16742
|
{
|
|
16671
16743
|
version: 28,
|
|
16672
16744
|
name: "lossless-retention",
|
|
16673
|
-
up:
|
|
16745
|
+
up: up29
|
|
16674
16746
|
},
|
|
16675
16747
|
{
|
|
16676
16748
|
version: 29,
|
|
16677
16749
|
name: "session-summary-dag",
|
|
16678
|
-
up:
|
|
16750
|
+
up: up30
|
|
16679
16751
|
},
|
|
16680
16752
|
{
|
|
16681
16753
|
version: 30,
|
|
16682
16754
|
name: "nullable-memory-job-memory-id",
|
|
16683
|
-
up:
|
|
16755
|
+
up: up31
|
|
16684
16756
|
},
|
|
16685
16757
|
{
|
|
16686
16758
|
version: 31,
|
|
16687
16759
|
name: "dependency-reason",
|
|
16688
|
-
up:
|
|
16760
|
+
up: up32,
|
|
16689
16761
|
artifacts: {
|
|
16690
16762
|
columns: [
|
|
16691
16763
|
{ table: "entity_dependencies", column: "reason" },
|
|
@@ -16696,7 +16768,7 @@ var MIGRATIONS = [
|
|
|
16696
16768
|
{
|
|
16697
16769
|
version: 32,
|
|
16698
16770
|
name: "embeddings-vector-column",
|
|
16699
|
-
up:
|
|
16771
|
+
up: up33,
|
|
16700
16772
|
artifacts: {
|
|
16701
16773
|
columns: [{ table: "embeddings", column: "vector", optional: true }]
|
|
16702
16774
|
}
|
|
@@ -16704,7 +16776,7 @@ var MIGRATIONS = [
|
|
|
16704
16776
|
{
|
|
16705
16777
|
version: 33,
|
|
16706
16778
|
name: "scope",
|
|
16707
|
-
up:
|
|
16779
|
+
up: up34,
|
|
16708
16780
|
artifacts: {
|
|
16709
16781
|
columns: [{ table: "memories", column: "scope" }]
|
|
16710
16782
|
}
|
|
@@ -16712,17 +16784,17 @@ var MIGRATIONS = [
|
|
|
16712
16784
|
{
|
|
16713
16785
|
version: 34,
|
|
16714
16786
|
name: "scope-aware-dedup",
|
|
16715
|
-
up:
|
|
16787
|
+
up: up35
|
|
16716
16788
|
},
|
|
16717
16789
|
{
|
|
16718
16790
|
version: 35,
|
|
16719
16791
|
name: "entity-fts",
|
|
16720
|
-
up:
|
|
16792
|
+
up: up36
|
|
16721
16793
|
},
|
|
16722
16794
|
{
|
|
16723
16795
|
version: 36,
|
|
16724
16796
|
name: "dependency-confidence",
|
|
16725
|
-
up:
|
|
16797
|
+
up: up37,
|
|
16726
16798
|
artifacts: {
|
|
16727
16799
|
columns: [{ table: "entity_dependencies", column: "confidence" }]
|
|
16728
16800
|
}
|
|
@@ -16730,7 +16802,7 @@ var MIGRATIONS = [
|
|
|
16730
16802
|
{
|
|
16731
16803
|
version: 37,
|
|
16732
16804
|
name: "entity-communities",
|
|
16733
|
-
up:
|
|
16805
|
+
up: up38,
|
|
16734
16806
|
artifacts: {
|
|
16735
16807
|
tables: ["entity_communities"],
|
|
16736
16808
|
columns: [{ table: "entities", column: "community_id" }]
|
|
@@ -16739,24 +16811,24 @@ var MIGRATIONS = [
|
|
|
16739
16811
|
{
|
|
16740
16812
|
version: 38,
|
|
16741
16813
|
name: "memory-hints",
|
|
16742
|
-
up:
|
|
16814
|
+
up: up39,
|
|
16743
16815
|
artifacts: { tables: ["memory_hints"] }
|
|
16744
16816
|
},
|
|
16745
16817
|
{
|
|
16746
16818
|
version: 39,
|
|
16747
16819
|
name: "dedup-entity-dependencies",
|
|
16748
|
-
up:
|
|
16820
|
+
up: up40
|
|
16749
16821
|
},
|
|
16750
16822
|
{
|
|
16751
16823
|
version: 40,
|
|
16752
16824
|
name: "session-transcripts",
|
|
16753
|
-
up:
|
|
16825
|
+
up: up41,
|
|
16754
16826
|
artifacts: { tables: ["session_transcripts"] }
|
|
16755
16827
|
},
|
|
16756
16828
|
{
|
|
16757
16829
|
version: 41,
|
|
16758
16830
|
name: "path-feedback",
|
|
16759
|
-
up:
|
|
16831
|
+
up: up42,
|
|
16760
16832
|
artifacts: {
|
|
16761
16833
|
tables: [
|
|
16762
16834
|
"path_feedback_events",
|
|
@@ -16771,7 +16843,7 @@ var MIGRATIONS = [
|
|
|
16771
16843
|
{
|
|
16772
16844
|
version: 42,
|
|
16773
16845
|
name: "session-memories-agent-id",
|
|
16774
|
-
up:
|
|
16846
|
+
up: up43,
|
|
16775
16847
|
artifacts: {
|
|
16776
16848
|
columns: [{ table: "session_memories", column: "agent_id" }]
|
|
16777
16849
|
}
|
|
@@ -16779,7 +16851,7 @@ var MIGRATIONS = [
|
|
|
16779
16851
|
{
|
|
16780
16852
|
version: 43,
|
|
16781
16853
|
name: "agents-table",
|
|
16782
|
-
up:
|
|
16854
|
+
up: up44,
|
|
16783
16855
|
artifacts: {
|
|
16784
16856
|
tables: ["agents"],
|
|
16785
16857
|
columns: [
|
|
@@ -16791,7 +16863,7 @@ var MIGRATIONS = [
|
|
|
16791
16863
|
{
|
|
16792
16864
|
version: 44,
|
|
16793
16865
|
name: "memory-md-temporal-head",
|
|
16794
|
-
up:
|
|
16866
|
+
up: up45,
|
|
16795
16867
|
artifacts: {
|
|
16796
16868
|
columns: [
|
|
16797
16869
|
{ table: "session_summaries", column: "source_type" },
|
|
@@ -16803,7 +16875,7 @@ var MIGRATIONS = [
|
|
|
16803
16875
|
{
|
|
16804
16876
|
version: 45,
|
|
16805
16877
|
name: "lossless-working-memory-hardening",
|
|
16806
|
-
up:
|
|
16878
|
+
up: up46,
|
|
16807
16879
|
artifacts: {
|
|
16808
16880
|
tables: ["session_transcripts_fts", "memory_md_heads"],
|
|
16809
16881
|
columns: [
|
|
@@ -16816,17 +16888,17 @@ var MIGRATIONS = [
|
|
|
16816
16888
|
{
|
|
16817
16889
|
version: 46,
|
|
16818
16890
|
name: "session-summary-uniqueness",
|
|
16819
|
-
up:
|
|
16891
|
+
up: up47
|
|
16820
16892
|
},
|
|
16821
16893
|
{
|
|
16822
16894
|
version: 47,
|
|
16823
16895
|
name: "agent-scoped-temporal-uniqueness",
|
|
16824
|
-
up:
|
|
16896
|
+
up: up48
|
|
16825
16897
|
},
|
|
16826
16898
|
{
|
|
16827
16899
|
version: 48,
|
|
16828
16900
|
name: "thread-heads",
|
|
16829
|
-
up:
|
|
16901
|
+
up: up49,
|
|
16830
16902
|
artifacts: {
|
|
16831
16903
|
tables: ["memory_thread_heads"]
|
|
16832
16904
|
}
|
|
@@ -16834,7 +16906,7 @@ var MIGRATIONS = [
|
|
|
16834
16906
|
{
|
|
16835
16907
|
version: 49,
|
|
16836
16908
|
name: "session-extract-cursors",
|
|
16837
|
-
up:
|
|
16909
|
+
up: up50,
|
|
16838
16910
|
artifacts: {
|
|
16839
16911
|
tables: ["session_extract_cursors"]
|
|
16840
16912
|
}
|
|
@@ -16842,7 +16914,7 @@ var MIGRATIONS = [
|
|
|
16842
16914
|
{
|
|
16843
16915
|
version: 50,
|
|
16844
16916
|
name: "related-to-audit",
|
|
16845
|
-
up:
|
|
16917
|
+
up: up51,
|
|
16846
16918
|
artifacts: {
|
|
16847
16919
|
tables: ["entity_dependency_history"]
|
|
16848
16920
|
}
|
|
@@ -16850,7 +16922,7 @@ var MIGRATIONS = [
|
|
|
16850
16922
|
{
|
|
16851
16923
|
version: 51,
|
|
16852
16924
|
name: "memory-md-rolling-window-lineage",
|
|
16853
|
-
up:
|
|
16925
|
+
up: up52,
|
|
16854
16926
|
artifacts: {
|
|
16855
16927
|
tables: ["memory_artifacts", "memory_artifact_tombstones", "memory_artifacts_fts"],
|
|
16856
16928
|
columns: [
|
|
@@ -16865,7 +16937,7 @@ var MIGRATIONS = [
|
|
|
16865
16937
|
{
|
|
16866
16938
|
version: 52,
|
|
16867
16939
|
name: "mcp-invocations",
|
|
16868
|
-
up:
|
|
16940
|
+
up: up53,
|
|
16869
16941
|
artifacts: {
|
|
16870
16942
|
tables: ["mcp_invocations"]
|
|
16871
16943
|
}
|
|
@@ -16873,7 +16945,7 @@ var MIGRATIONS = [
|
|
|
16873
16945
|
{
|
|
16874
16946
|
version: 53,
|
|
16875
16947
|
name: "skill-invocations",
|
|
16876
|
-
up:
|
|
16948
|
+
up: up54,
|
|
16877
16949
|
artifacts: {
|
|
16878
16950
|
tables: ["skill_invocations"]
|
|
16879
16951
|
}
|
|
@@ -16881,7 +16953,7 @@ var MIGRATIONS = [
|
|
|
16881
16953
|
{
|
|
16882
16954
|
version: 54,
|
|
16883
16955
|
name: "task-agent-scope",
|
|
16884
|
-
up:
|
|
16956
|
+
up: up55,
|
|
16885
16957
|
artifacts: {
|
|
16886
16958
|
tables: ["task_scope_hints"]
|
|
16887
16959
|
}
|
|
@@ -16889,7 +16961,7 @@ var MIGRATIONS = [
|
|
|
16889
16961
|
{
|
|
16890
16962
|
version: 55,
|
|
16891
16963
|
name: "dreaming-state",
|
|
16892
|
-
up:
|
|
16964
|
+
up: up56,
|
|
16893
16965
|
artifacts: {
|
|
16894
16966
|
tables: ["dreaming_state", "dreaming_passes"]
|
|
16895
16967
|
}
|
|
@@ -16897,22 +16969,22 @@ var MIGRATIONS = [
|
|
|
16897
16969
|
{
|
|
16898
16970
|
version: 56,
|
|
16899
16971
|
name: "agent-scoped-content-hash",
|
|
16900
|
-
up:
|
|
16972
|
+
up: up57
|
|
16901
16973
|
},
|
|
16902
16974
|
{
|
|
16903
16975
|
version: 57,
|
|
16904
16976
|
name: "memories-fts-tokenizer-repair",
|
|
16905
|
-
up:
|
|
16977
|
+
up: up58
|
|
16906
16978
|
},
|
|
16907
16979
|
{
|
|
16908
16980
|
version: 58,
|
|
16909
16981
|
name: "knowledge-graph-indices",
|
|
16910
|
-
up:
|
|
16982
|
+
up: up59
|
|
16911
16983
|
},
|
|
16912
16984
|
{
|
|
16913
16985
|
version: 59,
|
|
16914
16986
|
name: "entity-attribute-claim-key",
|
|
16915
|
-
up:
|
|
16987
|
+
up: up60,
|
|
16916
16988
|
artifacts: {
|
|
16917
16989
|
columns: [{ table: "entity_attributes", column: "claim_key" }]
|
|
16918
16990
|
}
|
|
@@ -16920,7 +16992,7 @@ var MIGRATIONS = [
|
|
|
16920
16992
|
{
|
|
16921
16993
|
version: 60,
|
|
16922
16994
|
name: "entity-attribute-group-key",
|
|
16923
|
-
up:
|
|
16995
|
+
up: up61,
|
|
16924
16996
|
artifacts: {
|
|
16925
16997
|
columns: [{ table: "entity_attributes", column: "group_key" }]
|
|
16926
16998
|
}
|
|
@@ -16928,7 +17000,7 @@ var MIGRATIONS = [
|
|
|
16928
17000
|
{
|
|
16929
17001
|
version: 61,
|
|
16930
17002
|
name: "memory-artifact-source-mtime",
|
|
16931
|
-
up:
|
|
17003
|
+
up: up62,
|
|
16932
17004
|
artifacts: {
|
|
16933
17005
|
columns: [{ table: "memory_artifacts", column: "source_mtime_ms" }]
|
|
16934
17006
|
}
|
|
@@ -16936,7 +17008,7 @@ var MIGRATIONS = [
|
|
|
16936
17008
|
{
|
|
16937
17009
|
version: 62,
|
|
16938
17010
|
name: "memory-artifact-soft-delete",
|
|
16939
|
-
up:
|
|
17011
|
+
up: up63,
|
|
16940
17012
|
artifacts: {
|
|
16941
17013
|
columns: [
|
|
16942
17014
|
{ table: "memory_artifacts", column: "is_deleted" },
|
|
@@ -16947,12 +17019,12 @@ var MIGRATIONS = [
|
|
|
16947
17019
|
{
|
|
16948
17020
|
version: 63,
|
|
16949
17021
|
name: "content-only-memories-fts-update",
|
|
16950
|
-
up:
|
|
17022
|
+
up: up64
|
|
16951
17023
|
},
|
|
16952
17024
|
{
|
|
16953
17025
|
version: 64,
|
|
16954
17026
|
name: "source-graph-provenance",
|
|
16955
|
-
up:
|
|
17027
|
+
up: up65,
|
|
16956
17028
|
artifacts: {
|
|
16957
17029
|
columns: [
|
|
16958
17030
|
{ table: "entities", column: "source_path" },
|
|
@@ -16965,7 +17037,7 @@ var MIGRATIONS = [
|
|
|
16965
17037
|
{
|
|
16966
17038
|
version: 65,
|
|
16967
17039
|
name: "source-embedding-agent-scope",
|
|
16968
|
-
up:
|
|
17040
|
+
up: up66,
|
|
16969
17041
|
artifacts: {
|
|
16970
17042
|
columns: [{ table: "embeddings", column: "agent_id", optional: true }]
|
|
16971
17043
|
}
|
|
@@ -16973,7 +17045,7 @@ var MIGRATIONS = [
|
|
|
16973
17045
|
{
|
|
16974
17046
|
version: 66,
|
|
16975
17047
|
name: "memory-search-telemetry",
|
|
16976
|
-
up:
|
|
17048
|
+
up: up67,
|
|
16977
17049
|
artifacts: {
|
|
16978
17050
|
tables: ["memory_search_telemetry"]
|
|
16979
17051
|
}
|
|
@@ -16981,7 +17053,7 @@ var MIGRATIONS = [
|
|
|
16981
17053
|
{
|
|
16982
17054
|
version: 67,
|
|
16983
17055
|
name: "ontology-proposals",
|
|
16984
|
-
up:
|
|
17056
|
+
up: up68,
|
|
16985
17057
|
artifacts: {
|
|
16986
17058
|
tables: ["ontology_proposals"],
|
|
16987
17059
|
columns: [
|
|
@@ -16995,7 +17067,7 @@ var MIGRATIONS = [
|
|
|
16995
17067
|
{
|
|
16996
17068
|
version: 68,
|
|
16997
17069
|
name: "daily-reflections",
|
|
16998
|
-
up:
|
|
17070
|
+
up: up69,
|
|
16999
17071
|
artifacts: {
|
|
17000
17072
|
tables: ["daily_reflections"]
|
|
17001
17073
|
}
|
|
@@ -17003,7 +17075,7 @@ var MIGRATIONS = [
|
|
|
17003
17075
|
{
|
|
17004
17076
|
version: 69,
|
|
17005
17077
|
name: "daily-reflections-multiple-insights",
|
|
17006
|
-
up:
|
|
17078
|
+
up: up70,
|
|
17007
17079
|
artifacts: {
|
|
17008
17080
|
tables: ["daily_reflections"]
|
|
17009
17081
|
}
|
|
@@ -17011,7 +17083,7 @@ var MIGRATIONS = [
|
|
|
17011
17083
|
{
|
|
17012
17084
|
version: 70,
|
|
17013
17085
|
name: "ontology-control-plane-state",
|
|
17014
|
-
up:
|
|
17086
|
+
up: up71,
|
|
17015
17087
|
artifacts: {
|
|
17016
17088
|
columns: [
|
|
17017
17089
|
{ table: "entities", column: "status" },
|
|
@@ -17026,7 +17098,7 @@ var MIGRATIONS = [
|
|
|
17026
17098
|
{
|
|
17027
17099
|
version: 71,
|
|
17028
17100
|
name: "epistemic-assertions",
|
|
17029
|
-
up:
|
|
17101
|
+
up: up72,
|
|
17030
17102
|
artifacts: {
|
|
17031
17103
|
tables: ["epistemic_assertions"]
|
|
17032
17104
|
}
|
|
@@ -17034,7 +17106,7 @@ var MIGRATIONS = [
|
|
|
17034
17106
|
{
|
|
17035
17107
|
version: 72,
|
|
17036
17108
|
name: "agent-scoped-idempotency-key",
|
|
17037
|
-
up:
|
|
17109
|
+
up: up73,
|
|
17038
17110
|
artifacts: {
|
|
17039
17111
|
columns: [
|
|
17040
17112
|
{ table: "memories", column: "idempotency_key" },
|
|
@@ -17045,7 +17117,7 @@ var MIGRATIONS = [
|
|
|
17045
17117
|
{
|
|
17046
17118
|
version: 73,
|
|
17047
17119
|
name: "recall-context-dedupe",
|
|
17048
|
-
up:
|
|
17120
|
+
up: up74,
|
|
17049
17121
|
artifacts: {
|
|
17050
17122
|
tables: ["session_context_epochs", "session_recall_events"]
|
|
17051
17123
|
}
|
|
@@ -17053,7 +17125,7 @@ var MIGRATIONS = [
|
|
|
17053
17125
|
{
|
|
17054
17126
|
version: 74,
|
|
17055
17127
|
name: "aggregate-memory-links",
|
|
17056
|
-
up:
|
|
17128
|
+
up: up75,
|
|
17057
17129
|
artifacts: {
|
|
17058
17130
|
tables: ["aggregate_memory_sources"]
|
|
17059
17131
|
}
|
|
@@ -17061,7 +17133,7 @@ var MIGRATIONS = [
|
|
|
17061
17133
|
{
|
|
17062
17134
|
version: 75,
|
|
17063
17135
|
name: "memory-artifact-source-provenance",
|
|
17064
|
-
up:
|
|
17136
|
+
up: up76,
|
|
17065
17137
|
artifacts: {
|
|
17066
17138
|
columns: [
|
|
17067
17139
|
{ table: "memory_artifacts", column: "source_id" },
|
|
@@ -17075,7 +17147,7 @@ var MIGRATIONS = [
|
|
|
17075
17147
|
{
|
|
17076
17148
|
version: 76,
|
|
17077
17149
|
name: "temporal-edges",
|
|
17078
|
-
up:
|
|
17150
|
+
up: up77,
|
|
17079
17151
|
artifacts: {
|
|
17080
17152
|
tables: ["temporal_edges"]
|
|
17081
17153
|
}
|
|
@@ -17083,7 +17155,7 @@ var MIGRATIONS = [
|
|
|
17083
17155
|
{
|
|
17084
17156
|
version: 77,
|
|
17085
17157
|
name: "entity-aliases",
|
|
17086
|
-
up:
|
|
17158
|
+
up: up78,
|
|
17087
17159
|
artifacts: {
|
|
17088
17160
|
tables: ["entity_aliases"]
|
|
17089
17161
|
}
|
|
@@ -17091,7 +17163,7 @@ var MIGRATIONS = [
|
|
|
17091
17163
|
{
|
|
17092
17164
|
version: 78,
|
|
17093
17165
|
name: "api-keys",
|
|
17094
|
-
up:
|
|
17166
|
+
up: up79,
|
|
17095
17167
|
artifacts: {
|
|
17096
17168
|
tables: ["api_keys"]
|
|
17097
17169
|
}
|
|
@@ -17099,7 +17171,7 @@ var MIGRATIONS = [
|
|
|
17099
17171
|
{
|
|
17100
17172
|
version: 79,
|
|
17101
17173
|
name: "transcript-capture-jobs",
|
|
17102
|
-
up:
|
|
17174
|
+
up: up80,
|
|
17103
17175
|
artifacts: {
|
|
17104
17176
|
tables: ["transcript_capture_jobs"]
|
|
17105
17177
|
}
|
|
@@ -17107,7 +17179,7 @@ var MIGRATIONS = [
|
|
|
17107
17179
|
{
|
|
17108
17180
|
version: 80,
|
|
17109
17181
|
name: "document-scope-columns",
|
|
17110
|
-
up:
|
|
17182
|
+
up: up81,
|
|
17111
17183
|
artifacts: {
|
|
17112
17184
|
columns: [
|
|
17113
17185
|
{ table: "documents", column: "agent_id" },
|
|
@@ -17118,7 +17190,7 @@ var MIGRATIONS = [
|
|
|
17118
17190
|
{
|
|
17119
17191
|
version: 81,
|
|
17120
17192
|
name: "aggregate-evidence-sources",
|
|
17121
|
-
up:
|
|
17193
|
+
up: up82,
|
|
17122
17194
|
artifacts: {
|
|
17123
17195
|
tables: ["aggregate_evidence_sources"]
|
|
17124
17196
|
}
|
|
@@ -17126,7 +17198,7 @@ var MIGRATIONS = [
|
|
|
17126
17198
|
{
|
|
17127
17199
|
version: 82,
|
|
17128
17200
|
name: "skill-invocations-harness",
|
|
17129
|
-
up:
|
|
17201
|
+
up: up83,
|
|
17130
17202
|
artifacts: {
|
|
17131
17203
|
columns: [
|
|
17132
17204
|
{ table: "skill_invocations", column: "harness" },
|
|
@@ -17137,7 +17209,7 @@ var MIGRATIONS = [
|
|
|
17137
17209
|
{
|
|
17138
17210
|
version: 83,
|
|
17139
17211
|
name: "memory-lifecycle-repair",
|
|
17140
|
-
up:
|
|
17212
|
+
up: up84,
|
|
17141
17213
|
artifacts: {
|
|
17142
17214
|
tables: ["transcript_capture_jobs", "aggregate_evidence_sources", "entity_dependencies"],
|
|
17143
17215
|
columns: [
|
|
@@ -17152,7 +17224,7 @@ var MIGRATIONS = [
|
|
|
17152
17224
|
{
|
|
17153
17225
|
version: 84,
|
|
17154
17226
|
name: "legacy-markdown-import-state",
|
|
17155
|
-
up:
|
|
17227
|
+
up: up85,
|
|
17156
17228
|
artifacts: {
|
|
17157
17229
|
tables: ["legacy_markdown_imports", "legacy_markdown_chunks"]
|
|
17158
17230
|
}
|
|
@@ -17160,7 +17232,7 @@ var MIGRATIONS = [
|
|
|
17160
17232
|
{
|
|
17161
17233
|
version: 85,
|
|
17162
17234
|
name: "backfill-relations-to-dependencies",
|
|
17163
|
-
up:
|
|
17235
|
+
up: up86,
|
|
17164
17236
|
artifacts: {
|
|
17165
17237
|
tables: ["entity_dependencies"]
|
|
17166
17238
|
}
|
|
@@ -17168,7 +17240,7 @@ var MIGRATIONS = [
|
|
|
17168
17240
|
{
|
|
17169
17241
|
version: 86,
|
|
17170
17242
|
name: "summary-jobs-content-hash",
|
|
17171
|
-
up:
|
|
17243
|
+
up: up87,
|
|
17172
17244
|
artifacts: {
|
|
17173
17245
|
columns: [{ table: "summary_jobs", column: "content_hash" }]
|
|
17174
17246
|
}
|
|
@@ -17176,7 +17248,7 @@ var MIGRATIONS = [
|
|
|
17176
17248
|
{
|
|
17177
17249
|
version: 87,
|
|
17178
17250
|
name: "summary-jobs-boundary-reason",
|
|
17179
|
-
up:
|
|
17251
|
+
up: up88,
|
|
17180
17252
|
artifacts: {
|
|
17181
17253
|
columns: [{ table: "summary_jobs", column: "boundary_reason" }]
|
|
17182
17254
|
}
|
|
@@ -17184,7 +17256,7 @@ var MIGRATIONS = [
|
|
|
17184
17256
|
{
|
|
17185
17257
|
version: 88,
|
|
17186
17258
|
name: "transcript-recovery-files",
|
|
17187
|
-
up:
|
|
17259
|
+
up: up89,
|
|
17188
17260
|
artifacts: {
|
|
17189
17261
|
tables: ["transcript_recovery_files"]
|
|
17190
17262
|
}
|
|
@@ -17192,7 +17264,7 @@ var MIGRATIONS = [
|
|
|
17192
17264
|
{
|
|
17193
17265
|
version: 89,
|
|
17194
17266
|
name: "job-cancellations",
|
|
17195
|
-
up:
|
|
17267
|
+
up: up90,
|
|
17196
17268
|
artifacts: {
|
|
17197
17269
|
tables: ["job_cancellations"]
|
|
17198
17270
|
}
|
|
@@ -17200,7 +17272,7 @@ var MIGRATIONS = [
|
|
|
17200
17272
|
{
|
|
17201
17273
|
version: 90,
|
|
17202
17274
|
name: "job-archive",
|
|
17203
|
-
up:
|
|
17275
|
+
up: up91,
|
|
17204
17276
|
artifacts: {
|
|
17205
17277
|
tables: ["job_archive"]
|
|
17206
17278
|
}
|
|
@@ -17208,25 +17280,25 @@ var MIGRATIONS = [
|
|
|
17208
17280
|
{
|
|
17209
17281
|
version: 91,
|
|
17210
17282
|
name: "embedding-index-generations",
|
|
17211
|
-
up:
|
|
17283
|
+
up: up92,
|
|
17212
17284
|
artifacts: { tables: ["embedding_index_state"] }
|
|
17213
17285
|
},
|
|
17214
17286
|
{
|
|
17215
17287
|
version: 92,
|
|
17216
17288
|
name: "embedding-staging-store",
|
|
17217
|
-
up:
|
|
17289
|
+
up: up93,
|
|
17218
17290
|
artifacts: { tables: ["embeddings_staging"] }
|
|
17219
17291
|
},
|
|
17220
17292
|
{
|
|
17221
17293
|
version: 93,
|
|
17222
17294
|
name: "dreaming-evidence-cursor",
|
|
17223
|
-
up:
|
|
17295
|
+
up: up94,
|
|
17224
17296
|
artifacts: { columns: [{ table: "dreaming_state", column: "evidence_cursor" }] }
|
|
17225
17297
|
},
|
|
17226
17298
|
{
|
|
17227
17299
|
version: 94,
|
|
17228
17300
|
name: "memory-kind",
|
|
17229
|
-
up:
|
|
17301
|
+
up: up95,
|
|
17230
17302
|
artifacts: {
|
|
17231
17303
|
columns: [
|
|
17232
17304
|
{ table: "memories", column: "memory_kind" },
|
|
@@ -17237,35 +17309,35 @@ var MIGRATIONS = [
|
|
|
17237
17309
|
{
|
|
17238
17310
|
version: 95,
|
|
17239
17311
|
name: "compaction-recall-projections",
|
|
17240
|
-
up:
|
|
17312
|
+
up: up96
|
|
17241
17313
|
},
|
|
17242
17314
|
{
|
|
17243
17315
|
version: 96,
|
|
17244
17316
|
name: "retire-legacy-ingestion",
|
|
17245
|
-
up:
|
|
17317
|
+
up: up97
|
|
17246
17318
|
},
|
|
17247
17319
|
{
|
|
17248
17320
|
version: 97,
|
|
17249
17321
|
name: "dreaming-failure-backoff",
|
|
17250
|
-
up:
|
|
17322
|
+
up: up98,
|
|
17251
17323
|
artifacts: { columns: [{ table: "dreaming_state", column: "last_failure_at" }] }
|
|
17252
17324
|
},
|
|
17253
17325
|
{
|
|
17254
17326
|
version: 98,
|
|
17255
17327
|
name: "dreaming-evidence-exclusions",
|
|
17256
|
-
up:
|
|
17328
|
+
up: up99,
|
|
17257
17329
|
artifacts: { tables: ["dreaming_evidence_exclusions"] }
|
|
17258
17330
|
},
|
|
17259
17331
|
{
|
|
17260
17332
|
version: 99,
|
|
17261
17333
|
name: "dreaming-tool-calls",
|
|
17262
|
-
up:
|
|
17334
|
+
up: up100,
|
|
17263
17335
|
artifacts: { tables: ["dreaming_tool_calls"] }
|
|
17264
17336
|
},
|
|
17265
17337
|
{
|
|
17266
17338
|
version: 100,
|
|
17267
17339
|
name: "dreaming-runbook",
|
|
17268
|
-
up:
|
|
17340
|
+
up: up101,
|
|
17269
17341
|
artifacts: {
|
|
17270
17342
|
columns: [
|
|
17271
17343
|
{ table: "dreaming_passes", column: "evidence_window_json" },
|
|
@@ -17276,23 +17348,23 @@ var MIGRATIONS = [
|
|
|
17276
17348
|
{
|
|
17277
17349
|
version: 101,
|
|
17278
17350
|
name: "dreaming-attention",
|
|
17279
|
-
up:
|
|
17351
|
+
up: up102,
|
|
17280
17352
|
artifacts: { tables: ["dreaming_attention"] }
|
|
17281
17353
|
},
|
|
17282
17354
|
{
|
|
17283
17355
|
version: 102,
|
|
17284
17356
|
name: "attribute-semantic-memories",
|
|
17285
|
-
up:
|
|
17357
|
+
up: up103
|
|
17286
17358
|
},
|
|
17287
17359
|
{
|
|
17288
17360
|
version: 103,
|
|
17289
17361
|
name: "semantic-memory-kind",
|
|
17290
|
-
up:
|
|
17362
|
+
up: up104
|
|
17291
17363
|
},
|
|
17292
17364
|
{
|
|
17293
17365
|
version: 104,
|
|
17294
17366
|
name: "derived-memory-provenance",
|
|
17295
|
-
up:
|
|
17367
|
+
up: up105,
|
|
17296
17368
|
artifacts: {
|
|
17297
17369
|
tables: ["derived_memory_sources"],
|
|
17298
17370
|
columns: [{ table: "memories", column: "stale_at" }]
|
|
@@ -17301,12 +17373,12 @@ var MIGRATIONS = [
|
|
|
17301
17373
|
{
|
|
17302
17374
|
version: 105,
|
|
17303
17375
|
name: "agent-scoped-entity-name",
|
|
17304
|
-
up:
|
|
17376
|
+
up: up106
|
|
17305
17377
|
},
|
|
17306
17378
|
{
|
|
17307
17379
|
version: 106,
|
|
17308
17380
|
name: "memory-review-after",
|
|
17309
|
-
up:
|
|
17381
|
+
up: up107,
|
|
17310
17382
|
artifacts: {
|
|
17311
17383
|
columns: [{ table: "memories", column: "review_after" }]
|
|
17312
17384
|
}
|
|
@@ -17314,7 +17386,7 @@ var MIGRATIONS = [
|
|
|
17314
17386
|
{
|
|
17315
17387
|
version: 107,
|
|
17316
17388
|
name: "dreaming-pass-usage",
|
|
17317
|
-
up:
|
|
17389
|
+
up: up108,
|
|
17318
17390
|
artifacts: {
|
|
17319
17391
|
columns: [
|
|
17320
17392
|
{ table: "dreaming_passes", column: "tokens_input" },
|
|
@@ -17328,7 +17400,7 @@ var MIGRATIONS = [
|
|
|
17328
17400
|
{
|
|
17329
17401
|
version: 108,
|
|
17330
17402
|
name: "embedding-usage",
|
|
17331
|
-
up:
|
|
17403
|
+
up: up109,
|
|
17332
17404
|
artifacts: {
|
|
17333
17405
|
tables: ["embedding_usage"]
|
|
17334
17406
|
}
|
|
@@ -17336,7 +17408,7 @@ var MIGRATIONS = [
|
|
|
17336
17408
|
{
|
|
17337
17409
|
version: 109,
|
|
17338
17410
|
name: "telemetry-install",
|
|
17339
|
-
up:
|
|
17411
|
+
up: up110,
|
|
17340
17412
|
artifacts: {
|
|
17341
17413
|
tables: ["telemetry_install"]
|
|
17342
17414
|
}
|
|
@@ -17344,12 +17416,12 @@ var MIGRATIONS = [
|
|
|
17344
17416
|
{
|
|
17345
17417
|
version: 110,
|
|
17346
17418
|
name: "memory-mention-join-index",
|
|
17347
|
-
up:
|
|
17419
|
+
up: up111
|
|
17348
17420
|
},
|
|
17349
17421
|
{
|
|
17350
17422
|
version: 111,
|
|
17351
17423
|
name: "telemetry-first-use",
|
|
17352
|
-
up:
|
|
17424
|
+
up: up112,
|
|
17353
17425
|
artifacts: {
|
|
17354
17426
|
columns: [
|
|
17355
17427
|
{ table: "telemetry_install", column: "first_remember_at" },
|
|
@@ -17360,7 +17432,7 @@ var MIGRATIONS = [
|
|
|
17360
17432
|
{
|
|
17361
17433
|
version: 112,
|
|
17362
17434
|
name: "telemetry-queue-ownership",
|
|
17363
|
-
up:
|
|
17435
|
+
up: up113,
|
|
17364
17436
|
artifacts: {
|
|
17365
17437
|
columns: [
|
|
17366
17438
|
{ table: "telemetry_events", column: "source" },
|
|
@@ -17372,7 +17444,7 @@ var MIGRATIONS = [
|
|
|
17372
17444
|
{
|
|
17373
17445
|
version: 113,
|
|
17374
17446
|
name: "session-claims",
|
|
17375
|
-
up:
|
|
17447
|
+
up: up114,
|
|
17376
17448
|
artifacts: {
|
|
17377
17449
|
tables: ["session_claims"],
|
|
17378
17450
|
columns: [
|
|
@@ -17386,12 +17458,12 @@ var MIGRATIONS = [
|
|
|
17386
17458
|
{
|
|
17387
17459
|
version: 114,
|
|
17388
17460
|
name: "memory-traversal-hydration-index",
|
|
17389
|
-
up:
|
|
17461
|
+
up: up115
|
|
17390
17462
|
},
|
|
17391
17463
|
{
|
|
17392
17464
|
version: 115,
|
|
17393
17465
|
name: "cross-agent-message-notifications",
|
|
17394
|
-
up:
|
|
17466
|
+
up: up116,
|
|
17395
17467
|
artifacts: {
|
|
17396
17468
|
tables: ["cross_agent_messages", "cross_agent_message_receipts"]
|
|
17397
17469
|
}
|
|
@@ -17399,7 +17471,7 @@ var MIGRATIONS = [
|
|
|
17399
17471
|
{
|
|
17400
17472
|
version: 116,
|
|
17401
17473
|
name: "acp-delivery-reconciliation",
|
|
17402
|
-
up:
|
|
17474
|
+
up: up117,
|
|
17403
17475
|
artifacts: {
|
|
17404
17476
|
columns: [
|
|
17405
17477
|
{ table: "cross_agent_messages", column: "delivery_state" },
|
|
@@ -17413,7 +17485,7 @@ var MIGRATIONS = [
|
|
|
17413
17485
|
{
|
|
17414
17486
|
version: 117,
|
|
17415
17487
|
name: "retire-summary-worker",
|
|
17416
|
-
up:
|
|
17488
|
+
up: up118,
|
|
17417
17489
|
artifacts: {
|
|
17418
17490
|
columns: [
|
|
17419
17491
|
{ table: "session_transcripts", column: "completed_at" },
|
|
@@ -17424,24 +17496,24 @@ var MIGRATIONS = [
|
|
|
17424
17496
|
{
|
|
17425
17497
|
version: 118,
|
|
17426
17498
|
name: "queue-pressure-indices",
|
|
17427
|
-
up:
|
|
17499
|
+
up: up119
|
|
17428
17500
|
},
|
|
17429
17501
|
{
|
|
17430
17502
|
version: 119,
|
|
17431
17503
|
name: "telemetry-version-observation",
|
|
17432
|
-
up:
|
|
17504
|
+
up: up120,
|
|
17433
17505
|
artifacts: { columns: [{ table: "telemetry_install", column: "last_seen_version" }] }
|
|
17434
17506
|
},
|
|
17435
17507
|
{
|
|
17436
17508
|
version: 120,
|
|
17437
17509
|
name: "source-lifecycle-telemetry",
|
|
17438
|
-
up:
|
|
17510
|
+
up: up121,
|
|
17439
17511
|
artifacts: { tables: ["source_lifecycle_state"] }
|
|
17440
17512
|
},
|
|
17441
17513
|
{
|
|
17442
17514
|
version: 121,
|
|
17443
17515
|
name: "telemetry-delivery-health",
|
|
17444
|
-
up:
|
|
17516
|
+
up: up122,
|
|
17445
17517
|
artifacts: {
|
|
17446
17518
|
tables: ["telemetry_delivery_state"],
|
|
17447
17519
|
columns: [
|
|
@@ -17455,7 +17527,7 @@ var MIGRATIONS = [
|
|
|
17455
17527
|
{
|
|
17456
17528
|
version: 122,
|
|
17457
17529
|
name: "dreaming-evidence-retry",
|
|
17458
|
-
up:
|
|
17530
|
+
up: up123,
|
|
17459
17531
|
artifacts: {
|
|
17460
17532
|
columns: [
|
|
17461
17533
|
{ table: "dreaming_evidence_exclusions", column: "failure_class" },
|
|
@@ -17468,13 +17540,13 @@ var MIGRATIONS = [
|
|
|
17468
17540
|
{
|
|
17469
17541
|
version: 123,
|
|
17470
17542
|
name: "embedding-index-failures",
|
|
17471
|
-
up:
|
|
17543
|
+
up: up124,
|
|
17472
17544
|
artifacts: { tables: ["embedding_index_failures"] }
|
|
17473
17545
|
},
|
|
17474
17546
|
{
|
|
17475
17547
|
version: 124,
|
|
17476
17548
|
name: "import-derived-lifecycle",
|
|
17477
|
-
up:
|
|
17549
|
+
up: up125,
|
|
17478
17550
|
artifacts: {
|
|
17479
17551
|
tables: ["imported_source_lifecycle"]
|
|
17480
17552
|
}
|
|
@@ -17482,77 +17554,77 @@ var MIGRATIONS = [
|
|
|
17482
17554
|
{
|
|
17483
17555
|
version: 125,
|
|
17484
17556
|
name: "memory-content-safety",
|
|
17485
|
-
up:
|
|
17557
|
+
up: up126,
|
|
17486
17558
|
artifacts: { tables: ["memory_content_safety"] }
|
|
17487
17559
|
},
|
|
17488
17560
|
{
|
|
17489
17561
|
version: 126,
|
|
17490
17562
|
name: "dreaming-surprisal-attention",
|
|
17491
|
-
up:
|
|
17563
|
+
up: up127,
|
|
17492
17564
|
artifacts: { tables: ["dreaming_attention"] }
|
|
17493
17565
|
},
|
|
17494
17566
|
{
|
|
17495
17567
|
version: 127,
|
|
17496
17568
|
name: "ontology-contradictions",
|
|
17497
|
-
up:
|
|
17569
|
+
up: up128,
|
|
17498
17570
|
artifacts: { tables: ["ontology_contradictions"] }
|
|
17499
17571
|
},
|
|
17500
17572
|
{
|
|
17501
17573
|
version: 128,
|
|
17502
17574
|
name: "bounded-queue-diagnostics",
|
|
17503
|
-
up:
|
|
17575
|
+
up: up129
|
|
17504
17576
|
},
|
|
17505
17577
|
{
|
|
17506
17578
|
version: 129,
|
|
17507
17579
|
name: "retire-structural-jobs",
|
|
17508
|
-
up:
|
|
17580
|
+
up: up130
|
|
17509
17581
|
},
|
|
17510
17582
|
{
|
|
17511
17583
|
version: 130,
|
|
17512
17584
|
name: "embedding-repair-state",
|
|
17513
|
-
up:
|
|
17585
|
+
up: up131,
|
|
17514
17586
|
artifacts: { tables: ["embedding_repair_budget", "embedding_repair_backoff"] }
|
|
17515
17587
|
},
|
|
17516
17588
|
{
|
|
17517
17589
|
version: 131,
|
|
17518
17590
|
name: "dreaming-evidence-consumption",
|
|
17519
|
-
up:
|
|
17591
|
+
up: up132,
|
|
17520
17592
|
artifacts: { tables: ["dreaming_evidence_consumption"] }
|
|
17521
17593
|
},
|
|
17522
17594
|
{
|
|
17523
17595
|
version: 132,
|
|
17524
17596
|
name: "observer-scoped-epistemic-assertions",
|
|
17525
|
-
up:
|
|
17597
|
+
up: up133,
|
|
17526
17598
|
artifacts: { tables: ["epistemic_assertions"] }
|
|
17527
17599
|
},
|
|
17528
17600
|
{
|
|
17529
17601
|
version: 133,
|
|
17530
17602
|
name: "dreaming-memory-head",
|
|
17531
|
-
up:
|
|
17603
|
+
up: up134,
|
|
17532
17604
|
artifacts: { tables: ["memory_head_revisions", "memory_head_entries", "memory_head_revision_entries"] }
|
|
17533
17605
|
},
|
|
17534
17606
|
{
|
|
17535
17607
|
version: 134,
|
|
17536
17608
|
name: "scope-memory-head-entries",
|
|
17537
|
-
up:
|
|
17609
|
+
up: up135,
|
|
17538
17610
|
artifacts: { tables: ["memory_head_entries"] }
|
|
17539
17611
|
},
|
|
17540
17612
|
{
|
|
17541
17613
|
version: 135,
|
|
17542
17614
|
name: "memory-head-publication",
|
|
17543
|
-
up:
|
|
17615
|
+
up: up136,
|
|
17544
17616
|
artifacts: { tables: ["memory_head_publications"] }
|
|
17545
17617
|
},
|
|
17546
17618
|
{
|
|
17547
17619
|
version: 136,
|
|
17548
17620
|
name: "memory-head-revisions",
|
|
17549
|
-
up:
|
|
17621
|
+
up: up137,
|
|
17550
17622
|
artifacts: { tables: ["memory_head_revisions"] }
|
|
17551
17623
|
},
|
|
17552
17624
|
{
|
|
17553
17625
|
version: 137,
|
|
17554
17626
|
name: "dreaming-head-manifest",
|
|
17555
|
-
up:
|
|
17627
|
+
up: up138,
|
|
17556
17628
|
artifacts: {
|
|
17557
17629
|
columns: [
|
|
17558
17630
|
{ table: "dreaming_passes", column: "head_revision" },
|
|
@@ -17563,7 +17635,7 @@ var MIGRATIONS = [
|
|
|
17563
17635
|
{
|
|
17564
17636
|
version: 138,
|
|
17565
17637
|
name: "bounded-status-projections",
|
|
17566
|
-
up:
|
|
17638
|
+
up: up139,
|
|
17567
17639
|
artifacts: {
|
|
17568
17640
|
tables: ["transcript_capture_status", "memories_duplicate_hash_counts", "memories_diagnostics_state"]
|
|
17569
17641
|
}
|
|
@@ -17571,31 +17643,31 @@ var MIGRATIONS = [
|
|
|
17571
17643
|
{
|
|
17572
17644
|
version: 139,
|
|
17573
17645
|
name: "native-source-sync-state",
|
|
17574
|
-
up:
|
|
17646
|
+
up: up140,
|
|
17575
17647
|
artifacts: { tables: ["native_source_sync_state"] }
|
|
17576
17648
|
},
|
|
17577
17649
|
{
|
|
17578
17650
|
version: 140,
|
|
17579
17651
|
name: "transcript-recovery-frontier",
|
|
17580
|
-
up:
|
|
17652
|
+
up: up141,
|
|
17581
17653
|
artifacts: { tables: ["transcript_recovery_frontiers"] }
|
|
17582
17654
|
},
|
|
17583
17655
|
{
|
|
17584
17656
|
version: 141,
|
|
17585
17657
|
name: "source-sync-checkpoints",
|
|
17586
|
-
up:
|
|
17658
|
+
up: up142,
|
|
17587
17659
|
artifacts: { tables: ["source_sync_checkpoints"] }
|
|
17588
17660
|
},
|
|
17589
17661
|
{
|
|
17590
17662
|
version: 142,
|
|
17591
17663
|
name: "source-sync-frontier",
|
|
17592
|
-
up:
|
|
17664
|
+
up: up143,
|
|
17593
17665
|
artifacts: { columns: [{ table: "source_sync_checkpoints", column: "frontier" }] }
|
|
17594
17666
|
},
|
|
17595
17667
|
{
|
|
17596
17668
|
version: 143,
|
|
17597
17669
|
name: "embedding-index-progress",
|
|
17598
|
-
up:
|
|
17670
|
+
up: up144,
|
|
17599
17671
|
artifacts: {
|
|
17600
17672
|
columns: [
|
|
17601
17673
|
{ table: "embedding_index_state", column: "migration_phase" },
|
|
@@ -17611,19 +17683,19 @@ var MIGRATIONS = [
|
|
|
17611
17683
|
{
|
|
17612
17684
|
version: 144,
|
|
17613
17685
|
name: "memory-job-lease-token",
|
|
17614
|
-
up:
|
|
17686
|
+
up: up145,
|
|
17615
17687
|
artifacts: { columns: [{ table: "memory_jobs", column: "lease_token" }] }
|
|
17616
17688
|
},
|
|
17617
17689
|
{
|
|
17618
17690
|
version: 145,
|
|
17619
17691
|
name: "dreaming-evidence-reviews",
|
|
17620
|
-
up:
|
|
17692
|
+
up: up146,
|
|
17621
17693
|
artifacts: { tables: ["dreaming_evidence_reviews"] }
|
|
17622
17694
|
},
|
|
17623
17695
|
{
|
|
17624
17696
|
version: 146,
|
|
17625
17697
|
name: "source-transcript-import",
|
|
17626
|
-
up:
|
|
17698
|
+
up: up147,
|
|
17627
17699
|
artifacts: {
|
|
17628
17700
|
tables: [
|
|
17629
17701
|
"source_import_jobs",
|
|
@@ -17642,19 +17714,19 @@ var MIGRATIONS = [
|
|
|
17642
17714
|
{
|
|
17643
17715
|
version: 147,
|
|
17644
17716
|
name: "source-import-replay-file-slots",
|
|
17645
|
-
up:
|
|
17717
|
+
up: up148,
|
|
17646
17718
|
artifacts: { tables: ["source_import_files"] }
|
|
17647
17719
|
},
|
|
17648
17720
|
{
|
|
17649
17721
|
version: 148,
|
|
17650
17722
|
name: "source-import-attempt-provenance",
|
|
17651
|
-
up:
|
|
17723
|
+
up: up149,
|
|
17652
17724
|
artifacts: { columns: [{ table: "source_import_record_attempts", column: "source_id" }] }
|
|
17653
17725
|
},
|
|
17654
17726
|
{
|
|
17655
17727
|
version: 149,
|
|
17656
17728
|
name: "transcript-import-state-machine",
|
|
17657
|
-
up:
|
|
17729
|
+
up: up150,
|
|
17658
17730
|
artifacts: {
|
|
17659
17731
|
columns: [
|
|
17660
17732
|
{ table: "source_import_jobs", column: "duplicate_mode" },
|
|
@@ -17666,13 +17738,42 @@ var MIGRATIONS = [
|
|
|
17666
17738
|
{
|
|
17667
17739
|
version: 150,
|
|
17668
17740
|
name: "memory-head-freshness",
|
|
17669
|
-
up:
|
|
17741
|
+
up: up151,
|
|
17670
17742
|
artifacts: {
|
|
17671
17743
|
columns: [
|
|
17672
17744
|
{ table: "memory_md_heads", column: "is_current" },
|
|
17673
17745
|
{ table: "dreaming_passes", column: "head_base_revision" }
|
|
17674
17746
|
]
|
|
17675
17747
|
}
|
|
17748
|
+
},
|
|
17749
|
+
{
|
|
17750
|
+
version: 151,
|
|
17751
|
+
name: "transcript-import-bytes",
|
|
17752
|
+
up,
|
|
17753
|
+
artifacts: {
|
|
17754
|
+
tables: [
|
|
17755
|
+
"source_import_chunks",
|
|
17756
|
+
"source_import_capacity",
|
|
17757
|
+
"source_import_migrations",
|
|
17758
|
+
"source_import_migration_streams",
|
|
17759
|
+
"source_import_migration_counts"
|
|
17760
|
+
],
|
|
17761
|
+
columns: [
|
|
17762
|
+
{ table: "source_import_files", column: "storage_state" },
|
|
17763
|
+
{ table: "source_import_files", column: "upload_generation" },
|
|
17764
|
+
{ table: "source_import_files", column: "upload_offset" },
|
|
17765
|
+
{ table: "source_import_files", column: "upload_size" },
|
|
17766
|
+
{ table: "source_import_files", column: "upload_digest" },
|
|
17767
|
+
...["checkpoint_line_number", "reserved_bytes", "original_path"].map((column) => ({
|
|
17768
|
+
table: "source_import_files",
|
|
17769
|
+
column
|
|
17770
|
+
})),
|
|
17771
|
+
...["retry_count", "cleanup_state", "retry_cursor", "retry_requested"].map((column) => ({
|
|
17772
|
+
table: "source_import_jobs",
|
|
17773
|
+
column
|
|
17774
|
+
}))
|
|
17775
|
+
]
|
|
17776
|
+
}
|
|
17676
17777
|
}
|
|
17677
17778
|
];
|
|
17678
17779
|
var LATEST_SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1]?.version ?? 0;
|