All files / src/objects ScenarioRun.ts

0% Statements 0/0
0% Branches 0/0
0% Functions 0/0
0% Lines 0/0

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48                                                                                               
/**
 * A scenario run (svc-core `app/services/scenarios`, `/app/scenario-runs`):
 * a developer's scripted agent chats, run on the real chat path in a project
 * of its own and exported whole for review. See docs/guides/scenario-runs.md.
 */
export type ScenarioRunStatus = "running" | "completed" | "failed" | "cancelled";
 
export interface ScenarioRunProgress {
  done?: number;
  total?: number;
  /** The turn running now ("a-lookup turn 2"), or "provisioning". */
  current?: string | null;
}
 
export interface ScenarioRunFailedCheck {
  where: string;
  check: string;
  expected: unknown;
  actual: unknown;
}
 
/** `export.summary`, once the run has finished. */
export interface ScenarioRunSummary {
  turns: number;
  by_status: Record<string, number>;
  checks: number;
  checks_passed: number;
  checks_failed: ScenarioRunFailedCheck[];
  cost_usd: number | null;
  unpriced_turns: number;
  duration_ms: number;
}
 
export interface ScenarioRun {
  id: string;
  name: string;
  status: ScenarioRunStatus;
  progress: ScenarioRunProgress;
  error: string | null;
  project_id: string | null;
  scenario_sha256: string;
  cancel_requested: boolean;
  created_at: string;
  updated_at: string;
  finished_at: string | null;
  summary: ScenarioRunSummary | null;
}