pub struct AddonInstall {
pub manager: String,
pub package: String,
pub version: String,
pub bin: String,
pub verify: Vec<String>,
}Expand description
The [install] block — how addon add provisions the addon’s upstream
package before wiring its [mcp] server. Absent (all-empty) ⇒ the addon is
either an ephemeral runner (npx/uvx, installs lazily on first spawn) or
already on the host; no bootstrap runs.
Fields§
§manager: StringPackage manager: uv | pip | cargo | npm | brew | dotnet.
package: StringPackage/formula to install (may carry extras, e.g. headroom-ai[all]).
version: StringExact pinned version (mandatory; floating/latest is rejected).
bin: StringExecutable the install provides — the [mcp].command. Used for the
idempotency check (skip if already on PATH). Defaults to the package name.
verify: Vec<String>Optional explicit “is it installed?” probe (argv; exit 0 ⇒ installed). Overrides the default PATH check; never run through a shell.
Implementations§
Source§impl AddonInstall
impl AddonInstall
Sourcepub fn is_declared(&self) -> bool
pub fn is_declared(&self) -> bool
true when the block actually requests a bootstrap install.
Sourcepub fn is_absent(&self) -> bool
pub fn is_absent(&self) -> bool
Inverse of Self::is_declared — for #[serde(skip_serializing_if)].
Sourcepub fn bin(&self) -> &str
pub fn bin(&self) -> &str
The executable name to probe on PATH — explicit bin, else the package
base name (extras + version stripped).
Sourcepub fn validate(&self) -> Result<(), String>
pub fn validate(&self) -> Result<(), String>
Validate the block: known manager, non-empty package, an exact pin, and no shell metacharacters anywhere (defence-in-depth). A no-op when absent.
Sourcepub fn to_receipt(&self) -> InstallReceipt
pub fn to_receipt(&self) -> InstallReceipt
A receipt recording exactly what was installed, for a clean uninstall.
Sourcepub fn install_argv(&self) -> Vec<String>
pub fn install_argv(&self) -> Vec<String>
The exact install argv (for the disclosure preview). Empty if unsupported.
Sourcepub fn uninstall_argv(&self) -> Vec<String>
pub fn uninstall_argv(&self) -> Vec<String>
The exact uninstall argv (for the disclosure preview). Empty if unsupported.
Trait Implementations§
Source§impl Clone for AddonInstall
impl Clone for AddonInstall
Source§fn clone(&self) -> AddonInstall
fn clone(&self) -> AddonInstall
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 AddonInstall
impl Debug for AddonInstall
Source§impl Default for AddonInstall
impl Default for AddonInstall
Source§fn default() -> AddonInstall
fn default() -> AddonInstall
Source§impl<'de> Deserialize<'de> for AddonInstallwhere
AddonInstall: Default,
impl<'de> Deserialize<'de> for AddonInstallwhere
AddonInstall: Default,
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>,
impl Eq for AddonInstall
Source§impl PartialEq for AddonInstall
impl PartialEq for AddonInstall
Source§impl Serialize for AddonInstall
impl Serialize for AddonInstall
impl StructuralPartialEq for AddonInstall
Auto Trait Implementations§
impl Freeze for AddonInstall
impl RefUnwindSafe for AddonInstall
impl Send for AddonInstall
impl Sync for AddonInstall
impl Unpin for AddonInstall
impl UnsafeUnpin for AddonInstall
impl UnwindSafe for AddonInstall
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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