export type AuthUser = {
  id: string;
  username?: string;
  email?: string;
  roles: string[];
};

export type RecommendedAction = {
  type: "webhook";
  id: string;
  confidence: number;
  reason: string;
  requires_confirmation: boolean;
  /**
   * Optional soft signal derived from the user's audit history: e.g.
   * "3 runs in last 7d, 100% success". The LLM may use this as a tiebreaker;
   * the UI uses it to show a "Most used" tag.
   */
  usageHint?: string;
};

export type InternalDocReference = {
  id: string;
  title: string;
  source: string;
  relevance: number;
};

export type ChatResult = {
  answer: string;
  recommended_actions: RecommendedAction[];
  internal_docs: InternalDocReference[];
};
