@cortexkit/magic-context 0.21.6 → 0.21.8

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.
Files changed (2) hide show
  1. package/dist/index.js +235 -40
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -10987,25 +10987,28 @@ function writeMagicContextConfig(configPath, options) {
10987
10987
  historian.model = options.historianModel;
10988
10988
  config.historian = historian;
10989
10989
  }
10990
+ const dreamer = config.dreamer ?? {};
10991
+ delete dreamer.enabled;
10990
10992
  if (options.dreamerEnabled) {
10991
- const dreamer = config.dreamer ?? {};
10992
- dreamer.enabled = true;
10993
+ delete dreamer.disable;
10993
10994
  if (options.dreamerModel) {
10994
10995
  dreamer.model = options.dreamerModel;
10995
10996
  }
10996
- config.dreamer = dreamer;
10997
10997
  } else {
10998
- const dreamer = config.dreamer ?? {};
10999
- dreamer.enabled = false;
11000
- config.dreamer = dreamer;
10998
+ dreamer.disable = true;
11001
10999
  }
11000
+ config.dreamer = dreamer;
11001
+ const sidekick = config.sidekick ?? {};
11002
+ delete sidekick.enabled;
11002
11003
  if (options.sidekickEnabled) {
11003
- const sidekick = config.sidekick ?? {};
11004
- sidekick.enabled = true;
11004
+ delete sidekick.disable;
11005
11005
  if (options.sidekickModel) {
11006
11006
  sidekick.model = options.sidekickModel;
11007
11007
  }
11008
11008
  config.sidekick = sidekick;
11009
+ } else {
11010
+ sidekick.disable = true;
11011
+ config.sidekick = sidekick;
11009
11012
  }
11010
11013
  if (options.claudeMax) {
11011
11014
  const cacheTtl = config.cache_ttl ?? {};
@@ -11311,23 +11314,20 @@ function writeMagicContextConfig2(configPath, options) {
11311
11314
  model: options.historianModel,
11312
11315
  thinking_level: options.historianThinkingLevel
11313
11316
  });
