pub struct AppService { /* private fields */ }Implementations§
Source§impl AppService
impl AppService
pub fn new(executor: Arc<Executor>, log_config: TranscriptConfig) -> Self
Sourcepub async fn run(
&self,
code: Option<String>,
code_file: Option<String>,
ctx: Option<Value>,
) -> Result<String, String>
pub async fn run( &self, code: Option<String>, code_file: Option<String>, ctx: Option<Value>, ) -> Result<String, String>
Execute Lua code with optional JSON context.
Sourcepub async fn advice(
&self,
strategy: &str,
task: String,
opts: Option<Value>,
) -> Result<String, String>
pub async fn advice( &self, strategy: &str, task: String, opts: Option<Value>, ) -> Result<String, String>
Apply a built-in strategy to a task.
If the requested package is not installed, automatically installs the bundled package collection from GitHub before executing.
Sourcepub async fn eval(
&self,
scenario: Option<String>,
scenario_file: Option<String>,
strategy: &str,
strategy_opts: Option<Value>,
) -> Result<String, String>
pub async fn eval( &self, scenario: Option<String>, scenario_file: Option<String>, strategy: &str, strategy_opts: Option<Value>, ) -> Result<String, String>
Run an evalframe evaluation suite.
Accepts a scenario (bindings + cases) and a strategy name. Automatically wires the strategy as the provider and executes the evalframe suite, returning the report (summary, scores, failures).
Injects a std global (mlua-batteries compatible shim) so evalframe’s
std.lua can resolve json/fs/time from algocline’s built-in primitives.
§Security: strategy is not sanitized
strategy is interpolated into a Lua string literal without escaping.
This is intentional — same rationale as [make_require_code]:
algocline runs Lua in the caller’s own process with full ambient
authority, so Lua injection does not cross a trust boundary.
Sourcepub fn eval_history(
&self,
strategy: Option<&str>,
limit: usize,
) -> Result<String, String>
pub fn eval_history( &self, strategy: Option<&str>, limit: usize, ) -> Result<String, String>
List eval history, optionally filtered by strategy.
Sourcepub fn eval_detail(&self, eval_id: &str) -> Result<String, String>
pub fn eval_detail(&self, eval_id: &str) -> Result<String, String>
View a specific eval result by ID.
Sourcepub async fn eval_compare(
&self,
eval_id_a: &str,
eval_id_b: &str,
) -> Result<String, String>
pub async fn eval_compare( &self, eval_id_a: &str, eval_id_b: &str, ) -> Result<String, String>
Compare two eval results with statistical significance testing.
Delegates to evalframe’s stats.welch_t (single source of truth for
t-distribution table and test logic). Reads persisted aggregated.scores
from each eval result — no re-computation of descriptive statistics.
The comparison result is persisted to ~/.algocline/evals/ so repeated
lookups of the same pair are file reads only.
Sourcepub async fn continue_batch(
&self,
session_id: &str,
responses: Vec<QueryResponse>,
) -> Result<String, String>
pub async fn continue_batch( &self, session_id: &str, responses: Vec<QueryResponse>, ) -> Result<String, String>
Continue a paused execution — batch feed.
Sourcepub async fn continue_single(
&self,
session_id: &str,
response: String,
query_id: Option<&str>,
) -> Result<String, String>
pub async fn continue_single( &self, session_id: &str, response: String, query_id: Option<&str>, ) -> Result<String, String>
Continue a paused execution — single response (with optional query_id).
Sourcepub async fn pkg_install(
&self,
url: String,
name: Option<String>,
) -> Result<String, String>
pub async fn pkg_install( &self, url: String, name: Option<String>, ) -> Result<String, String>
Install a package from a Git URL or local path.
Sourcepub async fn pkg_remove(&self, name: &str) -> Result<String, String>
pub async fn pkg_remove(&self, name: &str) -> Result<String, String>
Remove an installed package.
Trait Implementations§
Source§impl Clone for AppService
impl Clone for AppService
Source§fn clone(&self) -> AppService
fn clone(&self) -> AppService
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for AppService
impl !RefUnwindSafe for AppService
impl Send for AppService
impl Sync for AppService
impl Unpin for AppService
impl UnsafeUnpin for AppService
impl !UnwindSafe for AppService
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more