pub struct AgentConfigSnapshot {
pub name: String,
pub cmd: String,
pub output_flag: String,
pub yolo_flag: Option<String>,
pub can_commit: bool,
pub model_override: Option<String>,
pub provider_override: Option<String>,
pub context_level: u8,
}Expand description
Snapshot of agent configuration.
Captures the complete agent configuration to ensure the exact same agent behavior is used when resuming.
Fields§
§name: StringAgent name
cmd: StringAgent command
output_flag: StringOutput flag for JSON extraction
yolo_flag: Option<String>YOLO flag (if any)
can_commit: boolWhether this agent can commit
model_override: Option<String>Model override (e.g., “-m opencode/glm-4.7-free”) Default is None for backward compatibility with v1/v2 checkpoints.
provider_override: Option<String>Provider override (e.g., “opencode”, “anthropic”) Default is None for backward compatibility with v1/v2 checkpoints.
context_level: u8Context level (0=minimal, 1=normal) Default is 1 (normal context) for backward compatibility with v1/v2 checkpoints.
Implementations§
Source§impl AgentConfigSnapshot
impl AgentConfigSnapshot
Sourcepub fn new(
name: String,
cmd: String,
output_flag: String,
yolo_flag: Option<String>,
can_commit: bool,
) -> Self
pub fn new( name: String, cmd: String, output_flag: String, yolo_flag: Option<String>, can_commit: bool, ) -> Self
Create a snapshot from agent configuration.
Sourcepub fn with_model_override(self, model: Option<String>) -> Self
pub fn with_model_override(self, model: Option<String>) -> Self
Set model override.
Sourcepub fn with_provider_override(self, provider: Option<String>) -> Self
pub fn with_provider_override(self, provider: Option<String>) -> Self
Set provider override.
Sourcepub fn with_context_level(self, level: u8) -> Self
pub fn with_context_level(self, level: u8) -> Self
Set context level.
Trait Implementations§
Source§impl Clone for AgentConfigSnapshot
impl Clone for AgentConfigSnapshot
Source§fn clone(&self) -> AgentConfigSnapshot
fn clone(&self) -> AgentConfigSnapshot
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AgentConfigSnapshot
impl Debug for AgentConfigSnapshot
Source§impl<'de> Deserialize<'de> for AgentConfigSnapshot
impl<'de> Deserialize<'de> for AgentConfigSnapshot
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
Auto Trait Implementations§
impl Freeze for AgentConfigSnapshot
impl RefUnwindSafe for AgentConfigSnapshot
impl Send for AgentConfigSnapshot
impl Sync for AgentConfigSnapshot
impl Unpin for AgentConfigSnapshot
impl UnwindSafe for AgentConfigSnapshot
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,
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>
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 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>
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