(self, agent: str)
| 354 | f"({msg_type}) {content[:50]}\033[0m") |
| 355 | |
| 356 | def read_inbox(self, agent: str) -> list[dict]: |
| 357 | inbox = MAILBOX_DIR / f"{agent}.jsonl" |
| 358 | if not inbox.exists(): |
| 359 | return [] |
| 360 | msgs = [json.loads(line) for line in inbox.read_text().splitlines() |
| 361 | if line.strip()] |
| 362 | inbox.unlink() # consume: read + delete |
| 363 | return msgs |
| 364 | |
| 365 | |
| 366 | BUS = MessageBus() |
no test coverage detected