The scenario configuration.
The scenario description.
Readonlyevents$The current turn number in the scenario.
The current turn number in the scenario.
The sequence of messages exchanged during the scenario.
The unique identifier for the execution thread.
The unique identifier for the execution thread.
Adds a message to the conversation history.
The message to add.
Checks if a tool call for a specific tool exists in the execution state.
The name of the tool.
True if the tool call exists, false otherwise.
Retrieves the last agent message from the execution state.
The last agent message.
Retrieves the last message from the execution state.
The last message.
Retrieves the last tool call message for a specific tool.
The name of the tool.
The last tool call message.
Retrieves the last user message from the execution state.
The last user message.
Remove all messages from position index onward.
Truncates the internal message list and notifies the executor (via the registered rollback handler) to clean pending queues.
Note: This method is safe to call only during an agent's call()
invocation. The executor runs agents sequentially, so no other agent
can observe stale newMessages references. Calling this from outside
that flow may leave already-delivered newMessages out of sync.
Truncate point (clamped to [0, messages.length]).
Messages at positions >= index are removed.
The removed messages (empty array if nothing to remove).
Register a callback that fires when messages are rolled back. The executor uses this to clean up its pending message queues.
Manages the state of a scenario execution. This class implements the ScenarioExecutionStateLike interface and provides the internal logic for tracking conversation history, turns, results, and other related information.