pub struct TurnPolicyContext<'a> {
pub assistant_message: &'a AssistantMessage,
pub tool_results: &'a [ToolResultMessage],
pub stop_reason: StopReason,
pub system_prompt: &'a str,
pub model_spec: &'a ModelSpec,
pub context_messages: &'a [AgentMessage],
}Expand description
Per-turn context for PostTurn policies.
Fields§
§assistant_message: &'a AssistantMessageThe assistant message from the completed turn.
tool_results: &'a [ToolResultMessage]Tool results produced during this turn.
stop_reason: StopReasonWhy the turn ended.
system_prompt: &'a strThe system prompt active during this turn.
model_spec: &'a ModelSpecThe model specification active during this turn.
context_messages: &'a [AgentMessage]The committed conversation history for the completed turn.
This always includes the current turn’s assistant message and any tool
results before PostTurn policies run, regardless of whether the turn
ended with plain text, tool execution, or transfer termination.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for TurnPolicyContext<'a>
impl<'a> !RefUnwindSafe for TurnPolicyContext<'a>
impl<'a> Send for TurnPolicyContext<'a>
impl<'a> Sync for TurnPolicyContext<'a>
impl<'a> Unpin for TurnPolicyContext<'a>
impl<'a> UnsafeUnpin for TurnPolicyContext<'a>
impl<'a> !UnwindSafe for TurnPolicyContext<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more