pub struct TurnBuilder { /* private fields */ }Implementations§
Source§impl TurnBuilder
impl TurnBuilder
Sourcepub fn cancel(self, cancel: CancellationToken) -> Self
pub fn cancel(self, cancel: CancellationToken) -> Self
Install a process-local cooperative token.
This low-level hook remains for provider plumbing, shutdown, and tests.
Host-facing stop controls should use TurnWorkDriver::request_cancel
with an exact session/turn address. If this token fires, cancellation
evidence records no origin; call
cancel_with_origin when the origin is
known.
Sourcepub fn cancel_with_origin(
self,
cancel: CancellationToken,
origin: Option<String>,
) -> Self
pub fn cancel_with_origin( self, cancel: CancellationToken, origin: Option<String>, ) -> Self
Install a process-local token with an opaque host-defined origin.
Lash records the value without interpreting it.
pub fn protocol_turn_options(self, options: ProtocolTurnOptions) -> Self
pub fn provider(self, provider: ProviderHandle) -> Self
pub fn turn_id(self, id: impl Into<String>) -> Self
pub fn prompt_template(self, template: PromptTemplate) -> Self
pub fn prompt_contribution(self, contribution: PromptContribution) -> Self
pub fn replace_prompt_slot( self, slot: PromptSlot, contributions: impl IntoIterator<Item = PromptContribution>, ) -> Self
pub fn clear_prompt_slot(self, slot: PromptSlot) -> Self
pub fn prompt_layer(self, layer: PromptLayer) -> Self
Sourcepub fn with_plugin_input<P: PluginBinding>(self, input: P::Input) -> Self
pub fn with_plugin_input<P: PluginBinding>(self, input: P::Input) -> Self
Attach typed per-turn input for an activated plugin binding.
This is the generic primitive. Plugin crates should usually wrap it in a
domain extension trait such as .with_tone(tone) or .with_board(board)
so application code stays typed in its own vocabulary.
pub fn effects( self, controller: &dyn RuntimeEffectController, ) -> ScopedTurnBuilder<'_>
pub async fn run(self) -> Result<TurnOutput>
pub async fn stream_to( self, events: &dyn TurnActivitySink, ) -> Result<TurnResult>
pub fn stream(self) -> Result<TurnStream>
Sourcepub fn advanced(self) -> AdvancedTurn
pub fn advanced(self) -> AdvancedTurn
Access lower-level turn execution that bypasses the semantic
TurnActivity tier.