pub struct AgentArguments {
pub agent_instance_hierarchy: Option<String>,
pub agent_id: Option<String>,
pub agent_full_id: Option<String>,
pub agent_remote: Option<String>,
pub response_id: Option<String>,
pub response_ids: Option<String>,
pub mcp_session_id: Option<String>,
}Expand description
Agent identity + response routing args carried per call.
When passed as Some(&AgentArguments) to a [CommandExecutor],
subprocess-spawning executors (e.g. [binary::BinaryExecutor])
apply ALL six fields to the spawned child’s env atomically —
Some(v) → set, None → env_remove so the parent’s value for
that var can’t leak through. None for the whole bag means
“inherit parent env unmodified”. In-process executors (e.g.
[plugin::PluginExecutor]) ignore the bag.
Field ↔ env-var mapping (same as EnvConfigBuilder in
objectiveai-cli/src/run.rs):
agent_instance_hierarchy↔OBJECTIVEAI_AGENT_INSTANCE_HIERARCHYagent_id↔OBJECTIVEAI_AGENT_IDagent_full_id↔OBJECTIVEAI_AGENT_FULL_IDagent_remote↔OBJECTIVEAI_AGENT_REMOTEresponse_id↔OBJECTIVEAI_RESPONSE_IDresponse_ids↔OBJECTIVEAI_RESPONSE_IDSmcp_session_id↔MCP_SESSION_ID(the MCP transport session id minted by the MCP server, NOT an objectiveai-scoped identifier — same env-var convention ascrate::mcp::MCP_SESSION_ID_ENV)
Fields§
§agent_instance_hierarchy: Option<String>§agent_id: Option<String>§agent_full_id: Option<String>§agent_remote: Option<String>§response_id: Option<String>§response_ids: Option<String>§mcp_session_id: Option<String>Implementations§
Source§impl AgentArguments
impl AgentArguments
Sourcepub fn apply_to_command(&self, command: &mut Command)
pub fn apply_to_command(&self, command: &mut Command)
Apply this bag to a child-process command: every Some(v)
stamps the matching env var, every None env-removes it so
the parent’s value can’t leak through. Called by
[binary::BinaryExecutor]; available for any executor that
spawns a subprocess.
Trait Implementations§
Source§impl Clone for AgentArguments
impl Clone for AgentArguments
Source§fn clone(&self) -> AgentArguments
fn clone(&self) -> AgentArguments
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 AgentArguments
impl Debug for AgentArguments
Source§impl Default for AgentArguments
impl Default for AgentArguments
Source§fn default() -> AgentArguments
fn default() -> AgentArguments
Source§impl<'de> Deserialize<'de> for AgentArguments
impl<'de> Deserialize<'de> for AgentArguments
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 AgentArguments
Source§impl JsonSchema for AgentArguments
impl JsonSchema for AgentArguments
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for AgentArguments
impl PartialEq for AgentArguments
Source§fn eq(&self, other: &AgentArguments) -> bool
fn eq(&self, other: &AgentArguments) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for AgentArguments
impl Serialize for AgentArguments
impl StructuralPartialEq for AgentArguments
Auto Trait Implementations§
impl Freeze for AgentArguments
impl RefUnwindSafe for AgentArguments
impl Send for AgentArguments
impl Sync for AgentArguments
impl Unpin for AgentArguments
impl UnsafeUnpin for AgentArguments
impl UnwindSafe for AgentArguments
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<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
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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