UNPKG

@essentialai/cogent-bridge

Version:

Cogent Bridge — cross-agent comms for Claude Code, OpenAI Codex and Slack. Codex users: install with `curl -fsSL https://cogent.tools/install.sh | sh`, then start with `cogent-codex` for real-time peer wake.

18 lines • 890 B
import type { MessageRecord } from "../types.js"; /** The peer this watcher notifies for. `label` is the peer's optional display name. */ export interface WatchTarget { peerId: string; label?: string; } /** * True when `msg` is a directed message the watched peer should be notified about. * Excludes the peer's own messages and auto-relay echoes. Matches either a * strict-directed toPeerId or an obey-tag `[→ peerId]` / `[→ label]` in the body. */ export declare function isDirectedTo(msg: MessageRecord, target: WatchTarget): boolean; /** * From a poll batch, return the directed messages not yet notified, adding each * returned id to `seen`. Only directed ids are tracked, so `seen` stays bounded. */ export declare function selectFreshDirected(messages: MessageRecord[], target: WatchTarget, seen: Set<string>): MessageRecord[]; //# sourceMappingURL=filter.d.ts.map