Public declaration syntax from forge-rs/crates/forge-agent/src/streaming_tool_loop.rs Original source SHA-256: df84d3a0a4f00e0e559a1a78e877c1f2d8fe9db08ced25b9be82146285e098bb Function bodies and constant values are omitted. This is not the complete implementation. Source line 61 #[derive(Debug, Clone)] pub struct StreamingLoopConfig { /// Maximum turns before forced termination. pub max_turns: u32, /// Context pruning threshold (fraction of max_context_tokens). pub context_threshold: f64, /// Context pruning strategy. pub pruning_strategy: PruningStrategy, /// Model's maximum context window size. pub max_context_tokens: u64 } Source line 95 pub struct StreamingToolLoopAgent { } Source line 111 pub fn new( config: AgentConfig, loop_config: StreamingLoopConfig, model: Arc, tool_registry: ToolRegistry, approval: Arc, ) -> Self; Source line 143 pub fn with_observer(self, observer: Arc) -> Self; Source line 154 pub fn set_observer(&self, observer: Arc); Source line 166 pub fn clear_observer(&self); Source line 176 pub fn observer(&self) -> Arc; Source line 191 pub fn enqueue_interjection(&self, text: impl Into); Source line 204 pub fn enqueue_interjection_message(&self, message: ModelMessage); Source line 224 pub fn model(&self) -> &Arc; Source line 229 pub fn with_generate_options(mut self, options: GenerateOptions) -> Self;