MCPcopy
hub / github.com/codeaashu/claude-code / readUnreadMessages

Function readUnreadMessages

src/utils/teammateMailbox.ts:115–125  ·  view source on GitHub ↗
(
  agentName: string,
  teamName?: string,
)

Source from the content-addressed store, hash-verified

113 * @param teamName - Optional team name
114 */
115export async function readUnreadMessages(
116 agentName: string,
117 teamName?: string,
118): Promise<TeammateMessage[]> {
119 const messages = await readMailbox(agentName, teamName)
120 const unread = messages.filter(m => !m.read)
121 logForDebugging(
122 `[TeammateMailbox] readUnreadMessages: ${unread.length} unread of ${messages.length} total`,
123 )
124 return unread
125}
126
127/**
128 * Write a message to a teammate's inbox

Callers 3

runFunction · 0.85
useInboxPollerFunction · 0.85

Calls 2

readMailboxFunction · 0.85
logForDebuggingFunction · 0.85

Tested by

no test coverage detected