API
This commit is contained in:
parent
b60fb7a496
commit
65d92ed22e
2 changed files with 14 additions and 12 deletions
|
|
@ -634,6 +634,7 @@ macro_rules! tool {
|
|||
deprecation_message: String::new(),
|
||||
execution_context: ExecutionContext::default(),
|
||||
context_visibility: ContextVisibility::default(),
|
||||
required_depth: 0,
|
||||
}
|
||||
};
|
||||
($name:expr, $desc:expr, $cat:expr, $dangerous:expr, $approval:expr, $scoped:expr, $params:expr, $timeout:expr) => {
|
||||
|
|
@ -651,6 +652,7 @@ macro_rules! tool {
|
|||
deprecation_message: String::new(),
|
||||
execution_context: ExecutionContext::default(),
|
||||
context_visibility: ContextVisibility::default(),
|
||||
required_depth: 0,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
@ -1834,7 +1836,7 @@ pub fn tool_ids_for_agent_type(agent_type: &crate::agents::AgentType) -> Option<
|
|||
.collect::<Vec<String>>()
|
||||
};
|
||||
|
||||
let ids = Some(match agent_type {
|
||||
let mut ids = match agent_type {
|
||||
crate::agents::AgentType::BuildAgent => curated(&[
|
||||
"read_file",
|
||||
"write_file",
|
||||
|
|
@ -1890,7 +1892,7 @@ pub fn tool_ids_for_agent_type(agent_type: &crate::agents::AgentType) -> Option<
|
|||
"web_search",
|
||||
"web_fetch",
|
||||
]),
|
||||
});
|
||||
};
|
||||
|
||||
// Filter by depth: remove tools whose required_depth exceeds the agent's max_depth
|
||||
let policy = crate::agents::AgentPolicy::defaults_for(agent_type);
|
||||
|
|
|
|||
Loading…
Reference in a new issue