MCPcopy
hub / github.com/shareAI-lab/learn-claude-code / peek

Method peek

s15_agent_teams/code.py:627–632  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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
635BUS = MessageBus()

Callers 2

inbox_pollerFunction · 0.80
code.pyFile · 0.80

Calls 1

existsMethod · 0.80

Tested by

no test coverage detected