config: move agent_types list to config file
Active agent types for consolidation cycles are now read from config.json5 memory.agent_types instead of being hardcoded in scoring.rs. Adding or removing agents is a config change, not a code change. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
d20baafe9d
commit
f0086e2eaf
2 changed files with 17 additions and 2 deletions
|
|
@ -63,6 +63,8 @@ pub struct Config {
|
|||
pub api_model: Option<String>,
|
||||
/// Reasoning effort for API calls ("none", "low", "medium", "high").
|
||||
pub api_reasoning: String,
|
||||
/// Active agent types for consolidation cycles.
|
||||
pub agent_types: Vec<String>,
|
||||
}
|
||||
|
||||
impl Default for Config {
|
||||
|
|
@ -96,6 +98,10 @@ impl Default for Config {
|
|||
api_key: None,
|
||||
api_model: None,
|
||||
api_reasoning: "high".to_string(),
|
||||
agent_types: vec![
|
||||
"linker".into(), "organize".into(), "distill".into(),
|
||||
"separator".into(), "split".into(),
|
||||
],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -186,6 +192,14 @@ impl Config {
|
|||
if let Some(s) = mem.get("api_reasoning").and_then(|v| v.as_str()) {
|
||||
config.api_reasoning = s.to_string();
|
||||
}
|
||||
if let Some(arr) = mem.get("agent_types").and_then(|v| v.as_array()) {
|
||||
let types: Vec<String> = arr.iter()
|
||||
.filter_map(|v| v.as_str().map(|s| s.to_string()))
|
||||
.collect();
|
||||
if !types.is_empty() {
|
||||
config.agent_types = types;
|
||||
}
|
||||
}
|
||||
|
||||
// Resolve API settings from the shared model/backend config.
|
||||
// memory.agent_model references a named model; we look up its
|
||||
|
|
|
|||
|
|
@ -268,8 +268,9 @@ fn consolidation_plan_inner(store: &Store, detect_interf: bool) -> Consolidation
|
|||
rationale: Vec::new(),
|
||||
};
|
||||
|
||||
// Active agent types
|
||||
let agent_types = ["linker", "organize", "distill", "separator", "split"];
|
||||
// Active agent types from config
|
||||
let config = crate::config::get();
|
||||
let agent_types: Vec<&str> = config.agent_types.iter().map(|s| s.as_str()).collect();
|
||||
|
||||
// Target: α ≥ 2.5 (healthy scale-free)
|
||||
if alpha < 2.0 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue