@litmers/cursorflow-orchestrator 0.1.26 → 0.1.28
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/CHANGELOG.md +11 -0
- package/dist/cli/prepare.js +83 -0
- package/dist/cli/prepare.js.map +1 -1
- package/dist/cli/run.js +117 -0
- package/dist/cli/run.js.map +1 -1
- package/dist/core/auto-recovery.d.ts +3 -3
- package/dist/core/auto-recovery.js +3 -3
- package/dist/core/auto-recovery.js.map +1 -1
- package/dist/core/failure-policy.d.ts +2 -2
- package/dist/core/failure-policy.js +5 -5
- package/dist/core/failure-policy.js.map +1 -1
- package/dist/core/orchestrator.js +10 -5
- package/dist/core/orchestrator.js.map +1 -1
- package/package.json +1 -1
- package/src/cli/prepare.ts +93 -0
- package/src/cli/run.ts +145 -0
- package/src/core/auto-recovery.ts +6 -6
- package/src/core/failure-policy.ts +5 -5
- package/src/core/orchestrator.ts +10 -5
- package/src/core/runner.ts +1443 -1443
- package/src/utils/git.ts +870 -870
package/src/core/orchestrator.ts
CHANGED
|
@@ -44,11 +44,11 @@ import { preflightCheck, printPreflightReport, autoRepair } from '../utils/healt
|
|
|
44
44
|
import { getLatestCheckpoint } from '../utils/checkpoint';
|
|
45
45
|
import { cleanStaleLocks, getLockDir } from '../utils/lock';
|
|
46
46
|
|
|
47
|
-
/** Default stall detection configuration -
|
|
47
|
+
/** Default stall detection configuration - 2 minute idle timeout for recovery */
|
|
48
48
|
const DEFAULT_ORCHESTRATOR_STALL_CONFIG: StallDetectionConfig = {
|
|
49
49
|
...DEFAULT_STALL_CONFIG,
|
|
50
|
-
idleTimeoutMs: 60 * 1000,
|
|
51
|
-
progressTimeoutMs: 10 * 60 * 1000, // 10 minutes
|
|
50
|
+
idleTimeoutMs: 2 * 60 * 1000, // 2 minutes (idle detection for continue signal)
|
|
51
|
+
progressTimeoutMs: 10 * 60 * 1000, // 10 minutes (only triggers if no activity at all)
|
|
52
52
|
maxRestarts: 2,
|
|
53
53
|
};
|
|
54
54
|
|
|
@@ -192,7 +192,7 @@ export function spawnLane({
|
|
|
192
192
|
|
|
193
193
|
if (trimmed && !isJson) {
|
|
194
194
|
if (onActivity) onActivity();
|
|
195
|
-
// If line
|
|
195
|
+
// If line alreedy has timestamp format, just add lane prefix
|
|
196
196
|
if (hasTimestamp) {
|
|
197
197
|
// Insert lane name after first timestamp
|
|
198
198
|
const formatted = trimmed.replace(/^(\[[^\]]+\])/, `$1 ${logger.COLORS.magenta}[${laneName}]${logger.COLORS.reset}`);
|
|
@@ -706,7 +706,12 @@ export async function orchestrate(tasksDir: string, options: {
|
|
|
706
706
|
onActivity: () => {
|
|
707
707
|
const info = running.get(lane.name);
|
|
708
708
|
if (info) {
|
|
709
|
-
|
|
709
|
+
const now = Date.now();
|
|
710
|
+
info.lastActivity = now;
|
|
711
|
+
// Also reset progress tracking when there's activity (THNK/TOOL events)
|
|
712
|
+
// This prevents STALL_NO_PROGRESS from firing when agent is actively working
|
|
713
|
+
info.lastStateUpdate = now;
|
|
714
|
+
info.stallPhase = 0; // Reset stall phase since agent is responding
|
|
710
715
|
}
|
|
711
716
|
}
|
|
712
717
|
});
|