11314
- config.dreamer = {
11317
+ const dreamer = {
11315
11318
  ...config.dreamer ?? {},
11316
- enabled: options.dreamerEnabled,
11317
- model: options.dreamerModel
11319
+ model: options.dreamerModel,
11320
+ disable: options.dreamerEnabled ? undefined : true,
11321
+ enabled: undefined
11318
11322
  };
11319
- if (options.sidekickEnabled) {
11320
- config.sidekick = compactObject({
11321
- ...config.sidekick ?? {},
11322
- enabled: true,
11323
- model: options.sidekickModel
11324
- });
11325
- } else {
11326
- config.sidekick = {
11327
- ...config.sidekick ?? {},
11328
- enabled: false
11329
- };
11330
- }
11323
+ config.dreamer = compactObject(dreamer);
11324
+ const sidekick = {
11325
+ ...config.sidekick ?? {},
11326
+ model: options.sidekickEnabled ? options.sidekickModel : undefined,
11327
+ disable: options.sidekickEnabled ? undefined : true,
11328
+ enabled: undefined
11329
+ };
11330
+ config.sidekick = compactObject(sidekick);
11331
11331
  config.embedding = options.embedding;
11332
11332
  writeFileSync5(configPath, `${import_comment_json5.stringify(config, null, 2)}
11333
11333
  `);
@@ -12532,6 +12532,53 @@ var init_migrate = __esm(async () => {
12532
12532
  await init_sqlite();
12533
12533
  });
12534
12534
 
12535
+ // ../plugin/src/config/agent-disable.ts
12536
+ function clonePlainObject(value) {
12537
+ if (typeof value !== "object" || value === null || Array.isArray(value)) {
12538
+ return;
12539
+ }
12540
+ return { ...value };
12541
+ }
12542
+ function migrateLegacyEnabledForAgent(args) {
12543
+ const agent = clonePlainObject(args.patched[args.agentName]);
12544
+ if (!agent || !("enabled" in agent))
12545
+ return;
12546
+ const enabled = agent.enabled;
12547
+ const disable = agent.disable;
12548
+ delete agent.enabled;
12549
+ if (args.agentName === "historian") {
12550
+ args.warnings.push('Removed invalid "historian.enabled" in-memory (run doctor to persist).');
12551
+ args.patched.historian = agent;
12552
+ return;
12553
+ }
12554
+ if (args.agentName === "dreamer") {
12555
+ if (disable !== true && enabled === false) {
12556
+ agent.disable = true;
12557
+ args.warnings.push('Migrated "dreamer.enabled=false" → "dreamer.disable=true" in-memory (run doctor to persist). This now also disables manual /ctx-dream; for manual-only remove disable and set schedule="".');
12558
+ }
12559
+ args.patched.dreamer = agent;
12560
+ return;
12561
+ }
12562
+ if (disable !== true && enabled === false) {
12563
+ agent.disable = true;
12564
+ args.warnings.push('Migrated "sidekick.enabled=false" → "sidekick.disable=true" in-memory (run doctor to persist).');
12565
+ }
12566
+ args.patched.sidekick = agent;
12567
+ }
12568
+ function migrateLegacyAgentEnabledInMemory(rawConfig, warnings) {
12569
+ const shouldPatch = ["dreamer", "sidekick", "historian"].some((key) => {
12570
+ const agent = rawConfig[key];
12571
+ return typeof agent === "object" && agent !== null && !Array.isArray(agent) && "enabled" in agent;
12572
+ });
12573
+ if (!shouldPatch)
12574
+ return rawConfig;
12575
+ const patched = { ...rawConfig };
12576
+ migrateLegacyEnabledForAgent({ patched, agentName: "dreamer", warnings });
12577
+ migrateLegacyEnabledForAgent({ patched, agentName: "sidekick", warnings });
12578
+ migrateLegacyEnabledForAgent({ patched, agentName: "historian", warnings });
12579
+ return patched;
12580
+ }
12581
+
12535
12582
  // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/core.js
12536
12583
  function $constructor(name, initializer, params) {
12537
12584
  function init(inst, def) {
@@ -27211,7 +27258,6 @@ var init_magic_context = __esm(() => {
27211
27258
  ];
27212
27259
  PiThinkingLevelSchema = exports_external.enum(["off", "minimal", "low", "medium", "high", "xhigh"]).optional();
27213
27260
  DreamerConfigSchema = AgentOverrideConfigSchema.merge(exports_external.object({
27214
- enabled: exports_external.boolean().default(false),
27215
27261
  schedule: exports_external.string().default("02:00-06:00"),
27216
27262
  max_runtime_minutes: exports_external.number().min(10).default(120),
27217
27263
  tasks: exports_external.array(DreamingTaskSchema).default(DEFAULT_DREAMER_TASKS),
@@ -27229,7 +27275,6 @@ var init_magic_context = __esm(() => {
27229
27275
  thinking_level: PiThinkingLevelSchema
27230
27276
  }));
27231
27277
  SidekickConfigSchema = AgentOverrideConfigSchema.extend({
27232
- enabled: exports_external.boolean().default(false),
27233
27278
  timeout_ms: exports_external.number().default(30000),
27234
27279
  system_prompt: exports_external.string().optional(),
27235
27280
  thinking_level: PiThinkingLevelSchema
@@ -27579,7 +27624,8 @@ function migrateLegacyExperimental(rawConfig, warnings) {
27579
27624
  }
27580
27625
  function parsePluginConfig(rawConfig, recoveredTopLevelKeys = []) {
27581
27626
  const preMigrationWarnings = [];
27582
- const migrated = migrateLegacyExperimental(rawConfig, preMigrationWarnings);
27627
+ const migratedExperimental = migrateLegacyExperimental(rawConfig, preMigrationWarnings);
27628
+ const migrated = migrateLegacyAgentEnabledInMemory(migratedExperimental, preMigrationWarnings);
27583
27629
  const parsed = MagicContextConfigSchema.safeParse(migrated);
27584
27630
  const disabledHooks = Array.isArray(rawConfig.disabled_hooks) ? rawConfig.disabled_hooks.filter((value) => typeof value === "string") : undefined;
27585
27631
  const command = typeof rawConfig.command === "object" && rawConfig.command !== null ? rawConfig.command : undefined;
@@ -28768,6 +28814,43 @@ import { existsSync as existsSync17, readFileSync as readFileSync13, rmSync, sta
28768
28814
  import { createRequire as createRequire4 } from "node:module";
28769
28815
  import { homedir as homedir13 } from "node:os";
28770
28816
  import { join as join16 } from "node:path";
28817
+ function migrateLegacyAgentEnabledConfigForDoctor(mcConfig, logs) {
28818
+ let changed = false;
28819
+ let fixes = 0;
28820
+ const migrateLegacyAgentEnabled = (agentName) => {
28821
+ const agent = mcConfig[agentName];
28822
+ if (!agent || typeof agent !== "object" || !("enabled" in agent))
28823
+ return;
28824
+ const enabled = agent.enabled;
28825
+ const disable = agent.disable;
28826
+ delete agent.enabled;
28827
+ changed = true;
28828
+ fixes++;
28829
+ if (agentName === "historian") {
28830
+ logs.success("Removed invalid historian.enabled (historian uses disable=true to turn off).");
28831
+ return;
28832
+ }
28833
+ if (agentName === "dreamer") {
28834
+ if (disable !== true && enabled === false) {
28835
+ agent.disable = true;
28836
+ logs.warn("Migrated dreamer.enabled=false → dreamer.disable=true. This now also disables manual /ctx-dream. To keep manual dreaming, remove disable=true and set schedule to empty string.");
28837
+ } else {
28838
+ logs.success('Removed deprecated dreamer.enabled (use dreamer.disable=true to turn off the Dreamer agent; use schedule="" for manual-only dreaming).');
28839
+ }
28840
+ return;
28841
+ }
28842
+ if (disable !== true && enabled === false) {
28843
+ agent.disable = true;
28844
+ logs.success("Migrated sidekick.enabled=false → sidekick.disable=true.");
28845
+ } else {
28846
+ logs.success("Removed deprecated sidekick.enabled (use sidekick.disable=true to turn off Sidekick).");
28847
+ }
28848
+ };
28849
+ migrateLegacyAgentEnabled("dreamer");
28850
+ migrateLegacyAgentEnabled("sidekick");
28851
+ migrateLegacyAgentEnabled("historian");
28852
+ return { changed, fixes };
28853
+ }
28771
28854
  async function fetchNpmLatest(pkg, timeoutMs = 5000) {
28772
28855
  try {
28773
28856
  const controller = new AbortController;
@@ -29158,6 +29241,11 @@ async function runDoctor(options = {}) {
29158
29241
  log.success("Removed deprecated compaction_markers (always-on since v0.21.4)");
29159
29242
  fixed++;
29160
29243
  }
29244
+ const agentEnabledMigration = migrateLegacyAgentEnabledConfigForDoctor(mcConfig, log);
29245
+ if (agentEnabledMigration.changed) {
29246
+ mcChanged = true;
29247
+ fixed += agentEnabledMigration.fixes;
29248
+ }
29161
29249
  if (experimental && "user_memories" in experimental) {
29162
29250
  const dreamer = mcConfig.dreamer ?? {};
29163
29251
  const oldUM = experimental.user_memories;
@@ -29355,11 +29443,11 @@ async function runDoctor(options = {}) {
29355
29443
  const mcRaw = readFileSync13(paths.magicContextConfig, "utf-8");
29356
29444
  const mcConfig = import_comment_json9.parse(mcRaw);
29357
29445
  const dreamerObj = mcConfig?.dreamer;
29358
- const dreamerEnabled = dreamerObj?.enabled === true;
29446
+ const dreamerDisabled = dreamerObj?.disable === true;
29359
29447
  const userMemObj = dreamerObj?.user_memories;
29360
29448
  const userMemEnabled = userMemObj?.enabled !== false;
29361
- if (userMemEnabled && !dreamerEnabled) {
29362
- log.warn("dreamer.user_memories is enabled (default) but dreamer itself is disabled — user memory candidates will be collected but never promoted to stable memories. Enable `dreamer.enabled: true` or set `dreamer.user_memories.enabled: false` to silence this.");
29449
+ if (userMemEnabled && dreamerDisabled) {
29450
+ log.warn("dreamer.user_memories is enabled but dreamer.disable=true, so new promotions will not run. Remove dreamer.disable or set dreamer.user_memories.enabled=false.");
29363
29451
  issues++;
29364
29452
  }
29365
29453
  const pinKeyFilesObj = dreamerObj?.pin_key_files;
@@ -29534,11 +29622,11 @@ var init_doctor_opencode = __esm(async () => {
29534
29622
  PLUGIN_ENTRY_WITH_VERSION2 = `${PLUGIN_NAME6}@latest`;
29535
29623
  });
29536
29624
 
29537
- // ../plugin/src/features/magic-context/compartment-storage.ts
29538
- var insertCompartmentStatements, insertFactStatements;
29539
- var init_compartment_storage = __esm(() => {
29540
- insertCompartmentStatements = new WeakMap;
29541
- insertFactStatements = new WeakMap;
29625
+ // ../plugin/src/features/magic-context/compartment-lease.ts
29626
+ var COMPARTMENT_LEASE_TTL_MS, COMPARTMENT_LEASE_RENEWAL_MS;
29627
+ var init_compartment_lease = __esm(() => {
29628
+ COMPARTMENT_LEASE_TTL_MS = 5 * 60 * 1000;
29629
+ COMPARTMENT_LEASE_RENEWAL_MS = 60 * 1000;
29542
29630
  });
29543
29631
 
29544
29632
  // ../plugin/src/features/magic-context/compression-depth-storage.ts
@@ -29549,6 +29637,15 @@ var init_compression_depth_storage = __esm(() => {
29549
29637
  maxDepthStatements = new WeakMap;
29550
29638
  clearDepthStatements = new WeakMap;
29551
29639
  });
29640
+
29641
+ // ../plugin/src/features/magic-context/compartment-storage.ts
29642
+ var insertCompartmentStatements, insertFactStatements;
29643
+ var init_compartment_storage = __esm(() => {
29644
+ init_compartment_lease();
29645
+ init_compression_depth_storage();
29646
+ insertCompartmentStatements = new WeakMap;
29647
+ insertFactStatements = new WeakMap;
29648
+ });
29552
29649
  // ../plugin/src/shared/sqlite-helpers.ts
29553
29650
  function closeQuietly(db) {
29554
29651
  if (!db)
@@ -162611,6 +162708,65 @@ var init_migrations = __esm(async () => {
162611
162708
  db.exec("ALTER TABLE session_meta ADD COLUMN pending_pi_compaction_marker_state TEXT");
162612
162709
  }
162613
162710
  }
162711
+ },
162712
+ {
162713
+ version: 19,
162714
+ description: "Add compartment state lease table",
162715
+ up: (db) => {
162716
+ db.exec(`
162717
+ CREATE TABLE IF NOT EXISTS compartment_state_lease (
162718
+ session_id TEXT PRIMARY KEY NOT NULL,
162719
+ holder_id TEXT NOT NULL,
162720
+ acquired_at INTEGER NOT NULL,
162721
+ expires_at INTEGER NOT NULL
162722
+ );
162723
+ CREATE INDEX IF NOT EXISTS idx_compartment_state_lease_expires
162724
+ ON compartment_state_lease(expires_at);
162725
+ `);
162726
+ }
162727
+ },
162728
+ {
162729
+ version: 20,
162730
+ description: "Add subagent invocation token accounting",
162731
+ up: (db) => {
162732
+ db.exec(`
162733
+ CREATE TABLE IF NOT EXISTS subagent_invocations (
162734
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
162735
+ session_id TEXT NOT NULL,
162736
+ harness TEXT NOT NULL,
162737
+ subagent TEXT NOT NULL,
162738
+ task TEXT,
162739
+ provider_id TEXT,
162740
+ model_id TEXT,
162741
+ started_at INTEGER NOT NULL,
162742
+ ended_at INTEGER,
162743
+ status TEXT NOT NULL,
162744
+ input_tokens INTEGER NOT NULL DEFAULT 0,
162745
+ output_tokens INTEGER NOT NULL DEFAULT 0,
162746
+ cache_read_tokens INTEGER NOT NULL DEFAULT 0,
162747
+ cache_write_tokens INTEGER NOT NULL DEFAULT 0,
162748
+ error TEXT,
162749
+ parent_invocation_id INTEGER
162750
+ );
162751
+ CREATE INDEX IF NOT EXISTS idx_sai_session_started
162752
+ ON subagent_invocations(session_id, started_at DESC);
162753
+ CREATE INDEX IF NOT EXISTS idx_sai_subagent
162754
+ ON subagent_invocations(subagent, started_at DESC);
162755
+ `);
162756
+ }
162757
+ },
162758
+ {
162759
+ version: 21,
162760
+ description: "Add session lifetime work metrics",
162761
+ up: (db) => {
162762
+ const cols = db.prepare("PRAGMA table_info(session_meta)").all();
162763
+ if (!cols.some((c2) => c2.name === "new_work_tokens")) {
162764
+ db.exec("ALTER TABLE session_meta ADD COLUMN new_work_tokens INTEGER NOT NULL DEFAULT 0");
162765
+ }
162766
+ if (!cols.some((c2) => c2.name === "total_input_tokens")) {
162767
+ db.exec("ALTER TABLE session_meta ADD COLUMN total_input_tokens INTEGER NOT NULL DEFAULT 0");
162768
+ }
162769
+ }
162614
162770
  }
162615
162771
  ];
162616
162772
  });
@@ -162983,6 +163139,15 @@ function initializeDatabase(db) {
162983
163139
  );
162984
163140
  CREATE INDEX IF NOT EXISTS idx_compartments_session ON compartments(session_id);
162985
163141
 
163142
+ CREATE TABLE IF NOT EXISTS compartment_state_lease (
163143
+ session_id TEXT PRIMARY KEY NOT NULL,
163144
+ holder_id TEXT NOT NULL,
163145
+ acquired_at INTEGER NOT NULL,
163146
+ expires_at INTEGER NOT NULL
163147
+ );
163148
+ CREATE INDEX IF NOT EXISTS idx_compartment_state_lease_expires
163149
+ ON compartment_state_lease(expires_at);
163150
+
162986
163151
  CREATE TABLE IF NOT EXISTS compression_depth (
162987
163152
  session_id TEXT NOT NULL,
162988
163153
  message_ordinal INTEGER NOT NULL,
@@ -163179,12 +163344,37 @@ CREATE INDEX IF NOT EXISTS idx_dream_queue_pending ON dream_queue(started_at, en
163179
163344
  -- is a valid JSON blob written via setPendingPiCompactionMarkerState.
163180
163345
  -- Excluded from healNullTextColumns.
163181
163346
  pending_pi_compaction_marker_state TEXT,
163347
+ new_work_tokens INTEGER NOT NULL DEFAULT 0,
163348
+ total_input_tokens INTEGER NOT NULL DEFAULT 0,
163182
163349
  -- deferred_execute_state: intentionally NULLABLE without a default.
163183
163350
  -- Absence is SQL NULL; presence is a JSON blob written via
163184
163351
  -- setDeferredExecutePendingIfAbsent. Excluded from healNullTextColumns.
163185
163352
  deferred_execute_state TEXT
163186
163353
  );
163187
163354
 
163355
+ CREATE TABLE IF NOT EXISTS subagent_invocations (
163356
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
163357
+ session_id TEXT NOT NULL,
163358
+ harness TEXT NOT NULL,
163359
+ subagent TEXT NOT NULL,
163360
+ task TEXT,
163361
+ provider_id TEXT,
163362
+ model_id TEXT,
163363
+ started_at INTEGER NOT NULL,
163364
+ ended_at INTEGER,
163365
+ status TEXT NOT NULL,
163366
+ input_tokens INTEGER NOT NULL DEFAULT 0,
163367
+ output_tokens INTEGER NOT NULL DEFAULT 0,
163368
+ cache_read_tokens INTEGER NOT NULL DEFAULT 0,
163369
+ cache_write_tokens INTEGER NOT NULL DEFAULT 0,
163370
+ error TEXT,
163371
+ parent_invocation_id INTEGER
163372
+ );
163373
+ CREATE INDEX IF NOT EXISTS idx_sai_session_started
163374
+ ON subagent_invocations(session_id, started_at DESC);
163375
+ CREATE INDEX IF NOT EXISTS idx_sai_subagent
163376
+ ON subagent_invocations(subagent, started_at DESC);
163377
+
163188
163378
  CREATE INDEX IF NOT EXISTS idx_tags_session_tag_number ON tags(session_id, tag_number);
163189
163379
  CREATE INDEX IF NOT EXISTS idx_tags_session_message_id ON tags(session_id, message_id);
163190
163380
  CREATE INDEX IF NOT EXISTS idx_pending_ops_session ON pending_ops(session_id);
@@ -163276,6 +163466,8 @@ CREATE INDEX IF NOT EXISTS idx_dream_queue_pending ON dream_queue(started_at, en
163276
163466
  ensureColumn(db, "session_meta", "needs_emergency_recovery", "INTEGER DEFAULT 0");
163277
163467
  ensureColumn(db, "session_meta", "pending_compaction_marker_state", "TEXT");
163278
163468
  ensureColumn(db, "session_meta", "pending_pi_compaction_marker_state", "TEXT");
163469
+ ensureColumn(db, "session_meta", "new_work_tokens", "INTEGER NOT NULL DEFAULT 0");
163470
+ ensureColumn(db, "session_meta", "total_input_tokens", "INTEGER NOT NULL DEFAULT 0");
163279
163471
  ensureColumn(db, "session_meta", "deferred_execute_state", "TEXT");
163280
163472
  ensureColumn(db, "tags", "harness", "TEXT NOT NULL DEFAULT 'opencode'");
163281
163473
  ensureColumn(db, "pending_ops", "harness", "TEXT NOT NULL DEFAULT 'opencode'");
@@ -163339,7 +163531,9 @@ function healNullIntegerColumns(db) {
163339
163531
  ["tool_call_tokens", 0],
163340
163532
  ["note_nudge_trigger_pending", 0],
163341
163533
  ["observed_safe_input_tokens", 0],
163342
- ["cache_alert_sent", 0]
163534
+ ["cache_alert_sent", 0],
163535
+ ["new_work_tokens", 0],
163536
+ ["total_input_tokens", 0]
163343
163537
  ];
163344
163538
  for (const [column, fallback] of columns) {
163345
163539
  try {
@@ -163494,7 +163688,6 @@ var init_storage_ops = __esm(() => {
163494
163688
 
163495
163689
  // ../plugin/src/features/magic-context/storage-source.ts
163496
163690
  var init_storage_source = () => {};
163497
-
163498
163691
  // ../plugin/src/features/magic-context/storage-tags.ts
163499
163692
  var insertTagStatements, updateTagStatusStatements, updateTagDropModeStatements, updateTagMessageIdStatements, getTagNumbersByMessageIdStatements, deleteTagsByMessageIdStatements, getMaxTagNumberBySessionStatements, getTagNumberByMessageIdStatements, updateTagByteSizeStatements, updateTagInputByteSizeStatements, getOwnerScopedToolTagNumbersStatements, getActiveTagsBySessionStatements, getMaxDroppedTagNumberStatements, getToolTagNumberByOwnerStatements, getNullOwnerToolTagStatements, adoptNullOwnerToolTagStatements, deleteToolTagsByOwnerStatements;
163500
163693
  var init_storage_tags = __esm(() => {
@@ -163607,9 +163800,11 @@ function mergeRawConfigs(base, override) {
163607
163800
  return merged;
163608
163801
  }
163609
163802
  function parsePiConfig(rawConfig, recoveredTopLevelKeys = []) {
163610
- const parsed = MagicContextConfigSchema.safeParse(rawConfig);
163803
+ const preMigrationWarnings = [];
163804
+ const migrated = migrateLegacyAgentEnabledInMemory(rawConfig, preMigrationWarnings);
163805
+ const parsed = MagicContextConfigSchema.safeParse(migrated);
163611
163806
  if (parsed.success) {
163612
- return { config: parsed.data, warnings: [] };
163807
+ return { config: parsed.data, warnings: preMigrationWarnings };
163613
163808
  }
163614
163809
  const defaults = MagicContextConfigSchema.parse({});
163615
163810
  const errorPaths = new Set;
@@ -163619,8 +163814,8 @@ function parsePiConfig(rawConfig, recoveredTopLevelKeys = []) {
163619
163814
  errorPaths.add(String(topKey));
163620
163815
  }
163621
163816
  }
163622
- const patched = { ...rawConfig };
163623
- const warnings = [];
163817
+ const patched = { ...migrated };
163818
+ const warnings = [...preMigrationWarnings];
163624
163819
  for (const key of errorPaths) {
163625
163820
  recoveredTopLevelKeys.push(key);
163626
163821
  const isAgentConfig = key === "historian" || key === "dreamer" || key === "sidekick";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cortexkit/magic-context",
3
- "version": "0.21.6",
3
+ "version": "0.21.8",
4
4
  "description": "Unified CLI for Magic Context — setup, doctor, and migration across OpenCode and Pi",
5
5
  "keywords": [
6
6
  "opencode",