pub struct CommandAgentDefineData {Show 15 fields
pub name: String,
pub provider: String,
pub model: String,
pub icon: String,
pub description: String,
pub working_directory: String,
pub shell: String,
pub environment: String,
pub system_prompt: Option<String>,
pub env: Option<HashMap<String, String>>,
pub if_exists: Option<String>,
pub create_instance_stub: Option<bool>,
pub agent_type: String,
pub container_image: String,
pub container_volumes: String,
}Expand description
Request for agent.define — create or upsert an agent definition.
if_exists controls behaviour when a slug-matching definition exists:
"skip" (default) — return existing id unchanged
"update" — overwrite all provided non-empty fields
"error" — fail with an error message
Fields§
§name: String§provider: String§model: StringAlternative to provider — inferred from model prefix.
If both are set, provider wins.
icon: String§description: String§working_directory: String§shell: String§environment: String§system_prompt: Option<String>System/instruction text written to the agent’s CLAUDE.md on spawn.
env: Option<HashMap<String, String>>Extra env vars injected at agent spawn, stored as KEY=VALUE lines.
if_exists: Option<String>§create_instance_stub: Option<bool>§agent_type: String“host” or “container”. Defaults to “host” when absent — the safe default that works without Docker. Callers must explicitly pass “container” so a missing field never silently starts the wrong runtime.
container_image: StringDocker image for container-type agents. Empty string for host agents.
container_volumes: StringJSON array of volume mount specs. Empty array ("[]") for host agents.
Trait Implementations§
Source§impl Clone for CommandAgentDefineData
impl Clone for CommandAgentDefineData
Source§fn clone(&self) -> CommandAgentDefineData
fn clone(&self) -> CommandAgentDefineData
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CommandAgentDefineData
impl Debug for CommandAgentDefineData
Source§impl<'de> Deserialize<'de> for CommandAgentDefineData
impl<'de> Deserialize<'de> for CommandAgentDefineData
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>,
Auto Trait Implementations§
impl Freeze for CommandAgentDefineData
impl RefUnwindSafe for CommandAgentDefineData
impl Send for CommandAgentDefineData
impl Sync for CommandAgentDefineData
impl Unpin for CommandAgentDefineData
impl UnwindSafe for CommandAgentDefineData
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§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.§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.§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.§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.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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