import type { AssistantEvalBroadnessLevel, AssistantEvalQuestionType } from "./stage1Contracts";
import type { ProblemUnitType } from "./stage2ProblemUnits";

export type EvalTarget = "normalizer" | "assistant_stage1" | "assistant_stage2";

export interface AssistantStage1SuiteCaseTurn {
  user_message: string;
}

export interface AssistantStage1ExpectedHints {
  expected_reply_type?: string;
  expected_degraded_to?: "partial" | "clarification" | null;
}

export interface AssistantStage1SuiteCase {
  case_id: string;
  scenario_tag: string;
  question_type: AssistantEvalQuestionType;
  broadness_level: AssistantEvalBroadnessLevel;
  turns: AssistantStage1SuiteCaseTurn[];
  expected_hints?: AssistantStage1ExpectedHints;
  notes?: string[];
}

export interface AssistantStage1SuiteFile {
  suite_id: string;
  suite_version: string;
  schema_version?: string;
  scenario_count: number;
  case_ids: string[];
  cases: AssistantStage1SuiteCase[];
}

export interface AssistantStage2ExpectedHints extends AssistantStage1ExpectedHints {
  expected_problem_first?: boolean;
  expected_problem_unit_types?: ProblemUnitType[];
}

export interface AssistantStage2SuiteCase extends Omit<AssistantStage1SuiteCase, "expected_hints"> {
  expected_hints?: AssistantStage2ExpectedHints;
}

export interface AssistantStage2SuiteFile {
  suite_id: string;
  suite_version: string;
  schema_version?: string;
  scenario_count: number;
  case_ids: string[];
  cases: AssistantStage2SuiteCase[];
}
