feat: add smart respawn integration and priority todos (Phase 2)

Smart Respawn Integration (2.5):
- Check circuit breaker OPEN state before respawn (blocks cycle)
- Check RALPH_STATUS EXIT_SIGNAL=true to stop respawn
- Check STATUS=BLOCKED to pause respawn for human intervention
- Use RECOMMENDATION from RALPH_STATUS in update prompt
- Emit respawn:blocked SSE event with reason and details
- Show notification when respawn is blocked
- Visual blocked state with pulsing red indicator

Priority-based Todos (part of 2.3):
- Add RalphTodoPriority type (P0/P1/P2/null)
- Parse priority from todo content (P0:, Critical:, High Priority, etc.)
- Add priority field to RalphTodoItem interface
- Update frontend to display priority badges with colors
- Sort todos by priority (P0 > P1 > P2) then by status
- Add CSS for priority badges and highlighted cards

Bump version to 0.1391

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
arkon
2026-01-27 00:54:02 +01:00
co-authored by Claude Opus 4.5
parent 59b22337a5
commit 925ea09cca
8 changed files with 217 additions and 23 deletions
+8 -8
View File
@@ -718,6 +718,12 @@ export interface RalphTrackerState {
elapsedHours: number | null;
}
/**
* Priority levels for todo items.
* Matches @fix_plan.md format (P0=critical, P1=high, P2=normal).
*/
export type RalphTodoPriority = 'P0' | 'P1' | 'P2' | null;
/**
* A detected todo item from Claude Code output
*/
@@ -730,6 +736,8 @@ export interface RalphTodoItem {
status: RalphTodoStatus;
/** Timestamp when detected */
detectedAt: number;
/** Priority level (P0=critical, P1=high, P2=normal) */
priority: RalphTodoPriority;
}
/**
@@ -878,14 +886,6 @@ export function createInitialCircuitBreakerStatus(): CircuitBreakerStatus {
};
}
// ========== Priority Todo Types ==========
/**
* Priority levels for todo items.
* Matches @fix_plan.md format.
*/
export type RalphTodoPriority = 'P0' | 'P1' | 'P2' | null;
/**
* Creates initial Ralph tracker state
* @returns Fresh Ralph tracker state with defaults