Phone Watch
phone_watchBlocks until the person sends new messages, returns those lines oldest first, and saves a per-role cursor so a restarted watcher resumes without skipping.
Instructions
The standing phone watcher: blocks until the person sends something, returns it, and remembers its place. Run
it in the background (python -m ismail phone_watch "who=<your role>"), act on what it returns, and re-arm it
FIRST after every wake, before any other work. Never write your own watcher.
It loops phone_listen(who, page=True) and returns every wanted line (a burst gathered with one more short look),
oldest first, as JSON {lines, since, next}: nothing filtered by owner; only page telemetry (every page action but
panel_close) and the 'voice' transcribing line (its words follow as voice_text) stay out.
The cursor is saved per who (~/.ismail/phone/cursors/) only when it returns, so a killed watcher never
skips a line and a re-arm resumes where the last return left off. since: start after this inbox line instead.
With no saved cursor and no since it starts at the end of the inbox (history is never replayed) and says so.
wait_min: after this many minutes with nothing it returns {alive: true} so you re-arm and read phone_status (a
background task may be stopped at 2 hours). round=: you let a round of someone else's cards run:
its lines are held (counted, not returned) and the watcher wakes on anything else, or 90 s after the round's last
line. A phone server restart is waited out (it looks again every 10 s).
lead=true: you are the team lead: the heartbeat's alarms (an agent's watcher down while the person is live) come
to you, and you wake that agent. An alarm addressed to another watcher does not wake you.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| who | Yes | ||
| lead | No | ||
| round | No | ||
| since | No | ||
| wait_min | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |