export interface LiveStatusData {
  session_key: string;
  post_id: string;
  agent_id: string;
  status: 'active' | 'done' | 'error' | 'interrupted';
  lines: string[];
  elapsed_ms: number;
  token_count: number;
  children: LiveStatusData[];
  start_time_ms: number;
}

export interface WebSocketPayload {
  post_id: string;
  session_key: string;
  agent_id: string;
  status: string;
  lines: string[];
  elapsed_ms: number;
  token_count: number;
  children: LiveStatusData[];
  start_time_ms: number;
}

// Mattermost plugin registry types (subset)
export interface PluginRegistry {
  registerPostTypeComponent(typeName: string, component: any): string;
  registerWebSocketEventHandler(event: string, handler: (msg: any) => void): void;
  registerReducer(reducer: any): void;
  unregisterComponent(componentId: string): void;
}

export interface Post {
  id: string;
  type: string;
  props: Record<string, any>;
  channel_id: string;
  root_id: string;
}
