Skip to main content

WorkflowHostCallbacks

Trait WorkflowHostCallbacks 

Source
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§

Source

fn phase(&mut self, title: &str)

Source

fn log(&mut self, message: &str)

Source

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).

Source

fn args_json(&self) -> String

Source

fn budget_json(&self) -> String

Provided Methods§

Source

fn workflow_nested( &mut self, name_or_ref: &str, args_json: &str, ) -> Result<String, String>

Nested workflow(name|ref, args) — P1 (Wave H1). Default: not configured (scripts that nest without Frog bridge fail closed).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§