pub struct CapabilitySpec {Show 13 fields
pub capability_id: CapabilityId,
pub kind: CapabilityKind,
pub source: CapabilitySource,
pub namespace: CapabilityNamespace,
pub version: CapabilityVersion,
pub visibility: CapabilityVisibility,
pub projection: ProjectionMode,
pub executor_ref: Option<ExecutorRef>,
pub policy_ref: PolicyRef,
pub sidecar_refs: Vec<PackageSidecarRef>,
pub isolation_ref: Option<PackageSidecarRef>,
pub privacy: PrivacyClass,
pub readiness: CapabilityReadiness,
}Expand description
Describes the capability spec portion of a runtime package snapshot. Use it when package authors or tests need explicit package configuration; validation and activation happen in package/runtime coordinators.
Fields§
§capability_id: CapabilityIdStable capability identifier used for package projection and executable routing.
kind: CapabilityKindKind/category for this record, capability, event, or detected resource.
source: CapabilitySourceSource label or ref for this item; it is metadata and does not fetch content by itself.
namespace: CapabilityNamespaceNamespace that groups this capability or identifier. Use it to avoid collisions between packages, hosts, and extensions.
version: CapabilityVersionVersion string for this capability, package, or protocol surface. Use it for compatibility checks during package or adapter resolution.
visibility: CapabilityVisibilityVisibility class for the capability or result. Discovery and projection use it to decide what callers or models can see.
projection: ProjectionModeProjection controls for exposing data to a provider or subscriber. Use it to keep provider-visible data separate from private SDK state.
executor_ref: Option<ExecutorRef>Typed executor ref reference. Resolving or executing it is a separate policy-gated step.
policy_ref: PolicyRefPolicy reference that must be resolved by the host or runtime before execution.
sidecar_refs: Vec<PackageSidecarRef>References to typed package sidecars needed by this capability.
isolation_ref: Option<PackageSidecarRef>Typed isolation ref reference. Resolving or executing it is a separate policy-gated step.
privacy: PrivacyClassPrivacy class used for projection, telemetry, and raw-content access decisions.
readiness: CapabilityReadinessReadiness state for a capability or package feature. Launch and package validation use it to distinguish active, reserved, and blocked surfaces.
Implementations§
Source§impl CapabilitySpec
impl CapabilitySpec
Sourcepub fn fake_tool(
capability_id: impl Into<CapabilityId>,
name: impl Into<String>,
schema_ref: PackageSidecarRef,
executor_ref: ExecutorRef,
policy_ref: PolicyRef,
source: SourceRef,
) -> Self
pub fn fake_tool( capability_id: impl Into<CapabilityId>, name: impl Into<String>, schema_ref: PackageSidecarRef, executor_ref: ExecutorRef, policy_ref: PolicyRef, source: SourceRef, ) -> Self
Returns fake tool for the current value. This is a read-only or data-construction helper unless the method body explicitly calls a port or store.
Sourcepub fn reserved_inactive(
capability_id: impl Into<CapabilityId>,
kind: CapabilityKind,
policy_ref: PolicyRef,
source: SourceRef,
) -> Self
pub fn reserved_inactive( capability_id: impl Into<CapabilityId>, kind: CapabilityKind, policy_ref: PolicyRef, source: SourceRef, ) -> Self
Builds the reserved inactive value with the documented defaults. This is data-only and does not perform I/O, call host ports, append journals, publish events, or start processes.
Sourcepub fn provider_visible(&self) -> bool
pub fn provider_visible(&self) -> bool
Computes or returns provider visible for the package::capability contract without external I/O or side effects.
Sourcepub fn executable(&self) -> bool
pub fn executable(&self) -> bool
Returns whether executable applies for this state. This is data-only and does not perform I/O, call host ports, append journals, publish events, or start processes.
Sourcepub fn project_for_provider(
&self,
) -> Result<Option<ProviderCapabilityProjection>, AgentError>
pub fn project_for_provider( &self, ) -> Result<Option<ProviderCapabilityProjection>, AgentError>
Computes or returns project for provider for the package::capability contract without external I/O or side effects.
Sourcepub fn executable_route(
&self,
) -> Result<Option<ExecutableCapabilityRoute>, AgentError>
pub fn executable_route( &self, ) -> Result<Option<ExecutableCapabilityRoute>, AgentError>
Computes or returns executable route for the package::capability contract without external I/O or side effects.
Sourcepub fn validate(&self) -> Result<(), AgentError>
pub fn validate(&self) -> Result<(), AgentError>
Validates the package::capability invariants and returns a typed error on failure. Validation is pure and does not perform I/O, dispatch, journal appends, or adapter calls.
Trait Implementations§
Source§impl Clone for CapabilitySpec
impl Clone for CapabilitySpec
Source§fn clone(&self) -> CapabilitySpec
fn clone(&self) -> CapabilitySpec
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 CapabilitySpec
impl Debug for CapabilitySpec
Source§impl<'de> Deserialize<'de> for CapabilitySpec
impl<'de> Deserialize<'de> for CapabilitySpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for CapabilitySpec
impl PartialEq for CapabilitySpec
Source§fn eq(&self, other: &CapabilitySpec) -> bool
fn eq(&self, other: &CapabilitySpec) -> bool
self and other values to be equal, and is used by ==.