

## Email check via Himalaya
At every heartbeat, check the default inbox using Himalaya.

Suggested command:

    himalaya envelope list --page-size 10

Use this state file to track what has already been seen:

    memory/heartbeat-email-state.json

State file shape:
- `lastSeenIds`: array of recent message IDs already observed
- `lastCheckedAt`: ISO timestamp of last successful check
- `account`: account label

On each heartbeat:
1. Read `memory/heartbeat-email-state.json`
2. Run the Himalaya inbox list command
3. Extract the visible message IDs from the current inbox page
4. Compare them to `lastSeenIds`
5. If there are new emails since the last check, report them in the main session with a short summary (sender + subject is enough unless something looks important)
6. Update `memory/heartbeat-email-state.json` with the new `lastSeenIds` and current timestamp

If there are no new emails, do not send an email update, but still refresh `lastCheckedAt`.


## Flight check via tracking sites
Monitor Finnair flights AY88 and AY861 during heartbeats.

State file:

    memory/heartbeat-flight-state.json

State file shape:
- `monitoredFlights`: ["AY88", "AY861"]
- `lastKnownStatus`: map of flight number to latest status text
- `lastKnownLocation`: map of flight number to latest airborne position or location summary
- `lastCheckedAt`: ISO timestamp of last successful check
- `done`: boolean, set true after AY861 has landed

On each heartbeat:
1. Read `memory/heartbeat-flight-state.json`
2. Check whether AY88 or AY861 is airborne
3. If a flight is airborne, check its current location/position and report back briefly
4. Update the state with the latest status and location
5. Once AY861 has landed, set `done` to true and stop the flight checks from that point on

If neither flight is airborne, do not send a flight update.


## Heartbeat debugging
Heartbeat execution has been verified. Do not send routine debug messages every run anymore.

Only report to the main session when:
- there are new emails
- a monitored flight is airborne or lands
- there are project issues worth mentioning
- there is an actual heartbeat problem

You may still append lightweight local heartbeat traces if useful, but avoid noisy user-facing debug updates unless debugging is explicitly requested again.
