feat(04-01): create notification service with batching, urgency, and GC protection

- Add createNotificationService with 10s batch window, urgency mapping, click-to-navigate
- Extend DesktopEvent union with NotificationClickEvent type
- Add 10 unit tests covering batching, urgency, NEVER_BATCH, GC protection, Linux urgency
- Platform-specific: silent flag, Windows timeoutType, Linux urgency level

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 4.6 committed 2026-03-22 16:30:49 -04:00
1 parent 7d5d1e5b30
commit 9ebb489644
3 files changed
+460 -1

No files matched your search

+8 -1
View File
@@ -376,6 +376,12 @@ export interface NewMessageEvent {
message: AgentMessageRecord;
}
export interface NotificationClickEvent {
type: "notification-click";
section: SectionId;
entityId?: string;
}
export type DesktopEvent =
| LogChunkEvent
| DomainChangedEvent
@@ -384,7 +390,8 @@ export type DesktopEvent =
| HeartbeatStatusEvent
| AgentMessageEvent
| AutomationFiredEvent
| NewMessageEvent;
| NewMessageEvent
| NotificationClickEvent;
export type InboxItemType = "pending_approval" | "failed_run" | "budget_warning" | "blocked_task" | "review_needed" | "agent_message";