digest: modernize generate_digest() to use agent infrastructure
- Load template from digest.agent def (drop prompts_dir fallback)
- Resolve standard {{node:...}} placeholders — digest agent now gets
core-personality, memory-instructions, subconscious notes
- Call through call_for_def_multi() with agent def's temperature,
priority, and tools instead of call_simple()
- Move tool filtering from api.rs into callers (call_for_def_multi,
run_one_agent_inner) — api takes pre-filtered &[Tool] slice
Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
parent
375a8d9738
commit
1457a1b50d
6 changed files with 182 additions and 109 deletions
|
|
@ -296,15 +296,14 @@ fn run_one_agent_inner(
|
|||
log: &(dyn Fn(&str) + Sync),
|
||||
) -> Result<AgentResult, String> {
|
||||
let all_tools = crate::agent::tools::memory_and_journal_tools();
|
||||
let effective_tools: Vec<String> = if def.tools.is_empty() {
|
||||
all_tools.iter().map(|t| t.name.to_string()).collect()
|
||||
let effective_tools: Vec<crate::agent::tools::Tool> = if def.tools.is_empty() {
|
||||
all_tools
|
||||
} else {
|
||||
all_tools.iter()
|
||||
all_tools.into_iter()
|
||||
.filter(|t| def.tools.iter().any(|w| w == &t.name))
|
||||
.map(|t| t.name.to_string())
|
||||
.collect()
|
||||
};
|
||||
let tools_desc = effective_tools.join(", ");
|
||||
let tools_desc = effective_tools.iter().map(|t| t.name).collect::<Vec<_>>().join(", ");
|
||||
let n_steps = agent_batch.steps.len();
|
||||
|
||||
for key in &agent_batch.node_keys {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue