Skip to main content

activation_policy

Function activation_policy 

Source
pub fn activation_policy(
    mode: ActivationConfirm,
    auto_approve_confirms: bool,
) -> (ActivationAuthority, bool)
Expand description

Bundle of all dependencies needed to drive a streaming agent loop. Constructed once by Runtime::run_stream_with_messages before spawning the stream task. Host activation policy for MODEL-INITIATED activate_tools (tools.activation_confirm + server.auto_approve_confirms).

Returns (authority, host_prompt_allowed):

  • auto_approve_confirms or Auto → ModelConfirmed, no prompt.
  • Prompt → Unauthorized + prompt allowed: activate_tools asks the host (y/n confirm dialog) and only an explicit y/yes authorizes.
  • Deny → Unauthorized + prompt NOT allowed: always ConfirmationRequired, no dialog is ever raised.