import { z } from 'zod';

// Basic conversation types
export interface ConversationMessage {
  role: 'user' | 'assistant';
  content: string;
  timestamp: Date;
}

export interface ConversationState {
  id: string;
  messages: ConversationMessage[];
  currentTopic?: string;
  completedTopics: string[];
  createdAt: Date;
  updatedAt: Date;
}

// Expert types
export interface ExpertRole {
  title: string;
  systemPrompt: string;
  topics: string[];
  outputFormat: string;
}

// MCP tool schemas
export const ConsultExpertSchema = z.object({
  projectInfo: z.string().describe('Project description or message to expert'),
  conversationId: z.string().optional().describe('Unique conversation identifier')
});

export const GeneratePRDSchema = z.object({
  conversationId: z.string().describe('Conversation ID to generate PRD from'),
  projectName: z.string().optional().describe('Project name for the PRD')
});

export const GenerateDesignSpecSchema = z.object({
  conversationId: z.string().describe('Conversation ID to generate Design Specification from'),
  projectName: z.string().optional().describe('Project name for the Design Specification')
});

export type ConsultExpertInput = z.infer<typeof ConsultExpertSchema>;
export type GeneratePRDInput = z.infer<typeof GeneratePRDSchema>;
export type GenerateDesignSpecInput = z.infer<typeof GenerateDesignSpecSchema>;
export const GenerateTechArchitectureSchema = z.object({
  conversationId: z.string().describe('Conversation ID to generate Technical Architecture from'),
  projectName: z.string().optional().describe('Project name for the Technical Architecture')
});

export type GenerateTechArchitectureInput = z.infer<typeof GenerateTechArchitectureSchema>;


// Workflow types
export * from './workflow';
