pub struct ActionSource { /* private fields */ }Expand description
Exact executable source identity captured by a host-issued action handle. None of these values are read from a model proposal or inferred from a rendered Surface.
Implementations§
Source§impl ActionSource
impl ActionSource
pub fn new( provider_id: impl Into<String>, server_id: impl Into<String>, tool_name: impl Into<String>, remote_tool_name: impl Into<String>, schema_digest: impl Into<String>, policy_version: u64, policy_digest: impl Into<String>, requires_confirmation: bool, ) -> Result<Self, CompositionError>
Sourcepub fn mcp(
provider_id: impl Into<String>,
server_id: impl Into<String>,
tool_name: impl Into<String>,
remote_tool_name: impl Into<String>,
schema_digest: impl Into<String>,
policy_version: u64,
policy_digest: impl Into<String>,
requires_confirmation: bool,
) -> Result<Self, CompositionError>
pub fn mcp( provider_id: impl Into<String>, server_id: impl Into<String>, tool_name: impl Into<String>, remote_tool_name: impl Into<String>, schema_digest: impl Into<String>, policy_version: u64, policy_digest: impl Into<String>, requires_confirmation: bool, ) -> Result<Self, CompositionError>
Explicit MCP source constructor for callers that need to make the authority class unambiguous at construction time.
Sourcepub fn host_local(action: &Action) -> Result<Self, CompositionError>
pub fn host_local(action: &Action) -> Result<Self, CompositionError>
Construct an explicit host-local source. Host-local actions retain a complete source identity for stale checks, but never consult or bypass the MCP registry during admission.
Sourcepub fn resolve_live(
&self,
action: &Action,
mcp: Option<&LiveToolIdentity>,
host_local: Option<&Self>,
) -> Result<Self, CompositionError>
pub fn resolve_live( &self, action: &Action, mcp: Option<&LiveToolIdentity>, host_local: Option<&Self>, ) -> Result<Self, CompositionError>
Resolve a discovery-only Auto source against live, host-owned
candidates. Provider names and action kinds are never used as a
transport discriminator. Exactly one explicit source must be present
before a trusted handle can be created.
Sourcepub fn resolve_auto_against_live(
&self,
action: &Action,
mcp: Option<&LiveToolIdentity>,
host_local: Option<&Self>,
) -> Result<Self, CompositionError>
pub fn resolve_auto_against_live( &self, action: &Action, mcp: Option<&LiveToolIdentity>, host_local: Option<&Self>, ) -> Result<Self, CompositionError>
Alias with an explicit name for callers that are resolving a legacy discovery DTO immediately before trust construction.
pub fn validate_for_action( &self, action: &Action, ) -> Result<(), CompositionError>
pub fn source_type(&self) -> ActionSourceType
pub fn is_mcp_backed(&self) -> bool
pub fn transport(&self) -> Result<ActionTransport, CompositionError>
pub fn provider_id(&self) -> &str
pub fn server_id(&self) -> &str
pub fn tool_name(&self) -> &str
pub fn remote_tool_name(&self) -> &str
pub fn schema_digest(&self) -> &str
pub fn policy_version(&self) -> u64
pub fn policy_digest(&self) -> &str
pub fn requires_confirmation(&self) -> bool
Trait Implementations§
Source§impl Clone for ActionSource
impl Clone for ActionSource
Source§fn clone(&self) -> ActionSource
fn clone(&self) -> ActionSource
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ActionSource
impl Debug for ActionSource
impl Eq for ActionSource
Source§impl PartialEq for ActionSource
impl PartialEq for ActionSource
impl StructuralPartialEq for ActionSource
Auto Trait Implementations§
impl Freeze for ActionSource
impl RefUnwindSafe for ActionSource
impl Send for ActionSource
impl Sync for ActionSource
impl Unpin for ActionSource
impl UnsafeUnpin for ActionSource
impl UnwindSafe for ActionSource
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.