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
use crate::tool::{ToolRegistry, readonly::is_read_only};

pub fn restrict_registry(registry: &mut ToolRegistry, read_only: bool) {
    if !read_only {
        registry.unregister("question");
        return;
    }
    let ids: Vec<String> = registry.list().into_iter().map(str::to_string).collect();
    for id in ids {
        if !is_read_only(&id) {
            registry.unregister(&id);
        }
    }
}