pub struct AgentConfig {
pub cmd: String,
pub output_flag: String,
pub yolo_flag: String,
pub verbose_flag: String,
pub can_commit: bool,
pub json_parser: JsonParserType,
pub model_flag: Option<String>,
pub print_flag: String,
pub streaming_flag: String,
pub session_flag: String,
pub env_vars: HashMap<String, String>,
pub display_name: Option<String>,
}Expand description
Agent capabilities.
Fields§
§cmd: StringBase command to run the agent.
output_flag: StringOutput-format flag (JSON streaming, text mode, etc.).
yolo_flag: StringFlag for autonomous mode (no prompts).
verbose_flag: StringFlag for verbose output.
can_commit: boolWhether the agent can run git commit.
json_parser: JsonParserTypeWhich JSON parser to use for this agent’s output.
model_flag: Option<String>Model/provider flag for agents that support model selection.
print_flag: StringPrint/non-interactive mode flag (e.g., “-p” for Claude/CCS).
streaming_flag: StringInclude partial messages flag for streaming with -p (e.g., “–include-partial-messages”). Required for Claude/CCS to stream JSON output when using -p mode.
session_flag: StringSession continuation flag template (e.g., “–session {}” for OpenCode).
The {} placeholder is replaced with the session ID at runtime.
If empty, session continuation is not supported for this agent.
env_vars: HashMap<String, String>Environment variables to set when running this agent. Used for providers that need env vars (e.g., loaded from CCS settings).
display_name: Option<String>Display name for UI/logging (e.g., “ccs-glm” instead of raw agent name). If None, the agent name from the registry is used.
Implementations§
Source§impl AgentConfig
impl AgentConfig
Sourcepub fn builder() -> AgentConfigBuilder
pub fn builder() -> AgentConfigBuilder
Create a new AgentConfig builder.
Sourcepub fn build_cmd(&self, output: bool, yolo: bool, verbose: bool) -> String
pub fn build_cmd(&self, output: bool, yolo: bool, verbose: bool) -> String
Build full command string with specified flags.
Sourcepub fn build_cmd_with_model(
&self,
output: bool,
yolo: bool,
verbose: bool,
model_override: Option<&str>,
) -> String
pub fn build_cmd_with_model( &self, output: bool, yolo: bool, verbose: bool, model_override: Option<&str>, ) -> String
Build full command string with specified flags and optional model override.
Sourcepub fn build_cmd_with_session(
&self,
output: bool,
yolo: bool,
verbose: bool,
model_override: Option<&str>,
session_id: Option<&str>,
) -> String
pub fn build_cmd_with_session( &self, output: bool, yolo: bool, verbose: bool, model_override: Option<&str>, session_id: Option<&str>, ) -> String
Build full command string with session continuation.
This is used for XSD retries where we want to continue an existing session so the AI retains memory of its previous reasoning.
§Arguments
output- Enable JSON output formatyolo- Enable autonomous modeverbose- Enable verbose outputmodel_override- Optional model overridesession_id- Session ID to continue (if supported by this agent)
§Returns
The command string with session continuation flag if supported
Sourcepub fn supports_session_continuation(&self) -> bool
pub fn supports_session_continuation(&self) -> bool
Check if this agent supports session continuation.
Trait Implementations§
Source§impl Clone for AgentConfig
impl Clone for AgentConfig
Source§fn clone(&self) -> AgentConfig
fn clone(&self) -> AgentConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AgentConfig
impl Debug for AgentConfig
Auto Trait Implementations§
impl Freeze for AgentConfig
impl RefUnwindSafe for AgentConfig
impl Send for AgentConfig
impl Sync for AgentConfig
impl Unpin for AgentConfig
impl UnwindSafe for AgentConfig
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,
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