Passed to the onSimulationEnd callback while running under a simulation.

Carries two verdicts, both recorded for the run:

  • simulatorVerdict: the simulator's verdict (its LLM judgment of the chat).
  • userVerdict: your own veto, set via fail from richer checks (e.g. comparing mock backend state against the benchmark target in scenario.userdata). The effective result is the AND of the two: your check can fail a run the simulator passed, but it can never rescue one, so there is no success(); not calling fail leaves the simulator's verdict to stand.

Use jobContext to reach the running session and the room.

Constructors

Accessors

  • get simulationJobId(): string
  • The run job (one scenario) behind this session, likewise available up front.

    Returns string

  • get simulationMode(): SimulationMode
  • How the simulated user interacts with the agent (text chat or audio). Unspecified is treated as text, since simulations predating the field were all text-only.

    Returns SimulationMode

  • get simulationRun(): undefined | SimulationRun
  • The run, or undefined before the simulation ends.

    Carries only its id today, so every other field reads as its protobuf default rather than the run's real state. Prefer SimulationContext.simulationRunId, which is the same ID and is available from the entrypoint.

    Returns undefined | SimulationRun

Methods

  • Veto this run from your own checks (e.g. final DB state diverged).

    The effective result is the AND of both verdicts, so this can only fail a run the simulator passed, never rescue one. The simulator's verdict is still reported. The last call wins if you call fail more than once.

    Parameters

    • reason: string = ''

    Returns void