claude-overnight 1.25.6 → 1.25.9

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.
@@ -1 +1 @@
1
- export declare const VERSION = "1.25.6";
1
+ export declare const VERSION = "1.25.9";
package/dist/_version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // Auto-generated by build — do not edit manually.
2
- export const VERSION = "1.25.6";
2
+ export const VERSION = "1.25.9";
package/dist/index.js CHANGED
@@ -318,6 +318,7 @@ async function main() {
318
318
  }
319
319
  // ── Resume / continue detection ──
320
320
  let resuming = false;
321
+ let replanFromScratch = false;
321
322
  let resumeState = null;
322
323
  let resumeRunDir;
323
324
  let continueObjective;
@@ -332,7 +333,7 @@ async function main() {
332
333
  if (action === "q")
333
334
  process.exit(0);
334
335
  if (action === "h") {
335
- await showRunHistory(allRuns, cwd);
336
+ await showRunHistory(allRuns, cwd, incompleteRuns);
336
337
  continue;
337
338
  }
338
339
  if (action === "c") {
@@ -385,7 +386,7 @@ async function main() {
385
386
  break;
386
387
  }
387
388
  if (action === "h") {
388
- await showRunHistory(allRuns, cwd);
389
+ await showRunHistory(allRuns, cwd, incompleteRuns);
389
390
  continue;
390
391
  }
391
392
  resuming = true;
@@ -429,7 +430,7 @@ async function main() {
429
430
  break;
430
431
  }
431
432
  if (action === "h") {
432
- await showRunHistory(allRuns, cwd);
433
+ await showRunHistory(allRuns, cwd, incompleteRuns);
433
434
  continue;
434
435
  }
435
436
  const idx = parseInt(action) - 1;
@@ -460,25 +461,29 @@ async function main() {
460
461
  // thinking spend instead of throwing it away).
461
462
  const designs = readMdDir(join(resumeRunDir, "designs"));
462
463
  if (!designs || !resumeState.objective) {
463
- console.error(chalk.red(`\n Planning-phase run has no usable tasks.json or designs -- start Fresh instead.\n`));
464
- process.exit(1);
464
+ // Planning died before producing anything re-run planning from
465
+ // scratch while keeping all saved settings (model, budget, etc.).
466
+ console.log(chalk.yellow(`\n ⚠ Planning-phase run has no tasks or designs — will re-plan from scratch.\n`));
467
+ replanFromScratch = true;
465
468
  }
466
- const remainingBudget = Math.max(resumeState.concurrency, resumeState.budget - resumeState.accCompleted);
467
- const orchBudget = Math.min(50, Math.max(resumeState.concurrency, Math.ceil(remainingBudget * 0.5)));
468
- const flexNote = `This is wave 1 of an adaptive multi-wave run (total budget: ${remainingBudget}). Plan the highest-impact foundational work first. Future waves will iterate based on what's learned.`;
469
- console.log(chalk.cyan(`\n ◆ Re-orchestrating plan from existing designs...\n`));
470
- process.stdout.write("\x1B[?25l");
471
- try {
472
- const orchTasks = await orchestrate(resumeState.objective, designs, cwd, resumeState.plannerModel, resumeState.workerModel, resumeState.permissionMode, orchBudget, resumeState.concurrency, makeProgressLog(), flexNote, join(resumeRunDir, "tasks.json"));
473
- resumeState.currentTasks = orchTasks;
474
- process.stdout.write(`\x1B[2K\r ${chalk.green(`✓ ${orchTasks.length} tasks`)}\n`);
475
- }
476
- catch (err) {
469
+ else {
470
+ const remainingBudget = Math.max(resumeState.concurrency, resumeState.budget - resumeState.accCompleted);
471
+ const orchBudget = Math.min(50, Math.max(resumeState.concurrency, Math.ceil(remainingBudget * 0.5)));
472
+ const flexNote = `This is wave 1 of an adaptive multi-wave run (total budget: ${remainingBudget}). Plan the highest-impact foundational work first. Future waves will iterate based on what's learned.`;
473
+ console.log(chalk.cyan(`\n ◆ Re-orchestrating plan from existing designs...\n`));
474
+ process.stdout.write("\x1B[?25l");
475
+ try {
476
+ const orchTasks = await orchestrate(resumeState.objective, designs, cwd, resumeState.plannerModel, resumeState.workerModel, resumeState.permissionMode, orchBudget, resumeState.concurrency, makeProgressLog(), flexNote, join(resumeRunDir, "tasks.json"));
477
+ resumeState.currentTasks = orchTasks;
478
+ process.stdout.write(`\x1B[2K\r ${chalk.green(`✓ ${orchTasks.length} tasks`)}\n`);
479
+ }
480
+ catch (err) {
481
+ process.stdout.write("\x1B[?25h");
482
+ console.error(chalk.red(`\n Re-orchestration failed: ${err.message}\n Start Fresh instead.\n`));
483
+ process.exit(1);
484
+ }
477
485
  process.stdout.write("\x1B[?25h");
478
- console.error(chalk.red(`\n Re-orchestration failed: ${err.message}\n Start Fresh instead.\n`));
479
- process.exit(1);
480
486
  }
481
- process.stdout.write("\x1B[?25h");
482
487
  }
483
488
  }
484
489
  const unmerged = resumeState.branches.filter(b => b.status === "unmerged").length;
@@ -860,7 +865,7 @@ async function main() {
860
865
  if (resuming && resumeRunDir)
861
866
  updateLatestSymlink(rootDir, resumeRunDir);
862
867
  const previousKnowledge = readPreviousRunKnowledge(rootDir);
863
- const needsPlan = tasks.length === 0 && !resuming;
868
+ const needsPlan = tasks.length === 0 && (!resuming || replanFromScratch);
864
869
  const designDir = join(runDir, "designs");
865
870
  // Persist an early planning-phase state so the run is visible to the resume
866
871
  // picker even if orchestrate dies before executeRun gets a chance to run.
package/dist/state.d.ts CHANGED
@@ -53,7 +53,9 @@ export declare function formatTimeAgo(isoStr: string): string;
53
53
  export declare function showRunHistory(allRuns: {
54
54
  dir: string;
55
55
  state: RunState;
56
- }[], filterCwd: string): Promise<void>;
56
+ }[], filterCwd: string, resumable?: {
57
+ dir: string;
58
+ }[]): Promise<void>;
57
59
  export declare function readPreviousRunKnowledge(rootDir: string): string;
58
60
  export declare function createRunDir(rootDir: string): string;
59
61
  export declare function updateLatestSymlink(rootDir: string, runDir: string): void;
package/dist/state.js CHANGED
@@ -194,14 +194,6 @@ export function findIncompleteRuns(rootDir, filterCwd) {
194
194
  const state = loadRunState(runDir);
195
195
  if (!state || state.phase === "done" || state.cwd !== filterCwd)
196
196
  continue;
197
- // Planning-phase runs are resumable if: tasks.json exists (orchestrate
198
- // completed), design docs exist (thinking wave produced output), or the
199
- // run already consumed tokens (thinking wave started but was killed).
200
- if (state.phase === "planning"
201
- && !existsSync(join(runDir, "tasks.json"))
202
- && !readMdDir(join(runDir, "designs"))
203
- && state.accCompleted === 0 && state.accCost === 0)
204
- continue;
205
197
  results.push({ dir: runDir, state });
206
198
  }
207
199
  return results;
@@ -305,10 +297,11 @@ export function formatTimeAgo(isoStr) {
305
297
  return `${hours}h ago`;
306
298
  return `${Math.floor(hours / 24)}d ago`;
307
299
  }
308
- export async function showRunHistory(allRuns, filterCwd) {
309
- const runs = allRuns.filter(r => r.state.cwd === filterCwd && r.state.phase === "done");
300
+ export async function showRunHistory(allRuns, filterCwd, resumable = []) {
301
+ const resumableDirs = new Set(resumable.map(r => r.dir));
302
+ const runs = allRuns.filter(r => r.state.cwd === filterCwd && !resumableDirs.has(r.dir));
310
303
  if (runs.length === 0) {
311
- console.log(chalk.dim("\n No completed runs.\n"));
304
+ console.log(chalk.dim("\n No run history.\n"));
312
305
  return;
313
306
  }
314
307
  const PAGE = 5;
@@ -324,7 +317,8 @@ export async function showRunHistory(allRuns, filterCwd) {
324
317
  const cost = s.accCost > 0 ? ` · $${s.accCost.toFixed(2)}` : "";
325
318
  const obj = s.objective?.slice(0, 50) || "";
326
319
  const merged = s.branches.filter(b => b.status === "merged").length;
327
- console.log(` ${chalk.green("✓")} ${chalk.dim(date)} · ${s.accCompleted}/${s.budget}${cost}${merged ? ` · ${merged} merged` : ""}`);
320
+ const icon = s.phase === "done" ? chalk.green("✓") : chalk.dim("·");
321
+ console.log(` ${icon} ${chalk.dim(date)} · ${s.phase} · ${s.accCompleted}/${s.budget}${cost}${merged ? ` · ${merged} merged` : ""}`);
328
322
  console.log(` ${obj}${obj.length >= 50 ? "…" : ""}`);
329
323
  let status = "";
330
324
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-overnight",
3
- "version": "1.25.6",
3
+ "version": "1.25.9",
4
4
  "description": "Parallel Claude agents in git worktrees with a usage cap that reserves headroom for your interactive Claude Code. Crash-safe resume. Provider-agnostic model catalog (Anthropic, Cursor, OpenAI, Gemini, DeepSeek, Llama, Qwen) with capability-based task scoping.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-overnight",
3
- "version": "1.25.6",
3
+ "version": "1.25.9",
4
4
  "description": "Claude Code skill for understanding, installing, and inspecting claude-overnight runs -- parallel Claude agents in git worktrees with thinking waves, multi-wave steering, and crash-safe resume. Supports Cursor API Proxy, Qwen, OpenRouter.",
5
5
  "author": {
6
6
  "name": "Francesco Fornace"