Skip to main content

EffectPort

Trait EffectPort 

Source
pub trait EffectPort: Send + Sync {
    // Required methods
    fn runtime_descriptors(&self) -> Vec<Value>;
    fn compatible_runtime_id(
        &self,
        kind: RuntimeKind,
        version_requirement: &str,
    ) -> Option<String>;
    fn resolve_runtime(
        &self,
        runtime_id: &str,
        kind: RuntimeKind,
        version_requirement: &str,
    ) -> Result<Arc<dyn ResolvedRuntime>, Error>;
    fn actor_fingerprint(
        &self,
        value_id: &str,
        model: &str,
        reasoning_effort: &str,
    ) -> Result<String, Error>;
    fn actor_capabilities(&self, value_id: &str) -> Result<Value, Error>;
    fn admit_strategy_cwd(&self, cwd: &str) -> Result<(), Error>;
    fn execute_script(
        &self,
        command: &RunCommand,
        authorization_digest: &str,
        runtime: &Arc<dyn ResolvedRuntime>,
        revision_content: &Path,
        runtime_state_root: &Path,
        permit: &mut StrategyEffectPermit,
    ) -> Result<Value, Error>;
    fn execute_actor(
        &self,
        command: &RunCommand,
        authorization_digest: &str,
        binding: &BindingValue,
        permit: &mut StrategyEffectPermit,
        cwd: Option<&str>,
    ) -> Result<Value, Error>;
    fn predecessor_locator(&self, facts: &Value) -> Value;
    fn dispatch_lane_operation(
        &self,
        operation: &str,
        params: &Value,
    ) -> Result<Value, Error>;
    fn new_correlation_id(&self) -> String;
    fn record_run_stop(
        &self,
        portable_root: &Path,
        correlation_id: &str,
        confirmed: bool,
    ) -> Result<(), Error>;
}
Expand description

The host’s effect seam: runtime resolution, sandbox admission, actor and script execution, lane dispatch and the owned-run stop record.

Required Methods§

Source

fn runtime_descriptors(&self) -> Vec<Value>

The discovered runtime descriptors, already in their wire shape.

Source

fn compatible_runtime_id( &self, kind: RuntimeKind, version_requirement: &str, ) -> Option<String>

The compatible runtime id for one requirement, when one is installed.

Source

fn resolve_runtime( &self, runtime_id: &str, kind: RuntimeKind, version_requirement: &str, ) -> Result<Arc<dyn ResolvedRuntime>, Error>

Resolve one exact runtime for a requirement.

Source

fn actor_fingerprint( &self, value_id: &str, model: &str, reasoning_effort: &str, ) -> Result<String, Error>

The stable fingerprint of one actor identity under a model and effort.

Source

fn actor_capabilities(&self, value_id: &str) -> Result<Value, Error>

The capability probe answer for one actor identity, in the probe owner’s own wire shape.

Capability discovery is a host concern with a typed seam, so a binding check does not have to borrow the host lane’s generic operation dispatcher to ask one question. A caller reads the answer as the probe owner published it.

Source

fn admit_strategy_cwd(&self, cwd: &str) -> Result<(), Error>

Refuse a workspace outside the strategy sandbox policy.

Source

fn execute_script( &self, command: &RunCommand, authorization_digest: &str, runtime: &Arc<dyn ResolvedRuntime>, revision_content: &Path, runtime_state_root: &Path, permit: &mut StrategyEffectPermit, ) -> Result<Value, Error>

Execute one script command under a consumed permit.

Source

fn execute_actor( &self, command: &RunCommand, authorization_digest: &str, binding: &BindingValue, permit: &mut StrategyEffectPermit, cwd: Option<&str>, ) -> Result<Value, Error>

Execute one actor command under a consumed permit.

Source

fn predecessor_locator(&self, facts: &Value) -> Value

The predecessor locator a fallback carries for the failed command.

Source

fn dispatch_lane_operation( &self, operation: &str, params: &Value, ) -> Result<Value, Error>

One operation through the host’s own dispatch lane.

Source

fn new_correlation_id(&self) -> String

A fresh correlation id for one stop request.

Source

fn record_run_stop( &self, portable_root: &Path, correlation_id: &str, confirmed: bool, ) -> Result<(), Error>

Record one owned-run stop outcome in the durable local record.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§