Skip to content

Commit 8828b34

Browse files
committed
fix(monitoring): use correct type for process.emit in cleanup
The previous type assertion was incorrect and could cause runtime errors. Using NodeJS.EventEmitter ensures proper type safety when emitting events.
1 parent ffcbbf2 commit 8828b34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/agents/monitoring/cleanup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export class MonitoringCleanup {
4949
logger.debug('First Ctrl+C detected - aborting current step and stopping workflow gracefully');
5050

5151
// Emit workflow:skip to abort the currently running step (triggers AbortController)
52-
process.emit('workflow:skip' as string);
52+
(process as NodeJS.EventEmitter).emit('workflow:skip');
5353

5454
// Call UI callback to update status
5555
this.workflowHandlers.onStop?.();

0 commit comments

Comments
 (0)