mod checkpoints;
mod events;
mod interventions;
mod observation;
mod persistence;
mod replay;
mod v3_routing;
use crate::agent_surface::AppMode;
use zagens_core::turn::TurnLoopMode;
use super::Engine;
use crate::topic_memory::PromptInjectionArbitration;
fn turn_loop_mode_to_app_mode(mode: TurnLoopMode) -> AppMode {
match mode {
TurnLoopMode::Agent => AppMode::Agent,
TurnLoopMode::Yolo => AppMode::Yolo,
TurnLoopMode::Plan => AppMode::Plan,
}
}
pub(super) fn refresh_system_prompt_for_turn_mode(engine: &mut Engine, mode: TurnLoopMode) {
engine.refresh_system_prompt_with_arbitration(
turn_loop_mode_to_app_mode(mode),
PromptInjectionArbitration::none(),
);
}
pub(super) fn refresh_system_prompt_for_turn_mode_under_capacity(
engine: &mut Engine,
mode: TurnLoopMode,
) {
engine.refresh_system_prompt_with_arbitration(
turn_loop_mode_to_app_mode(mode),
PromptInjectionArbitration::capacity_pressure(),
);
}