feat: add Claude Code hooks for desktop notifications

Wire Claude Code's official hooks system (Notification, Stop) to POST
back to Claudeman's new /api/hook-event endpoint, which broadcasts SSE
events consumed by the existing NotificationManager for desktop alerts.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
arkon
2026-01-24 02:46:24 +01:00
co-authored by Claude Opus 4.5
parent f818fbb234
commit b4aea57d9c
6 changed files with 378 additions and 12 deletions
+15
View File
@@ -369,6 +369,21 @@ export interface QuickRunRequest {
workingDir?: string;
}
/**
* Hook event types triggered by Claude Code's hooks system
*/
export type HookEventType = 'idle_prompt' | 'permission_prompt' | 'stop';
/**
* Request body for the hook-event API endpoint
*/
export interface HookEventRequest {
/** Type of hook event that fired */
event: HookEventType;
/** Session ID from CLAUDEMAN_SESSION_ID env var */
sessionId: string;
}
// ========== API Response Types ==========
/**