pub struct AgentDefinition {
pub description: String,
pub id: String,
pub name: String,
pub prompt: String,
pub read_only: bool,
}Expand description
One enabled agent loaded from a workspace agent definition.
Fields§
§description: StringShort explanation shown beside the agent name.
id: StringStable identifier used to resolve the definition.
name: StringHuman-readable picker label.
prompt: StringBehavioral preamble injected into agent turns.
read_only: boolAdditional access restriction, never a grant of session permissions.
Implementations§
Source§impl AgentDefinition
impl AgentDefinition
Sourcepub fn bundled(id: &str) -> Option<Self>
pub fn bundled(id: &str) -> Option<Self>
Resolves a bundled definition using the same parser as repository files.
Sourcepub fn permission_mode(&self, session_mode: PermissionMode) -> PermissionMode
pub fn permission_mode(&self, session_mode: PermissionMode) -> PermissionMode
Intersects the definition’s restriction with the host permission mode.
Sourcepub fn summary(&self) -> AgentDefinitionSummary
pub fn summary(&self) -> AgentDefinitionSummary
Returns catalog metadata without retaining the prompt body.
Trait Implementations§
Source§impl Clone for AgentDefinition
impl Clone for AgentDefinition
Source§impl Debug for AgentDefinition
impl Debug for AgentDefinition
Source§impl<'de> Deserialize<'de> for AgentDefinition
impl<'de> Deserialize<'de> for AgentDefinition
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for AgentDefinition
Source§impl PartialEq for AgentDefinition
impl PartialEq for AgentDefinition
Source§impl Serialize for AgentDefinition
impl Serialize for AgentDefinition
impl StructuralPartialEq for AgentDefinition
Auto Trait Implementations§
impl Forget for AgentDefinition
impl Freeze for AgentDefinition
impl Move for AgentDefinition
impl RefUnwindSafe for AgentDefinition
impl Send for AgentDefinition
impl Sync for AgentDefinition
impl Unpin for AgentDefinition
impl UnsafeUnpin for AgentDefinition
impl UnwindSafe for AgentDefinition
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
Mutably borrows from an owned value. Read more
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§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
Compare self to
key and return true if they are equal.