pub enum Permission {
Show 15 variants
ToolsIntercept,
ToolsTransformOutput,
ToolsOverride,
LlmContent,
SessionLifecycle,
SessionDrive,
ToolsRegister,
ProvidersRegister,
ContextProvidersRegister,
MemoryRead,
MemoryWrite,
ConfigWrite,
ConfigSubscribe,
AudioInput,
AudioOutput,
}Expand description
Permission flags an extension can request.
Variants§
ToolsIntercept
Can subscribe to before_tool_call / after_tool_call hooks.
ToolsTransformOutput
Can rewrite tool OUTPUT via after_tool_call → HookResult::Replace.
Distinct from (and additional to) tools.intercept: observing a tool’s
output is a weaker capability than silently rewriting what the model
believes the tool returned, so it requires explicit, separate consent.
ToolsOverride
Can override built-in tools.
LlmContent
Can read LLM input/output (before_message hook).
SessionLifecycle
Can subscribe to session lifecycle hooks.
SessionDrive
May propose foreground turns after explicit local user authorization. Declaration alone never arms a session driver or grants a hook.
ToolsRegister
Can register new tools.
ProvidersRegister
Can register new providers.
ContextProvidersRegister
Can declare dormant memory/context contribution providers
(continuous-memory spec §7.1). Distinct from ProvidersRegister
(model/LLM providers): this gates only passive context-provider
capability metadata; activation additionally requires an exact
memory-context lease (task A6).
MemoryRead
Can read from the local memory store via memory.query.
MemoryWrite
Can append to the local memory store via memory.append.
ConfigWrite
Can read/write its own plugin-namespaced config via config.get/config.set.
ConfigSubscribe
Can subscribe to hot-reload notifications for its own plugin config.
AudioInput
Can capture audio from input devices.
AudioOutput
Can produce audio through output devices.
Implementations§
Source§impl Permission
impl Permission
Sourcepub const ALL: &'static [Permission]
pub const ALL: &'static [Permission]
Every permission variant, in declaration order.
Exhaustiveness is enforced by all_covers_every_variant below, which
pattern-matches every variant explicitly: adding one to the enum
breaks that test’s match at compile time, and its length assertion
then forces this list to be updated too.
This list is what docs/extensions/contract.json is drift-checked
against (see crates/agent-tui/tests/extensions_contract.rs). Before
that check existed the contract had fallen eight permissions behind
the engine while STABILITY.md advertised it as CI-verified.
Sourcepub fn parse(s: &str) -> Option<Permission>
pub fn parse(s: &str) -> Option<Permission>
Parse from wire-format string.
Sourcepub fn is_reserved(&self) -> bool
pub fn is_reserved(&self) -> bool
Whether this permission is reserved for a future implementation.
Trait Implementations§
Source§impl Clone for Permission
impl Clone for Permission
Source§fn clone(&self) -> Permission
fn clone(&self) -> Permission
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for Permission
Source§impl Debug for Permission
impl Debug for Permission
Source§impl<'de> Deserialize<'de> for Permission
impl<'de> Deserialize<'de> for Permission
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Permission, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Permission, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for Permission
Source§impl Hash for Permission
impl Hash for Permission
Source§impl PartialEq for Permission
impl PartialEq for Permission
Source§impl Serialize for Permission
impl Serialize for Permission
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for Permission
Auto Trait Implementations§
impl Freeze for Permission
impl RefUnwindSafe for Permission
impl Send for Permission
impl Sync for Permission
impl Unpin for Permission
impl UnsafeUnpin for Permission
impl UnwindSafe for Permission
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
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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<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