feat: add workflow management commands and utilities

- Implemented workflow installation, listing, and syncing commands in `workflow.ts`.
- Created utility functions for project root detection and package version retrieval in `project-root.ts`.
- Added update checker functionality to notify users of new package versions in `update-checker.ts`.
- Developed unit tests for project root utilities and update checker to ensure functionality and version comparison accuracy.
This commit is contained in:
catlog22
2026-01-21 12:35:33 +08:00
parent ffe9898fd3
commit 9d6bc92837
13 changed files with 1832 additions and 5 deletions

View File

@@ -98,8 +98,9 @@ function broadcastStreamEvent(eventType: string, payload: Record<string, unknown
req.on('socket', (socket) => {
socket.unref();
});
req.on('error', () => {
// Silently ignore errors for streaming events
req.on('error', (err) => {
// Log errors for debugging - helps diagnose hook communication issues
console.error(`[Hook] Failed to send ${eventType}:`, (err as Error).message);
});
req.on('timeout', () => {
req.destroy();