import { createMessage, listInbox } from '../../core/services/messageService.js'; export function messageSend( cwd: string, opts: { from: string; to: string; text: string; taskId?: string }, ): void { const m = createMessage(cwd, opts); console.log(`AgentHub: Message sent ${m.id} (${m.from} → ${m.to})`); } export function inboxList(cwd: string, opts: { agent: string; unreadOnly?: boolean }): void { const msgs = listInbox(cwd, opts.agent, { unreadOnly: opts.unreadOnly }); if (msgs.length === 0) { console.log(`No messages for ${opts.agent}.`); return; } for (const m of msgs) { const flag = m.status === 'unread' ? '●' : ' '; console.log(`${flag} ${m.id} ${m.from} → ${m.to}${m.taskId ? ` [${m.taskId}]` : ''}: ${m.text}`); } }