/**
 * Intent types for natural language query classification
 */
export type IntentType =
  | "query_tasks"
  | "query_events"
  | "query_projects"
  | "create_task"
  | "create_event"
  | "update_task"
  | "update_event"
  | "briefing"
  | "search"
  | "unknown";

/**
 * Extracted entity from a query
 */
export interface ExtractedEntity {
  /** Entity type */
  type: "date" | "time" | "person" | "project" | "priority" | "status" | "text";
  /** Normalized value */
  value: string;
  /** Original text that was matched */
  raw: string;
  /** Position in original query (start index) */
  start: number;
  /** Position in original query (end index) */
  end: number;
}

/**
 * Result of intent classification
 */
export interface IntentClassification {
  /** Classified intent type */
  intent: IntentType;
  /** Confidence score (0.0 - 1.0) */
  confidence: number;
  /** Extracted entities from the query */
  entities: ExtractedEntity[];
  /** Method used for classification */
  method: "rule" | "llm";
  /** Original query text */
  query: string;
}

/**
 * Pattern configuration for intent matching
 */
export interface IntentPattern {
  /** Intent type this pattern matches */
  intent: IntentType;
  /** Regex patterns to match */
  patterns: RegExp[];
  /** Priority (higher = checked first) */
  priority: number;
}
