/** * File-backed inbox messaging protocol. * * Port of cc-agent-teams-impl-mcp messaging.py into TypeScript. * Each agent's inbox is a JSON array of InboxMessage objects stored at: * ~/.codex-teams-mcp/teams//inboxes/.json * * All mutations are protected by a per-team file lock to prevent * concurrent read-modify-write races. */ import type { InboxMessage } from './types.js'; /** * Ensure the inbox directory and file exist for the given agent. * Creates an empty JSON array file if one does not already exist. * Returns the resolved inbox file path. */ export declare function ensureInbox(teamName: string, agentName: string): string; /** * Append a single message to an agent's inbox. * Uses a file lock to prevent concurrent read-modify-write races. */ export declare function appendMessage(teamName: string, recipient: string, message: InboxMessage): Promise; /** * Read messages from an agent's inbox with optional filtering. * * @param teamName - Team name. * @param agentName - Whose inbox to read. * @param opts.unreadOnly - If true, only return unread messages. Default false. * @param opts.markAsRead - If true, mark returned messages as read on disk. Default true. * @param opts.senderFilter - If set, only return messages where `from` matches. */ export declare function readInbox(teamName: string, agentName: string, opts?: { unreadOnly?: boolean; markAsRead?: boolean; senderFilter?: string; }): Promise; /** * Send a plain-text message from one agent to another. */ export declare function sendPlainMessage(teamName: string, from: string, to: string, text: string, summary: string, color?: string): Promise; /** * Send a structured (JSON-serialized) message from one agent to another. * The payload object is stringified into the `text` field so that the * inbox format stays uniform. */ export declare function sendStructuredMessage(teamName: string, from: string, to: string, payload: object): Promise; /** * Send a shutdown request to a teammate. * Returns the generated requestId so the caller can correlate responses. */ export declare function sendShutdownRequest(teamName: string, recipient: string, reason?: string): Promise; /** * Send a task assignment notification to a teammate. */ export declare function sendTaskAssignment(teamName: string, taskId: string, subject: string, description: string, assignedBy: string, assignee: string): Promise; //# sourceMappingURL=messaging.d.ts.map