(self, agent: str)
| 616 | f"{content[:50]}\033[0m") |
| 617 | |
| 618 | def read_inbox(self, agent: str) -> list[dict]: |
| 619 | inbox = MAILBOX_DIR / f"{agent}.jsonl" |
| 620 | if not inbox.exists(): |
| 621 | return [] |
| 622 | msgs = [json.loads(line) for line in inbox.read_text().splitlines() |
| 623 | if line.strip()] |
| 624 | inbox.unlink() # consume: read + delete |
| 625 | return msgs |
| 626 | |
| 627 | def peek(self, agent: str) -> bool: |
| 628 | """Non-destructive: True if the agent has unread inbox messages. |
no test coverage detected