<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.tvu.host-monitor</string>

    <!-- `bash -l` matches the convention of the existing com.claude.* agents on
         this machine (a login shell also picks up the Full-Disk-Access grant
         given to /bin/bash here). -->
    <key>ProgramArguments</key>
    <array>
        <string>/bin/bash</string>
        <string>-l</string>
        <string>/Users/nancy/Documents/AICoding/VS_Code/tvu-design-system/tools/host-monitor/bin/check-host.sh</string>
    </array>

    <!-- Every 15 minutes. StartInterval rather than StartCalendarInterval because
         this is a heartbeat, not a scheduled report: what matters is bounded time
         to detection, not a wall-clock slot. Alerting is edge-triggered and
         de-duplicated, so a tight interval does not mean repeated banners. -->
    <key>StartInterval</key>
    <integer>900</integer>

    <!-- Run once immediately on load/login, so a machine that was asleep during an
         outage learns the current state as soon as it wakes. -->
    <key>RunAtLoad</key>
    <true/>

    <key>StandardOutPath</key>
    <string>/Users/nancy/.claude/host-monitor/launchd.log</string>
    <key>StandardErrorPath</key>
    <string>/Users/nancy/.claude/host-monitor/launchd.log</string>

    <key>EnvironmentVariables</key>
    <dict>
        <key>PATH</key>
        <string>/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
        <key>STATE_DIR</key>
        <string>/Users/nancy/.claude/host-monitor</string>
    </dict>

    <!-- Deliberately NOT setting Nice/LowPriorityIO: three curl calls every 15
         minutes is noise-level cost, and delaying them would only delay detection. -->
</dict>
</plist>
