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:
Kent Overstreet 2026-03-20 14:04:47 -04:00
parent d20baafe9d
commit f0086e2eaf
2 changed files with 17 additions and 2 deletions

View file

@ -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