@cortexkit/magic-context 0.22.1 → 0.22.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +44 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -145495,6 +145495,17 @@ CREATE INDEX IF NOT EXISTS idx_dream_queue_pending ON dream_queue(started_at, en
|
|
|
145495
145495
|
updated_at INTEGER NOT NULL DEFAULT 0
|
|
145496
145496
|
);
|
|
145497
145497
|
|
|
145498
|
+
CREATE TABLE IF NOT EXISTS git_sweep_coordinator (
|
|
145499
|
+
project_path TEXT PRIMARY KEY,
|
|
145500
|
+
lease_holder TEXT,
|
|
145501
|
+
lease_expires_at INTEGER,
|
|
145502
|
+
last_swept_at INTEGER
|
|
145503
|
+
);
|
|
145504
|
+
CREATE INDEX IF NOT EXISTS idx_git_sweep_coordinator_lease_expires
|
|
145505
|
+
ON git_sweep_coordinator(lease_expires_at);
|
|
145506
|
+
CREATE INDEX IF NOT EXISTS idx_git_sweep_coordinator_last_swept
|
|
145507
|
+
ON git_sweep_coordinator(last_swept_at);
|
|
145508
|
+
|
|
145498
145509
|
CREATE TABLE IF NOT EXISTS m0_mutation_log (
|
|
145499
145510
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
145500
145511
|
session_id TEXT NOT NULL,
|
|
@@ -146030,7 +146041,7 @@ function closeDatabase() {
|
|
|
146030
146041
|
}
|
|
146031
146042
|
}
|
|
146032
146043
|
}
|
|
146033
|
-
var databases, persistenceByDatabase, persistenceErrorByDatabase, lastSchemaFenceRejection = null, LATEST_SUPPORTED_VERSION =
|
|
146044
|
+
var databases, persistenceByDatabase, persistenceErrorByDatabase, lastSchemaFenceRejection = null, LATEST_SUPPORTED_VERSION = 29, sqlitePragmaConfig;
|
|
146034
146045
|
var init_storage_db = __esm(async () => {
|
|
146035
146046
|
init_data_path();
|
|
146036
146047
|
init_logger();
|
|
@@ -146821,6 +146832,38 @@ var init_migrations = __esm(async () => {
|
|
|
146821
146832
|
ON tags(session_id, entry_fingerprint)
|
|
146822
146833
|
WHERE type='message' AND entry_fingerprint IS NOT NULL`);
|
|
146823
146834
|
}
|
|
146835
|
+
},
|
|
146836
|
+
{
|
|
146837
|
+
version: 28,
|
|
146838
|
+
description: "Add git commit sweep coordinator lease/cooldown table",
|
|
146839
|
+
up: (db) => {
|
|
146840
|
+
db.exec(`
|
|
146841
|
+
CREATE TABLE IF NOT EXISTS git_sweep_coordinator (
|
|
146842
|
+
project_path TEXT PRIMARY KEY,
|
|
146843
|
+
lease_holder TEXT,
|
|
146844
|
+
lease_expires_at INTEGER,
|
|
146845
|
+
last_swept_at INTEGER
|
|
146846
|
+
);
|
|
146847
|
+
CREATE INDEX IF NOT EXISTS idx_git_sweep_coordinator_lease_expires
|
|
146848
|
+
ON git_sweep_coordinator(lease_expires_at);
|
|
146849
|
+
CREATE INDEX IF NOT EXISTS idx_git_sweep_coordinator_last_swept
|
|
146850
|
+
ON git_sweep_coordinator(last_swept_at);
|
|
146851
|
+
`);
|
|
146852
|
+
}
|
|
146853
|
+
},
|
|
146854
|
+
{
|
|
146855
|
+
version: 29,
|
|
146856
|
+
description: "Add anchor_ordinal to notes (traceback to the conversation tail)",
|
|
146857
|
+
up: (db) => {
|
|
146858
|
+
const notesExists = db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='notes'").get();
|
|
146859
|
+
if (!notesExists) {
|
|
146860
|
+
return;
|
|
146861
|
+
}
|
|
146862
|
+
const columns = db.prepare("PRAGMA table_info(notes)").all();
|
|
146863
|
+
if (!columns.some((column) => column.name === "anchor_ordinal")) {
|
|
146864
|
+
db.exec("ALTER TABLE notes ADD COLUMN anchor_ordinal INTEGER");
|
|
146865
|
+
}
|
|
146866
|
+
}
|
|
146824
146867
|
}
|
|
146825
146868
|
];
|
|
146826
146869
|
LATEST_MIGRATION_VERSION = MIGRATIONS.reduce((max, m) => Math.max(max, m.version), 0);
|