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§
Sourcefn runtime_descriptors(&self) -> Vec<Value>
fn runtime_descriptors(&self) -> Vec<Value>
The discovered runtime descriptors, already in their wire shape.
Sourcefn compatible_runtime_id(
&self,
kind: RuntimeKind,
version_requirement: &str,
) -> Option<String>
fn compatible_runtime_id( &self, kind: RuntimeKind, version_requirement: &str, ) -> Option<String>
The compatible runtime id for one requirement, when one is installed.
Sourcefn resolve_runtime(
&self,
runtime_id: &str,
kind: RuntimeKind,
version_requirement: &str,
) -> Result<Arc<dyn ResolvedRuntime>, Error>
fn resolve_runtime( &self, runtime_id: &str, kind: RuntimeKind, version_requirement: &str, ) -> Result<Arc<dyn ResolvedRuntime>, Error>
Resolve one exact runtime for a requirement.
Sourcefn actor_fingerprint(
&self,
value_id: &str,
model: &str,
reasoning_effort: &str,
) -> Result<String, Error>
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.
Sourcefn actor_capabilities(&self, value_id: &str) -> Result<Value, Error>
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.
Sourcefn admit_strategy_cwd(&self, cwd: &str) -> Result<(), Error>
fn admit_strategy_cwd(&self, cwd: &str) -> Result<(), Error>
Refuse a workspace outside the strategy sandbox policy.
Sourcefn 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_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.
Sourcefn execute_actor(
&self,
command: &RunCommand,
authorization_digest: &str,
binding: &BindingValue,
permit: &mut StrategyEffectPermit,
cwd: Option<&str>,
) -> Result<Value, Error>
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.
Sourcefn predecessor_locator(&self, facts: &Value) -> Value
fn predecessor_locator(&self, facts: &Value) -> Value
The predecessor locator a fallback carries for the failed command.
Sourcefn dispatch_lane_operation(
&self,
operation: &str,
params: &Value,
) -> Result<Value, Error>
fn dispatch_lane_operation( &self, operation: &str, params: &Value, ) -> Result<Value, Error>
One operation through the host’s own dispatch lane.
Sourcefn new_correlation_id(&self) -> String
fn new_correlation_id(&self) -> String
A fresh correlation id for one stop request.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".