// btmsg types — agent messaging system

import type { AgentId, GroupId } from './ids';

export interface BtmsgAgent {
  id: AgentId;
  name: string;
  role: string;
  groupId: GroupId;
  tier: number;
  model: string | null;
  status: string;
  unreadCount: number;
}

export interface BtmsgMessage {
  id: string;
  fromAgent: AgentId;
  toAgent: AgentId;
  content: string;
  read: boolean;
  replyTo: string | null;
  createdAt: string;
  senderName?: string;
  senderRole?: string;
}

export interface BtmsgChannel {
  id: string;
  name: string;
  groupId: GroupId;
  createdBy: AgentId;
  memberCount: number;
  createdAt: string;
}

export interface BtmsgChannelMessage {
  id: string;
  channelId: string;
  fromAgent: AgentId;
  content: string;
  createdAt: string;
  senderName: string;
  senderRole: string;
}

export interface AgentHeartbeat {
  agentId: AgentId;
  timestamp: number;
}

export interface DeadLetterEntry {
  id: number;
  fromAgent: string;
  toAgent: string;
  content: string;
  error: string;
  createdAt: string;
}

export interface AuditEntry {
  id: number;
  agentId: string;
  eventType: string;
  detail: string;
  createdAt: string;
}
