codetether-agent 4.7.0-a-002.4

A2A-native AI coding agent for the CodeTether ecosystem
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::provider::ToolDefinition;
use crate::swarm::SubTask;
use crate::tool::readonly::is_read_only;

pub fn is_read_only_task(task: &SubTask) -> bool {
    task.is_read_only()
}

pub fn definitions(all: &[ToolDefinition], read_only: bool) -> Vec<ToolDefinition> {
    all.iter()
        .filter(|tool| tool.name != "question")
        .filter(|tool| !read_only || is_read_only(&tool.name))
        .cloned()
        .collect()
}