pub struct AgentLoopControl { /* private fields */ }Implementations§
Source§impl AgentLoopControl
impl AgentLoopControl
pub fn run_id(&self) -> InteractiveRunId
pub async fn update_settings( &self, update: InteractiveSettingsUpdate, ) -> Result<(), InteractiveError>
pub async fn interrupt( &self, reason: InterruptReason, ) -> Result<(), InteractiveError>
Sourcepub async fn save_session_to(
&self,
store: FileSessionStore,
) -> Result<(), InteractiveError>
pub async fn save_session_to( &self, store: FileSessionStore, ) -> Result<(), InteractiveError>
Saves the session only while the interactive producer is at an idle boundary.
Returns InteractiveError::SessionSaveRequiresIdle immediately when a model, tool, or
interrupt phase is active.
Sourcepub async fn compact_context(
&self,
focus: Option<String>,
) -> Result<Option<CompactionOutcome>, InteractiveError>
pub async fn compact_context( &self, focus: Option<String>, ) -> Result<Option<CompactionOutcome>, InteractiveError>
Manually compacts session history at an idle boundary, optionally
emphasizing focus instructions in the generated summary.
Returns Ok(None) when no compressible history exists before the
retained tail, and InteractiveError::CompactRequiresIdle immediately
when a model, tool, compaction, or interrupt phase is already active.
Sourcepub async fn compact_context_with_policy(
&self,
focus: Option<String>,
policy: Option<CitationCompactionPolicy>,
) -> Result<Option<CompactionOutcome>, InteractiveError>
pub async fn compact_context_with_policy( &self, focus: Option<String>, policy: Option<CitationCompactionPolicy>, ) -> Result<Option<CompactionOutcome>, InteractiveError>
Manually compacts session history at an idle boundary with optional
focus instructions and an optional per-call CitationCompactionPolicy
override.
When policy is None, the runtime’s configured compaction policy is used.
Sourcepub async fn set_plan_mode(&self, enabled: bool) -> Result<(), InteractiveError>
pub async fn set_plan_mode(&self, enabled: bool) -> Result<(), InteractiveError>
Toggles Plan Mode on or off (works both while idle and mid-turn).
Sourcepub async fn approve_plan(
&self,
plan_id: PlanId,
note: Option<String>,
) -> Result<(), InteractiveError>
pub async fn approve_plan( &self, plan_id: PlanId, note: Option<String>, ) -> Result<(), InteractiveError>
Approves a submitted plan, exits Plan Mode, and continues execution.
Sourcepub async fn request_plan_changes(
&self,
plan_id: PlanId,
feedback: String,
) -> Result<(), InteractiveError>
pub async fn request_plan_changes( &self, plan_id: PlanId, feedback: String, ) -> Result<(), InteractiveError>
Keeps Plan Mode active and delivers revision feedback to the agent.
Sourcepub async fn abandon_plan(
&self,
plan_id: PlanId,
) -> Result<(), InteractiveError>
pub async fn abandon_plan( &self, plan_id: PlanId, ) -> Result<(), InteractiveError>
Abandons a submitted plan and exits Plan Mode without implementing.