@cortexkit/pi-magic-context 0.27.2 → 0.27.3

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 CHANGED
@@ -150534,7 +150534,7 @@ function enforceSchemaFence(db, dbPath, latestSupportedVersion) {
150534
150534
  return true;
150535
150535
  }
150536
150536
  lastSchemaFenceRejection = { persistedVersion, supportedVersion: latestSupportedVersion };
150537
- log(`[magic-context] storage fatal: refusing to open ${dbPath}; database schema v${persistedVersion} is newer than this binary supports (max v${latestSupportedVersion}). Upgrade Magic Context/OpenCode/Pi before writing to this cache.`);
150537
+ log(`[magic-context] storage fatal: refusing to open ${dbPath}; database schema v${persistedVersion} is newer than this binary supports (max v${latestSupportedVersion}). A pinned or stale plugin is likely sharing this database with a newer instance; update or unpin Magic Context with 'npx @cortexkit/magic-context@latest doctor --force', then restart.`);
150538
150538
  return false;
150539
150539
  }
150540
150540
  var sqlitePragmaConfig = {
@@ -184337,6 +184337,7 @@ var pendingPiDecisionBySession = new Map;
184337
184337
  var lastBoundMessageIdBySession = new Map;
184338
184338
  var scheduledWriteTokensBySession = new Map;
184339
184339
  var writerOverrideForTests = null;
184340
+ var retentionOverrideForTests = null;
184340
184341
  function normalizeMaterializeReason(harness, reason, rematerialized) {
184341
184342
  const raw = typeof reason === "string" ? reason.trim() : "";
184342
184343
  if (raw.length > 0) {
@@ -184477,7 +184478,7 @@ function writeTransformDecisionRow(dbPath, row) {
184477
184478
  WHERE session_id = ? AND harness = ?
184478
184479
  ORDER BY ts_ms DESC, rowid DESC
184479
184480
  LIMIT ?
184480
- )`).run(row.sessionId, row.harness, row.sessionId, row.harness, TRANSFORM_DECISIONS_RETENTION);
184481
+ )`).run(row.sessionId, row.harness, row.sessionId, row.harness, retentionOverrideForTests ?? TRANSFORM_DECISIONS_RETENTION);
184481
184482
  } finally {
184482
184483
  closeQuietly(db);
184483
184484
  }
@@ -199320,7 +199321,7 @@ function formatThresholdPercent(value) {
199320
199321
  // package.json
199321
199322
  var package_default = {
199322
199323
  name: "@cortexkit/pi-magic-context",
199323
- version: "0.27.2",
199324
+ version: "0.27.3",
199324
199325
  type: "module",
199325
199326
  description: "Pi coding agent extension for Magic Context — cross-session memory and context management",
199326
199327
  main: "dist/index.js",
@@ -205531,7 +205532,7 @@ async function src_default2(pi) {
205531
205532
  return;
205532
205533
  }
205533
205534
  if (!db) {
205534
- warn(`Magic Context (pi) storage unavailable at ${dbPath} (cache schema is newer than this binary supports). ` + "Plugin will not register hooks; upgrade/restart Pi/OpenCode/Magic Context to recover.");
205535
+ warn(`Magic Context (pi) storage unavailable at ${dbPath} (cache schema is newer than this binary supports). ` + "A pinned or stale plugin is likely sharing this database with a newer instance. " + "Plugin will not register hooks; run 'npx @cortexkit/magic-context@latest doctor --force' " + "(or update Pi/OpenCode) and restart to recover.");
205535
205536
  return;
205536
205537
  }
205537
205538
  const database = db;
@@ -142942,7 +142942,7 @@ function enforceSchemaFence(db, dbPath, latestSupportedVersion) {
142942
142942
  return true;
142943
142943
  }
142944
142944
  lastSchemaFenceRejection = { persistedVersion, supportedVersion: latestSupportedVersion };
142945
- log(`[magic-context] storage fatal: refusing to open ${dbPath}; database schema v${persistedVersion} is newer than this binary supports (max v${latestSupportedVersion}). Upgrade Magic Context/OpenCode/Pi before writing to this cache.`);
142945
+ log(`[magic-context] storage fatal: refusing to open ${dbPath}; database schema v${persistedVersion} is newer than this binary supports (max v${latestSupportedVersion}). A pinned or stale plugin is likely sharing this database with a newer instance; update or unpin Magic Context with 'npx @cortexkit/magic-context@latest doctor --force', then restart.`);
142946
142946
  return false;
142947
142947
  }
142948
142948
  var sqlitePragmaConfig = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cortexkit/pi-magic-context",
3
- "version": "0.27.2",
3
+ "version": "0.27.3",
4
4
  "type": "module",
5
5
  "description": "Pi coding agent extension for Magic Context — cross-session memory and context management",
6
6
  "main": "dist/index.js",