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

Method read_inbox

s19_mcp_plugin/code.py:331–338  ·  view source on GitHub ↗
(self, agent: str)

Source from the content-addressed store, hash-verified

329 f"({msg_type}) {content[:50]}\033[0m")
330
331 def read_inbox(self, agent: str) -> list[dict]:
332 inbox = MAILBOX_DIR / f"{agent}.jsonl"
333 if not inbox.exists():
334 return []
335 msgs = [json.loads(line) for line in inbox.read_text().splitlines()
336 if line.strip()]
337 inbox.unlink()
338 return msgs
339
340
341BUS = MessageBus()

Callers 3

consume_lead_inboxFunction · 0.45
idle_pollFunction · 0.45
runFunction · 0.45

Calls 1

existsMethod · 0.80

Tested by

no test coverage detected