@cleocode/cleo 2026.3.62 → 2026.3.63

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/mcp/index.js CHANGED
@@ -10670,6 +10670,25 @@ function runBrainMigrations(nativeDb, db) {
10670
10670
  );
10671
10671
  }
10672
10672
  }
10673
+ if (tableExists(nativeDb, "__drizzle_migrations") && tableExists(nativeDb, "brain_decisions")) {
10674
+ const localMigrations = readMigrationFiles({ migrationsFolder });
10675
+ const localHashes = new Set(localMigrations.map((m) => m.hash));
10676
+ const dbEntries = nativeDb.prepare('SELECT hash FROM "__drizzle_migrations"').all();
10677
+ const hasOrphanedEntries = dbEntries.some((e) => !localHashes.has(e.hash));
10678
+ if (hasOrphanedEntries) {
10679
+ const log11 = getLogger("brain");
10680
+ log11.warn(
10681
+ { orphaned: dbEntries.filter((e) => !localHashes.has(e.hash)).length },
10682
+ "Detected stale migration journal entries from a previous CLEO version. Reconciling brain.db."
10683
+ );
10684
+ nativeDb.exec('DELETE FROM "__drizzle_migrations"');
10685
+ for (const m of localMigrations) {
10686
+ nativeDb.exec(
10687
+ `INSERT INTO "__drizzle_migrations" ("hash", "created_at") VALUES ('${m.hash}', ${m.folderMillis})`
10688
+ );
10689
+ }
10690
+ }
10691
+ }
10673
10692
  const MAX_RETRIES = 5;
10674
10693
  const BASE_DELAY_MS = 100;
10675
10694
  const MAX_DELAY_MS = 2e3;
@@ -10777,6 +10796,7 @@ var init_brain_sqlite = __esm({
10777
10796
  init_migrator();
10778
10797
  init_node_sqlite();
10779
10798
  init_migrator2();
10799
+ init_logger();
10780
10800
  init_paths();
10781
10801
  init_brain_schema();
10782
10802
  init_sqlite2();
@@ -88185,14 +88205,19 @@ async function taskCreate(projectRoot, params) {
88185
88205
  size: params.size,
88186
88206
  acceptance: params.acceptance,
88187
88207
  notes: params.notes,
88188
- files: params.files
88208
+ files: params.files,
88209
+ dryRun: params.dryRun
88189
88210
  },
88190
88211
  projectRoot,
88191
88212
  accessor
88192
88213
  );
88193
88214
  return {
88194
88215
  success: true,
88195
- data: { task: taskToRecord(result.task), duplicate: result.duplicate ?? false }
88216
+ data: {
88217
+ task: taskToRecord(result.task),
88218
+ duplicate: result.duplicate ?? false,
88219
+ dryRun: params.dryRun
88220
+ }
88196
88221
  };
88197
88222
  } catch (err) {
88198
88223
  const cleoErr = err;
@@ -93429,7 +93454,8 @@ var TasksHandler = class {
93429
93454
  phase: params?.phase,
93430
93455
  size: params?.size,
93431
93456
  notes: params?.notes,
93432
- files: params?.files
93457
+ files: params?.files,
93458
+ dryRun: params?.dryRun
93433
93459
  });
93434
93460
  return wrapResult(result, "mutate", "tasks", operation, startTime);
93435
93461
  }