mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-05 06:59:42 +02:00
fix: respawn controller multi-layer detection and cleanup
- Update idle detection from legacy '↵ send' to completion message pattern
("for Xm Xs" time patterns like "Worked for 2m 46s")
- Add confirming_idle state for false positive prevention
- Add completionConfirmMs (5s) and noOutputTimeoutMs (30s) config options
- Add multi-layer detection with confidence scoring (0-100%)
- Fix null pointer error in extractTokenCount with guard clause
- Fix respawn controller not stopping on session cleanup (broadcast respawn:stopped)
- Update tests to use new completion message patterns
- Add detection status UI display (confidence level, waiting state)
- Update CLAUDE.md with new detection documentation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1271,6 +1271,8 @@ export class WebServer extends EventEmitter {
|
||||
controller.stop();
|
||||
controller.removeAllListeners();
|
||||
this.respawnControllers.delete(sessionId);
|
||||
// Notify UI that respawn is stopped for this session
|
||||
this.broadcast('respawn:stopped', { sessionId, reason: 'session_cleanup' });
|
||||
}
|
||||
|
||||
// Clear respawn timer
|
||||
@@ -1445,6 +1447,10 @@ export class WebServer extends EventEmitter {
|
||||
this.broadcast('respawn:stepCompleted', { sessionId, step });
|
||||
});
|
||||
|
||||
controller.on('detectionUpdate', (detection: unknown) => {
|
||||
this.broadcast('respawn:detectionUpdate', { sessionId, detection });
|
||||
});
|
||||
|
||||
controller.on('log', (message: string) => {
|
||||
this.broadcast('respawn:log', { sessionId, message });
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user