Innovation Engine — productivity

Camera-Aware Meeting Guard

August 08, 2026

Ethan just built an AFK detector from webcam presence and has a meeting-recorder pipeline, but nothing connects them. This watches upcoming calendar events and, if he's away from the desk within 3 minutes of a meeting start, fires an escalating nudge (telegram-notify → callme-sms-send), and if he IS present it auto-arms meeting-record so no call is ever missed unrecorded.

afk-mode/canon-webcam presencegws Google Calendarmeeting-recordtelegram-notifycallme-sms-send

Create /home/ethan/.local/bin/meeting-presence-guard (bash, ~70 lines). Poll via systemd timer every minute. Use `open-upcoming-meetings.mjs --json` (or `gws calendar list --json`) to find events starting in <=3 min; dedupe with a state file at ~/.local/state/meeting-presence-guard/fired-. Read presence from the existing `afk-mode` state (the camera-backed stop hook Ethan just built) — if AFK, call `telegram-notify` immediately and `callme-sms-send` if still AFK at T-1min; if present, invoke `meeting-record-toggle on` and drop a line into `worklog`. Ship meeting-presence-guard.test.sh with a fake afk-mode + stub calendar JSON, plus a systemd unit + timer registered with timer-health-audit.

Built & Ready
**Camera-Aware Meeting Guard — LIVE**

**Created**
- `~/bin/meeting-presence-guard` (executable, 78 lines) — polls Google Calendar via `gws`, acts on events starting within 3 min
- `~/bin/meeting-presence-guard.test.sh` — 10 assertions, stubbed calendar/AFK/notifier
- `~/.config/systemd/user/meeting-presence-guard.{service,timer}` — every 60s, enabled and ticking, capped 512M/50% CPU

**Behavior**
- AFK at T-3 → `telegram-notify`; still AFK at T-1 → `callme-sms-send`
- Present → `meeting-record-toggle` arms the recorder + a `worklog` note
- Dedupes per event+channel in `~/.local/state/meeting-presence-guard/`
- Fail-closed: unusable calendar response exits 1 rather than reading as "nothing upcoming"
- Writes `last-run.json` heartbeat so silence reads as broken

**Verified**
- Unit tests: `passed=10 failed=0`
- E2E against the real calendar: exit 0, heartbeat `{"last_run":"2026-08-08T10:06:23Z","afk":1}` — no meeting inside the window, so correctly silent
- Timer next fire confirmed 60s out; registered in `timer-health-audit` (only pre-existing file touched), audit reports all healthy

**One caveat:** the escalation path fired against stubs in tests, not against real Telegram/SMS — sending a live test text to Ethan wasn't something I'd do unprompted. Your 8:59 backyard event is the next real trigger.
Active Projects
innovation-engine, russ-telegram, joyos-lab-staging, joyos-labs-monitor, jekelinspections
Category
productivity