gestura_core_tools/
lib.rs

1//! Built-in tools, schemas, permissions, and tool policy for Gestura.
2//!
3//! This domain crate owns the implementation of Gestura's built-in tools and
4//! the shared machinery around them: registry construction, permission checks,
5//! policy evaluation, provider schema generation, and async wrappers used by the
6//! higher-level pipeline.
7//!
8//! ## Design role
9//!
10//! This crate is intentionally independent from the `gestura-core` facade so it
11//! can stay workable with lower coupling and faster iteration. The public stable
12//! import path for most consumers remains `gestura_core::tools::*`, which
13//! re-exports these modules from the facade crate.
14//!
15//! ## High-signal modules
16//!
17//! - `file`, `shell`, `git`, `web`, `screen`: built-in tool implementations
18//! - `registry`: built-in tool catalog and discovery helpers
19//! - `schemas`: provider-specific tool schemas for OpenAI, Anthropic, and Gemini
20//! - `permissions`: permission management and audit-friendly checks
21//! - `policy`: policy evaluation helpers layered on top of permissions
22//!
23//! Pipeline orchestration and higher-level request handling stay in
24//! `gestura-core`; this crate focuses on the tools domain itself.
25
26/// Error compatibility module.
27///
28/// Many tool implementations historically imported `crate::error::{AppError, Result}`.
29/// We keep that shape here so the code remains portable across crates.
30pub mod error {
31    pub use gestura_core_foundation::error::{AppError, Result};
32}
33
34pub mod config;
35
36pub mod code;
37pub mod file;
38pub mod git;
39pub mod gui;
40pub mod mcp_manager;
41pub mod permissions;
42pub mod policy;
43pub mod registry;
44pub mod schemas;
45pub mod screen;
46pub mod shell;
47pub mod tool_confirmation;
48pub mod tool_inspection;
49pub mod web;
50
51// Async wrappers for pipeline / GUI integration
52pub mod code_async;
53pub mod file_async;
54pub mod git_async;
55pub mod screen_async;
56pub mod shell_async;
57
58pub use registry::{
59    ToolDefinition, all_tools, find_tool, looks_like_capabilities_question,
60    looks_like_tools_question, render_tool_detail, render_tools_overview,
61};