pub struct AddonsConfig {
pub policy: String,
pub allowlist: Vec<String>,
pub require_signature: bool,
pub sandbox: String,
pub block_risky: bool,
pub enforce_capabilities: bool,
pub metering: bool,
}Expand description
[addons] configuration. Global-only; default is fully permissive so the
out-of-the-box experience is unchanged.
Fields§
§policy: StringInstall policy: open | verified_only | allowlist | locked.
allowlist: Vec<String>Slugs permitted when policy = allowlist.
require_signature: boolHonour a user-override registry (<data_dir>/addon_registry.json) only
when it carries a valid signature by a trusted org key.
sandbox: StringSandbox spawned stdio servers without a declared [capabilities] block:
off | auto | strict (the legacy global mode).
block_risky: boolRefuse to install an addon that has a high-risk (Danger) capability.
enforce_capabilities: boolFail closed when an addon declares restricted [capabilities] but no OS
sandbox launcher (sandbox-exec / bwrap) is available to enforce them. Off
by default → best-effort (warn + run) so a missing launcher never blocks
a spawn; orgs that require real enforcement set this to true.
metering: boolRecord per-addon / per-tool gateway usage counters to
<data_dir>/addons/usage.json (local-only; basis for analytics + billing,
P5). On by default; set false to disable all usage accounting.
Implementations§
Source§impl AddonsConfig
impl AddonsConfig
Sourcepub fn policy(&self) -> AddonPolicy
pub fn policy(&self) -> AddonPolicy
The parsed install policy.
Sourcepub fn sandbox_mode(&self) -> SandboxMode
pub fn sandbox_mode(&self) -> SandboxMode
The parsed sandbox mode.
Trait Implementations§
Source§impl Clone for AddonsConfig
impl Clone for AddonsConfig
Source§fn clone(&self) -> AddonsConfig
fn clone(&self) -> AddonsConfig
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 AddonsConfig
impl Debug for AddonsConfig
Source§impl Default for AddonsConfig
impl Default for AddonsConfig
Source§impl<'de> Deserialize<'de> for AddonsConfigwhere
AddonsConfig: Default,
impl<'de> Deserialize<'de> for AddonsConfigwhere
AddonsConfig: 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 AddonsConfig
Source§impl PartialEq for AddonsConfig
impl PartialEq for AddonsConfig
Source§fn eq(&self, other: &AddonsConfig) -> bool
fn eq(&self, other: &AddonsConfig) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for AddonsConfig
impl Serialize for AddonsConfig
impl StructuralPartialEq for AddonsConfig
Auto Trait Implementations§
impl Freeze for AddonsConfig
impl RefUnwindSafe for AddonsConfig
impl Send for AddonsConfig
impl Sync for AddonsConfig
impl Unpin for AddonsConfig
impl UnsafeUnpin for AddonsConfig
impl UnwindSafe for AddonsConfig
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.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