Skip to main content

AgentConfig

Struct AgentConfig 

Source
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: String

Base command to run the agent.

§output_flag: String

Output-format flag (JSON streaming, text mode, etc.).

§yolo_flag: String

Flag for autonomous mode (no prompts).

§verbose_flag: String

Flag for verbose output.

§can_commit: bool

Whether the agent can run git commit.

§json_parser: JsonParserType

Which JSON parser to use for this agent’s output.

§model_flag: Option<String>

Model/provider flag for agents that support model selection.

§print_flag: String

Print/non-interactive mode flag (e.g., “-p” for Claude/CCS).

§streaming_flag: String

Include 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: String

Session 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

Source

pub fn builder() -> AgentConfigBuilder

Create a new AgentConfig builder.

Source

pub fn build_cmd(&self, output: bool, yolo: bool, verbose: bool) -> String

Build full command string with specified flags.

Source

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.

Source

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 format
  • yolo - Enable autonomous mode
  • verbose - Enable verbose output
  • model_override - Optional model override
  • session_id - Session ID to continue (if supported by this agent)
§Returns

The command string with session continuation flag if supported

Source

pub fn supports_session_continuation(&self) -> bool

Check if this agent supports session continuation.

Trait Implementations§

Source§

impl Clone for AgentConfig

Source§

fn clone(&self) -> AgentConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AgentConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for AgentConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.