create-claude-workspace 2.3.24 → 2.3.25
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/scheduler/index.mjs
CHANGED
|
@@ -285,16 +285,16 @@ export async function runScheduler(opts) {
|
|
|
285
285
|
process.exit(1);
|
|
286
286
|
}
|
|
287
287
|
}
|
|
288
|
-
// Task mode detection
|
|
288
|
+
// Task mode detection — always re-detect unless user explicitly set --task-mode
|
|
289
|
+
// (stored state may be stale if CLI was installed/authenticated since last run)
|
|
289
290
|
if (opts.taskMode) {
|
|
290
291
|
state.taskMode = opts.taskMode;
|
|
292
|
+
logger.info(`Task mode (from flag): ${state.taskMode}`);
|
|
291
293
|
}
|
|
292
|
-
else
|
|
293
|
-
// Auto-detect: platform mode if remote has issues with status:: labels
|
|
294
|
+
else {
|
|
294
295
|
state.taskMode = detectTaskMode(opts.projectDir);
|
|
295
|
-
logger.info(`Task mode
|
|
296
|
+
logger.info(`Task mode: ${state.taskMode}`);
|
|
296
297
|
}
|
|
297
|
-
// If resuming existing state, keep the stored taskMode
|
|
298
298
|
// Platform mode: shorter idle poll interval (30s vs 5min)
|
|
299
299
|
const mutableOpts = opts;
|
|
300
300
|
if (state.taskMode === 'platform' && !opts.taskMode && opts.idlePollInterval === SCHEDULER_DEFAULTS.idlePollInterval) {
|
package/dist/scheduler/loop.mjs
CHANGED
|
@@ -785,6 +785,15 @@ export async function recoverOrphanedWorktrees(projectDir, state, logger, _deps)
|
|
|
785
785
|
// Phase 1: Orphaned worktrees → re-inject into pipelines
|
|
786
786
|
for (const worktreePath of orphans) {
|
|
787
787
|
try {
|
|
788
|
+
// If the worktree directory was manually deleted, prune it from git and skip
|
|
789
|
+
if (!existsSync(worktreePath)) {
|
|
790
|
+
logger.info(`[recovery] Worktree directory missing: ${worktreePath} — pruning from git`);
|
|
791
|
+
try {
|
|
792
|
+
execFileSync('git', ['worktree', 'prune'], { cwd: projectDir, stdio: 'pipe', timeout: 10_000 });
|
|
793
|
+
}
|
|
794
|
+
catch { /* ignore */ }
|
|
795
|
+
continue;
|
|
796
|
+
}
|
|
788
797
|
const branch = getCurrentBranch(worktreePath);
|
|
789
798
|
const alreadyMerged = isBranchMerged(projectDir, branch);
|
|
790
799
|
if (alreadyMerged) {
|