pub trait WorkflowHostCallbacks: Send {
// Required methods
fn phase(&mut self, title: &str);
fn log(&mut self, message: &str);
fn agent(&mut self, prompt: &str, opts_json: &str) -> Result<String, String>;
fn args_json(&self) -> String;
fn budget_json(&self) -> String;
// Provided method
fn workflow_nested(
&mut self,
name_or_ref: &str,
args_json: &str,
) -> Result<String, String> { ... }
}Expand description
Callbacks implemented by Frog (or tests) for one workflow run.
Required Methods§
fn phase(&mut self, title: &str)
fn log(&mut self, message: &str)
Sourcefn agent(&mut self, prompt: &str, opts_json: &str) -> Result<String, String>
fn agent(&mut self, prompt: &str, opts_json: &str) -> Result<String, String>
Run one agent; return Ok(JSON text or plain string). Err aborts the call.
Uses std::result::Result (mozjs jsapi re-exports a different Result).
fn args_json(&self) -> String
fn budget_json(&self) -> String
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".