@signetai/connector-base 1.0.1 → 1.0.2-next.2664
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 +482 -350
- package/dist/config.d.ts +10 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/index.d.ts +7 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +761 -421
- package/dist/launcher.d.ts +12 -0
- package/dist/launcher.d.ts.map +1 -0
- package/package.json +2 -2
package/dist/agent-dir.js
CHANGED
|
@@ -10402,6 +10402,79 @@ var DAEMON_DERIVED_MEMORY_SOURCE_TYPES = [
|
|
|
10402
10402
|
"dreaming"
|
|
10403
10403
|
];
|
|
10404
10404
|
function up(db) {
|
|
10405
|
+
if (!db.prepare("PRAGMA table_info(source_import_records)").all().some((row) => row.name === "redacted_bytes"))
|
|
10406
|
+
db.exec("ALTER TABLE source_import_records ADD COLUMN redacted_bytes INTEGER NOT NULL DEFAULT 0");
|
|
10407
|
+
db.exec(`
|
|
10408
|
+
CREATE TABLE IF NOT EXISTS session_transcript_deletions (
|
|
10409
|
+
agent_id TEXT NOT NULL,
|
|
10410
|
+
session_key TEXT NOT NULL,
|
|
10411
|
+
generation INTEGER NOT NULL DEFAULT 1,
|
|
10412
|
+
watermark TEXT NOT NULL,
|
|
10413
|
+
opened_at TEXT,
|
|
10414
|
+
blocked INTEGER NOT NULL DEFAULT 1,
|
|
10415
|
+
ended INTEGER NOT NULL DEFAULT 0,
|
|
10416
|
+
pending_start INTEGER NOT NULL DEFAULT 0,
|
|
10417
|
+
lifecycle_intent_seq INTEGER NOT NULL DEFAULT 0,
|
|
10418
|
+
receipt_generation INTEGER NOT NULL DEFAULT 1,
|
|
10419
|
+
harness TEXT,
|
|
10420
|
+
project TEXT,
|
|
10421
|
+
hard INTEGER NOT NULL DEFAULT 0,
|
|
10422
|
+
phase TEXT NOT NULL DEFAULT 'evidence',
|
|
10423
|
+
counts TEXT NOT NULL DEFAULT '{}',
|
|
10424
|
+
PRIMARY KEY (agent_id, session_key)
|
|
10425
|
+
);
|
|
10426
|
+
CREATE TABLE IF NOT EXISTS session_transcript_deleted_prefixes (
|
|
10427
|
+
agent_id TEXT NOT NULL,
|
|
10428
|
+
session_key TEXT NOT NULL,
|
|
10429
|
+
generation INTEGER NOT NULL,
|
|
10430
|
+
origin TEXT NOT NULL,
|
|
10431
|
+
record_count INTEGER NOT NULL,
|
|
10432
|
+
record_hash TEXT NOT NULL,
|
|
10433
|
+
PRIMARY KEY (agent_id, session_key, generation, origin)
|
|
10434
|
+
);
|
|
10435
|
+
CREATE TABLE IF NOT EXISTS session_transcript_deleted_positions (
|
|
10436
|
+
agent_id TEXT NOT NULL,
|
|
10437
|
+
session_key TEXT NOT NULL,
|
|
10438
|
+
generation INTEGER NOT NULL,
|
|
10439
|
+
origin TEXT NOT NULL,
|
|
10440
|
+
position INTEGER NOT NULL,
|
|
10441
|
+
record_hash TEXT NOT NULL,
|
|
10442
|
+
PRIMARY KEY (agent_id, session_key, generation, origin, position),
|
|
10443
|
+
FOREIGN KEY (agent_id, session_key, generation, origin)
|
|
10444
|
+
REFERENCES session_transcript_deleted_prefixes(agent_id, session_key, generation, origin) ON DELETE CASCADE
|
|
10445
|
+
);
|
|
10446
|
+
CREATE TABLE IF NOT EXISTS session_transcript_deleted_sources (
|
|
10447
|
+
agent_id TEXT NOT NULL,
|
|
10448
|
+
session_key TEXT NOT NULL,
|
|
10449
|
+
generation INTEGER NOT NULL,
|
|
10450
|
+
kind TEXT NOT NULL,
|
|
10451
|
+
id TEXT NOT NULL,
|
|
10452
|
+
outcome TEXT NOT NULL DEFAULT 'deleted',
|
|
10453
|
+
PRIMARY KEY (agent_id, session_key, generation, kind, id)
|
|
10454
|
+
);
|
|
10455
|
+
CREATE TABLE IF NOT EXISTS session_transcript_delete_files (
|
|
10456
|
+
agent_id TEXT NOT NULL,
|
|
10457
|
+
session_key TEXT NOT NULL,
|
|
10458
|
+
generation INTEGER NOT NULL,
|
|
10459
|
+
path TEXT NOT NULL,
|
|
10460
|
+
checkpoint TEXT,
|
|
10461
|
+
done INTEGER NOT NULL DEFAULT 0,
|
|
10462
|
+
PRIMARY KEY (agent_id, session_key, generation, path)
|
|
10463
|
+
);
|
|
10464
|
+
CREATE INDEX IF NOT EXISTS idx_session_delete_files_pending ON session_transcript_delete_files(path) WHERE done = 0 AND checkpoint IS NOT NULL;
|
|
10465
|
+
CREATE INDEX IF NOT EXISTS idx_import_records_session_delete ON source_import_records(agent_id,canonical_key,redacted_bytes);
|
|
10466
|
+
CREATE INDEX IF NOT EXISTS idx_memories_session_delete_source ON memories(agent_id,source_id);
|
|
10467
|
+
CREATE INDEX IF NOT EXISTS idx_capture_jobs_session_delete ON transcript_capture_jobs(agent_id,session_key);
|
|
10468
|
+
CREATE INDEX IF NOT EXISTS idx_session_delete_source_lookup
|
|
10469
|
+
ON session_transcript_deleted_sources(agent_id, kind, id, outcome);
|
|
10470
|
+
`);
|
|
10471
|
+
const columns = db.prepare("PRAGMA table_info(session_transcript_deletions)").all();
|
|
10472
|
+
for (const column of ["pending_start", "lifecycle_intent_seq"]) {
|
|
10473
|
+
if (!columns.some((row) => row.name === column))
|
|
10474
|
+
db.exec(`ALTER TABLE session_transcript_deletions ADD COLUMN ${column} INTEGER NOT NULL DEFAULT 0`);
|
|
10475
|
+
}
|
|
10476
|
+
}
|
|
10477
|
+
function up2(db) {
|
|
10405
10478
|
const hasColumn = (table, column) => {
|
|
10406
10479
|
const statement = db.prepare(`SELECT 1 FROM pragma_table_info('${table}') WHERE name = ?`);
|
|
10407
10480
|
try {
|
|
@@ -10461,7 +10534,7 @@ function up(db) {
|
|
|
10461
10534
|
CREATE INDEX IF NOT EXISTS idx_transcript_import_harness ON transcript_import_conversations(agent_id,harness);
|
|
10462
10535
|
`);
|
|
10463
10536
|
}
|
|
10464
|
-
function
|
|
10537
|
+
function up3(db) {
|
|
10465
10538
|
db.exec(`
|
|
10466
10539
|
DROP INDEX IF EXISTS idx_memory_artifacts_agent_sha;
|
|
10467
10540
|
CREATE INDEX idx_memory_artifacts_agent_sha ON memory_artifacts(agent_id, source_sha256, COALESCE(source_id, ''), COALESCE(is_deleted, 0), captured_at DESC, source_path)
|
|
@@ -10473,7 +10546,7 @@ function addColumnIfMissing(db, column, definition) {
|
|
|
10473
10546
|
return;
|
|
10474
10547
|
db.exec(`ALTER TABLE transcript_capture_jobs ADD COLUMN ${column} ${definition}`);
|
|
10475
10548
|
}
|
|
10476
|
-
function
|
|
10549
|
+
function up4(db) {
|
|
10477
10550
|
const table = db.prepare("SELECT 1 AS present FROM sqlite_master WHERE type = 'table' AND name = 'transcript_capture_jobs'").get();
|
|
10478
10551
|
if (!table?.present)
|
|
10479
10552
|
return;
|
|
@@ -10490,7 +10563,7 @@ function up3(db) {
|
|
|
10490
10563
|
ON transcript_capture_jobs(agent_id, source_sha256);
|
|
10491
10564
|
`);
|
|
10492
10565
|
}
|
|
10493
|
-
function
|
|
10566
|
+
function up5(db) {
|
|
10494
10567
|
db.exec(`
|
|
10495
10568
|
CREATE TABLE IF NOT EXISTS source_sync_failures (
|
|
10496
10569
|
agent_id TEXT NOT NULL,
|
|
@@ -10513,7 +10586,7 @@ function up4(db) {
|
|
|
10513
10586
|
WHERE resolved_at IS NULL;
|
|
10514
10587
|
`);
|
|
10515
10588
|
}
|
|
10516
|
-
function
|
|
10589
|
+
function up6(db) {
|
|
10517
10590
|
db.exec("DROP TABLE IF EXISTS mcp_invocations");
|
|
10518
10591
|
}
|
|
10519
10592
|
var MEMORIES_FTS_TOKENIZER = "porter unicode61";
|
|
@@ -10628,7 +10701,7 @@ function memoriesFtsNeedsTokenizerRepair(sql) {
|
|
|
10628
10701
|
return false;
|
|
10629
10702
|
return !normalizeSql(sql).includes(`tokenize='${MEMORIES_FTS_TOKENIZER}'`);
|
|
10630
10703
|
}
|
|
10631
|
-
function
|
|
10704
|
+
function up7(db) {
|
|
10632
10705
|
db.exec(`
|
|
10633
10706
|
CREATE TABLE IF NOT EXISTS schema_migrations (
|
|
10634
10707
|
version INTEGER PRIMARY KEY,
|
|
@@ -10726,7 +10799,7 @@ function addColumnIfMissing2(db, table, column, definition) {
|
|
|
10726
10799
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
10727
10800
|
}
|
|
10728
10801
|
}
|
|
10729
|
-
function
|
|
10802
|
+
function up8(db) {
|
|
10730
10803
|
addColumnIfMissing2(db, "memories", "content_hash", "TEXT");
|
|
10731
10804
|
addColumnIfMissing2(db, "memories", "normalized_content", "TEXT");
|
|
10732
10805
|
addColumnIfMissing2(db, "memories", "is_deleted", "INTEGER DEFAULT 0");
|
|
@@ -10844,7 +10917,7 @@ function addColumnIfMissing3(db, table, column, definition) {
|
|
|
10844
10917
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
10845
10918
|
return true;
|
|
10846
10919
|
}
|
|
10847
|
-
function
|
|
10920
|
+
function up9(db) {
|
|
10848
10921
|
addColumnIfMissing3(db, "memories", "why", "TEXT");
|
|
10849
10922
|
addColumnIfMissing3(db, "memories", "project", "TEXT");
|
|
10850
10923
|
db.exec(`DROP INDEX IF EXISTS idx_memories_content_hash`);
|
|
@@ -10881,7 +10954,7 @@ function addColumnIfMissing4(db, table, column, definition) {
|
|
|
10881
10954
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
10882
10955
|
}
|
|
10883
10956
|
}
|
|
10884
|
-
function
|
|
10957
|
+
function up10(db) {
|
|
10885
10958
|
addColumnIfMissing4(db, "memory_history", "actor_type", "TEXT");
|
|
10886
10959
|
addColumnIfMissing4(db, "memory_history", "session_id", "TEXT");
|
|
10887
10960
|
addColumnIfMissing4(db, "memory_history", "request_id", "TEXT");
|
|
@@ -10914,7 +10987,7 @@ function addColumnIfMissing5(db, table, column, definition) {
|
|
|
10914
10987
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
10915
10988
|
}
|
|
10916
10989
|
}
|
|
10917
|
-
function
|
|
10990
|
+
function up11(db) {
|
|
10918
10991
|
addColumnIfMissing5(db, "entities", "canonical_name", "TEXT");
|
|
10919
10992
|
addColumnIfMissing5(db, "entities", "mentions", "INTEGER DEFAULT 0");
|
|
10920
10993
|
addColumnIfMissing5(db, "entities", "embedding", "BLOB");
|
|
@@ -10931,7 +11004,7 @@ function hasColumn4(db, table, column) {
|
|
|
10931
11004
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
10932
11005
|
return rows.some((r) => r.name === column);
|
|
10933
11006
|
}
|
|
10934
|
-
function
|
|
11007
|
+
function up12(db) {
|
|
10935
11008
|
if (!hasColumn4(db, "memories", "idempotency_key")) {
|
|
10936
11009
|
db.exec("ALTER TABLE memories ADD COLUMN idempotency_key TEXT");
|
|
10937
11010
|
}
|
|
@@ -10946,7 +11019,7 @@ function hasColumn5(db, table, column) {
|
|
|
10946
11019
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
10947
11020
|
return rows.some((r) => r.name === column);
|
|
10948
11021
|
}
|
|
10949
|
-
function
|
|
11022
|
+
function up13(db) {
|
|
10950
11023
|
db.exec(`
|
|
10951
11024
|
CREATE TABLE IF NOT EXISTS documents (
|
|
10952
11025
|
id TEXT PRIMARY KEY,
|
|
@@ -11003,7 +11076,7 @@ function up12(db) {
|
|
|
11003
11076
|
db.exec("ALTER TABLE memory_jobs ADD COLUMN document_id TEXT");
|
|
11004
11077
|
}
|
|
11005
11078
|
}
|
|
11006
|
-
function
|
|
11079
|
+
function up14(db) {
|
|
11007
11080
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='embeddings'").all();
|
|
11008
11081
|
if (tables.length === 0)
|
|
11009
11082
|
return;
|
|
@@ -11020,7 +11093,7 @@ function up13(db) {
|
|
|
11020
11093
|
ON embeddings(content_hash)
|
|
11021
11094
|
`);
|
|
11022
11095
|
}
|
|
11023
|
-
function
|
|
11096
|
+
function up15(db) {
|
|
11024
11097
|
db.exec(`
|
|
11025
11098
|
CREATE TABLE IF NOT EXISTS summary_jobs (
|
|
11026
11099
|
id TEXT PRIMARY KEY,
|
|
@@ -11040,7 +11113,7 @@ function up14(db) {
|
|
|
11040
11113
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_summary_jobs_status
|
|
11041
11114
|
ON summary_jobs(status)`);
|
|
11042
11115
|
}
|
|
11043
|
-
function
|
|
11116
|
+
function up16(db) {
|
|
11044
11117
|
db.exec(`
|
|
11045
11118
|
CREATE TABLE IF NOT EXISTS umap_cache (
|
|
11046
11119
|
id INTEGER PRIMARY KEY,
|
|
@@ -11051,7 +11124,7 @@ function up15(db) {
|
|
|
11051
11124
|
)
|
|
11052
11125
|
`);
|
|
11053
11126
|
}
|
|
11054
|
-
function
|
|
11127
|
+
function up17(db) {
|
|
11055
11128
|
db.exec(`
|
|
11056
11129
|
CREATE TABLE IF NOT EXISTS session_scores (
|
|
11057
11130
|
id TEXT PRIMARY KEY,
|
|
@@ -11071,7 +11144,7 @@ function up16(db) {
|
|
|
11071
11144
|
ON session_scores(session_key);
|
|
11072
11145
|
`);
|
|
11073
11146
|
}
|
|
11074
|
-
function
|
|
11147
|
+
function up18(db) {
|
|
11075
11148
|
db.exec(`
|
|
11076
11149
|
CREATE TABLE IF NOT EXISTS scheduled_tasks (
|
|
11077
11150
|
id TEXT PRIMARY KEY,
|
|
@@ -11112,7 +11185,7 @@ function addColumnIfMissing6(db, table, column, definition) {
|
|
|
11112
11185
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11113
11186
|
}
|
|
11114
11187
|
}
|
|
11115
|
-
function
|
|
11188
|
+
function up19(db) {
|
|
11116
11189
|
db.exec(`
|
|
11117
11190
|
CREATE TABLE IF NOT EXISTS ingestion_jobs (
|
|
11118
11191
|
id TEXT PRIMARY KEY,
|
|
@@ -11138,7 +11211,7 @@ function up18(db) {
|
|
|
11138
11211
|
addColumnIfMissing6(db, "memories", "source_path", "TEXT");
|
|
11139
11212
|
addColumnIfMissing6(db, "memories", "source_section", "TEXT");
|
|
11140
11213
|
}
|
|
11141
|
-
function
|
|
11214
|
+
function up20(db) {
|
|
11142
11215
|
db.exec(`
|
|
11143
11216
|
CREATE TABLE IF NOT EXISTS telemetry_events (
|
|
11144
11217
|
id TEXT PRIMARY KEY,
|
|
@@ -11163,7 +11236,7 @@ function addColumnIfMissing7(db, table, column, definition) {
|
|
|
11163
11236
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11164
11237
|
}
|
|
11165
11238
|
}
|
|
11166
|
-
function
|
|
11239
|
+
function up21(db) {
|
|
11167
11240
|
db.exec(`
|
|
11168
11241
|
CREATE TABLE IF NOT EXISTS session_memories (
|
|
11169
11242
|
id TEXT PRIMARY KEY,
|
|
@@ -11190,7 +11263,7 @@ function up20(db) {
|
|
|
11190
11263
|
addColumnIfMissing7(db, "session_scores", "confidence", "REAL");
|
|
11191
11264
|
addColumnIfMissing7(db, "session_scores", "continuity_reasoning", "TEXT");
|
|
11192
11265
|
}
|
|
11193
|
-
function
|
|
11266
|
+
function up22(db) {
|
|
11194
11267
|
db.exec(`
|
|
11195
11268
|
CREATE TABLE IF NOT EXISTS session_checkpoints (
|
|
11196
11269
|
id TEXT PRIMARY KEY,
|
|
@@ -11212,7 +11285,7 @@ function up21(db) {
|
|
|
11212
11285
|
ON session_checkpoints(project_normalized, created_at DESC);
|
|
11213
11286
|
`);
|
|
11214
11287
|
}
|
|
11215
|
-
function
|
|
11288
|
+
function up23(db) {
|
|
11216
11289
|
const cols = db.prepare("PRAGMA table_info(scheduled_tasks)").all();
|
|
11217
11290
|
const colNames = new Set(cols.flatMap((c) => typeof c.name === "string" ? [c.name] : []));
|
|
11218
11291
|
if (!colNames.has("skill_name")) {
|
|
@@ -11223,7 +11296,7 @@ function up22(db) {
|
|
|
11223
11296
|
CHECK (skill_mode IN ('inject', 'slash') OR skill_mode IS NULL)`);
|
|
11224
11297
|
}
|
|
11225
11298
|
}
|
|
11226
|
-
function
|
|
11299
|
+
function up24(db) {
|
|
11227
11300
|
const existing = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='skill_meta'").get();
|
|
11228
11301
|
if (existing)
|
|
11229
11302
|
return;
|
|
@@ -11255,7 +11328,7 @@ function up23(db) {
|
|
|
11255
11328
|
CREATE INDEX idx_skill_meta_source ON skill_meta(source);
|
|
11256
11329
|
`);
|
|
11257
11330
|
}
|
|
11258
|
-
function
|
|
11331
|
+
function up25(db) {
|
|
11259
11332
|
const entityCols = db.prepare("PRAGMA table_info(entities)").all();
|
|
11260
11333
|
const entityColNames = new Set(entityCols.flatMap((c) => typeof c.name === "string" ? [c.name] : []));
|
|
11261
11334
|
if (!entityColNames.has("agent_id")) {
|
|
@@ -11340,13 +11413,13 @@ function addColumnIfMissing8(db, table, column, definition) {
|
|
|
11340
11413
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11341
11414
|
}
|
|
11342
11415
|
}
|
|
11343
|
-
function
|
|
11416
|
+
function up26(db) {
|
|
11344
11417
|
addColumnIfMissing8(db, "session_memories", "entity_slot", "INTEGER");
|
|
11345
11418
|
addColumnIfMissing8(db, "session_memories", "aspect_slot", "INTEGER");
|
|
11346
11419
|
addColumnIfMissing8(db, "session_memories", "is_constraint", "INTEGER NOT NULL DEFAULT 0");
|
|
11347
11420
|
addColumnIfMissing8(db, "session_memories", "structural_density", "INTEGER");
|
|
11348
11421
|
}
|
|
11349
|
-
function
|
|
11422
|
+
function up27(db) {
|
|
11350
11423
|
const columns = db.prepare("PRAGMA table_info(session_checkpoints)").all();
|
|
11351
11424
|
const columnNames = new Set(columns.flatMap((column) => typeof column.name === "string" ? [column.name] : []));
|
|
11352
11425
|
if (!columnNames.has("focal_entity_ids")) {
|
|
@@ -11371,25 +11444,25 @@ function addColumnIfMissing9(db, table, column, definition) {
|
|
|
11371
11444
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11372
11445
|
}
|
|
11373
11446
|
}
|
|
11374
|
-
function
|
|
11447
|
+
function up28(db) {
|
|
11375
11448
|
addColumnIfMissing9(db, "entities", "pinned", "INTEGER NOT NULL DEFAULT 0");
|
|
11376
11449
|
addColumnIfMissing9(db, "entities", "pinned_at", "TEXT");
|
|
11377
11450
|
db.exec("CREATE INDEX IF NOT EXISTS idx_entities_pinned ON entities(agent_id, pinned, pinned_at DESC)");
|
|
11378
11451
|
}
|
|
11379
|
-
function up28(_db) {}
|
|
11380
11452
|
function up29(_db) {}
|
|
11453
|
+
function up30(_db) {}
|
|
11381
11454
|
function addColumnIfMissing10(db, table, column, definition) {
|
|
11382
11455
|
const cols = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
11383
11456
|
if (!cols.some((c) => c.name === column)) {
|
|
11384
11457
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11385
11458
|
}
|
|
11386
11459
|
}
|
|
11387
|
-
function
|
|
11460
|
+
function up31(db) {
|
|
11388
11461
|
addColumnIfMissing10(db, "session_memories", "agent_relevance_score", "REAL");
|
|
11389
11462
|
addColumnIfMissing10(db, "session_memories", "agent_feedback_count", "INTEGER DEFAULT 0");
|
|
11390
11463
|
}
|
|
11391
|
-
function
|
|
11392
|
-
function
|
|
11464
|
+
function up32(_db) {}
|
|
11465
|
+
function up33(db) {
|
|
11393
11466
|
db.exec(`
|
|
11394
11467
|
UPDATE entities
|
|
11395
11468
|
SET canonical_name = REPLACE(REPLACE(REPLACE(
|
|
@@ -11398,7 +11471,7 @@ function up32(db) {
|
|
|
11398
11471
|
WHERE canonical_name IS NULL
|
|
11399
11472
|
`);
|
|
11400
11473
|
}
|
|
11401
|
-
function
|
|
11474
|
+
function up34(db) {
|
|
11402
11475
|
db.exec(`
|
|
11403
11476
|
CREATE TABLE IF NOT EXISTS memories_cold (
|
|
11404
11477
|
archive_id TEXT PRIMARY KEY,
|
|
@@ -11435,7 +11508,7 @@ function up33(db) {
|
|
|
11435
11508
|
CREATE INDEX IF NOT EXISTS idx_cold_source ON memories_cold(cold_source_id);
|
|
11436
11509
|
`);
|
|
11437
11510
|
}
|
|
11438
|
-
function
|
|
11511
|
+
function up35(db) {
|
|
11439
11512
|
db.exec(`
|
|
11440
11513
|
CREATE TABLE IF NOT EXISTS session_summaries (
|
|
11441
11514
|
id TEXT PRIMARY KEY,
|
|
@@ -11480,7 +11553,7 @@ function up34(db) {
|
|
|
11480
11553
|
WHERE session_key IS NOT NULL;
|
|
11481
11554
|
`);
|
|
11482
11555
|
}
|
|
11483
|
-
function
|
|
11556
|
+
function up36(db) {
|
|
11484
11557
|
db.exec(`
|
|
11485
11558
|
CREATE TABLE IF NOT EXISTS memory_jobs_new (
|
|
11486
11559
|
id TEXT PRIMARY KEY,
|
|
@@ -11525,7 +11598,7 @@ function up35(db) {
|
|
|
11525
11598
|
ON memory_jobs(failed_at);
|
|
11526
11599
|
`);
|
|
11527
11600
|
}
|
|
11528
|
-
function
|
|
11601
|
+
function up37(db) {
|
|
11529
11602
|
const depCols = db.prepare("PRAGMA table_info(entity_dependencies)").all();
|
|
11530
11603
|
if (!depCols.some((c) => c.name === "reason")) {
|
|
11531
11604
|
db.exec("ALTER TABLE entity_dependencies ADD COLUMN reason TEXT");
|
|
@@ -11535,7 +11608,7 @@ function up36(db) {
|
|
|
11535
11608
|
db.exec("ALTER TABLE entities ADD COLUMN last_synthesized_at TEXT");
|
|
11536
11609
|
}
|
|
11537
11610
|
}
|
|
11538
|
-
function
|
|
11611
|
+
function up38(db) {
|
|
11539
11612
|
const cols = db.prepare("PRAGMA table_info(embeddings)").all();
|
|
11540
11613
|
if (cols.length === 0)
|
|
11541
11614
|
return;
|
|
@@ -11543,14 +11616,14 @@ function up37(db) {
|
|
|
11543
11616
|
db.exec("ALTER TABLE embeddings ADD COLUMN vector BLOB");
|
|
11544
11617
|
}
|
|
11545
11618
|
}
|
|
11546
|
-
function
|
|
11619
|
+
function up39(db) {
|
|
11547
11620
|
const cols = db.prepare("PRAGMA table_info(memories)").all();
|
|
11548
11621
|
if (!cols.some((c) => c.name === "scope")) {
|
|
11549
11622
|
db.exec("ALTER TABLE memories ADD COLUMN scope TEXT DEFAULT NULL");
|
|
11550
11623
|
}
|
|
11551
11624
|
db.exec("CREATE INDEX IF NOT EXISTS idx_memories_scope ON memories(scope) WHERE scope IS NOT NULL");
|
|
11552
11625
|
}
|
|
11553
|
-
function
|
|
11626
|
+
function up40(db) {
|
|
11554
11627
|
db.exec("DROP INDEX IF EXISTS idx_memories_content_hash_unique");
|
|
11555
11628
|
db.exec(`
|
|
11556
11629
|
CREATE UNIQUE INDEX idx_memories_content_hash_unique
|
|
@@ -11558,7 +11631,7 @@ function up39(db) {
|
|
|
11558
11631
|
WHERE content_hash IS NOT NULL AND is_deleted = 0
|
|
11559
11632
|
`);
|
|
11560
11633
|
}
|
|
11561
|
-
function
|
|
11634
|
+
function up41(db) {
|
|
11562
11635
|
db.exec(`
|
|
11563
11636
|
CREATE VIRTUAL TABLE IF NOT EXISTS entities_fts USING fts5(
|
|
11564
11637
|
name, canonical_name,
|
|
@@ -11590,13 +11663,13 @@ function up40(db) {
|
|
|
11590
11663
|
END
|
|
11591
11664
|
`);
|
|
11592
11665
|
}
|
|
11593
|
-
function
|
|
11666
|
+
function up42(db) {
|
|
11594
11667
|
const cols = db.prepare("PRAGMA table_info(entity_dependencies)").all();
|
|
11595
11668
|
if (!cols.some((c) => c.name === "confidence")) {
|
|
11596
11669
|
db.exec("ALTER TABLE entity_dependencies ADD COLUMN confidence REAL DEFAULT 0.7");
|
|
11597
11670
|
}
|
|
11598
11671
|
}
|
|
11599
|
-
function
|
|
11672
|
+
function up43(db) {
|
|
11600
11673
|
db.exec(`
|
|
11601
11674
|
CREATE TABLE IF NOT EXISTS entity_communities (
|
|
11602
11675
|
id TEXT PRIMARY KEY,
|
|
@@ -11614,7 +11687,7 @@ function up42(db) {
|
|
|
11614
11687
|
db.exec("ALTER TABLE entities ADD COLUMN community_id TEXT REFERENCES entity_communities(id)");
|
|
11615
11688
|
}
|
|
11616
11689
|
}
|
|
11617
|
-
function
|
|
11690
|
+
function up44(db) {
|
|
11618
11691
|
db.exec(`
|
|
11619
11692
|
CREATE TABLE IF NOT EXISTS memory_hints (
|
|
11620
11693
|
id TEXT PRIMARY KEY,
|
|
@@ -11654,7 +11727,7 @@ function up43(db) {
|
|
|
11654
11727
|
END
|
|
11655
11728
|
`);
|
|
11656
11729
|
}
|
|
11657
|
-
function
|
|
11730
|
+
function up45(db) {
|
|
11658
11731
|
db.exec(`
|
|
11659
11732
|
DELETE FROM entity_dependencies
|
|
11660
11733
|
WHERE id NOT IN (
|
|
@@ -11672,7 +11745,7 @@ function up44(db) {
|
|
|
11672
11745
|
)
|
|
11673
11746
|
`);
|
|
11674
11747
|
}
|
|
11675
|
-
function
|
|
11748
|
+
function up46(db) {
|
|
11676
11749
|
db.exec(`
|
|
11677
11750
|
CREATE TABLE IF NOT EXISTS session_transcripts (
|
|
11678
11751
|
session_key TEXT PRIMARY KEY,
|
|
@@ -11695,7 +11768,7 @@ function addColumnIfMissing11(db, table, column, definition) {
|
|
|
11695
11768
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11696
11769
|
}
|
|
11697
11770
|
}
|
|
11698
|
-
function
|
|
11771
|
+
function up47(db) {
|
|
11699
11772
|
addColumnIfMissing11(db, "session_memories", "path_json", "TEXT");
|
|
11700
11773
|
db.exec(`
|
|
11701
11774
|
CREATE TABLE IF NOT EXISTS path_feedback_events (
|
|
@@ -11770,7 +11843,7 @@ function addColumnIfMissing12(db, table, column, definition) {
|
|
|
11770
11843
|
return;
|
|
11771
11844
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11772
11845
|
}
|
|
11773
|
-
function
|
|
11846
|
+
function up48(db) {
|
|
11774
11847
|
addColumnIfMissing12(db, "session_memories", "entity_slot", "INTEGER");
|
|
11775
11848
|
addColumnIfMissing12(db, "session_memories", "aspect_slot", "INTEGER");
|
|
11776
11849
|
addColumnIfMissing12(db, "session_memories", "is_constraint", "INTEGER NOT NULL DEFAULT 0");
|
|
@@ -11858,7 +11931,7 @@ function addColumnIfMissing13(db, table, column, definition) {
|
|
|
11858
11931
|
return;
|
|
11859
11932
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11860
11933
|
}
|
|
11861
|
-
function
|
|
11934
|
+
function up49(db) {
|
|
11862
11935
|
db.exec(`
|
|
11863
11936
|
CREATE TABLE IF NOT EXISTS agents (
|
|
11864
11937
|
id TEXT PRIMARY KEY,
|
|
@@ -11887,7 +11960,7 @@ function addColumnIfMissing14(db, table, column, definition) {
|
|
|
11887
11960
|
return;
|
|
11888
11961
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11889
11962
|
}
|
|
11890
|
-
function
|
|
11963
|
+
function up50(db) {
|
|
11891
11964
|
addColumnIfMissing14(db, "session_summaries", "source_type", "TEXT");
|
|
11892
11965
|
addColumnIfMissing14(db, "session_summaries", "source_ref", "TEXT");
|
|
11893
11966
|
addColumnIfMissing14(db, "session_summaries", "meta_json", "TEXT");
|
|
@@ -11913,7 +11986,7 @@ function addColumnIfMissing15(db, table, column, definition) {
|
|
|
11913
11986
|
return;
|
|
11914
11987
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
11915
11988
|
}
|
|
11916
|
-
function
|
|
11989
|
+
function up51(db) {
|
|
11917
11990
|
addColumnIfMissing15(db, "session_transcripts", "updated_at", "TEXT");
|
|
11918
11991
|
addColumnIfMissing15(db, "summary_jobs", "agent_id", "TEXT NOT NULL DEFAULT 'default'");
|
|
11919
11992
|
addColumnIfMissing15(db, "session_scores", "agent_id", "TEXT NOT NULL DEFAULT 'default'");
|
|
@@ -11984,7 +12057,7 @@ function up50(db) {
|
|
|
11984
12057
|
ON memory_md_heads(lease_expires_at);
|
|
11985
12058
|
`);
|
|
11986
12059
|
}
|
|
11987
|
-
function
|
|
12060
|
+
function up52(db) {
|
|
11988
12061
|
db.exec(`
|
|
11989
12062
|
DROP INDEX IF EXISTS idx_summaries_session_depth;
|
|
11990
12063
|
|
|
@@ -12045,7 +12118,7 @@ function up51(db) {
|
|
|
12045
12118
|
AND COALESCE(source_type, 'summary') = 'summary';
|
|
12046
12119
|
`);
|
|
12047
12120
|
}
|
|
12048
|
-
function
|
|
12121
|
+
function up53(db) {
|
|
12049
12122
|
db.exec(`
|
|
12050
12123
|
DROP TRIGGER IF EXISTS session_transcripts_fts_ai;
|
|
12051
12124
|
DROP TRIGGER IF EXISTS session_transcripts_fts_ad;
|
|
@@ -12143,7 +12216,7 @@ function up52(db) {
|
|
|
12143
12216
|
AND COALESCE(source_type, 'summary') = 'summary';
|
|
12144
12217
|
`);
|
|
12145
12218
|
}
|
|
12146
|
-
function
|
|
12219
|
+
function up54(db) {
|
|
12147
12220
|
db.exec(`
|
|
12148
12221
|
CREATE TABLE IF NOT EXISTS memory_thread_heads (
|
|
12149
12222
|
agent_id TEXT NOT NULL DEFAULT 'default',
|
|
@@ -12261,7 +12334,7 @@ function up53(db) {
|
|
|
12261
12334
|
WHERE excluded.latest_at >= memory_thread_heads.latest_at;
|
|
12262
12335
|
`);
|
|
12263
12336
|
}
|
|
12264
|
-
function
|
|
12337
|
+
function up55(db) {
|
|
12265
12338
|
db.exec(`
|
|
12266
12339
|
CREATE TABLE IF NOT EXISTS session_extract_cursors (
|
|
12267
12340
|
session_key TEXT NOT NULL,
|
|
@@ -12278,7 +12351,7 @@ function hasTable(db, name) {
|
|
|
12278
12351
|
WHERE type = 'table' AND name = ?
|
|
12279
12352
|
LIMIT 1`).get(name) !== undefined;
|
|
12280
12353
|
}
|
|
12281
|
-
function
|
|
12354
|
+
function up56(db) {
|
|
12282
12355
|
db.exec(`
|
|
12283
12356
|
CREATE TABLE IF NOT EXISTS entity_dependency_history (
|
|
12284
12357
|
id TEXT PRIMARY KEY,
|
|
@@ -12448,7 +12521,7 @@ function addColumnIfMissing16(db, table, column, definition) {
|
|
|
12448
12521
|
return;
|
|
12449
12522
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12450
12523
|
}
|
|
12451
|
-
function
|
|
12524
|
+
function up57(db) {
|
|
12452
12525
|
addColumnIfMissing16(db, "summary_jobs", "session_id", "TEXT");
|
|
12453
12526
|
addColumnIfMissing16(db, "summary_jobs", "trigger", "TEXT NOT NULL DEFAULT 'session_end'");
|
|
12454
12527
|
addColumnIfMissing16(db, "summary_jobs", "captured_at", "TEXT");
|
|
@@ -12540,8 +12613,8 @@ function up56(db) {
|
|
|
12540
12613
|
VALUES ('rebuild');
|
|
12541
12614
|
`);
|
|
12542
12615
|
}
|
|
12543
|
-
function
|
|
12544
|
-
function
|
|
12616
|
+
function up58(_db) {}
|
|
12617
|
+
function up59(db) {
|
|
12545
12618
|
db.exec(`
|
|
12546
12619
|
CREATE TABLE IF NOT EXISTS skill_invocations (
|
|
12547
12620
|
id TEXT PRIMARY KEY,
|
|
@@ -12557,7 +12630,7 @@ function up58(db) {
|
|
|
12557
12630
|
CREATE INDEX IF NOT EXISTS idx_skill_inv_agent ON skill_invocations(agent_id, created_at);
|
|
12558
12631
|
`);
|
|
12559
12632
|
}
|
|
12560
|
-
function
|
|
12633
|
+
function up60(db) {
|
|
12561
12634
|
db.exec(`
|
|
12562
12635
|
CREATE TABLE IF NOT EXISTS task_scope_hints (
|
|
12563
12636
|
task_id TEXT PRIMARY KEY REFERENCES scheduled_tasks(id) ON DELETE CASCADE,
|
|
@@ -12588,7 +12661,7 @@ function up59(db) {
|
|
|
12588
12661
|
ON task_scope_hints(agent_id, updated_at);
|
|
12589
12662
|
`);
|
|
12590
12663
|
}
|
|
12591
|
-
function
|
|
12664
|
+
function up61(db) {
|
|
12592
12665
|
db.exec(`
|
|
12593
12666
|
CREATE TABLE IF NOT EXISTS dreaming_state (
|
|
12594
12667
|
agent_id TEXT PRIMARY KEY NOT NULL,
|
|
@@ -12631,7 +12704,7 @@ function ensureMemoriesScopeColumns(db) {
|
|
|
12631
12704
|
if (!names.has("scope"))
|
|
12632
12705
|
db.exec("ALTER TABLE memories ADD COLUMN scope TEXT");
|
|
12633
12706
|
}
|
|
12634
|
-
function
|
|
12707
|
+
function up62(db) {
|
|
12635
12708
|
ensureMemoriesScopeColumns(db);
|
|
12636
12709
|
db.exec("DROP INDEX IF EXISTS idx_memories_content_hash_unique");
|
|
12637
12710
|
db.exec(`
|
|
@@ -12644,20 +12717,20 @@ function up61(db) {
|
|
|
12644
12717
|
WHERE content_hash IS NOT NULL AND is_deleted = 0
|
|
12645
12718
|
`);
|
|
12646
12719
|
}
|
|
12647
|
-
function
|
|
12720
|
+
function up63(db) {
|
|
12648
12721
|
const sql = readMemoriesFtsSql(db);
|
|
12649
12722
|
if (sql !== null && !memoriesFtsNeedsTokenizerRepair(sql))
|
|
12650
12723
|
return;
|
|
12651
12724
|
recreateMemoriesFts(db);
|
|
12652
12725
|
}
|
|
12653
|
-
function
|
|
12726
|
+
function up64(db) {
|
|
12654
12727
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_entities_order
|
|
12655
12728
|
ON entities(agent_id, pinned DESC, pinned_at DESC, mentions DESC, updated_at DESC, name)`);
|
|
12656
12729
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_entities_extracted_mentions
|
|
12657
12730
|
ON entities(entity_type, mentions)
|
|
12658
12731
|
WHERE entity_type = 'extracted'`);
|
|
12659
12732
|
}
|
|
12660
|
-
function
|
|
12733
|
+
function up65(db) {
|
|
12661
12734
|
const cols = db.prepare("PRAGMA table_info(entity_attributes)").all();
|
|
12662
12735
|
if (!cols.some((col) => col.name === "claim_key")) {
|
|
12663
12736
|
db.exec("ALTER TABLE entity_attributes ADD COLUMN claim_key TEXT");
|
|
@@ -12666,7 +12739,7 @@ function up64(db) {
|
|
|
12666
12739
|
ON entity_attributes(agent_id, aspect_id, claim_key, status)
|
|
12667
12740
|
WHERE claim_key IS NOT NULL`);
|
|
12668
12741
|
}
|
|
12669
|
-
function
|
|
12742
|
+
function up66(db) {
|
|
12670
12743
|
const cols = db.prepare("PRAGMA table_info(entity_attributes)").all();
|
|
12671
12744
|
if (!cols.some((col) => col.name === "group_key")) {
|
|
12672
12745
|
db.exec("ALTER TABLE entity_attributes ADD COLUMN group_key TEXT");
|
|
@@ -12678,13 +12751,13 @@ function up65(db) {
|
|
|
12678
12751
|
ON entity_attributes(agent_id, aspect_id, group_key, claim_key, status)
|
|
12679
12752
|
WHERE claim_key IS NOT NULL`);
|
|
12680
12753
|
}
|
|
12681
|
-
function
|
|
12754
|
+
function up67(db) {
|
|
12682
12755
|
const cols = db.prepare("PRAGMA table_info(memory_artifacts)").all();
|
|
12683
12756
|
if (cols.some((col) => col.name === "source_mtime_ms"))
|
|
12684
12757
|
return;
|
|
12685
12758
|
db.exec("ALTER TABLE memory_artifacts ADD COLUMN source_mtime_ms REAL");
|
|
12686
12759
|
}
|
|
12687
|
-
function
|
|
12760
|
+
function up68(db) {
|
|
12688
12761
|
const cols = db.prepare("PRAGMA table_info(memory_artifacts)").all();
|
|
12689
12762
|
const names = new Set(cols.map((col) => col.name));
|
|
12690
12763
|
if (!names.has("is_deleted")) {
|
|
@@ -12698,7 +12771,7 @@ function up67(db) {
|
|
|
12698
12771
|
ON memory_artifacts(agent_id, is_deleted, deleted_at)
|
|
12699
12772
|
`);
|
|
12700
12773
|
}
|
|
12701
|
-
function
|
|
12774
|
+
function up69(db) {
|
|
12702
12775
|
db.exec("DROP TRIGGER IF EXISTS memories_au");
|
|
12703
12776
|
db.exec(`
|
|
12704
12777
|
CREATE TRIGGER IF NOT EXISTS memories_au AFTER UPDATE OF content ON memories BEGIN
|
|
@@ -12716,7 +12789,7 @@ function addColumnIfMissing17(db, table, column, definition) {
|
|
|
12716
12789
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12717
12790
|
}
|
|
12718
12791
|
}
|
|
12719
|
-
function
|
|
12792
|
+
function up70(db) {
|
|
12720
12793
|
for (const table of ["entities", "entity_communities", "entity_attributes", "entity_dependencies"]) {
|
|
12721
12794
|
addColumnIfMissing17(db, table, "source_id", "TEXT");
|
|
12722
12795
|
addColumnIfMissing17(db, table, "source_kind", "TEXT");
|
|
@@ -12736,7 +12809,7 @@ function hasColumn7(db, table, column) {
|
|
|
12736
12809
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
12737
12810
|
return rows.some((row) => row.name === column);
|
|
12738
12811
|
}
|
|
12739
|
-
function
|
|
12812
|
+
function up71(db) {
|
|
12740
12813
|
if (!hasTable2(db, "embeddings"))
|
|
12741
12814
|
return;
|
|
12742
12815
|
if (!hasColumn7(db, "embeddings", "agent_id")) {
|
|
@@ -12744,7 +12817,7 @@ function up70(db) {
|
|
|
12744
12817
|
}
|
|
12745
12818
|
db.exec("CREATE INDEX IF NOT EXISTS idx_embeddings_agent_source ON embeddings(agent_id, source_type, source_id)");
|
|
12746
12819
|
}
|
|
12747
|
-
function
|
|
12820
|
+
function up72(db) {
|
|
12748
12821
|
db.exec(`
|
|
12749
12822
|
CREATE TABLE IF NOT EXISTS memory_search_telemetry (
|
|
12750
12823
|
id TEXT PRIMARY KEY,
|
|
@@ -12785,7 +12858,7 @@ function addColumnIfMissing18(db, table, column, definition) {
|
|
|
12785
12858
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
12786
12859
|
}
|
|
12787
12860
|
}
|
|
12788
|
-
function
|
|
12861
|
+
function up73(db) {
|
|
12789
12862
|
db.exec(`
|
|
12790
12863
|
CREATE TABLE IF NOT EXISTS ontology_proposals (
|
|
12791
12864
|
id TEXT PRIMARY KEY,
|
|
@@ -12828,7 +12901,7 @@ function up72(db) {
|
|
|
12828
12901
|
db.exec(`CREATE INDEX IF NOT EXISTS idx_${table}_proposal ON ${table}(agent_id, proposal_id)`);
|
|
12829
12902
|
}
|
|
12830
12903
|
}
|
|
12831
|
-
function
|
|
12904
|
+
function up74(db) {
|
|
12832
12905
|
db.exec(`
|
|
12833
12906
|
CREATE TABLE IF NOT EXISTS daily_reflections (
|
|
12834
12907
|
id TEXT PRIMARY KEY,
|
|
@@ -12855,7 +12928,7 @@ function up73(db) {
|
|
|
12855
12928
|
WHERE content_key IS NOT NULL;
|
|
12856
12929
|
`);
|
|
12857
12930
|
}
|
|
12858
|
-
function
|
|
12931
|
+
function up75(db) {
|
|
12859
12932
|
const cols = db.prepare("PRAGMA table_info(daily_reflections)").all();
|
|
12860
12933
|
const colNames = new Set(cols.flatMap((c) => typeof c.name === "string" ? [c.name] : []));
|
|
12861
12934
|
if (!colNames.has("content_key")) {
|
|
@@ -12892,7 +12965,7 @@ function backfillVersionRoots(db) {
|
|
|
12892
12965
|
WHERE version_root_id IS NULL
|
|
12893
12966
|
`);
|
|
12894
12967
|
}
|
|
12895
|
-
function
|
|
12968
|
+
function up76(db) {
|
|
12896
12969
|
for (const table of ["entities", "entity_aspects", "entity_dependencies"]) {
|
|
12897
12970
|
addColumnIfMissing19(db, table, "status", "TEXT NOT NULL DEFAULT 'active'");
|
|
12898
12971
|
addColumnIfMissing19(db, table, "archived_at", "TEXT");
|
|
@@ -12927,7 +13000,7 @@ function up75(db) {
|
|
|
12927
13000
|
ON entity_aspects(agent_id, proposal_id);
|
|
12928
13001
|
`);
|
|
12929
13002
|
}
|
|
12930
|
-
function
|
|
13003
|
+
function up77(db) {
|
|
12931
13004
|
db.exec(`
|
|
12932
13005
|
CREATE TABLE IF NOT EXISTS epistemic_assertions (
|
|
12933
13006
|
id TEXT PRIMARY KEY,
|
|
@@ -12983,7 +13056,7 @@ function ensureMemoriesScopeColumns2(db) {
|
|
|
12983
13056
|
if (!names.has("runtime_path"))
|
|
12984
13057
|
db.exec("ALTER TABLE memories ADD COLUMN runtime_path TEXT");
|
|
12985
13058
|
}
|
|
12986
|
-
function
|
|
13059
|
+
function up78(db) {
|
|
12987
13060
|
ensureMemoriesScopeColumns2(db);
|
|
12988
13061
|
db.exec("DROP INDEX IF EXISTS idx_memories_idempotency_key");
|
|
12989
13062
|
db.exec(`
|
|
@@ -12997,7 +13070,7 @@ function up77(db) {
|
|
|
12997
13070
|
WHERE idempotency_key IS NOT NULL AND is_deleted = 0
|
|
12998
13071
|
`);
|
|
12999
13072
|
}
|
|
13000
|
-
function
|
|
13073
|
+
function up79(db) {
|
|
13001
13074
|
db.exec(`
|
|
13002
13075
|
CREATE TABLE IF NOT EXISTS session_context_epochs (
|
|
13003
13076
|
session_key TEXT NOT NULL,
|
|
@@ -13032,7 +13105,7 @@ function up78(db) {
|
|
|
13032
13105
|
ON session_recall_events(item_kind, item_id, created_at DESC);
|
|
13033
13106
|
`);
|
|
13034
13107
|
}
|
|
13035
|
-
function
|
|
13108
|
+
function up80(db) {
|
|
13036
13109
|
db.exec(`
|
|
13037
13110
|
CREATE TABLE IF NOT EXISTS aggregate_memory_sources (
|
|
13038
13111
|
aggregate_memory_id TEXT NOT NULL,
|
|
@@ -13051,7 +13124,7 @@ function addColumnIfMissing20(db, table, column, definition) {
|
|
|
13051
13124
|
return;
|
|
13052
13125
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
13053
13126
|
}
|
|
13054
|
-
function
|
|
13127
|
+
function up81(db) {
|
|
13055
13128
|
addColumnIfMissing20(db, "memory_artifacts", "source_id", "TEXT");
|
|
13056
13129
|
addColumnIfMissing20(db, "memory_artifacts", "source_root", "TEXT");
|
|
13057
13130
|
addColumnIfMissing20(db, "memory_artifacts", "source_external_id", "TEXT");
|
|
@@ -13064,7 +13137,7 @@ function up80(db) {
|
|
|
13064
13137
|
ON memory_artifacts(agent_id, source_id, source_root);
|
|
13065
13138
|
`);
|
|
13066
13139
|
}
|
|
13067
|
-
function
|
|
13140
|
+
function up82(db) {
|
|
13068
13141
|
db.exec(`
|
|
13069
13142
|
CREATE TABLE IF NOT EXISTS temporal_edges (
|
|
13070
13143
|
id TEXT PRIMARY KEY,
|
|
@@ -13087,7 +13160,7 @@ function up81(db) {
|
|
|
13087
13160
|
ON temporal_edges(agent_id, subject_type, subject_id);
|
|
13088
13161
|
`);
|
|
13089
13162
|
}
|
|
13090
|
-
function
|
|
13163
|
+
function up83(db) {
|
|
13091
13164
|
db.exec(`
|
|
13092
13165
|
CREATE TABLE IF NOT EXISTS entity_aliases (
|
|
13093
13166
|
id TEXT PRIMARY KEY,
|
|
@@ -13111,7 +13184,7 @@ function up82(db) {
|
|
|
13111
13184
|
ON entity_aliases(agent_id, canonical_alias, status);
|
|
13112
13185
|
`);
|
|
13113
13186
|
}
|
|
13114
|
-
function
|
|
13187
|
+
function up84(db) {
|
|
13115
13188
|
db.exec(`
|
|
13116
13189
|
CREATE TABLE IF NOT EXISTS api_keys (
|
|
13117
13190
|
id TEXT PRIMARY KEY,
|
|
@@ -13139,7 +13212,7 @@ function up83(db) {
|
|
|
13139
13212
|
ON api_keys(connector, harness);
|
|
13140
13213
|
`);
|
|
13141
13214
|
}
|
|
13142
|
-
function
|
|
13215
|
+
function up85(db) {
|
|
13143
13216
|
db.exec(`
|
|
13144
13217
|
CREATE TABLE IF NOT EXISTS transcript_capture_jobs (
|
|
13145
13218
|
id TEXT PRIMARY KEY,
|
|
@@ -13174,7 +13247,7 @@ function hasColumn10(db, table, column) {
|
|
|
13174
13247
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
13175
13248
|
return rows.some((row) => row.name === column);
|
|
13176
13249
|
}
|
|
13177
|
-
function
|
|
13250
|
+
function up86(db) {
|
|
13178
13251
|
if (!hasColumn10(db, "documents", "agent_id")) {
|
|
13179
13252
|
db.exec("ALTER TABLE documents ADD COLUMN agent_id TEXT NOT NULL DEFAULT 'default'");
|
|
13180
13253
|
}
|
|
@@ -13260,7 +13333,7 @@ function up85(db) {
|
|
|
13260
13333
|
db.exec("CREATE INDEX IF NOT EXISTS idx_documents_agent_project ON documents(agent_id, project)");
|
|
13261
13334
|
db.exec("CREATE INDEX IF NOT EXISTS idx_documents_source_scope ON documents(source_url, agent_id, project)");
|
|
13262
13335
|
}
|
|
13263
|
-
function
|
|
13336
|
+
function up87(db) {
|
|
13264
13337
|
db.exec(`
|
|
13265
13338
|
CREATE TABLE IF NOT EXISTS aggregate_evidence_sources (
|
|
13266
13339
|
aggregate_memory_id TEXT NOT NULL,
|
|
@@ -13282,7 +13355,7 @@ function hasColumn11(db, table, column) {
|
|
|
13282
13355
|
return rows.some((row) => row.name === column);
|
|
13283
13356
|
}
|
|
13284
13357
|
var COLUMNS = ["harness", "session_id", "tool_use_id", "cwd", "origin", "args"];
|
|
13285
|
-
function
|
|
13358
|
+
function up88(db) {
|
|
13286
13359
|
for (const column of COLUMNS) {
|
|
13287
13360
|
if (!hasColumn11(db, "skill_invocations", column)) {
|
|
13288
13361
|
db.exec(`ALTER TABLE skill_invocations ADD COLUMN ${column} TEXT`);
|
|
@@ -13363,7 +13436,7 @@ function documentScopeColumnsPreservingExisting(db) {
|
|
|
13363
13436
|
`);
|
|
13364
13437
|
}
|
|
13365
13438
|
try {
|
|
13366
|
-
|
|
13439
|
+
up86(db);
|
|
13367
13440
|
if (preserveAgentId) {
|
|
13368
13441
|
db.exec(`
|
|
13369
13442
|
UPDATE documents
|
|
@@ -13383,12 +13456,12 @@ function documentScopeColumnsPreservingExisting(db) {
|
|
|
13383
13456
|
db.exec("DROP TABLE IF EXISTS temp.__signet_doc_project_guard");
|
|
13384
13457
|
}
|
|
13385
13458
|
}
|
|
13386
|
-
function
|
|
13387
|
-
|
|
13459
|
+
function up89(db) {
|
|
13460
|
+
up85(db);
|
|
13388
13461
|
if (hasTable3(db, "documents")) {
|
|
13389
13462
|
documentScopeColumnsPreservingExisting(db);
|
|
13390
13463
|
}
|
|
13391
|
-
|
|
13464
|
+
up87(db);
|
|
13392
13465
|
addColumnIfMissing21(db, "memories", "superseded_by", "TEXT");
|
|
13393
13466
|
addColumnIfMissing21(db, "memories", "superseded_at", "TEXT");
|
|
13394
13467
|
addColumnIfMissing21(db, "memories", "superseded_reason", "TEXT");
|
|
@@ -13445,7 +13518,7 @@ function up88(db) {
|
|
|
13445
13518
|
AND ${sourceAgentId} = ${targetAgentId}
|
|
13446
13519
|
`);
|
|
13447
13520
|
}
|
|
13448
|
-
function
|
|
13521
|
+
function up90(db) {
|
|
13449
13522
|
db.exec(`
|
|
13450
13523
|
CREATE TABLE IF NOT EXISTS legacy_markdown_imports (
|
|
13451
13524
|
path TEXT PRIMARY KEY,
|
|
@@ -13475,7 +13548,7 @@ function up89(db) {
|
|
|
13475
13548
|
ON legacy_markdown_chunks(memory_id);
|
|
13476
13549
|
`);
|
|
13477
13550
|
}
|
|
13478
|
-
function
|
|
13551
|
+
function up91(db) {
|
|
13479
13552
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name IN ('relations', 'entity_dependencies')").all();
|
|
13480
13553
|
const tableNames = new Set(tables.map((r) => String(r.name)));
|
|
13481
13554
|
if (!tableNames.has("relations") || !tableNames.has("entity_dependencies"))
|
|
@@ -13534,7 +13607,7 @@ function addColumnIfMissing22(db, table, column, definition) {
|
|
|
13534
13607
|
return;
|
|
13535
13608
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
13536
13609
|
}
|
|
13537
|
-
function
|
|
13610
|
+
function up92(db) {
|
|
13538
13611
|
addColumnIfMissing22(db, "summary_jobs", "content_hash", "TEXT");
|
|
13539
13612
|
db.exec(`
|
|
13540
13613
|
CREATE INDEX IF NOT EXISTS idx_summary_jobs_agent_session_content_hash
|
|
@@ -13547,14 +13620,14 @@ function addColumnIfMissing23(db, table, column, definition) {
|
|
|
13547
13620
|
return;
|
|
13548
13621
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
13549
13622
|
}
|
|
13550
|
-
function
|
|
13623
|
+
function up93(db) {
|
|
13551
13624
|
addColumnIfMissing23(db, "summary_jobs", "boundary_reason", "TEXT");
|
|
13552
13625
|
db.exec(`
|
|
13553
13626
|
CREATE INDEX IF NOT EXISTS idx_summary_jobs_boundary_reason
|
|
13554
13627
|
ON summary_jobs(agent_id, session_key, boundary_reason)
|
|
13555
13628
|
`);
|
|
13556
13629
|
}
|
|
13557
|
-
function
|
|
13630
|
+
function up94(db) {
|
|
13558
13631
|
db.exec(`
|
|
13559
13632
|
CREATE TABLE IF NOT EXISTS transcript_recovery_files (
|
|
13560
13633
|
agent_id TEXT NOT NULL,
|
|
@@ -13572,7 +13645,7 @@ function up93(db) {
|
|
|
13572
13645
|
ON transcript_capture_jobs(agent_id, session_id, status);
|
|
13573
13646
|
`);
|
|
13574
13647
|
}
|
|
13575
|
-
function
|
|
13648
|
+
function up95(db) {
|
|
13576
13649
|
db.exec(`
|
|
13577
13650
|
CREATE TABLE IF NOT EXISTS job_cancellations (
|
|
13578
13651
|
id TEXT PRIMARY KEY,
|
|
@@ -13600,7 +13673,7 @@ function indexExists(db, table, indexName) {
|
|
|
13600
13673
|
const rows = db.prepare(`PRAGMA index_list(${table})`).all();
|
|
13601
13674
|
return rows.some((row) => row.name === indexName);
|
|
13602
13675
|
}
|
|
13603
|
-
function
|
|
13676
|
+
function up96(db) {
|
|
13604
13677
|
db.exec(`
|
|
13605
13678
|
CREATE TABLE IF NOT EXISTS job_archive (
|
|
13606
13679
|
id TEXT PRIMARY KEY,
|
|
@@ -13627,7 +13700,7 @@ function indexExists2(db, table, indexName) {
|
|
|
13627
13700
|
const rows = db.prepare(`PRAGMA index_list(${table})`).all();
|
|
13628
13701
|
return rows.some((row) => row.name === indexName);
|
|
13629
13702
|
}
|
|
13630
|
-
function
|
|
13703
|
+
function up97(db) {
|
|
13631
13704
|
db.exec(`
|
|
13632
13705
|
CREATE TABLE IF NOT EXISTS embedding_index_state (
|
|
13633
13706
|
id INTEGER PRIMARY KEY CHECK (id = 1),
|
|
@@ -13640,7 +13713,7 @@ function up96(db) {
|
|
|
13640
13713
|
)
|
|
13641
13714
|
`);
|
|
13642
13715
|
}
|
|
13643
|
-
function
|
|
13716
|
+
function up98(db) {
|
|
13644
13717
|
db.exec(`
|
|
13645
13718
|
CREATE TABLE IF NOT EXISTS embeddings_staging (
|
|
13646
13719
|
id TEXT PRIMARY KEY,
|
|
@@ -13659,7 +13732,7 @@ function up97(db) {
|
|
|
13659
13732
|
ON embeddings_staging(agent_id, source_type, source_id);
|
|
13660
13733
|
`);
|
|
13661
13734
|
}
|
|
13662
|
-
function
|
|
13735
|
+
function up99(db) {
|
|
13663
13736
|
const columns = db.prepare("PRAGMA table_info(dreaming_state)").all();
|
|
13664
13737
|
if (!columns.some((column) => column.name === "evidence_cursor")) {
|
|
13665
13738
|
db.exec("ALTER TABLE dreaming_state ADD COLUMN evidence_cursor TEXT");
|
|
@@ -13670,7 +13743,7 @@ function hasColumn13(db, table, column) {
|
|
|
13670
13743
|
const rows = db.prepare(`PRAGMA table_info(${table})`).all();
|
|
13671
13744
|
return rows.some((r) => r.name === column);
|
|
13672
13745
|
}
|
|
13673
|
-
function
|
|
13746
|
+
function up100(db) {
|
|
13674
13747
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name = 'memories'").all();
|
|
13675
13748
|
if (tables.length === 0)
|
|
13676
13749
|
return;
|
|
@@ -13695,23 +13768,23 @@ function up99(db) {
|
|
|
13695
13768
|
function hasColumn14(db, table, column) {
|
|
13696
13769
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
13697
13770
|
}
|
|
13698
|
-
function
|
|
13771
|
+
function up101(db) {
|
|
13699
13772
|
const hasMemories = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'memories'").get();
|
|
13700
13773
|
if (!hasMemories || !hasColumn14(db, "memories", "memory_kind") || !hasColumn14(db, "memories", "type"))
|
|
13701
13774
|
return;
|
|
13702
13775
|
db.exec("UPDATE memories SET memory_kind = NULL WHERE type = 'session_summary'");
|
|
13703
13776
|
}
|
|
13704
|
-
function
|
|
13777
|
+
function up102(db) {
|
|
13705
13778
|
db.exec("DROP TABLE IF EXISTS ingestion_jobs");
|
|
13706
13779
|
}
|
|
13707
|
-
function
|
|
13780
|
+
function up103(db) {
|
|
13708
13781
|
const columns = db.prepare("PRAGMA table_info(dreaming_state)").all();
|
|
13709
13782
|
if (!columns.some((column) => column.name === "last_failure_at")) {
|
|
13710
13783
|
db.exec("ALTER TABLE dreaming_state ADD COLUMN last_failure_at TEXT");
|
|
13711
13784
|
}
|
|
13712
13785
|
db.exec("UPDATE dreaming_state SET last_failure_at = updated_at WHERE consecutive_failures > 0 AND last_failure_at IS NULL");
|
|
13713
13786
|
}
|
|
13714
|
-
function
|
|
13787
|
+
function up104(db) {
|
|
13715
13788
|
db.exec(`
|
|
13716
13789
|
CREATE TABLE IF NOT EXISTS dreaming_evidence_exclusions (
|
|
13717
13790
|
agent_id TEXT NOT NULL,
|
|
@@ -13728,7 +13801,7 @@ function up103(db) {
|
|
|
13728
13801
|
ON dreaming_evidence_exclusions (agent_id, resolved_at, requeue_requested_at, excluded_at DESC);
|
|
13729
13802
|
`);
|
|
13730
13803
|
}
|
|
13731
|
-
function
|
|
13804
|
+
function up105(db) {
|
|
13732
13805
|
db.exec(`
|
|
13733
13806
|
CREATE TABLE IF NOT EXISTS dreaming_tool_calls (
|
|
13734
13807
|
id TEXT PRIMARY KEY,
|
|
@@ -13748,7 +13821,7 @@ function up104(db) {
|
|
|
13748
13821
|
ON dreaming_tool_calls (agent_id, pass_id, sequence ASC);
|
|
13749
13822
|
`);
|
|
13750
13823
|
}
|
|
13751
|
-
function
|
|
13824
|
+
function up106(db) {
|
|
13752
13825
|
const columns = db.prepare("PRAGMA table_info(dreaming_passes)").all();
|
|
13753
13826
|
if (!columns.some((column) => column.name === "evidence_window_json")) {
|
|
13754
13827
|
db.exec("ALTER TABLE dreaming_passes ADD COLUMN evidence_window_json TEXT");
|
|
@@ -13757,7 +13830,7 @@ function up105(db) {
|
|
|
13757
13830
|
db.exec("ALTER TABLE dreaming_passes ADD COLUMN runbook_json TEXT");
|
|
13758
13831
|
}
|
|
13759
13832
|
}
|
|
13760
|
-
function
|
|
13833
|
+
function up107(db) {
|
|
13761
13834
|
db.exec(`
|
|
13762
13835
|
CREATE TABLE IF NOT EXISTS dreaming_attention (
|
|
13763
13836
|
id TEXT PRIMARY KEY,
|
|
@@ -13779,7 +13852,7 @@ function up106(db) {
|
|
|
13779
13852
|
function hasColumn15(db, table, column) {
|
|
13780
13853
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
13781
13854
|
}
|
|
13782
|
-
function
|
|
13855
|
+
function up108(db) {
|
|
13783
13856
|
const requiredMemoryColumns = [
|
|
13784
13857
|
"content_hash",
|
|
13785
13858
|
"normalized_content",
|
|
@@ -13830,7 +13903,7 @@ function up107(db) {
|
|
|
13830
13903
|
WHERE EXISTS (SELECT 1 FROM memory_entity_mentions WHERE entity_id = entities.id)
|
|
13831
13904
|
`);
|
|
13832
13905
|
}
|
|
13833
|
-
function
|
|
13906
|
+
function up109(db) {
|
|
13834
13907
|
const tables = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name IN ('memories', 'entity_attributes')").all();
|
|
13835
13908
|
if (tables.length !== 2)
|
|
13836
13909
|
return;
|
|
@@ -13853,7 +13926,7 @@ function tableExists(db, table) {
|
|
|
13853
13926
|
function hasColumn16(db, table, column) {
|
|
13854
13927
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
13855
13928
|
}
|
|
13856
|
-
function
|
|
13929
|
+
function up110(db) {
|
|
13857
13930
|
db.exec(`
|
|
13858
13931
|
CREATE TABLE IF NOT EXISTS derived_memory_sources (
|
|
13859
13932
|
derived_memory_id TEXT NOT NULL,
|
|
@@ -13896,7 +13969,7 @@ function up109(db) {
|
|
|
13896
13969
|
`);
|
|
13897
13970
|
}
|
|
13898
13971
|
}
|
|
13899
|
-
function
|
|
13972
|
+
function up111(db) {
|
|
13900
13973
|
db.exec(`
|
|
13901
13974
|
DROP TRIGGER IF EXISTS entities_fts_ai;
|
|
13902
13975
|
DROP TRIGGER IF EXISTS entities_fts_ad;
|
|
@@ -13985,7 +14058,7 @@ function up110(db) {
|
|
|
13985
14058
|
function hasColumn17(db, table, column) {
|
|
13986
14059
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
13987
14060
|
}
|
|
13988
|
-
function
|
|
14061
|
+
function up112(db) {
|
|
13989
14062
|
if (!hasColumn17(db, "memories", "review_after")) {
|
|
13990
14063
|
db.exec("ALTER TABLE memories ADD COLUMN review_after TEXT;");
|
|
13991
14064
|
}
|
|
@@ -14001,14 +14074,14 @@ var TOKEN_COLUMNS = [
|
|
|
14001
14074
|
["tokens_cache_write", "INTEGER"],
|
|
14002
14075
|
["tokens_cost", "REAL"]
|
|
14003
14076
|
];
|
|
14004
|
-
function
|
|
14077
|
+
function up113(db) {
|
|
14005
14078
|
for (const [column, type] of TOKEN_COLUMNS) {
|
|
14006
14079
|
if (!hasColumn18(db, "dreaming_passes", column)) {
|
|
14007
14080
|
db.exec(`ALTER TABLE dreaming_passes ADD COLUMN ${column} ${type};`);
|
|
14008
14081
|
}
|
|
14009
14082
|
}
|
|
14010
14083
|
}
|
|
14011
|
-
function
|
|
14084
|
+
function up114(db) {
|
|
14012
14085
|
db.exec(`
|
|
14013
14086
|
CREATE TABLE IF NOT EXISTS embedding_usage (
|
|
14014
14087
|
day TEXT NOT NULL,
|
|
@@ -14021,7 +14094,7 @@ function up113(db) {
|
|
|
14021
14094
|
);
|
|
14022
14095
|
`);
|
|
14023
14096
|
}
|
|
14024
|
-
function
|
|
14097
|
+
function up115(db) {
|
|
14025
14098
|
db.exec(`
|
|
14026
14099
|
CREATE TABLE IF NOT EXISTS telemetry_install (
|
|
14027
14100
|
id TEXT PRIMARY KEY,
|
|
@@ -14029,7 +14102,7 @@ function up114(db) {
|
|
|
14029
14102
|
);
|
|
14030
14103
|
`);
|
|
14031
14104
|
}
|
|
14032
|
-
function
|
|
14105
|
+
function up116(db) {
|
|
14033
14106
|
db.exec(`
|
|
14034
14107
|
CREATE INDEX IF NOT EXISTS idx_memory_entity_mentions_entity_memory
|
|
14035
14108
|
ON memory_entity_mentions(entity_id, memory_id);
|
|
@@ -14040,7 +14113,7 @@ function hasColumn19(db, table, column) {
|
|
|
14040
14113
|
return rows.some((row) => row.name === column);
|
|
14041
14114
|
}
|
|
14042
14115
|
var COLUMNS2 = ["first_remember_at", "first_recall_at"];
|
|
14043
|
-
function
|
|
14116
|
+
function up117(db) {
|
|
14044
14117
|
for (const column of COLUMNS2) {
|
|
14045
14118
|
if (!hasColumn19(db, "telemetry_install", column)) {
|
|
14046
14119
|
db.exec(`ALTER TABLE telemetry_install ADD COLUMN ${column} TEXT`);
|
|
@@ -14056,7 +14129,7 @@ function addColumnIfMissing24(db, column, definition) {
|
|
|
14056
14129
|
db.exec(`ALTER TABLE telemetry_events ADD COLUMN ${column} ${definition}`);
|
|
14057
14130
|
}
|
|
14058
14131
|
}
|
|
14059
|
-
function
|
|
14132
|
+
function up118(db) {
|
|
14060
14133
|
addColumnIfMissing24(db, "source", "TEXT NOT NULL DEFAULT 'daemon'");
|
|
14061
14134
|
addColumnIfMissing24(db, "claim_token", "TEXT");
|
|
14062
14135
|
addColumnIfMissing24(db, "claimed_at", "TEXT");
|
|
@@ -14065,7 +14138,7 @@ function up117(db) {
|
|
|
14065
14138
|
ON telemetry_events(source, sent_to_posthog, claimed_at, timestamp);
|
|
14066
14139
|
`);
|
|
14067
14140
|
}
|
|
14068
|
-
function
|
|
14141
|
+
function up119(db) {
|
|
14069
14142
|
db.exec(`
|
|
14070
14143
|
CREATE TABLE IF NOT EXISTS session_claims (
|
|
14071
14144
|
session_key TEXT NOT NULL,
|
|
@@ -14086,7 +14159,7 @@ function up118(db) {
|
|
|
14086
14159
|
ON session_claims(agent_id, state, expires_at);
|
|
14087
14160
|
`);
|
|
14088
14161
|
}
|
|
14089
|
-
function
|
|
14162
|
+
function up120(db) {
|
|
14090
14163
|
const table = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'entity_attributes'").get();
|
|
14091
14164
|
if (table == null)
|
|
14092
14165
|
return;
|
|
@@ -14095,7 +14168,7 @@ function up119(db) {
|
|
|
14095
14168
|
ON entity_attributes(memory_id, agent_id, status, importance);
|
|
14096
14169
|
`);
|
|
14097
14170
|
}
|
|
14098
|
-
function
|
|
14171
|
+
function up121(db) {
|
|
14099
14172
|
db.exec(`
|
|
14100
14173
|
CREATE TABLE IF NOT EXISTS cross_agent_messages (
|
|
14101
14174
|
id TEXT PRIMARY KEY,
|
|
@@ -14152,7 +14225,7 @@ function addColumnIfMissing25(db, column, definition) {
|
|
|
14152
14225
|
db.exec(`ALTER TABLE cross_agent_messages ADD COLUMN ${column} ${definition}`);
|
|
14153
14226
|
}
|
|
14154
14227
|
}
|
|
14155
|
-
function
|
|
14228
|
+
function up122(db) {
|
|
14156
14229
|
const table = db.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'cross_agent_messages'").get();
|
|
14157
14230
|
if (table == null)
|
|
14158
14231
|
return;
|
|
@@ -14353,7 +14426,7 @@ function backfillTranscriptsFromSummaryJobs(db) {
|
|
|
14353
14426
|
insert.run(...values);
|
|
14354
14427
|
}
|
|
14355
14428
|
}
|
|
14356
|
-
function
|
|
14429
|
+
function up123(db) {
|
|
14357
14430
|
if (!hasTable4(db, "session_transcripts"))
|
|
14358
14431
|
return;
|
|
14359
14432
|
addColumnIfMissing26(db, "session_transcripts", "completed_at", "TEXT");
|
|
@@ -14406,7 +14479,7 @@ function up122(db) {
|
|
|
14406
14479
|
ON session_transcripts(agent_id, content_hash);
|
|
14407
14480
|
`);
|
|
14408
14481
|
}
|
|
14409
|
-
function
|
|
14482
|
+
function up124(db) {
|
|
14410
14483
|
db.exec(`
|
|
14411
14484
|
CREATE INDEX IF NOT EXISTS idx_memory_jobs_pressure_status
|
|
14412
14485
|
ON memory_jobs(status)
|
|
@@ -14425,12 +14498,12 @@ function up123(db) {
|
|
|
14425
14498
|
function hasColumn22(db, table, column) {
|
|
14426
14499
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
14427
14500
|
}
|
|
14428
|
-
function
|
|
14501
|
+
function up125(db) {
|
|
14429
14502
|
if (!hasColumn22(db, "telemetry_install", "last_seen_version")) {
|
|
14430
14503
|
db.exec("ALTER TABLE telemetry_install ADD COLUMN last_seen_version TEXT");
|
|
14431
14504
|
}
|
|
14432
14505
|
}
|
|
14433
|
-
function
|
|
14506
|
+
function up126(db) {
|
|
14434
14507
|
db.exec(`
|
|
14435
14508
|
CREATE TABLE IF NOT EXISTS source_lifecycle_state (
|
|
14436
14509
|
agent_id TEXT NOT NULL,
|
|
@@ -14459,7 +14532,7 @@ function addColumnIfMissing27(db, column, definition) {
|
|
|
14459
14532
|
db.exec(`ALTER TABLE telemetry_events ADD COLUMN ${column} ${definition}`);
|
|
14460
14533
|
}
|
|
14461
14534
|
}
|
|
14462
|
-
function
|
|
14535
|
+
function up127(db) {
|
|
14463
14536
|
addColumnIfMissing27(db, "delivery_attempts", "INTEGER NOT NULL DEFAULT 0");
|
|
14464
14537
|
addColumnIfMissing27(db, "last_attempt_at", "TEXT");
|
|
14465
14538
|
addColumnIfMissing27(db, "sent_at", "TEXT");
|
|
@@ -14480,7 +14553,7 @@ function up126(db) {
|
|
|
14480
14553
|
VALUES (1, CURRENT_TIMESTAMP);
|
|
14481
14554
|
`);
|
|
14482
14555
|
}
|
|
14483
|
-
function
|
|
14556
|
+
function up128(db) {
|
|
14484
14557
|
const columns = db.prepare("PRAGMA table_info(dreaming_evidence_exclusions)").all();
|
|
14485
14558
|
const names = new Set(columns.map((column) => column.name));
|
|
14486
14559
|
if (!names.has("failure_class")) {
|
|
@@ -14497,7 +14570,7 @@ function up127(db) {
|
|
|
14497
14570
|
}
|
|
14498
14571
|
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)");
|
|
14499
14572
|
}
|
|
14500
|
-
function
|
|
14573
|
+
function up129(db) {
|
|
14501
14574
|
db.exec(`
|
|
14502
14575
|
CREATE TABLE IF NOT EXISTS embedding_index_failures (
|
|
14503
14576
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
@@ -14521,7 +14594,7 @@ function up128(db) {
|
|
|
14521
14594
|
ON embedding_index_failures(source_type, source_id);
|
|
14522
14595
|
`);
|
|
14523
14596
|
}
|
|
14524
|
-
function
|
|
14597
|
+
function up130(db) {
|
|
14525
14598
|
db.exec(`
|
|
14526
14599
|
CREATE TABLE IF NOT EXISTS imported_source_lifecycle (
|
|
14527
14600
|
id TEXT PRIMARY KEY,
|
|
@@ -14539,7 +14612,7 @@ function up129(db) {
|
|
|
14539
14612
|
ON imported_source_lifecycle(agent_id, status, updated_at DESC);
|
|
14540
14613
|
`);
|
|
14541
14614
|
}
|
|
14542
|
-
function
|
|
14615
|
+
function up131(db) {
|
|
14543
14616
|
db.exec(`
|
|
14544
14617
|
CREATE TABLE IF NOT EXISTS memory_content_safety (
|
|
14545
14618
|
agent_id TEXT NOT NULL,
|
|
@@ -14559,7 +14632,7 @@ function up130(db) {
|
|
|
14559
14632
|
ON memory_content_safety(agent_id, source_kind, context_eligible);
|
|
14560
14633
|
`);
|
|
14561
14634
|
}
|
|
14562
|
-
function
|
|
14635
|
+
function up132(db) {
|
|
14563
14636
|
const table = db.prepare("SELECT sql FROM sqlite_master WHERE type = 'table' AND name = 'dreaming_attention'").get();
|
|
14564
14637
|
if (!table)
|
|
14565
14638
|
return;
|
|
@@ -14593,7 +14666,7 @@ function up131(db) {
|
|
|
14593
14666
|
ON dreaming_attention (agent_id, resolved_at, priority DESC, created_at ASC);
|
|
14594
14667
|
`);
|
|
14595
14668
|
}
|
|
14596
|
-
function
|
|
14669
|
+
function up133(db) {
|
|
14597
14670
|
db.exec(`
|
|
14598
14671
|
CREATE TABLE IF NOT EXISTS ontology_contradictions (
|
|
14599
14672
|
id TEXT PRIMARY KEY,
|
|
@@ -14649,7 +14722,7 @@ function up132(db) {
|
|
|
14649
14722
|
ON ontology_contradictions(agent_id, left_source_id, right_source_id);
|
|
14650
14723
|
`);
|
|
14651
14724
|
}
|
|
14652
|
-
function
|
|
14725
|
+
function up134(db) {
|
|
14653
14726
|
db.exec(`
|
|
14654
14727
|
CREATE INDEX IF NOT EXISTS idx_memory_jobs_diagnostics_status_created_at
|
|
14655
14728
|
ON memory_jobs(status, created_at)
|
|
@@ -14664,7 +14737,7 @@ function up133(db) {
|
|
|
14664
14737
|
function tableExists2(db, table) {
|
|
14665
14738
|
return db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = ?").get(table) != null;
|
|
14666
14739
|
}
|
|
14667
|
-
function
|
|
14740
|
+
function up135(db) {
|
|
14668
14741
|
if (!tableExists2(db, "memory_jobs"))
|
|
14669
14742
|
return;
|
|
14670
14743
|
if (!tableExists2(db, "job_cancellations")) {
|
|
@@ -14713,7 +14786,7 @@ function up134(db) {
|
|
|
14713
14786
|
AND status IN ('pending', 'leased');
|
|
14714
14787
|
`);
|
|
14715
14788
|
}
|
|
14716
|
-
function
|
|
14789
|
+
function up136(db) {
|
|
14717
14790
|
db.exec(`
|
|
14718
14791
|
CREATE TABLE IF NOT EXISTS embedding_repair_budget (
|
|
14719
14792
|
id INTEGER PRIMARY KEY CHECK (id = 1),
|
|
@@ -14753,7 +14826,7 @@ function up135(db) {
|
|
|
14753
14826
|
END;
|
|
14754
14827
|
`);
|
|
14755
14828
|
}
|
|
14756
|
-
function
|
|
14829
|
+
function up137(db) {
|
|
14757
14830
|
db.exec(`
|
|
14758
14831
|
CREATE TABLE IF NOT EXISTS dreaming_evidence_consumption (
|
|
14759
14832
|
agent_id TEXT NOT NULL,
|
|
@@ -14776,13 +14849,13 @@ function up136(db) {
|
|
|
14776
14849
|
ON dreaming_evidence_consumption(agent_id, pass_id, delivered_offset, source_length);
|
|
14777
14850
|
`);
|
|
14778
14851
|
}
|
|
14779
|
-
function
|
|
14852
|
+
function up138(db) {
|
|
14780
14853
|
db.exec(`
|
|
14781
14854
|
CREATE INDEX IF NOT EXISTS idx_epistemic_assertions_observer_entity
|
|
14782
14855
|
ON epistemic_assertions(agent_id, subject_entity_id, status, asserted_at DESC, created_at DESC);
|
|
14783
14856
|
`);
|
|
14784
14857
|
}
|
|
14785
|
-
function
|
|
14858
|
+
function up139(db) {
|
|
14786
14859
|
db.exec(`
|
|
14787
14860
|
CREATE TABLE IF NOT EXISTS memory_head_revisions (
|
|
14788
14861
|
id TEXT PRIMARY KEY,
|
|
@@ -14834,7 +14907,7 @@ function up138(db) {
|
|
|
14834
14907
|
if (!names.has("format_version"))
|
|
14835
14908
|
db.exec("ALTER TABLE memory_md_heads ADD COLUMN format_version INTEGER NOT NULL DEFAULT 1");
|
|
14836
14909
|
}
|
|
14837
|
-
function
|
|
14910
|
+
function up140(db) {
|
|
14838
14911
|
db.exec(`
|
|
14839
14912
|
CREATE TABLE memory_head_entries_v134 (
|
|
14840
14913
|
entry_id TEXT NOT NULL, agent_id TEXT NOT NULL, canonical_text TEXT NOT NULL,
|
|
@@ -14852,7 +14925,7 @@ function up139(db) {
|
|
|
14852
14925
|
ON memory_head_entries(agent_id, entry_id, last_revision DESC);
|
|
14853
14926
|
`);
|
|
14854
14927
|
}
|
|
14855
|
-
function
|
|
14928
|
+
function up141(db) {
|
|
14856
14929
|
db.exec(`
|
|
14857
14930
|
CREATE TABLE IF NOT EXISTS memory_head_publications (
|
|
14858
14931
|
agent_id TEXT NOT NULL,
|
|
@@ -14868,7 +14941,7 @@ function up140(db) {
|
|
|
14868
14941
|
ON memory_head_publications(agent_id, status, revision DESC);
|
|
14869
14942
|
`);
|
|
14870
14943
|
}
|
|
14871
|
-
function
|
|
14944
|
+
function up142(db) {
|
|
14872
14945
|
const cols = new Set(db.prepare("PRAGMA table_info(memory_head_revisions)").all().map((r) => r.name));
|
|
14873
14946
|
for (const [name, type] of [
|
|
14874
14947
|
["entry_id", "TEXT"],
|
|
@@ -14882,7 +14955,7 @@ function up141(db) {
|
|
|
14882
14955
|
}
|
|
14883
14956
|
db.exec("CREATE UNIQUE INDEX IF NOT EXISTS idx_memory_head_revisions_entry ON memory_head_revisions(agent_id, revision, entry_id)");
|
|
14884
14957
|
}
|
|
14885
|
-
function
|
|
14958
|
+
function up143(db) {
|
|
14886
14959
|
const cols = new Set(db.prepare("PRAGMA table_info(dreaming_passes)").all().map((r) => r.name));
|
|
14887
14960
|
for (const [name, type] of [
|
|
14888
14961
|
["head_revision", "INTEGER"],
|
|
@@ -14904,7 +14977,7 @@ function addColumnIfMissing28(db, table, column, definition) {
|
|
|
14904
14977
|
if (!hasColumn24(db, table, column))
|
|
14905
14978
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
14906
14979
|
}
|
|
14907
|
-
function
|
|
14980
|
+
function up144(db) {
|
|
14908
14981
|
addColumnIfMissing28(db, "memories", "manual_override", "INTEGER DEFAULT 0");
|
|
14909
14982
|
db.exec(`
|
|
14910
14983
|
CREATE TABLE IF NOT EXISTS transcript_capture_status (
|
|
@@ -15209,7 +15282,7 @@ function up143(db) {
|
|
|
15209
15282
|
GROUP BY j.agent_id;
|
|
15210
15283
|
`);
|
|
15211
15284
|
}
|
|
15212
|
-
function
|
|
15285
|
+
function up145(db) {
|
|
15213
15286
|
db.exec(`
|
|
15214
15287
|
CREATE TABLE IF NOT EXISTS native_source_sync_state (
|
|
15215
15288
|
agent_id TEXT NOT NULL,
|
|
@@ -15225,7 +15298,7 @@ function up144(db) {
|
|
|
15225
15298
|
ON native_source_sync_state(agent_id, status);
|
|
15226
15299
|
`);
|
|
15227
15300
|
}
|
|
15228
|
-
function
|
|
15301
|
+
function up146(db) {
|
|
15229
15302
|
db.exec(`
|
|
15230
15303
|
CREATE TABLE IF NOT EXISTS transcript_recovery_frontiers (
|
|
15231
15304
|
agent_id TEXT NOT NULL,
|
|
@@ -15237,7 +15310,7 @@ function up145(db) {
|
|
|
15237
15310
|
);
|
|
15238
15311
|
`);
|
|
15239
15312
|
}
|
|
15240
|
-
function
|
|
15313
|
+
function up147(db) {
|
|
15241
15314
|
db.exec(`
|
|
15242
15315
|
CREATE TABLE IF NOT EXISTS source_sync_checkpoints (
|
|
15243
15316
|
agent_id TEXT NOT NULL,
|
|
@@ -15251,13 +15324,13 @@ function up146(db) {
|
|
|
15251
15324
|
);
|
|
15252
15325
|
`);
|
|
15253
15326
|
}
|
|
15254
|
-
function
|
|
15327
|
+
function up148(db) {
|
|
15255
15328
|
const columns = db.prepare("PRAGMA table_info(source_sync_checkpoints)").all();
|
|
15256
15329
|
if (!columns.some((column) => column.name === "frontier")) {
|
|
15257
15330
|
db.exec("ALTER TABLE source_sync_checkpoints ADD COLUMN frontier TEXT");
|
|
15258
15331
|
}
|
|
15259
15332
|
}
|
|
15260
|
-
function
|
|
15333
|
+
function up149(db) {
|
|
15261
15334
|
const columns = new Set(db.prepare("PRAGMA table_info(embedding_index_state)").all().map((row) => row.name).filter((name) => typeof name === "string"));
|
|
15262
15335
|
const additions = [
|
|
15263
15336
|
["migration_phase", "TEXT"],
|
|
@@ -15292,13 +15365,13 @@ function up148(db) {
|
|
|
15292
15365
|
`);
|
|
15293
15366
|
}
|
|
15294
15367
|
}
|
|
15295
|
-
function
|
|
15368
|
+
function up150(db) {
|
|
15296
15369
|
const columns = new Set(db.prepare("PRAGMA table_info(memory_jobs)").all().map((row) => row.name).filter((name) => typeof name === "string"));
|
|
15297
15370
|
if (!columns.has("lease_token")) {
|
|
15298
15371
|
db.exec("ALTER TABLE memory_jobs ADD COLUMN lease_token TEXT");
|
|
15299
15372
|
}
|
|
15300
15373
|
}
|
|
15301
|
-
function
|
|
15374
|
+
function up151(db) {
|
|
15302
15375
|
db.exec(`
|
|
15303
15376
|
CREATE TABLE IF NOT EXISTS dreaming_evidence_reviews (
|
|
15304
15377
|
agent_id TEXT NOT NULL,
|
|
@@ -15316,7 +15389,7 @@ function up150(db) {
|
|
|
15316
15389
|
ON dreaming_evidence_reviews (agent_id, reviewed_at DESC);
|
|
15317
15390
|
`);
|
|
15318
15391
|
}
|
|
15319
|
-
function
|
|
15392
|
+
function up152(db) {
|
|
15320
15393
|
db.exec(`
|
|
15321
15394
|
CREATE TABLE IF NOT EXISTS source_import_jobs (
|
|
15322
15395
|
id TEXT PRIMARY KEY, kind TEXT NOT NULL CHECK (kind = 'import'), agent_id TEXT NOT NULL,
|
|
@@ -15383,16 +15456,16 @@ function up151(db) {
|
|
|
15383
15456
|
}
|
|
15384
15457
|
db.exec("CREATE INDEX IF NOT EXISTS idx_session_transcripts_agent_source ON session_transcripts(agent_id, source_id)");
|
|
15385
15458
|
}
|
|
15386
|
-
function
|
|
15459
|
+
function up153(db) {
|
|
15387
15460
|
db.exec("CREATE INDEX IF NOT EXISTS idx_source_import_files_job_state ON source_import_files(job_id, state)");
|
|
15388
15461
|
}
|
|
15389
|
-
function
|
|
15462
|
+
function up154(db) {
|
|
15390
15463
|
const columns = db.prepare("PRAGMA table_info(source_import_record_attempts)").all();
|
|
15391
15464
|
if (!columns.some((column) => column.name === "source_id")) {
|
|
15392
15465
|
db.exec("ALTER TABLE source_import_record_attempts ADD COLUMN source_id TEXT");
|
|
15393
15466
|
}
|
|
15394
15467
|
}
|
|
15395
|
-
function
|
|
15468
|
+
function up155(db) {
|
|
15396
15469
|
const addColumn = (table, column, definition) => {
|
|
15397
15470
|
const statement = db.prepare("SELECT 1 AS found FROM pragma_table_info(?) WHERE name = ?");
|
|
15398
15471
|
let exists;
|
|
@@ -15413,7 +15486,7 @@ function addColumnIfMissing29(db, table, column, definition) {
|
|
|
15413
15486
|
if (!columns.some((row) => row.name === column))
|
|
15414
15487
|
db.exec(`ALTER TABLE ${table} ADD COLUMN ${column} ${definition}`);
|
|
15415
15488
|
}
|
|
15416
|
-
function
|
|
15489
|
+
function up156(db) {
|
|
15417
15490
|
addColumnIfMissing29(db, "memory_md_heads", "is_current", "INTEGER NOT NULL DEFAULT 0");
|
|
15418
15491
|
addColumnIfMissing29(db, "dreaming_passes", "head_base_revision", "INTEGER");
|
|
15419
15492
|
db.exec("CREATE INDEX IF NOT EXISTS idx_memory_head_revisions_content_hash ON memory_head_revisions(content_hash)");
|
|
@@ -15563,7 +15636,7 @@ function up155(db) {
|
|
|
15563
15636
|
`);
|
|
15564
15637
|
}
|
|
15565
15638
|
}
|
|
15566
|
-
function
|
|
15639
|
+
function up157(db) {
|
|
15567
15640
|
db.exec(`
|
|
15568
15641
|
CREATE TABLE IF NOT EXISTS vector_repair_checkpoints (
|
|
15569
15642
|
operation TEXT NOT NULL CHECK (operation IN ('resync', 'clean-orphans')),
|
|
@@ -15588,7 +15661,7 @@ function up156(db) {
|
|
|
15588
15661
|
ON vector_repair_checkpoints(status, updated_at);
|
|
15589
15662
|
`);
|
|
15590
15663
|
}
|
|
15591
|
-
function
|
|
15664
|
+
function up158(db) {
|
|
15592
15665
|
db.exec(`
|
|
15593
15666
|
CREATE TABLE IF NOT EXISTS embedding_repair_checkpoints (
|
|
15594
15667
|
checkpoint_id TEXT PRIMARY KEY,
|
|
@@ -15609,7 +15682,7 @@ function up157(db) {
|
|
|
15609
15682
|
ON embedding_repair_checkpoints(status, updated_at);
|
|
15610
15683
|
`);
|
|
15611
15684
|
}
|
|
15612
|
-
function
|
|
15685
|
+
function up159(db) {
|
|
15613
15686
|
const columns = new Set(db.prepare("PRAGMA table_info(embedding_repair_checkpoints)").all().map((row) => row.name));
|
|
15614
15687
|
if (!columns.has("profile_fingerprint")) {
|
|
15615
15688
|
db.exec("ALTER TABLE embedding_repair_checkpoints ADD COLUMN profile_fingerprint TEXT");
|
|
@@ -15624,7 +15697,7 @@ function up158(db) {
|
|
|
15624
15697
|
);
|
|
15625
15698
|
`);
|
|
15626
15699
|
}
|
|
15627
|
-
function
|
|
15700
|
+
function up160(db) {
|
|
15628
15701
|
db.exec(`
|
|
15629
15702
|
CREATE INDEX IF NOT EXISTS idx_memories_agent_kind
|
|
15630
15703
|
ON memories(agent_id, memory_kind);
|
|
@@ -15691,7 +15764,7 @@ function rebuildLedgerWithoutGlobalKeyPrimaryKey(db) {
|
|
|
15691
15764
|
throw error;
|
|
15692
15765
|
}
|
|
15693
15766
|
}
|
|
15694
|
-
function
|
|
15767
|
+
function up161(db) {
|
|
15695
15768
|
db.exec(`
|
|
15696
15769
|
CREATE TABLE IF NOT EXISTS import_admission_ledger (
|
|
15697
15770
|
key TEXT NOT NULL, agent_id TEXT NOT NULL, workspace_id TEXT NOT NULL DEFAULT '', file_name TEXT NOT NULL,
|
|
@@ -15726,13 +15799,13 @@ function up160(db) {
|
|
|
15726
15799
|
CREATE INDEX IF NOT EXISTS idx_import_admission_events_key ON import_admission_events(admission_key, agent_id, workspace_id, id);
|
|
15727
15800
|
`);
|
|
15728
15801
|
}
|
|
15729
|
-
function
|
|
15802
|
+
function up162(db) {
|
|
15730
15803
|
db.exec(`
|
|
15731
15804
|
CREATE INDEX IF NOT EXISTS idx_entities_agent_updated_id
|
|
15732
15805
|
ON entities(agent_id, updated_at DESC, id DESC);
|
|
15733
15806
|
`);
|
|
15734
15807
|
}
|
|
15735
|
-
function
|
|
15808
|
+
function up163(db) {
|
|
15736
15809
|
db.exec(`
|
|
15737
15810
|
CREATE TABLE IF NOT EXISTS generic_entity_prune_scan_state (
|
|
15738
15811
|
id INTEGER PRIMARY KEY CHECK (id = 1),
|
|
@@ -15773,7 +15846,7 @@ function up162(db) {
|
|
|
15773
15846
|
END;
|
|
15774
15847
|
`);
|
|
15775
15848
|
}
|
|
15776
|
-
function
|
|
15849
|
+
function up164(db) {
|
|
15777
15850
|
db.exec(`
|
|
15778
15851
|
DROP TRIGGER IF EXISTS memory_content_safety_head_freshness_ai;
|
|
15779
15852
|
DROP TRIGGER IF EXISTS memory_content_safety_head_freshness_au;
|
|
@@ -15783,7 +15856,7 @@ function up163(db) {
|
|
|
15783
15856
|
`);
|
|
15784
15857
|
}
|
|
15785
15858
|
var COLUMNS3 = ["occurred_start", "occurred_end", "valid_from", "valid_until", "time_precision"];
|
|
15786
|
-
function
|
|
15859
|
+
function up165(db) {
|
|
15787
15860
|
const cols = db.prepare("PRAGMA table_info(entity_attributes)").all();
|
|
15788
15861
|
for (const column of COLUMNS3) {
|
|
15789
15862
|
if (!cols.some((col) => col.name === column)) {
|
|
@@ -15791,7 +15864,7 @@ function up164(db) {
|
|
|
15791
15864
|
}
|
|
15792
15865
|
}
|
|
15793
15866
|
}
|
|
15794
|
-
function
|
|
15867
|
+
function up166(db) {
|
|
15795
15868
|
const passColumns = db.prepare("PRAGMA table_info(dreaming_passes)").all();
|
|
15796
15869
|
if (!passColumns.some((column) => column.name === "scope_key")) {
|
|
15797
15870
|
db.exec("ALTER TABLE dreaming_passes ADD COLUMN scope_key TEXT");
|
|
@@ -15814,13 +15887,13 @@ function up165(db) {
|
|
|
15814
15887
|
ON dreaming_history_nodes(pass_id) WHERE pass_id IS NOT NULL;
|
|
15815
15888
|
`);
|
|
15816
15889
|
}
|
|
15817
|
-
function
|
|
15890
|
+
function up167(db) {
|
|
15818
15891
|
const columns = db.prepare("PRAGMA table_info(dreaming_passes)").all();
|
|
15819
15892
|
if (!columns.some((column) => column.name === "tokens_peak_context")) {
|
|
15820
15893
|
db.exec("ALTER TABLE dreaming_passes ADD COLUMN tokens_peak_context INTEGER");
|
|
15821
15894
|
}
|
|
15822
15895
|
}
|
|
15823
|
-
function
|
|
15896
|
+
function up168(db) {
|
|
15824
15897
|
const sql = readMemoriesFtsSql(db);
|
|
15825
15898
|
if (sql !== null && !memoriesFtsNeedsTokenizerRepair(sql))
|
|
15826
15899
|
return;
|
|
@@ -15832,7 +15905,7 @@ function hasTable5(db, table) {
|
|
|
15832
15905
|
function hasColumn25(db, table, column) {
|
|
15833
15906
|
return db.prepare(`PRAGMA table_info(${table})`).all().some((row) => row.name === column);
|
|
15834
15907
|
}
|
|
15835
|
-
function
|
|
15908
|
+
function up169(db) {
|
|
15836
15909
|
if (!hasTable5(db, "entity_attributes") || !hasTable5(db, "entity_aspects") || !hasTable5(db, "entities") || !hasColumn25(db, "entity_attributes", "source_root") || !hasColumn25(db, "entities", "source_root")) {
|
|
15837
15910
|
return;
|
|
15838
15911
|
}
|
|
@@ -15905,7 +15978,7 @@ function up168(db) {
|
|
|
15905
15978
|
DROP TABLE retired_source_paragraphs;
|
|
15906
15979
|
`);
|
|
15907
15980
|
}
|
|
15908
|
-
function
|
|
15981
|
+
function up170(db) {
|
|
15909
15982
|
if (db.prepare("SELECT 1 FROM sqlite_master WHERE type = 'table' AND name = 'dreaming_evidence_consumption'").get() == null)
|
|
15910
15983
|
return;
|
|
15911
15984
|
const columns = db.prepare("PRAGMA table_info(dreaming_evidence_consumption)").all();
|
|
@@ -15916,7 +15989,7 @@ function up169(db) {
|
|
|
15916
15989
|
db.exec("ALTER TABLE dreaming_evidence_consumption ADD COLUMN stalled_passes INTEGER NOT NULL DEFAULT 0 CHECK (stalled_passes >= 0)");
|
|
15917
15990
|
}
|
|
15918
15991
|
}
|
|
15919
|
-
function
|
|
15992
|
+
function up171(db) {
|
|
15920
15993
|
db.exec(`
|
|
15921
15994
|
CREATE TABLE IF NOT EXISTS dependency_history_compaction_state (
|
|
15922
15995
|
id INTEGER PRIMARY KEY CHECK (id = 1),
|
|
@@ -15927,7 +16000,7 @@ function up170(db) {
|
|
|
15927
16000
|
INSERT OR IGNORE INTO dependency_history_compaction_state (id) VALUES (1);
|
|
15928
16001
|
`);
|
|
15929
16002
|
}
|
|
15930
|
-
function
|
|
16003
|
+
function up172(db) {
|
|
15931
16004
|
db.exec(`
|
|
15932
16005
|
CREATE TABLE IF NOT EXISTS cross_agent_message_wakes (
|
|
15933
16006
|
message_id TEXT PRIMARY KEY,
|
|
@@ -16106,17 +16179,38 @@ function repairBoardNotices(db) {
|
|
|
16106
16179
|
throw error;
|
|
16107
16180
|
}
|
|
16108
16181
|
}
|
|
16182
|
+
function up173(db) {
|
|
16183
|
+
db.exec(`
|
|
16184
|
+
CREATE TABLE IF NOT EXISTS dreaming_policies (
|
|
16185
|
+
hash TEXT PRIMARY KEY,
|
|
16186
|
+
text TEXT NOT NULL,
|
|
16187
|
+
created_at TEXT NOT NULL
|
|
16188
|
+
);
|
|
16189
|
+
`);
|
|
16190
|
+
const columns = new Set(db.prepare("PRAGMA table_info(dreaming_passes)").all().map((column) => column.name));
|
|
16191
|
+
if (!columns.has("policy_hash"))
|
|
16192
|
+
db.exec("ALTER TABLE dreaming_passes ADD COLUMN policy_hash TEXT");
|
|
16193
|
+
if (!columns.has("policy_source"))
|
|
16194
|
+
db.exec("ALTER TABLE dreaming_passes ADD COLUMN policy_source TEXT CHECK (policy_source IN ('default', 'custom'))");
|
|
16195
|
+
}
|
|
16196
|
+
function up174(db) {
|
|
16197
|
+
db.exec(`
|
|
16198
|
+
CREATE INDEX IF NOT EXISTS idx_memory_artifacts_native_paths
|
|
16199
|
+
ON memory_artifacts(agent_id, harness, source_kind, source_id, source_path, is_deleted)
|
|
16200
|
+
WHERE is_deleted = 0 AND harness IS NOT NULL
|
|
16201
|
+
`);
|
|
16202
|
+
}
|
|
16109
16203
|
var MIGRATIONS = [
|
|
16110
16204
|
{
|
|
16111
16205
|
version: 1,
|
|
16112
16206
|
name: "baseline",
|
|
16113
|
-
up:
|
|
16207
|
+
up: up7,
|
|
16114
16208
|
artifacts: { tables: ["memories", "conversations", "embeddings"] }
|
|
16115
16209
|
},
|
|
16116
16210
|
{
|
|
16117
16211
|
version: 2,
|
|
16118
16212
|
name: "pipeline-v2",
|
|
16119
|
-
up:
|
|
16213
|
+
up: up8,
|
|
16120
16214
|
artifacts: {
|
|
16121
16215
|
tables: ["memory_history", "memory_jobs", "entities", "relations", "memory_entity_mentions"]
|
|
16122
16216
|
}
|
|
@@ -16124,12 +16218,12 @@ var MIGRATIONS = [
|
|
|
16124
16218
|
{
|
|
16125
16219
|
version: 3,
|
|
16126
16220
|
name: "unique-content-hash",
|
|
16127
|
-
up:
|
|
16221
|
+
up: up9
|
|
16128
16222
|
},
|
|
16129
16223
|
{
|
|
16130
16224
|
version: 4,
|
|
16131
16225
|
name: "history-actor-and-retention",
|
|
16132
|
-
up:
|
|
16226
|
+
up: up10,
|
|
16133
16227
|
artifacts: {
|
|
16134
16228
|
columns: [{ table: "memory_history", column: "actor_type" }]
|
|
16135
16229
|
}
|
|
@@ -16137,7 +16231,7 @@ var MIGRATIONS = [
|
|
|
16137
16231
|
{
|
|
16138
16232
|
version: 5,
|
|
16139
16233
|
name: "graph-extended",
|
|
16140
|
-
up:
|
|
16234
|
+
up: up11,
|
|
16141
16235
|
artifacts: {
|
|
16142
16236
|
columns: [{ table: "entities", column: "canonical_name" }]
|
|
16143
16237
|
}
|
|
@@ -16145,7 +16239,7 @@ var MIGRATIONS = [
|
|
|
16145
16239
|
{
|
|
16146
16240
|
version: 6,
|
|
16147
16241
|
name: "idempotency-key",
|
|
16148
|
-
up:
|
|
16242
|
+
up: up12,
|
|
16149
16243
|
artifacts: {
|
|
16150
16244
|
columns: [{ table: "memories", column: "idempotency_key" }]
|
|
16151
16245
|
}
|
|
@@ -16153,42 +16247,42 @@ var MIGRATIONS = [
|
|
|
16153
16247
|
{
|
|
16154
16248
|
version: 7,
|
|
16155
16249
|
name: "documents-and-connectors",
|
|
16156
|
-
up:
|
|
16250
|
+
up: up13,
|
|
16157
16251
|
artifacts: { tables: ["documents", "document_memories", "connectors"] }
|
|
16158
16252
|
},
|
|
16159
16253
|
{
|
|
16160
16254
|
version: 8,
|
|
16161
16255
|
name: "embeddings-unique-hash",
|
|
16162
|
-
up:
|
|
16256
|
+
up: up14
|
|
16163
16257
|
},
|
|
16164
16258
|
{
|
|
16165
16259
|
version: 9,
|
|
16166
16260
|
name: "summary-jobs",
|
|
16167
|
-
up:
|
|
16261
|
+
up: up15,
|
|
16168
16262
|
artifacts: { tables: ["summary_jobs"] }
|
|
16169
16263
|
},
|
|
16170
16264
|
{
|
|
16171
16265
|
version: 10,
|
|
16172
16266
|
name: "umap-cache",
|
|
16173
|
-
up:
|
|
16267
|
+
up: up16,
|
|
16174
16268
|
artifacts: { tables: ["umap_cache"] }
|
|
16175
16269
|
},
|
|
16176
16270
|
{
|
|
16177
16271
|
version: 11,
|
|
16178
16272
|
name: "session-scores",
|
|
16179
|
-
up:
|
|
16273
|
+
up: up17,
|
|
16180
16274
|
artifacts: { tables: ["session_scores"] }
|
|
16181
16275
|
},
|
|
16182
16276
|
{
|
|
16183
16277
|
version: 12,
|
|
16184
16278
|
name: "scheduled-tasks",
|
|
16185
|
-
up:
|
|
16279
|
+
up: up18,
|
|
16186
16280
|
artifacts: { tables: ["scheduled_tasks", "task_runs"] }
|
|
16187
16281
|
},
|
|
16188
16282
|
{
|
|
16189
16283
|
version: 13,
|
|
16190
16284
|
name: "ingestion-tracking",
|
|
16191
|
-
up:
|
|
16285
|
+
up: up19,
|
|
16192
16286
|
artifacts: {
|
|
16193
16287
|
columns: [
|
|
16194
16288
|
{ table: "memories", column: "source_path" },
|
|
@@ -16199,13 +16293,13 @@ var MIGRATIONS = [
|
|
|
16199
16293
|
{
|
|
16200
16294
|
version: 14,
|
|
16201
16295
|
name: "telemetry",
|
|
16202
|
-
up:
|
|
16296
|
+
up: up20,
|
|
16203
16297
|
artifacts: { tables: ["telemetry_events"] }
|
|
16204
16298
|
},
|
|
16205
16299
|
{
|
|
16206
16300
|
version: 15,
|
|
16207
16301
|
name: "session-memories",
|
|
16208
|
-
up:
|
|
16302
|
+
up: up21,
|
|
16209
16303
|
artifacts: {
|
|
16210
16304
|
tables: ["session_memories"],
|
|
16211
16305
|
columns: [
|
|
@@ -16217,13 +16311,13 @@ var MIGRATIONS = [
|
|
|
16217
16311
|
{
|
|
16218
16312
|
version: 16,
|
|
16219
16313
|
name: "session-checkpoints",
|
|
16220
|
-
up:
|
|
16314
|
+
up: up22,
|
|
16221
16315
|
artifacts: { tables: ["session_checkpoints"] }
|
|
16222
16316
|
},
|
|
16223
16317
|
{
|
|
16224
16318
|
version: 17,
|
|
16225
16319
|
name: "task-skills",
|
|
16226
|
-
up:
|
|
16320
|
+
up: up23,
|
|
16227
16321
|
artifacts: {
|
|
16228
16322
|
columns: [{ table: "scheduled_tasks", column: "skill_name" }]
|
|
16229
16323
|
}
|
|
@@ -16231,13 +16325,13 @@ var MIGRATIONS = [
|
|
|
16231
16325
|
{
|
|
16232
16326
|
version: 18,
|
|
16233
16327
|
name: "skill-meta",
|
|
16234
|
-
up:
|
|
16328
|
+
up: up24,
|
|
16235
16329
|
artifacts: { tables: ["skill_meta"] }
|
|
16236
16330
|
},
|
|
16237
16331
|
{
|
|
16238
16332
|
version: 19,
|
|
16239
16333
|
name: "knowledge-structure",
|
|
16240
|
-
up:
|
|
16334
|
+
up: up25,
|
|
16241
16335
|
artifacts: {
|
|
16242
16336
|
tables: ["entity_aspects", "entity_attributes", "entity_dependencies", "task_meta"],
|
|
16243
16337
|
columns: [{ table: "entities", column: "agent_id" }]
|
|
@@ -16246,7 +16340,7 @@ var MIGRATIONS = [
|
|
|
16246
16340
|
{
|
|
16247
16341
|
version: 20,
|
|
16248
16342
|
name: "session-structural-columns",
|
|
16249
|
-
up:
|
|
16343
|
+
up: up26,
|
|
16250
16344
|
artifacts: {
|
|
16251
16345
|
columns: [
|
|
16252
16346
|
{ table: "session_memories", column: "entity_slot" },
|
|
@@ -16259,7 +16353,7 @@ var MIGRATIONS = [
|
|
|
16259
16353
|
{
|
|
16260
16354
|
version: 21,
|
|
16261
16355
|
name: "checkpoint-structural",
|
|
16262
|
-
up:
|
|
16356
|
+
up: up27,
|
|
16263
16357
|
artifacts: {
|
|
16264
16358
|
columns: [{ table: "session_checkpoints", column: "focal_entity_ids" }]
|
|
16265
16359
|
}
|
|
@@ -16267,7 +16361,7 @@ var MIGRATIONS = [
|
|
|
16267
16361
|
{
|
|
16268
16362
|
version: 22,
|
|
16269
16363
|
name: "entity-pinning",
|
|
16270
|
-
up:
|
|
16364
|
+
up: up28,
|
|
16271
16365
|
artifacts: {
|
|
16272
16366
|
columns: [
|
|
16273
16367
|
{ table: "entities", column: "pinned" },
|
|
@@ -16278,17 +16372,17 @@ var MIGRATIONS = [
|
|
|
16278
16372
|
{
|
|
16279
16373
|
version: 23,
|
|
16280
16374
|
name: "retired-scorer-gap",
|
|
16281
|
-
up:
|
|
16375
|
+
up: up29
|
|
16282
16376
|
},
|
|
16283
16377
|
{
|
|
16284
16378
|
version: 24,
|
|
16285
16379
|
name: "retired-scorer-gap",
|
|
16286
|
-
up:
|
|
16380
|
+
up: up30
|
|
16287
16381
|
},
|
|
16288
16382
|
{
|
|
16289
16383
|
version: 25,
|
|
16290
16384
|
name: "agent-feedback",
|
|
16291
|
-
up:
|
|
16385
|
+
up: up31,
|
|
16292
16386
|
artifacts: {
|
|
16293
16387
|
columns: [{ table: "session_memories", column: "agent_relevance_score" }]
|
|
16294
16388
|
}
|
|
@@ -16296,32 +16390,32 @@ var MIGRATIONS = [
|
|
|
16296
16390
|
{
|
|
16297
16391
|
version: 26,
|
|
16298
16392
|
name: "retired-scorer-gap",
|
|
16299
|
-
up:
|
|
16393
|
+
up: up32
|
|
16300
16394
|
},
|
|
16301
16395
|
{
|
|
16302
16396
|
version: 27,
|
|
16303
16397
|
name: "backfill-canonical-names",
|
|
16304
|
-
up:
|
|
16398
|
+
up: up33
|
|
16305
16399
|
},
|
|
16306
16400
|
{
|
|
16307
16401
|
version: 28,
|
|
16308
16402
|
name: "lossless-retention",
|
|
16309
|
-
up:
|
|
16403
|
+
up: up34
|
|
16310
16404
|
},
|
|
16311
16405
|
{
|
|
16312
16406
|
version: 29,
|
|
16313
16407
|
name: "session-summary-dag",
|
|
16314
|
-
up:
|
|
16408
|
+
up: up35
|
|
16315
16409
|
},
|
|
16316
16410
|
{
|
|
16317
16411
|
version: 30,
|
|
16318
16412
|
name: "nullable-memory-job-memory-id",
|
|
16319
|
-
up:
|
|
16413
|
+
up: up36
|
|
16320
16414
|
},
|
|
16321
16415
|
{
|
|
16322
16416
|
version: 31,
|
|
16323
16417
|
name: "dependency-reason",
|
|
16324
|
-
up:
|
|
16418
|
+
up: up37,
|
|
16325
16419
|
artifacts: {
|
|
16326
16420
|
columns: [
|
|
16327
16421
|
{ table: "entity_dependencies", column: "reason" },
|
|
@@ -16332,7 +16426,7 @@ var MIGRATIONS = [
|
|
|
16332
16426
|
{
|
|
16333
16427
|
version: 32,
|
|
16334
16428
|
name: "embeddings-vector-column",
|
|
16335
|
-
up:
|
|
16429
|
+
up: up38,
|
|
16336
16430
|
artifacts: {
|
|
16337
16431
|
columns: [{ table: "embeddings", column: "vector", optional: true }]
|
|
16338
16432
|
}
|
|
@@ -16340,7 +16434,7 @@ var MIGRATIONS = [
|
|
|
16340
16434
|
{
|
|
16341
16435
|
version: 33,
|
|
16342
16436
|
name: "scope",
|
|
16343
|
-
up:
|
|
16437
|
+
up: up39,
|
|
16344
16438
|
artifacts: {
|
|
16345
16439
|
columns: [{ table: "memories", column: "scope" }]
|
|
16346
16440
|
}
|
|
@@ -16348,17 +16442,17 @@ var MIGRATIONS = [
|
|
|
16348
16442
|
{
|
|
16349
16443
|
version: 34,
|
|
16350
16444
|
name: "scope-aware-dedup",
|
|
16351
|
-
up:
|
|
16445
|
+
up: up40
|
|
16352
16446
|
},
|
|
16353
16447
|
{
|
|
16354
16448
|
version: 35,
|
|
16355
16449
|
name: "entity-fts",
|
|
16356
|
-
up:
|
|
16450
|
+
up: up41
|
|
16357
16451
|
},
|
|
16358
16452
|
{
|
|
16359
16453
|
version: 36,
|
|
16360
16454
|
name: "dependency-confidence",
|
|
16361
|
-
up:
|
|
16455
|
+
up: up42,
|
|
16362
16456
|
artifacts: {
|
|
16363
16457
|
columns: [{ table: "entity_dependencies", column: "confidence" }]
|
|
16364
16458
|
}
|
|
@@ -16366,7 +16460,7 @@ var MIGRATIONS = [
|
|
|
16366
16460
|
{
|
|
16367
16461
|
version: 37,
|
|
16368
16462
|
name: "entity-communities",
|
|
16369
|
-
up:
|
|
16463
|
+
up: up43,
|
|
16370
16464
|
artifacts: {
|
|
16371
16465
|
tables: ["entity_communities"],
|
|
16372
16466
|
columns: [{ table: "entities", column: "community_id" }]
|
|
@@ -16375,24 +16469,24 @@ var MIGRATIONS = [
|
|
|
16375
16469
|
{
|
|
16376
16470
|
version: 38,
|
|
16377
16471
|
name: "memory-hints",
|
|
16378
|
-
up:
|
|
16472
|
+
up: up44,
|
|
16379
16473
|
artifacts: { tables: ["memory_hints"] }
|
|
16380
16474
|
},
|
|
16381
16475
|
{
|
|
16382
16476
|
version: 39,
|
|
16383
16477
|
name: "dedup-entity-dependencies",
|
|
16384
|
-
up:
|
|
16478
|
+
up: up45
|
|
16385
16479
|
},
|
|
16386
16480
|
{
|
|
16387
16481
|
version: 40,
|
|
16388
16482
|
name: "session-transcripts",
|
|
16389
|
-
up:
|
|
16483
|
+
up: up46,
|
|
16390
16484
|
artifacts: { tables: ["session_transcripts"] }
|
|
16391
16485
|
},
|
|
16392
16486
|
{
|
|
16393
16487
|
version: 41,
|
|
16394
16488
|
name: "path-feedback",
|
|
16395
|
-
up:
|
|
16489
|
+
up: up47,
|
|
16396
16490
|
artifacts: {
|
|
16397
16491
|
tables: [
|
|
16398
16492
|
"path_feedback_events",
|
|
@@ -16407,7 +16501,7 @@ var MIGRATIONS = [
|
|
|
16407
16501
|
{
|
|
16408
16502
|
version: 42,
|
|
16409
16503
|
name: "session-memories-agent-id",
|
|
16410
|
-
up:
|
|
16504
|
+
up: up48,
|
|
16411
16505
|
artifacts: {
|
|
16412
16506
|
columns: [{ table: "session_memories", column: "agent_id" }]
|
|
16413
16507
|
}
|
|
@@ -16415,7 +16509,7 @@ var MIGRATIONS = [
|
|
|
16415
16509
|
{
|
|
16416
16510
|
version: 43,
|
|
16417
16511
|
name: "agents-table",
|
|
16418
|
-
up:
|
|
16512
|
+
up: up49,
|
|
16419
16513
|
artifacts: {
|
|
16420
16514
|
tables: ["agents"],
|
|
16421
16515
|
columns: [
|
|
@@ -16427,7 +16521,7 @@ var MIGRATIONS = [
|
|
|
16427
16521
|
{
|
|
16428
16522
|
version: 44,
|
|
16429
16523
|
name: "memory-md-temporal-head",
|
|
16430
|
-
up:
|
|
16524
|
+
up: up50,
|
|
16431
16525
|
artifacts: {
|
|
16432
16526
|
columns: [
|
|
16433
16527
|
{ table: "session_summaries", column: "source_type" },
|
|
@@ -16439,7 +16533,7 @@ var MIGRATIONS = [
|
|
|
16439
16533
|
{
|
|
16440
16534
|
version: 45,
|
|
16441
16535
|
name: "lossless-working-memory-hardening",
|
|
16442
|
-
up:
|
|
16536
|
+
up: up51,
|
|
16443
16537
|
artifacts: {
|
|
16444
16538
|
tables: ["session_transcripts_fts", "memory_md_heads"],
|
|
16445
16539
|
columns: [
|
|
@@ -16452,17 +16546,17 @@ var MIGRATIONS = [
|
|
|
16452
16546
|
{
|
|
16453
16547
|
version: 46,
|
|
16454
16548
|
name: "session-summary-uniqueness",
|
|
16455
|
-
up:
|
|
16549
|
+
up: up52
|
|
16456
16550
|
},
|
|
16457
16551
|
{
|
|
16458
16552
|
version: 47,
|
|
16459
16553
|
name: "agent-scoped-temporal-uniqueness",
|
|
16460
|
-
up:
|
|
16554
|
+
up: up53
|
|
16461
16555
|
},
|
|
16462
16556
|
{
|
|
16463
16557
|
version: 48,
|
|
16464
16558
|
name: "thread-heads",
|
|
16465
|
-
up:
|
|
16559
|
+
up: up54,
|
|
16466
16560
|
artifacts: {
|
|
16467
16561
|
tables: ["memory_thread_heads"]
|
|
16468
16562
|
}
|
|
@@ -16470,7 +16564,7 @@ var MIGRATIONS = [
|
|
|
16470
16564
|
{
|
|
16471
16565
|
version: 49,
|
|
16472
16566
|
name: "session-extract-cursors",
|
|
16473
|
-
up:
|
|
16567
|
+
up: up55,
|
|
16474
16568
|
artifacts: {
|
|
16475
16569
|
tables: ["session_extract_cursors"]
|
|
16476
16570
|
}
|
|
@@ -16478,7 +16572,7 @@ var MIGRATIONS = [
|
|
|
16478
16572
|
{
|
|
16479
16573
|
version: 50,
|
|
16480
16574
|
name: "related-to-audit",
|
|
16481
|
-
up:
|
|
16575
|
+
up: up56,
|
|
16482
16576
|
artifacts: {
|
|
16483
16577
|
tables: ["entity_dependency_history"]
|
|
16484
16578
|
}
|
|
@@ -16486,7 +16580,7 @@ var MIGRATIONS = [
|
|
|
16486
16580
|
{
|
|
16487
16581
|
version: 51,
|
|
16488
16582
|
name: "memory-md-rolling-window-lineage",
|
|
16489
|
-
up:
|
|
16583
|
+
up: up57,
|
|
16490
16584
|
artifacts: {
|
|
16491
16585
|
tables: ["memory_artifacts", "memory_artifact_tombstones", "memory_artifacts_fts"],
|
|
16492
16586
|
columns: [
|
|
@@ -16501,12 +16595,12 @@ var MIGRATIONS = [
|
|
|
16501
16595
|
{
|
|
16502
16596
|
version: 52,
|
|
16503
16597
|
name: "mcp-invocations",
|
|
16504
|
-
up:
|
|
16598
|
+
up: up58
|
|
16505
16599
|
},
|
|
16506
16600
|
{
|
|
16507
16601
|
version: 53,
|
|
16508
16602
|
name: "skill-invocations",
|
|
16509
|
-
up:
|
|
16603
|
+
up: up59,
|
|
16510
16604
|
artifacts: {
|
|
16511
16605
|
tables: ["skill_invocations"]
|
|
16512
16606
|
}
|
|
@@ -16514,7 +16608,7 @@ var MIGRATIONS = [
|
|
|
16514
16608
|
{
|
|
16515
16609
|
version: 54,
|
|
16516
16610
|
name: "task-agent-scope",
|
|
16517
|
-
up:
|
|
16611
|
+
up: up60,
|
|
16518
16612
|
artifacts: {
|
|
16519
16613
|
tables: ["task_scope_hints"]
|
|
16520
16614
|
}
|
|
@@ -16522,7 +16616,7 @@ var MIGRATIONS = [
|
|
|
16522
16616
|
{
|
|
16523
16617
|
version: 55,
|
|
16524
16618
|
name: "dreaming-state",
|
|
16525
|
-
up:
|
|
16619
|
+
up: up61,
|
|
16526
16620
|
artifacts: {
|
|
16527
16621
|
tables: ["dreaming_state", "dreaming_passes"]
|
|
16528
16622
|
}
|
|
@@ -16530,22 +16624,22 @@ var MIGRATIONS = [
|
|
|
16530
16624
|
{
|
|
16531
16625
|
version: 56,
|
|
16532
16626
|
name: "agent-scoped-content-hash",
|
|
16533
|
-
up:
|
|
16627
|
+
up: up62
|
|
16534
16628
|
},
|
|
16535
16629
|
{
|
|
16536
16630
|
version: 57,
|
|
16537
16631
|
name: "memories-fts-tokenizer-repair",
|
|
16538
|
-
up:
|
|
16632
|
+
up: up63
|
|
16539
16633
|
},
|
|
16540
16634
|
{
|
|
16541
16635
|
version: 58,
|
|
16542
16636
|
name: "knowledge-graph-indices",
|
|
16543
|
-
up:
|
|
16637
|
+
up: up64
|
|
16544
16638
|
},
|
|
16545
16639
|
{
|
|
16546
16640
|
version: 59,
|
|
16547
16641
|
name: "entity-attribute-claim-key",
|
|
16548
|
-
up:
|
|
16642
|
+
up: up65,
|
|
16549
16643
|
artifacts: {
|
|
16550
16644
|
columns: [{ table: "entity_attributes", column: "claim_key" }]
|
|
16551
16645
|
}
|
|
@@ -16553,7 +16647,7 @@ var MIGRATIONS = [
|
|
|
16553
16647
|
{
|
|
16554
16648
|
version: 60,
|
|
16555
16649
|
name: "entity-attribute-group-key",
|
|
16556
|
-
up:
|
|
16650
|
+
up: up66,
|
|
16557
16651
|
artifacts: {
|
|
16558
16652
|
columns: [{ table: "entity_attributes", column: "group_key" }]
|
|
16559
16653
|
}
|
|
@@ -16561,7 +16655,7 @@ var MIGRATIONS = [
|
|
|
16561
16655
|
{
|
|
16562
16656
|
version: 61,
|
|
16563
16657
|
name: "memory-artifact-source-mtime",
|
|
16564
|
-
up:
|
|
16658
|
+
up: up67,
|
|
16565
16659
|
artifacts: {
|
|
16566
16660
|
columns: [{ table: "memory_artifacts", column: "source_mtime_ms" }]
|
|
16567
16661
|
}
|
|
@@ -16569,7 +16663,7 @@ var MIGRATIONS = [
|
|
|
16569
16663
|
{
|
|
16570
16664
|
version: 62,
|
|
16571
16665
|
name: "memory-artifact-soft-delete",
|
|
16572
|
-
up:
|
|
16666
|
+
up: up68,
|
|
16573
16667
|
artifacts: {
|
|
16574
16668
|
columns: [
|
|
16575
16669
|
{ table: "memory_artifacts", column: "is_deleted" },
|
|
@@ -16580,12 +16674,12 @@ var MIGRATIONS = [
|
|
|
16580
16674
|
{
|
|
16581
16675
|
version: 63,
|
|
16582
16676
|
name: "content-only-memories-fts-update",
|
|
16583
|
-
up:
|
|
16677
|
+
up: up69
|
|
16584
16678
|
},
|
|
16585
16679
|
{
|
|
16586
16680
|
version: 64,
|
|
16587
16681
|
name: "source-graph-provenance",
|
|
16588
|
-
up:
|
|
16682
|
+
up: up70,
|
|
16589
16683
|
artifacts: {
|
|
16590
16684
|
columns: [
|
|
16591
16685
|
{ table: "entities", column: "source_path" },
|
|
@@ -16598,7 +16692,7 @@ var MIGRATIONS = [
|
|
|
16598
16692
|
{
|
|
16599
16693
|
version: 65,
|
|
16600
16694
|
name: "source-embedding-agent-scope",
|
|
16601
|
-
up:
|
|
16695
|
+
up: up71,
|
|
16602
16696
|
artifacts: {
|
|
16603
16697
|
columns: [{ table: "embeddings", column: "agent_id", optional: true }]
|
|
16604
16698
|
}
|
|
@@ -16606,7 +16700,7 @@ var MIGRATIONS = [
|
|
|
16606
16700
|
{
|
|
16607
16701
|
version: 66,
|
|
16608
16702
|
name: "memory-search-telemetry",
|
|
16609
|
-
up:
|
|
16703
|
+
up: up72,
|
|
16610
16704
|
artifacts: {
|
|
16611
16705
|
tables: ["memory_search_telemetry"]
|
|
16612
16706
|
}
|
|
@@ -16614,7 +16708,7 @@ var MIGRATIONS = [
|
|
|
16614
16708
|
{
|
|
16615
16709
|
version: 67,
|
|
16616
16710
|
name: "ontology-proposals",
|
|
16617
|
-
up:
|
|
16711
|
+
up: up73,
|
|
16618
16712
|
artifacts: {
|
|
16619
16713
|
tables: ["ontology_proposals"],
|
|
16620
16714
|
columns: [
|
|
@@ -16628,7 +16722,7 @@ var MIGRATIONS = [
|
|
|
16628
16722
|
{
|
|
16629
16723
|
version: 68,
|
|
16630
16724
|
name: "daily-reflections",
|
|
16631
|
-
up:
|
|
16725
|
+
up: up74,
|
|
16632
16726
|
artifacts: {
|
|
16633
16727
|
tables: ["daily_reflections"]
|
|
16634
16728
|
}
|
|
@@ -16636,7 +16730,7 @@ var MIGRATIONS = [
|
|
|
16636
16730
|
{
|
|
16637
16731
|
version: 69,
|
|
16638
16732
|
name: "daily-reflections-multiple-insights",
|
|
16639
|
-
up:
|
|
16733
|
+
up: up75,
|
|
16640
16734
|
artifacts: {
|
|
16641
16735
|
tables: ["daily_reflections"]
|
|
16642
16736
|
}
|
|
@@ -16644,7 +16738,7 @@ var MIGRATIONS = [
|
|
|
16644
16738
|
{
|
|
16645
16739
|
version: 70,
|
|
16646
16740
|
name: "ontology-control-plane-state",
|
|
16647
|
-
up:
|
|
16741
|
+
up: up76,
|
|
16648
16742
|
artifacts: {
|
|
16649
16743
|
columns: [
|
|
16650
16744
|
{ table: "entities", column: "status" },
|
|
@@ -16659,7 +16753,7 @@ var MIGRATIONS = [
|
|
|
16659
16753
|
{
|
|
16660
16754
|
version: 71,
|
|
16661
16755
|
name: "epistemic-assertions",
|
|
16662
|
-
up:
|
|
16756
|
+
up: up77,
|
|
16663
16757
|
artifacts: {
|
|
16664
16758
|
tables: ["epistemic_assertions"]
|
|
16665
16759
|
}
|
|
@@ -16667,7 +16761,7 @@ var MIGRATIONS = [
|
|
|
16667
16761
|
{
|
|
16668
16762
|
version: 72,
|
|
16669
16763
|
name: "agent-scoped-idempotency-key",
|
|
16670
|
-
up:
|
|
16764
|
+
up: up78,
|
|
16671
16765
|
artifacts: {
|
|
16672
16766
|
columns: [
|
|
16673
16767
|
{ table: "memories", column: "idempotency_key" },
|
|
@@ -16678,7 +16772,7 @@ var MIGRATIONS = [
|
|
|
16678
16772
|
{
|
|
16679
16773
|
version: 73,
|
|
16680
16774
|
name: "recall-context-dedupe",
|
|
16681
|
-
up:
|
|
16775
|
+
up: up79,
|
|
16682
16776
|
artifacts: {
|
|
16683
16777
|
tables: ["session_context_epochs", "session_recall_events"]
|
|
16684
16778
|
}
|
|
@@ -16686,7 +16780,7 @@ var MIGRATIONS = [
|
|
|
16686
16780
|
{
|
|
16687
16781
|
version: 74,
|
|
16688
16782
|
name: "aggregate-memory-links",
|
|
16689
|
-
up:
|
|
16783
|
+
up: up80,
|
|
16690
16784
|
artifacts: {
|
|
16691
16785
|
tables: ["aggregate_memory_sources"]
|
|
16692
16786
|
}
|
|
@@ -16694,7 +16788,7 @@ var MIGRATIONS = [
|
|
|
16694
16788
|
{
|
|
16695
16789
|
version: 75,
|
|
16696
16790
|
name: "memory-artifact-source-provenance",
|
|
16697
|
-
up:
|
|
16791
|
+
up: up81,
|
|
16698
16792
|
artifacts: {
|
|
16699
16793
|
columns: [
|
|
16700
16794
|
{ table: "memory_artifacts", column: "source_id" },
|
|
@@ -16708,7 +16802,7 @@ var MIGRATIONS = [
|
|
|
16708
16802
|
{
|
|
16709
16803
|
version: 76,
|
|
16710
16804
|
name: "temporal-edges",
|
|
16711
|
-
up:
|
|
16805
|
+
up: up82,
|
|
16712
16806
|
artifacts: {
|
|
16713
16807
|
tables: ["temporal_edges"]
|
|
16714
16808
|
}
|
|
@@ -16716,7 +16810,7 @@ var MIGRATIONS = [
|
|
|
16716
16810
|
{
|
|
16717
16811
|
version: 77,
|
|
16718
16812
|
name: "entity-aliases",
|
|
16719
|
-
up:
|
|
16813
|
+
up: up83,
|
|
16720
16814
|
artifacts: {
|
|
16721
16815
|
tables: ["entity_aliases"]
|
|
16722
16816
|
}
|
|
@@ -16724,7 +16818,7 @@ var MIGRATIONS = [
|
|
|
16724
16818
|
{
|
|
16725
16819
|
version: 78,
|
|
16726
16820
|
name: "api-keys",
|
|
16727
|
-
up:
|
|
16821
|
+
up: up84,
|
|
16728
16822
|
artifacts: {
|
|
16729
16823
|
tables: ["api_keys"]
|
|
16730
16824
|
}
|
|
@@ -16732,7 +16826,7 @@ var MIGRATIONS = [
|
|
|
16732
16826
|
{
|
|
16733
16827
|
version: 79,
|
|
16734
16828
|
name: "transcript-capture-jobs",
|
|
16735
|
-
up:
|
|
16829
|
+
up: up85,
|
|
16736
16830
|
artifacts: {
|
|
16737
16831
|
tables: ["transcript_capture_jobs"]
|
|
16738
16832
|
}
|
|
@@ -16740,7 +16834,7 @@ var MIGRATIONS = [
|
|
|
16740
16834
|
{
|
|
16741
16835
|
version: 80,
|
|
16742
16836
|
name: "document-scope-columns",
|
|
16743
|
-
up:
|
|
16837
|
+
up: up86,
|
|
16744
16838
|
artifacts: {
|
|
16745
16839
|
columns: [
|
|
16746
16840
|
{ table: "documents", column: "agent_id" },
|
|
@@ -16751,7 +16845,7 @@ var MIGRATIONS = [
|
|
|
16751
16845
|
{
|
|
16752
16846
|
version: 81,
|
|
16753
16847
|
name: "aggregate-evidence-sources",
|
|
16754
|
-
up:
|
|
16848
|
+
up: up87,
|
|
16755
16849
|
artifacts: {
|
|
16756
16850
|
tables: ["aggregate_evidence_sources"]
|
|
16757
16851
|
}
|
|
@@ -16759,7 +16853,7 @@ var MIGRATIONS = [
|
|
|
16759
16853
|
{
|
|
16760
16854
|
version: 82,
|
|
16761
16855
|
name: "skill-invocations-harness",
|
|
16762
|
-
up:
|
|
16856
|
+
up: up88,
|
|
16763
16857
|
artifacts: {
|
|
16764
16858
|
columns: [
|
|
16765
16859
|
{ table: "skill_invocations", column: "harness" },
|
|
@@ -16770,7 +16864,7 @@ var MIGRATIONS = [
|
|
|
16770
16864
|
{
|
|
16771
16865
|
version: 83,
|
|
16772
16866
|
name: "memory-lifecycle-repair",
|
|
16773
|
-
up:
|
|
16867
|
+
up: up89,
|
|
16774
16868
|
artifacts: {
|
|
16775
16869
|
tables: ["transcript_capture_jobs", "aggregate_evidence_sources", "entity_dependencies"],
|
|
16776
16870
|
columns: [
|
|
@@ -16785,7 +16879,7 @@ var MIGRATIONS = [
|
|
|
16785
16879
|
{
|
|
16786
16880
|
version: 84,
|
|
16787
16881
|
name: "legacy-markdown-import-state",
|
|
16788
|
-
up:
|
|
16882
|
+
up: up90,
|
|
16789
16883
|
artifacts: {
|
|
16790
16884
|
tables: ["legacy_markdown_imports", "legacy_markdown_chunks"]
|
|
16791
16885
|
}
|
|
@@ -16793,7 +16887,7 @@ var MIGRATIONS = [
|
|
|
16793
16887
|
{
|
|
16794
16888
|
version: 85,
|
|
16795
16889
|
name: "backfill-relations-to-dependencies",
|
|
16796
|
-
up:
|
|
16890
|
+
up: up91,
|
|
16797
16891
|
artifacts: {
|
|
16798
16892
|
tables: ["entity_dependencies"]
|
|
16799
16893
|
}
|
|
@@ -16801,7 +16895,7 @@ var MIGRATIONS = [
|
|
|
16801
16895
|
{
|
|
16802
16896
|
version: 86,
|
|
16803
16897
|
name: "summary-jobs-content-hash",
|
|
16804
|
-
up:
|
|
16898
|
+
up: up92,
|
|
16805
16899
|
artifacts: {
|
|
16806
16900
|
columns: [{ table: "summary_jobs", column: "content_hash" }]
|
|
16807
16901
|
}
|
|
@@ -16809,7 +16903,7 @@ var MIGRATIONS = [
|
|
|
16809
16903
|
{
|
|
16810
16904
|
version: 87,
|
|
16811
16905
|
name: "summary-jobs-boundary-reason",
|
|
16812
|
-
up:
|
|
16906
|
+
up: up93,
|
|
16813
16907
|
artifacts: {
|
|
16814
16908
|
columns: [{ table: "summary_jobs", column: "boundary_reason" }]
|
|
16815
16909
|
}
|
|
@@ -16817,7 +16911,7 @@ var MIGRATIONS = [
|
|
|
16817
16911
|
{
|
|
16818
16912
|
version: 88,
|
|
16819
16913
|
name: "transcript-recovery-files",
|
|
16820
|
-
up:
|
|
16914
|
+
up: up94,
|
|
16821
16915
|
artifacts: {
|
|
16822
16916
|
tables: ["transcript_recovery_files"]
|
|
16823
16917
|
}
|
|
@@ -16825,7 +16919,7 @@ var MIGRATIONS = [
|
|
|
16825
16919
|
{
|
|
16826
16920
|
version: 89,
|
|
16827
16921
|
name: "job-cancellations",
|
|
16828
|
-
up:
|
|
16922
|
+
up: up95,
|
|
16829
16923
|
artifacts: {
|
|
16830
16924
|
tables: ["job_cancellations"]
|
|
16831
16925
|
}
|
|
@@ -16833,7 +16927,7 @@ var MIGRATIONS = [
|
|
|
16833
16927
|
{
|
|
16834
16928
|
version: 90,
|
|
16835
16929
|
name: "job-archive",
|
|
16836
|
-
up:
|
|
16930
|
+
up: up96,
|
|
16837
16931
|
artifacts: {
|
|
16838
16932
|
tables: ["job_archive"]
|
|
16839
16933
|
}
|
|
@@ -16841,25 +16935,25 @@ var MIGRATIONS = [
|
|
|
16841
16935
|
{
|
|
16842
16936
|
version: 91,
|
|
16843
16937
|
name: "embedding-index-generations",
|
|
16844
|
-
up:
|
|
16938
|
+
up: up97,
|
|
16845
16939
|
artifacts: { tables: ["embedding_index_state"] }
|
|
16846
16940
|
},
|
|
16847
16941
|
{
|
|
16848
16942
|
version: 92,
|
|
16849
16943
|
name: "embedding-staging-store",
|
|
16850
|
-
up:
|
|
16944
|
+
up: up98,
|
|
16851
16945
|
artifacts: { tables: ["embeddings_staging"] }
|
|
16852
16946
|
},
|
|
16853
16947
|
{
|
|
16854
16948
|
version: 93,
|
|
16855
16949
|
name: "dreaming-evidence-cursor",
|
|
16856
|
-
up:
|
|
16950
|
+
up: up99,
|
|
16857
16951
|
artifacts: { columns: [{ table: "dreaming_state", column: "evidence_cursor" }] }
|
|
16858
16952
|
},
|
|
16859
16953
|
{
|
|
16860
16954
|
version: 94,
|
|
16861
16955
|
name: "memory-kind",
|
|
16862
|
-
up:
|
|
16956
|
+
up: up100,
|
|
16863
16957
|
artifacts: {
|
|
16864
16958
|
columns: [
|
|
16865
16959
|
{ table: "memories", column: "memory_kind" },
|
|
@@ -16870,35 +16964,35 @@ var MIGRATIONS = [
|
|
|
16870
16964
|
{
|
|
16871
16965
|
version: 95,
|
|
16872
16966
|
name: "compaction-recall-projections",
|
|
16873
|
-
up:
|
|
16967
|
+
up: up101
|
|
16874
16968
|
},
|
|
16875
16969
|
{
|
|
16876
16970
|
version: 96,
|
|
16877
16971
|
name: "retire-legacy-ingestion",
|
|
16878
|
-
up:
|
|
16972
|
+
up: up102
|
|
16879
16973
|
},
|
|
16880
16974
|
{
|
|
16881
16975
|
version: 97,
|
|
16882
16976
|
name: "dreaming-failure-backoff",
|
|
16883
|
-
up:
|
|
16977
|
+
up: up103,
|
|
16884
16978
|
artifacts: { columns: [{ table: "dreaming_state", column: "last_failure_at" }] }
|
|
16885
16979
|
},
|
|
16886
16980
|
{
|
|
16887
16981
|
version: 98,
|
|
16888
16982
|
name: "dreaming-evidence-exclusions",
|
|
16889
|
-
up:
|
|
16983
|
+
up: up104,
|
|
16890
16984
|
artifacts: { tables: ["dreaming_evidence_exclusions"] }
|
|
16891
16985
|
},
|
|
16892
16986
|
{
|
|
16893
16987
|
version: 99,
|
|
16894
16988
|
name: "dreaming-tool-calls",
|
|
16895
|
-
up:
|
|
16989
|
+
up: up105,
|
|
16896
16990
|
artifacts: { tables: ["dreaming_tool_calls"] }
|
|
16897
16991
|
},
|
|
16898
16992
|
{
|
|
16899
16993
|
version: 100,
|
|
16900
16994
|
name: "dreaming-runbook",
|
|
16901
|
-
up:
|
|
16995
|
+
up: up106,
|
|
16902
16996
|
artifacts: {
|
|
16903
16997
|
columns: [
|
|
16904
16998
|
{ table: "dreaming_passes", column: "evidence_window_json" },
|
|
@@ -16909,23 +17003,23 @@ var MIGRATIONS = [
|
|
|
16909
17003
|
{
|
|
16910
17004
|
version: 101,
|
|
16911
17005
|
name: "dreaming-attention",
|
|
16912
|
-
up:
|
|
17006
|
+
up: up107,
|
|
16913
17007
|
artifacts: { tables: ["dreaming_attention"] }
|
|
16914
17008
|
},
|
|
16915
17009
|
{
|
|
16916
17010
|
version: 102,
|
|
16917
17011
|
name: "attribute-semantic-memories",
|
|
16918
|
-
up:
|
|
17012
|
+
up: up108
|
|
16919
17013
|
},
|
|
16920
17014
|
{
|
|
16921
17015
|
version: 103,
|
|
16922
17016
|
name: "semantic-memory-kind",
|
|
16923
|
-
up:
|
|
17017
|
+
up: up109
|
|
16924
17018
|
},
|
|
16925
17019
|
{
|
|
16926
17020
|
version: 104,
|
|
16927
17021
|
name: "derived-memory-provenance",
|
|
16928
|
-
up:
|
|
17022
|
+
up: up110,
|
|
16929
17023
|
artifacts: {
|
|
16930
17024
|
tables: ["derived_memory_sources"],
|
|
16931
17025
|
columns: [{ table: "memories", column: "stale_at" }]
|
|
@@ -16934,12 +17028,12 @@ var MIGRATIONS = [
|
|
|
16934
17028
|
{
|
|
16935
17029
|
version: 105,
|
|
16936
17030
|
name: "agent-scoped-entity-name",
|
|
16937
|
-
up:
|
|
17031
|
+
up: up111
|
|
16938
17032
|
},
|
|
16939
17033
|
{
|
|
16940
17034
|
version: 106,
|
|
16941
17035
|
name: "memory-review-after",
|
|
16942
|
-
up:
|
|
17036
|
+
up: up112,
|
|
16943
17037
|
artifacts: {
|
|
16944
17038
|
columns: [{ table: "memories", column: "review_after" }]
|
|
16945
17039
|
}
|
|
@@ -16947,7 +17041,7 @@ var MIGRATIONS = [
|
|
|
16947
17041
|
{
|
|
16948
17042
|
version: 107,
|
|
16949
17043
|
name: "dreaming-pass-usage",
|
|
16950
|
-
up:
|
|
17044
|
+
up: up113,
|
|
16951
17045
|
artifacts: {
|
|
16952
17046
|
columns: [
|
|
16953
17047
|
{ table: "dreaming_passes", column: "tokens_input" },
|
|
@@ -16961,7 +17055,7 @@ var MIGRATIONS = [
|
|
|
16961
17055
|
{
|
|
16962
17056
|
version: 108,
|
|
16963
17057
|
name: "embedding-usage",
|
|
16964
|
-
up:
|
|
17058
|
+
up: up114,
|
|
16965
17059
|
artifacts: {
|
|
16966
17060
|
tables: ["embedding_usage"]
|
|
16967
17061
|
}
|
|
@@ -16969,7 +17063,7 @@ var MIGRATIONS = [
|
|
|
16969
17063
|
{
|
|
16970
17064
|
version: 109,
|
|
16971
17065
|
name: "telemetry-install",
|
|
16972
|
-
up:
|
|
17066
|
+
up: up115,
|
|
16973
17067
|
artifacts: {
|
|
16974
17068
|
tables: ["telemetry_install"]
|
|
16975
17069
|
}
|
|
@@ -16977,12 +17071,12 @@ var MIGRATIONS = [
|
|
|
16977
17071
|
{
|
|
16978
17072
|
version: 110,
|
|
16979
17073
|
name: "memory-mention-join-index",
|
|
16980
|
-
up:
|
|
17074
|
+
up: up116
|
|
16981
17075
|
},
|
|
16982
17076
|
{
|
|
16983
17077
|
version: 111,
|
|
16984
17078
|
name: "telemetry-first-use",
|
|
16985
|
-
up:
|
|
17079
|
+
up: up117,
|
|
16986
17080
|
artifacts: {
|
|
16987
17081
|
columns: [
|
|
16988
17082
|
{ table: "telemetry_install", column: "first_remember_at" },
|
|
@@ -16993,7 +17087,7 @@ var MIGRATIONS = [
|
|
|
16993
17087
|
{
|
|
16994
17088
|
version: 112,
|
|
16995
17089
|
name: "telemetry-queue-ownership",
|
|
16996
|
-
up:
|
|
17090
|
+
up: up118,
|
|
16997
17091
|
artifacts: {
|
|
16998
17092
|
columns: [
|
|
16999
17093
|
{ table: "telemetry_events", column: "source" },
|
|
@@ -17005,7 +17099,7 @@ var MIGRATIONS = [
|
|
|
17005
17099
|
{
|
|
17006
17100
|
version: 113,
|
|
17007
17101
|
name: "session-claims",
|
|
17008
|
-
up:
|
|
17102
|
+
up: up119,
|
|
17009
17103
|
artifacts: {
|
|
17010
17104
|
tables: ["session_claims"],
|
|
17011
17105
|
columns: [
|
|
@@ -17019,12 +17113,12 @@ var MIGRATIONS = [
|
|
|
17019
17113
|
{
|
|
17020
17114
|
version: 114,
|
|
17021
17115
|
name: "memory-traversal-hydration-index",
|
|
17022
|
-
up:
|
|
17116
|
+
up: up120
|
|
17023
17117
|
},
|
|
17024
17118
|
{
|
|
17025
17119
|
version: 115,
|
|
17026
17120
|
name: "cross-agent-message-notifications",
|
|
17027
|
-
up:
|
|
17121
|
+
up: up121,
|
|
17028
17122
|
artifacts: {
|
|
17029
17123
|
tables: ["cross_agent_messages", "cross_agent_message_receipts"]
|
|
17030
17124
|
}
|
|
@@ -17032,7 +17126,7 @@ var MIGRATIONS = [
|
|
|
17032
17126
|
{
|
|
17033
17127
|
version: 116,
|
|
17034
17128
|
name: "acp-delivery-reconciliation",
|
|
17035
|
-
up:
|
|
17129
|
+
up: up122,
|
|
17036
17130
|
artifacts: {
|
|
17037
17131
|
columns: [
|
|
17038
17132
|
{ table: "cross_agent_messages", column: "delivery_state" },
|
|
@@ -17046,7 +17140,7 @@ var MIGRATIONS = [
|
|
|
17046
17140
|
{
|
|
17047
17141
|
version: 117,
|
|
17048
17142
|
name: "retire-summary-worker",
|
|
17049
|
-
up:
|
|
17143
|
+
up: up123,
|
|
17050
17144
|
artifacts: {
|
|
17051
17145
|
columns: [
|
|
17052
17146
|
{ table: "session_transcripts", column: "completed_at" },
|
|
@@ -17057,24 +17151,24 @@ var MIGRATIONS = [
|
|
|
17057
17151
|
{
|
|
17058
17152
|
version: 118,
|
|
17059
17153
|
name: "queue-pressure-indices",
|
|
17060
|
-
up:
|
|
17154
|
+
up: up124
|
|
17061
17155
|
},
|
|
17062
17156
|
{
|
|
17063
17157
|
version: 119,
|
|
17064
17158
|
name: "telemetry-version-observation",
|
|
17065
|
-
up:
|
|
17159
|
+
up: up125,
|
|
17066
17160
|
artifacts: { columns: [{ table: "telemetry_install", column: "last_seen_version" }] }
|
|
17067
17161
|
},
|
|
17068
17162
|
{
|
|
17069
17163
|
version: 120,
|
|
17070
17164
|
name: "source-lifecycle-telemetry",
|
|
17071
|
-
up:
|
|
17165
|
+
up: up126,
|
|
17072
17166
|
artifacts: { tables: ["source_lifecycle_state"] }
|
|
17073
17167
|
},
|
|
17074
17168
|
{
|
|
17075
17169
|
version: 121,
|
|
17076
17170
|
name: "telemetry-delivery-health",
|
|
17077
|
-
up:
|
|
17171
|
+
up: up127,
|
|
17078
17172
|
artifacts: {
|
|
17079
17173
|
tables: ["telemetry_delivery_state"],
|
|
17080
17174
|
columns: [
|
|
@@ -17088,7 +17182,7 @@ var MIGRATIONS = [
|
|
|
17088
17182
|
{
|
|
17089
17183
|
version: 122,
|
|
17090
17184
|
name: "dreaming-evidence-retry",
|
|
17091
|
-
up:
|
|
17185
|
+
up: up128,
|
|
17092
17186
|
artifacts: {
|
|
17093
17187
|
columns: [
|
|
17094
17188
|
{ table: "dreaming_evidence_exclusions", column: "failure_class" },
|
|
@@ -17101,13 +17195,13 @@ var MIGRATIONS = [
|
|
|
17101
17195
|
{
|
|
17102
17196
|
version: 123,
|
|
17103
17197
|
name: "embedding-index-failures",
|
|
17104
|
-
up:
|
|
17198
|
+
up: up129,
|
|
17105
17199
|
artifacts: { tables: ["embedding_index_failures"] }
|
|
17106
17200
|
},
|
|
17107
17201
|
{
|
|
17108
17202
|
version: 124,
|
|
17109
17203
|
name: "import-derived-lifecycle",
|
|
17110
|
-
up:
|
|
17204
|
+
up: up130,
|
|
17111
17205
|
artifacts: {
|
|
17112
17206
|
tables: ["imported_source_lifecycle"]
|
|
17113
17207
|
}
|
|
@@ -17115,76 +17209,76 @@ var MIGRATIONS = [
|
|
|
17115
17209
|
{
|
|
17116
17210
|
version: 125,
|
|
17117
17211
|
name: "memory-content-safety",
|
|
17118
|
-
up:
|
|
17212
|
+
up: up131
|
|
17119
17213
|
},
|
|
17120
17214
|
{
|
|
17121
17215
|
version: 126,
|
|
17122
17216
|
name: "dreaming-surprisal-attention",
|
|
17123
|
-
up:
|
|
17217
|
+
up: up132,
|
|
17124
17218
|
artifacts: { tables: ["dreaming_attention"] }
|
|
17125
17219
|
},
|
|
17126
17220
|
{
|
|
17127
17221
|
version: 127,
|
|
17128
17222
|
name: "ontology-contradictions",
|
|
17129
|
-
up:
|
|
17223
|
+
up: up133,
|
|
17130
17224
|
artifacts: { tables: ["ontology_contradictions"] }
|
|
17131
17225
|
},
|
|
17132
17226
|
{
|
|
17133
17227
|
version: 128,
|
|
17134
17228
|
name: "bounded-queue-diagnostics",
|
|
17135
|
-
up:
|
|
17229
|
+
up: up134
|
|
17136
17230
|
},
|
|
17137
17231
|
{
|
|
17138
17232
|
version: 129,
|
|
17139
17233
|
name: "retire-structural-jobs",
|
|
17140
|
-
up:
|
|
17234
|
+
up: up135
|
|
17141
17235
|
},
|
|
17142
17236
|
{
|
|
17143
17237
|
version: 130,
|
|
17144
17238
|
name: "embedding-repair-state",
|
|
17145
|
-
up:
|
|
17239
|
+
up: up136,
|
|
17146
17240
|
artifacts: { tables: ["embedding_repair_budget", "embedding_repair_backoff"] }
|
|
17147
17241
|
},
|
|
17148
17242
|
{
|
|
17149
17243
|
version: 131,
|
|
17150
17244
|
name: "dreaming-evidence-consumption",
|
|
17151
|
-
up:
|
|
17245
|
+
up: up137,
|
|
17152
17246
|
artifacts: { tables: ["dreaming_evidence_consumption"] }
|
|
17153
17247
|
},
|
|
17154
17248
|
{
|
|
17155
17249
|
version: 132,
|
|
17156
17250
|
name: "observer-scoped-epistemic-assertions",
|
|
17157
|
-
up:
|
|
17251
|
+
up: up138,
|
|
17158
17252
|
artifacts: { tables: ["epistemic_assertions"] }
|
|
17159
17253
|
},
|
|
17160
17254
|
{
|
|
17161
17255
|
version: 133,
|
|
17162
17256
|
name: "dreaming-memory-head",
|
|
17163
|
-
up:
|
|
17257
|
+
up: up139,
|
|
17164
17258
|
artifacts: { tables: ["memory_head_revisions", "memory_head_entries", "memory_head_revision_entries"] }
|
|
17165
17259
|
},
|
|
17166
17260
|
{
|
|
17167
17261
|
version: 134,
|
|
17168
17262
|
name: "scope-memory-head-entries",
|
|
17169
|
-
up:
|
|
17263
|
+
up: up140,
|
|
17170
17264
|
artifacts: { tables: ["memory_head_entries"] }
|
|
17171
17265
|
},
|
|
17172
17266
|
{
|
|
17173
17267
|
version: 135,
|
|
17174
17268
|
name: "memory-head-publication",
|
|
17175
|
-
up:
|
|
17269
|
+
up: up141,
|
|
17176
17270
|
artifacts: { tables: ["memory_head_publications"] }
|
|
17177
17271
|
},
|
|
17178
17272
|
{
|
|
17179
17273
|
version: 136,
|
|
17180
17274
|
name: "memory-head-revisions",
|
|
17181
|
-
up:
|
|
17275
|
+
up: up142,
|
|
17182
17276
|
artifacts: { tables: ["memory_head_revisions"] }
|
|
17183
17277
|
},
|
|
17184
17278
|
{
|
|
17185
17279
|
version: 137,
|
|
17186
17280
|
name: "dreaming-head-manifest",
|
|
17187
|
-
up:
|
|
17281
|
+
up: up143,
|
|
17188
17282
|
artifacts: {
|
|
17189
17283
|
columns: [
|
|
17190
17284
|
{ table: "dreaming_passes", column: "head_revision" },
|
|
@@ -17195,7 +17289,7 @@ var MIGRATIONS = [
|
|
|
17195
17289
|
{
|
|
17196
17290
|
version: 138,
|
|
17197
17291
|
name: "bounded-status-projections",
|
|
17198
|
-
up:
|
|
17292
|
+
up: up144,
|
|
17199
17293
|
artifacts: {
|
|
17200
17294
|
tables: ["transcript_capture_status", "memories_duplicate_hash_counts", "memories_diagnostics_state"]
|
|
17201
17295
|
}
|
|
@@ -17203,31 +17297,31 @@ var MIGRATIONS = [
|
|
|
17203
17297
|
{
|
|
17204
17298
|
version: 139,
|
|
17205
17299
|
name: "native-source-sync-state",
|
|
17206
|
-
up:
|
|
17300
|
+
up: up145,
|
|
17207
17301
|
artifacts: { tables: ["native_source_sync_state"] }
|
|
17208
17302
|
},
|
|
17209
17303
|
{
|
|
17210
17304
|
version: 140,
|
|
17211
17305
|
name: "transcript-recovery-frontier",
|
|
17212
|
-
up:
|
|
17306
|
+
up: up146,
|
|
17213
17307
|
artifacts: { tables: ["transcript_recovery_frontiers"] }
|
|
17214
17308
|
},
|
|
17215
17309
|
{
|
|
17216
17310
|
version: 141,
|
|
17217
17311
|
name: "source-sync-checkpoints",
|
|
17218
|
-
up:
|
|
17312
|
+
up: up147,
|
|
17219
17313
|
artifacts: { tables: ["source_sync_checkpoints"] }
|
|
17220
17314
|
},
|
|
17221
17315
|
{
|
|
17222
17316
|
version: 142,
|
|
17223
17317
|
name: "source-sync-frontier",
|
|
17224
|
-
up:
|
|
17318
|
+
up: up148,
|
|
17225
17319
|
artifacts: { columns: [{ table: "source_sync_checkpoints", column: "frontier" }] }
|
|
17226
17320
|
},
|
|
17227
17321
|
{
|
|
17228
17322
|
version: 143,
|
|
17229
17323
|
name: "embedding-index-progress",
|
|
17230
|
-
up:
|
|
17324
|
+
up: up149,
|
|
17231
17325
|
artifacts: {
|
|
17232
17326
|
columns: [
|
|
17233
17327
|
{ table: "embedding_index_state", column: "migration_phase" },
|
|
@@ -17243,19 +17337,19 @@ var MIGRATIONS = [
|
|
|
17243
17337
|
{
|
|
17244
17338
|
version: 144,
|
|
17245
17339
|
name: "memory-job-lease-token",
|
|
17246
|
-
up:
|
|
17340
|
+
up: up150,
|
|
17247
17341
|
artifacts: { columns: [{ table: "memory_jobs", column: "lease_token" }] }
|
|
17248
17342
|
},
|
|
17249
17343
|
{
|
|
17250
17344
|
version: 145,
|
|
17251
17345
|
name: "dreaming-evidence-reviews",
|
|
17252
|
-
up:
|
|
17346
|
+
up: up151,
|
|
17253
17347
|
artifacts: { tables: ["dreaming_evidence_reviews"] }
|
|
17254
17348
|
},
|
|
17255
17349
|
{
|
|
17256
17350
|
version: 146,
|
|
17257
17351
|
name: "source-transcript-import",
|
|
17258
|
-
up:
|
|
17352
|
+
up: up152,
|
|
17259
17353
|
artifacts: {
|
|
17260
17354
|
tables: [
|
|
17261
17355
|
"source_import_jobs",
|
|
@@ -17274,19 +17368,19 @@ var MIGRATIONS = [
|
|
|
17274
17368
|
{
|
|
17275
17369
|
version: 147,
|
|
17276
17370
|
name: "source-import-replay-file-slots",
|
|
17277
|
-
up:
|
|
17371
|
+
up: up153,
|
|
17278
17372
|
artifacts: { tables: ["source_import_files"] }
|
|
17279
17373
|
},
|
|
17280
17374
|
{
|
|
17281
17375
|
version: 148,
|
|
17282
17376
|
name: "source-import-attempt-provenance",
|
|
17283
|
-
up:
|
|
17377
|
+
up: up154,
|
|
17284
17378
|
artifacts: { columns: [{ table: "source_import_record_attempts", column: "source_id" }] }
|
|
17285
17379
|
},
|
|
17286
17380
|
{
|
|
17287
17381
|
version: 149,
|
|
17288
17382
|
name: "transcript-import-state-machine",
|
|
17289
|
-
up:
|
|
17383
|
+
up: up155,
|
|
17290
17384
|
artifacts: {
|
|
17291
17385
|
columns: [
|
|
17292
17386
|
{ table: "source_import_jobs", column: "duplicate_mode" },
|
|
@@ -17298,7 +17392,7 @@ var MIGRATIONS = [
|
|
|
17298
17392
|
{
|
|
17299
17393
|
version: 150,
|
|
17300
17394
|
name: "memory-head-freshness",
|
|
17301
|
-
up:
|
|
17395
|
+
up: up156,
|
|
17302
17396
|
artifacts: {
|
|
17303
17397
|
columns: [
|
|
17304
17398
|
{ table: "memory_md_heads", column: "is_current" },
|
|
@@ -17309,7 +17403,7 @@ var MIGRATIONS = [
|
|
|
17309
17403
|
{
|
|
17310
17404
|
version: 151,
|
|
17311
17405
|
name: "transcript-import-bytes",
|
|
17312
|
-
up,
|
|
17406
|
+
up: up2,
|
|
17313
17407
|
artifacts: {
|
|
17314
17408
|
tables: [
|
|
17315
17409
|
"source_import_chunks",
|
|
@@ -17338,19 +17432,19 @@ var MIGRATIONS = [
|
|
|
17338
17432
|
{
|
|
17339
17433
|
version: 152,
|
|
17340
17434
|
name: "memory-artifact-sha-index",
|
|
17341
|
-
up:
|
|
17435
|
+
up: up3,
|
|
17342
17436
|
artifacts: { indexes: ["idx_memory_artifacts_agent_sha"] }
|
|
17343
17437
|
},
|
|
17344
17438
|
{
|
|
17345
17439
|
version: 153,
|
|
17346
17440
|
name: "vector-repair-checkpoints",
|
|
17347
|
-
up:
|
|
17441
|
+
up: up157,
|
|
17348
17442
|
artifacts: { tables: ["vector_repair_checkpoints"] }
|
|
17349
17443
|
},
|
|
17350
17444
|
{
|
|
17351
17445
|
version: 154,
|
|
17352
17446
|
name: "transcript-capture-source-identity",
|
|
17353
|
-
up:
|
|
17447
|
+
up: up4,
|
|
17354
17448
|
artifacts: {
|
|
17355
17449
|
columns: [
|
|
17356
17450
|
{ table: "transcript_capture_jobs", column: "source_identity" },
|
|
@@ -17365,19 +17459,19 @@ var MIGRATIONS = [
|
|
|
17365
17459
|
{
|
|
17366
17460
|
version: 155,
|
|
17367
17461
|
name: "source-sync-failures",
|
|
17368
|
-
up:
|
|
17462
|
+
up: up5,
|
|
17369
17463
|
artifacts: { tables: ["source_sync_failures"], indexes: ["idx_source_sync_failures_active"] }
|
|
17370
17464
|
},
|
|
17371
17465
|
{
|
|
17372
17466
|
version: 156,
|
|
17373
17467
|
name: "embedding-repair-checkpoints",
|
|
17374
|
-
up:
|
|
17468
|
+
up: up158,
|
|
17375
17469
|
artifacts: { tables: ["embedding_repair_checkpoints"] }
|
|
17376
17470
|
},
|
|
17377
17471
|
{
|
|
17378
17472
|
version: 157,
|
|
17379
17473
|
name: "embedding-repair-progress",
|
|
17380
|
-
up:
|
|
17474
|
+
up: up159,
|
|
17381
17475
|
artifacts: {
|
|
17382
17476
|
tables: ["embedding_repair_progress"],
|
|
17383
17477
|
columns: [{ table: "embedding_repair_checkpoints", column: "profile_fingerprint" }]
|
|
@@ -17386,18 +17480,18 @@ var MIGRATIONS = [
|
|
|
17386
17480
|
{
|
|
17387
17481
|
version: 158,
|
|
17388
17482
|
name: "dreaming-candidate-scan-index",
|
|
17389
|
-
up:
|
|
17483
|
+
up: up160,
|
|
17390
17484
|
artifacts: { indexes: ["idx_memories_agent_kind"] }
|
|
17391
17485
|
},
|
|
17392
17486
|
{
|
|
17393
17487
|
version: 159,
|
|
17394
17488
|
name: "retire-obsolete-invocation-ledger",
|
|
17395
|
-
up:
|
|
17489
|
+
up: up6
|
|
17396
17490
|
},
|
|
17397
17491
|
{
|
|
17398
17492
|
version: 160,
|
|
17399
17493
|
name: "import-admission-ledger",
|
|
17400
|
-
up:
|
|
17494
|
+
up: up161,
|
|
17401
17495
|
artifacts: {
|
|
17402
17496
|
tables: ["import_admission_ledger", "import_admission_events"],
|
|
17403
17497
|
indexes: ["idx_import_admission_status", "idx_import_admission_events_key"],
|
|
@@ -17409,24 +17503,24 @@ var MIGRATIONS = [
|
|
|
17409
17503
|
{
|
|
17410
17504
|
version: 161,
|
|
17411
17505
|
name: "entity-prune-keyset-index",
|
|
17412
|
-
up:
|
|
17506
|
+
up: up162,
|
|
17413
17507
|
artifacts: { indexes: ["idx_entities_agent_updated_id"] }
|
|
17414
17508
|
},
|
|
17415
17509
|
{
|
|
17416
17510
|
version: 162,
|
|
17417
17511
|
name: "generic-entity-prune-scan-generation",
|
|
17418
|
-
up:
|
|
17512
|
+
up: up163,
|
|
17419
17513
|
artifacts: { tables: ["generic_entity_prune_scan_state"] }
|
|
17420
17514
|
},
|
|
17421
17515
|
{
|
|
17422
17516
|
version: 163,
|
|
17423
17517
|
name: "retire-memory-content-safety",
|
|
17424
|
-
up:
|
|
17518
|
+
up: up164
|
|
17425
17519
|
},
|
|
17426
17520
|
{
|
|
17427
17521
|
version: 164,
|
|
17428
17522
|
name: "claim-event-time",
|
|
17429
|
-
up:
|
|
17523
|
+
up: up165,
|
|
17430
17524
|
artifacts: {
|
|
17431
17525
|
columns: ["occurred_start", "occurred_end", "valid_from", "valid_until", "time_precision"].map((column) => ({
|
|
17432
17526
|
table: "entity_attributes",
|
|
@@ -17437,7 +17531,7 @@ var MIGRATIONS = [
|
|
|
17437
17531
|
{
|
|
17438
17532
|
version: 165,
|
|
17439
17533
|
name: "dreaming-history",
|
|
17440
|
-
up:
|
|
17534
|
+
up: up166,
|
|
17441
17535
|
artifacts: {
|
|
17442
17536
|
tables: ["dreaming_history_nodes"],
|
|
17443
17537
|
indexes: ["idx_dreaming_history_nodes_pass"],
|
|
@@ -17447,23 +17541,23 @@ var MIGRATIONS = [
|
|
|
17447
17541
|
{
|
|
17448
17542
|
version: 166,
|
|
17449
17543
|
name: "dreaming-pass-peak-context",
|
|
17450
|
-
up:
|
|
17544
|
+
up: up167,
|
|
17451
17545
|
artifacts: { columns: [{ table: "dreaming_passes", column: "tokens_peak_context" }] }
|
|
17452
17546
|
},
|
|
17453
17547
|
{
|
|
17454
17548
|
version: 167,
|
|
17455
17549
|
name: "memories-fts-porter",
|
|
17456
|
-
up:
|
|
17550
|
+
up: up168
|
|
17457
17551
|
},
|
|
17458
17552
|
{
|
|
17459
17553
|
version: 168,
|
|
17460
17554
|
name: "retire-source-paragraph-claims",
|
|
17461
|
-
up:
|
|
17555
|
+
up: up169
|
|
17462
17556
|
},
|
|
17463
17557
|
{
|
|
17464
17558
|
version: 169,
|
|
17465
17559
|
name: "dreaming-evidence-review-cursor",
|
|
17466
|
-
up:
|
|
17560
|
+
up: up170,
|
|
17467
17561
|
artifacts: {
|
|
17468
17562
|
columns: [
|
|
17469
17563
|
{ table: "dreaming_evidence_consumption", column: "cursor_basis" },
|
|
@@ -17474,7 +17568,7 @@ var MIGRATIONS = [
|
|
|
17474
17568
|
{
|
|
17475
17569
|
version: 170,
|
|
17476
17570
|
name: "dependency-history-compaction-state",
|
|
17477
|
-
up:
|
|
17571
|
+
up: up171,
|
|
17478
17572
|
artifacts: {
|
|
17479
17573
|
tables: ["dependency_history_compaction_state"]
|
|
17480
17574
|
}
|
|
@@ -17482,7 +17576,7 @@ var MIGRATIONS = [
|
|
|
17482
17576
|
{
|
|
17483
17577
|
version: 171,
|
|
17484
17578
|
name: "agent-wake-and-message-board",
|
|
17485
|
-
up:
|
|
17579
|
+
up: up172,
|
|
17486
17580
|
artifacts: {
|
|
17487
17581
|
columns: [
|
|
17488
17582
|
{ table: "cross_agent_message_wakes", column: "session_key" },
|
|
@@ -17502,6 +17596,51 @@ var MIGRATIONS = [
|
|
|
17502
17596
|
"board_notices"
|
|
17503
17597
|
]
|
|
17504
17598
|
}
|
|
17599
|
+
},
|
|
17600
|
+
{
|
|
17601
|
+
version: 172,
|
|
17602
|
+
name: "dreaming-pass-policy",
|
|
17603
|
+
up: up173,
|
|
17604
|
+
artifacts: {
|
|
17605
|
+
tables: ["dreaming_policies"],
|
|
17606
|
+
columns: [
|
|
17607
|
+
{ table: "dreaming_passes", column: "policy_hash" },
|
|
17608
|
+
{ table: "dreaming_passes", column: "policy_source" }
|
|
17609
|
+
]
|
|
17610
|
+
}
|
|
17611
|
+
},
|
|
17612
|
+
{
|
|
17613
|
+
version: 173,
|
|
17614
|
+
name: "memory-artifact-native-path-index",
|
|
17615
|
+
up: up174,
|
|
17616
|
+
artifacts: { indexes: ["idx_memory_artifacts_native_paths"] }
|
|
17617
|
+
},
|
|
17618
|
+
{
|
|
17619
|
+
version: 174,
|
|
17620
|
+
name: "session-transcript-deletions",
|
|
17621
|
+
up,
|
|
17622
|
+
artifacts: {
|
|
17623
|
+
tables: [
|
|
17624
|
+
"session_transcript_deletions",
|
|
17625
|
+
"session_transcript_deleted_prefixes",
|
|
17626
|
+
"session_transcript_deleted_positions",
|
|
17627
|
+
"session_transcript_deleted_sources",
|
|
17628
|
+
"session_transcript_delete_files"
|
|
17629
|
+
],
|
|
17630
|
+
indexes: [
|
|
17631
|
+
"idx_session_delete_files_pending",
|
|
17632
|
+
"idx_session_delete_source_lookup",
|
|
17633
|
+
"idx_memories_session_delete_source",
|
|
17634
|
+
"idx_capture_jobs_session_delete",
|
|
17635
|
+
"idx_import_records_session_delete"
|
|
17636
|
+
],
|
|
17637
|
+
columns: [
|
|
17638
|
+
{ table: "source_import_records", column: "redacted_bytes" },
|
|
17639
|
+
{ table: "session_transcript_deletions", column: "pending_start" },
|
|
17640
|
+
{ table: "session_transcript_deletions", column: "lifecycle_intent_seq" },
|
|
17641
|
+
{ table: "session_transcript_deleted_prefixes", column: "origin" }
|
|
17642
|
+
]
|
|
17643
|
+
}
|
|
17505
17644
|
}
|
|
17506
17645
|
];
|
|
17507
17646
|
var LATEST_SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1]?.version ?? 0;
|
|
@@ -18022,13 +18161,6 @@ var IDENTITY_FILES = {
|
|
|
18022
18161
|
optional: true,
|
|
18023
18162
|
context: "session",
|
|
18024
18163
|
session: "bootstrap"
|
|
18025
|
-
},
|
|
18026
|
-
dreaming: {
|
|
18027
|
-
path: "DREAMING.md",
|
|
18028
|
-
description: "Dreaming/reflection prompt used only for dreaming sessions",
|
|
18029
|
-
optional: true,
|
|
18030
|
-
context: "session",
|
|
18031
|
-
session: "dreaming"
|
|
18032
18164
|
}
|
|
18033
18165
|
};
|
|
18034
18166
|
var REQUIRED_IDENTITY_KEYS = Object.entries(IDENTITY_FILES).filter(([, spec]) => !spec.optional).map(([key]) => key);
|