#[derive(Clone, Debug, PartialEq, Eq)]
pub enum ToolScope {
None,
All,
Selected(Vec<String>),
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Default)]
pub enum ParallelPolicy {
#[default]
FailFast,
BestEffort,
}
#[derive(Clone, Debug, PartialEq, Eq, Default)]
pub enum RecitationPolicy {
#[default]
Fail,
RetryWithReminder(String),
FallbackToFreeForm { reminder: String },
}
#[derive(Clone, Debug)]
pub struct StagePolicy {
pub max_turns: usize,
pub max_validation_attempts: usize,
pub temperature: f32,
pub tools: ToolScope,
pub recitation_policy: RecitationPolicy,
}
impl Default for StagePolicy {
fn default() -> Self {
Self {
max_turns: 15,
max_validation_attempts: 3,
temperature: 0.0,
tools: ToolScope::All,
recitation_policy: RecitationPolicy::RetryWithReminder(
"IMPORTANT: Your previous response was blocked by a recitation filter. \
To bypass this filter, please rephrase your response: do NOT quote large blocks \
of code verbatim. Describe code logic in your own words, summarize findings, or \
quote only short snippets (1-2 lines). Re-emit your JSON output now."
.to_string(),
),
}
}
}