pub trait EngineApi: Send + Sync {
Show 19 methods
// Required methods
fn run<'life0, 'async_trait>(
&'life0 self,
code: Option<String>,
code_file: Option<String>,
ctx: Option<Value>,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn advice<'life0, 'life1, 'async_trait>(
&'life0 self,
strategy: &'life1 str,
task: String,
opts: Option<Value>,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn continue_single<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
response: String,
query_id: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait;
fn continue_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
responses: Vec<QueryResponse>,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn status<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn eval<'life0, 'life1, 'async_trait>(
&'life0 self,
scenario: Option<String>,
scenario_file: Option<String>,
scenario_name: Option<String>,
strategy: &'life1 str,
strategy_opts: Option<Value>,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn eval_history<'life0, 'life1, 'async_trait>(
&'life0 self,
strategy: Option<&'life1 str>,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn eval_detail<'life0, 'life1, 'async_trait>(
&'life0 self,
eval_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn eval_compare<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
eval_id_a: &'life1 str,
eval_id_b: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait;
fn scenario_list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn scenario_show<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn scenario_install<'life0, 'async_trait>(
&'life0 self,
url: String,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn pkg_list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn pkg_install<'life0, 'async_trait>(
&'life0 self,
url: String,
name: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn pkg_remove<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn add_note<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
content: &'life2 str,
title: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait;
fn log_view<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: Option<&'life1 str>,
limit: Option<usize>,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn stats<'life0, 'life1, 'async_trait>(
&'life0 self,
strategy_filter: Option<&'life1 str>,
days: Option<u64>,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn info<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
}Expand description
Transport-independent API for the algocline engine.
Abstracts the full public surface of AppService so that callers
(MCP handler, future daemon client, etc.) can operate through
Arc<dyn EngineApi> without depending on the concrete implementation.
All methods are async to support both local (in-process) and remote (socket/HTTP) implementations uniformly.
Required Methods§
Sourcefn run<'life0, 'async_trait>(
&'life0 self,
code: Option<String>,
code_file: Option<String>,
ctx: Option<Value>,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn run<'life0, 'async_trait>(
&'life0 self,
code: Option<String>,
code_file: Option<String>,
ctx: Option<Value>,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Execute Lua code with optional JSON context.
Sourcefn advice<'life0, 'life1, 'async_trait>(
&'life0 self,
strategy: &'life1 str,
task: String,
opts: Option<Value>,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn advice<'life0, 'life1, 'async_trait>(
&'life0 self,
strategy: &'life1 str,
task: String,
opts: Option<Value>,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Apply an installed strategy package to a task.
Sourcefn continue_single<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
response: String,
query_id: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn continue_single<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
response: String,
query_id: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Continue a paused execution — single response (with optional query_id).
Sourcefn continue_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
responses: Vec<QueryResponse>,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn continue_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
responses: Vec<QueryResponse>,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Continue a paused execution — batch feed.
Sourcefn status<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn status<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Query active session status.
Sourcefn eval<'life0, 'life1, 'async_trait>(
&'life0 self,
scenario: Option<String>,
scenario_file: Option<String>,
scenario_name: Option<String>,
strategy: &'life1 str,
strategy_opts: Option<Value>,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn eval<'life0, 'life1, 'async_trait>(
&'life0 self,
scenario: Option<String>,
scenario_file: Option<String>,
scenario_name: Option<String>,
strategy: &'life1 str,
strategy_opts: Option<Value>,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Run an evalframe evaluation suite.
Sourcefn eval_history<'life0, 'life1, 'async_trait>(
&'life0 self,
strategy: Option<&'life1 str>,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn eval_history<'life0, 'life1, 'async_trait>(
&'life0 self,
strategy: Option<&'life1 str>,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
List eval history, optionally filtered by strategy.
Sourcefn eval_detail<'life0, 'life1, 'async_trait>(
&'life0 self,
eval_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn eval_detail<'life0, 'life1, 'async_trait>(
&'life0 self,
eval_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
View a specific eval result by ID.
Sourcefn eval_compare<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
eval_id_a: &'life1 str,
eval_id_b: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn eval_compare<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
eval_id_a: &'life1 str,
eval_id_b: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Compare two eval results with statistical significance testing.
Sourcefn scenario_list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn scenario_list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
List available scenarios.
Sourcefn scenario_show<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn scenario_show<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Show the content of a named scenario.
Sourcefn scenario_install<'life0, 'async_trait>(
&'life0 self,
url: String,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn scenario_install<'life0, 'async_trait>(
&'life0 self,
url: String,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Install scenarios from a Git URL or local path.
Sourcefn pkg_list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn pkg_list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
List installed packages with metadata.
Sourcefn pkg_install<'life0, 'async_trait>(
&'life0 self,
url: String,
name: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn pkg_install<'life0, 'async_trait>(
&'life0 self,
url: String,
name: Option<String>,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Install a package from a Git URL or local path.
Sourcefn pkg_remove<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn pkg_remove<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Remove an installed package.
Sourcefn add_note<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
content: &'life2 str,
title: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn add_note<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
content: &'life2 str,
title: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Append a note to a session’s log file.
Sourcefn log_view<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: Option<&'life1 str>,
limit: Option<usize>,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn log_view<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: Option<&'life1 str>,
limit: Option<usize>,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
View session logs.
Sourcefn stats<'life0, 'life1, 'async_trait>(
&'life0 self,
strategy_filter: Option<&'life1 str>,
days: Option<u64>,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn stats<'life0, 'life1, 'async_trait>(
&'life0 self,
strategy_filter: Option<&'life1 str>,
days: Option<u64>,
) -> Pin<Box<dyn Future<Output = Result<String, String>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Aggregate stats across all logged sessions.
Implementors§
impl EngineApi for AppService
Delegates each EngineApi method to the corresponding AppService
inherent method via fully-qualified syntax (AppService::method(self, …)).
This avoids ambiguity between the trait method and the inherent method of the same name, preventing accidental infinite recursion if the inherent method is ever removed or renamed.