Proactive Monitor

The background loop that watches system health, your calendar, and surfaces notifications.

MeghaOS doesn't only react: it watches. ProactiveMonitor runs a background thread that periodically checks system health and your calendar, and raises notifications when something needs your attention.

The loop

the background monitor ticks roughly every 10 seconds, running three checks:

System health

It samples CPU and disk with system metrics and raises alerts past thresholds:

ConditionNotificationEvent
CPU > 90%"CPU is running at N%, consider closing some apps."cpu_high
Disk low (few GB free)"Only N GB remaining on disk."disk_low

The events are published on the AgentBus, so other parts of the system (or the shell) can react to them, not just display a toast.

Upcoming meetings

It reads the built-in calendar and notifies you ahead of upcoming events, so meetings surface on the desktop without you asking.

Daily briefing

The system fires a once-per-day briefing, the backbone of a "here's your day" summary.

Notifications API

All notifications land in a queue exposed to the shell:

EndpointReturns
GET /api/notificationsPending notifications (title, message, type)

The shell polls this to render alerts. Calendar sync is also triggered from here, keeping calendar data fresh in the background.

Wiring

The monitor runs completely in the background so health checks and calendar polling never interfere with the chat experience.