pub struct ToolRegistry { /* private fields */ }
Implementations§
Source§impl ToolRegistry
impl ToolRegistry
pub async fn cache_stats(&self) -> Value
pub async fn clear_cache(&self)
Source§impl ToolRegistry
impl ToolRegistry
pub async fn read_file(&mut self, args: Value) -> Result<Value>
pub async fn write_file(&mut self, args: Value) -> Result<Value>
pub async fn edit_file(&mut self, args: Value) -> Result<Value>
pub async fn delete_file(&mut self, _args: Value) -> Result<Value>
pub async fn rp_search(&mut self, args: Value) -> Result<Value>
pub fn last_rp_search_result(&self) -> Option<GrepSearchResult>
pub async fn list_files(&mut self, args: Value) -> Result<Value>
pub async fn run_terminal_cmd(&mut self, args: Value) -> Result<Value>
Source§impl ToolRegistry
impl ToolRegistry
pub fn policy_manager_mut(&mut self) -> Result<&mut ToolPolicyManager>
pub fn policy_manager(&self) -> Result<&ToolPolicyManager>
pub fn set_tool_policy( &mut self, tool_name: &str, policy: ToolPolicy, ) -> Result<()>
pub fn get_tool_policy(&self, tool_name: &str) -> ToolPolicy
pub fn reset_tool_policies(&mut self) -> Result<()>
pub fn allow_all_tools(&mut self) -> Result<()>
pub fn deny_all_tools(&mut self) -> Result<()>
pub fn print_policy_status(&self)
Source§impl ToolRegistry
impl ToolRegistry
pub fn pty_config(&self) -> &PtyConfig
pub fn can_start_pty_session(&self) -> bool
pub fn start_pty_session(&self) -> Result<()>
pub fn end_pty_session(&self)
pub fn active_pty_sessions(&self) -> usize
Source§impl ToolRegistry
impl ToolRegistry
pub fn new(workspace_root: PathBuf) -> Self
pub fn new_with_config(workspace_root: PathBuf, pty_config: PtyConfig) -> Self
pub fn register_tool(&mut self, registration: ToolRegistration) -> Result<()>
pub fn available_tools(&self) -> Vec<String>
pub fn enable_full_auto_mode(&mut self, allowed_tools: &[String])
pub fn current_full_auto_allowlist(&self) -> Option<Vec<String>>
pub fn has_tool(&self, name: &str) -> bool
pub fn with_ast_grep(self, engine: Arc<AstGrepEngine>) -> Self
pub fn workspace_root(&self) -> &PathBuf
pub fn plan_manager(&self) -> PlanManager
pub fn current_plan(&self) -> TaskPlan
pub async fn initialize_async(&mut self) -> Result<()>
pub fn apply_config_policies( &mut self, tools_config: &ToolsConfig, ) -> Result<()>
pub async fn execute_tool(&mut self, name: &str, args: Value) -> Result<Value>
Source§impl ToolRegistry
impl ToolRegistry
Sourcepub fn preflight_tool_permission(&mut self, name: &str) -> Result<bool>
pub fn preflight_tool_permission(&mut self, name: &str) -> Result<bool>
Prompt for permission before starting long-running tool executions to avoid spinner conflicts
pub fn evaluate_tool_policy( &mut self, name: &str, ) -> Result<ToolPermissionDecision>
pub fn mark_tool_preapproved(&mut self, name: &str)
Trait Implementations§
Source§impl Clone for ToolRegistry
impl Clone for ToolRegistry
Source§fn clone(&self) -> ToolRegistry
fn clone(&self) -> ToolRegistry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ToolRegistry
impl !RefUnwindSafe for ToolRegistry
impl Send for ToolRegistry
impl Sync for ToolRegistry
impl Unpin for ToolRegistry
impl !UnwindSafe for ToolRegistry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more