-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathlib.rs
More file actions
53 lines (45 loc) · 2.03 KB
/
lib.rs
File metadata and controls
53 lines (45 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#![doc = include_str!(concat!("../", env!("CARGO_PKG_README")))]
// Validate feature combinations at compile time
#[cfg(all(feature = "async", feature = "blocking"))]
compile_error!("Features `async` and `blocking` are mutually exclusive.");
#[cfg(not(any(feature = "async", feature = "blocking")))]
compile_error!("Either an async runtime (e.g., `tokio`) or `blocking` feature must be enabled.");
pub mod context;
pub mod credentials;
pub mod error;
pub mod fs;
pub mod models;
pub mod output;
pub mod path;
pub mod permissions;
pub mod permissions_ext;
pub mod system_prompt;
pub mod tool_metadata;
pub mod tools;
pub mod util;
pub mod workspace;
mod internal;
pub use context::ToolContext;
pub use credentials::{CredentialLookup, CredentialResolver};
pub use error::{ToolError, ToolResult};
pub use output::ToolOutput;
pub use path::{AbsolutePathResolver, AllowedGlobResolver, AllowedPathResolver, PathResolver};
pub use system_prompt::SystemPromptBuilder;
pub use workspace::resolve_workspace_root;
// Re-export tools (always available, sync or async based on runtime feature)
pub use tools::{
edit_file, execute_command, execute_command_with_mode, glob_files, grep_search, read_file,
read_todos, write_file, write_todos, BashExecutionMode, BashOutput, BashRequest, BashSettings,
EditError, EditRequest, EditSettings, GlobOutput, GlobRequest, GlobSettings, GrepFileMatches,
GrepFormattingSettings, GrepLineMatch, GrepOutput, GrepRequest, GrepSettings, ReadRequest,
ReadSettings, TaskInput, TaskOutput, TaskSettings, Todo, TodoPriority, TodoReadRequest,
TodoState, TodoStatus, TodoWriteRequest, WriteRequest, WriteSettings,
};
// Re-export Linux sandbox types (Linux-only, requires linux-bubblewrap feature)
#[cfg(all(feature = "linux-bubblewrap", target_os = "linux"))]
pub use tools::linux_bwrap_profile;
// Re-export webfetch tools (requires tokio or blocking feature)
#[cfg(any(feature = "tokio", feature = "blocking"))]
pub use tools::{
fetch_url, format_json, html_to_markdown, WebFetchOutput, WebFetchRequest, WebFetchSettings,
};