pub trait ScriptHost {
// Required methods
fn ready(&self) -> Result<bool, String>;
fn run(&self, source: &str) -> Result<String, String>;
fn result(&self, id: &str) -> Result<Option<Value>, String>;
fn halt(&self, id: &str) -> Result<(), String>;
}Expand description
Where Run sends a program when the app has a script runner: the app’s
own server’s code mode (crate::mcp::EditorHost), the same realm, limits
and generated brep.<group>.<tool> functions an agent’s run_script
gets. Without one (the web build, a bare test harness) Run uses the
plugin runner’s editor action.
Required Methods§
Sourcefn run(&self, source: &str) -> Result<String, String>
fn run(&self, source: &str) -> Result<String, String>
Submit a program; answers its execution id.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".