Non-destructive: True if the agent has unread inbox messages. The Lead's inbox poller uses this to decide whether to wake a turn without consuming the mailbox.
(self, agent: str)
| 625 | return msgs |
| 626 | |
| 627 | def peek(self, agent: str) -> bool: |
| 628 | """Non-destructive: True if the agent has unread inbox messages. |
| 629 | The Lead's inbox poller uses this to decide whether to wake a turn |
| 630 | without consuming the mailbox.""" |
| 631 | inbox = MAILBOX_DIR / f"{agent}.jsonl" |
| 632 | return inbox.exists() and inbox.stat().st_size > 0 |
| 633 | |
| 634 | |
| 635 | BUS = MessageBus() |
no test coverage detected