feat: add hook event history with badge counts in SessionLifecycleStatus

Server persists hookHistory[] per agent (cap 500, resets on SessionStart),
synced realtime via session-state-patch. Frontend computes event counts
by macro type and renders color-coded badges at the ribbon start.
Mock mode also accumulates badges during demo sequence.
This commit is contained in:
2026-02-21 04:29:02 -06:00
parent 638b449f08
commit b9eec1013b
4 changed files with 200 additions and 4 deletions

View File

@@ -31,6 +31,12 @@ export interface PendingApproval {
timestamp: number
}
export interface HookHistoryEntry {
event: string
timestamp: number
detail?: string
}
export interface SessionNotification {
id: string
event: string
@@ -71,6 +77,7 @@ export interface AgentSessionState {
pendingApprovals: PendingApproval[]
terminal: AgentTerminalInfo
notifications: SessionNotification[]
hookHistory: HookHistoryEntry[]
lastHookEvent: string | null
lastHookDetail: string | null
}