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

Method poll

src/utils/mailbox.ts:48–52  ·  view source on GitHub ↗
(fn: (msg: Message) => boolean = () => true)

Source from the content-addressed store, hash-verified

46 }
47
48 poll(fn: (msg: Message) => boolean = () => true): Message | undefined {
49 const idx = this.queue.findIndex(fn)
50 if (idx === -1) return undefined
51 return this.queue.splice(idx, 1)[0]
52 }
53
54 receive(fn: (msg: Message) => boolean = () => true): Promise<Message> {
55 const idx = this.queue.findIndex(fn)

Callers 1

useMailboxBridgeFunction · 0.80

Calls 1

spliceMethod · 0.80

Tested by

no test coverage detected