llm-coding-tools-core 0.1.0

Lightweight, high-performance core types and utilities for coding tools - framework agnostic
Documentation
#![doc = include_str!(concat!("../", env!("CARGO_PKG_README")))]
#![warn(missing_docs)]

// Validate feature combinations at compile time
#[cfg(all(feature = "async", not(feature = "tokio")))]
compile_error!("Feature `async` requires a runtime. Enable `tokio` feature instead.");

#[cfg(all(feature = "async", feature = "blocking"))]
compile_error!("Features `async` and `blocking` are mutually exclusive.");

pub mod context;
pub mod error;
pub mod fs;
pub mod operations;
pub mod output;
pub mod path;
pub mod system_prompt;
pub mod tool_names;
pub mod util;

pub use context::ToolContext;
pub use error::{ToolError, ToolResult};
pub use output::ToolOutput;
pub use path::{AbsolutePathResolver, AllowedPathResolver, PathResolver};
pub use system_prompt::{Substitute, SystemPromptBuilder};

// Re-export operations (always available, sync or async based on runtime feature)
pub use operations::{
    edit_file, execute_command, glob_files, grep_search, read_file, read_todos, write_file,
    write_todos, BashOutput, EditError, GlobOutput, GrepFileMatches, GrepLineMatch, GrepOutput,
    Todo, TodoPriority, TodoState, TodoStatus,
};

// Re-export webfetch operations (requires async or blocking feature)
#[cfg(any(feature = "async", feature = "blocking"))]
pub use operations::{fetch_url, format_json, html_to_markdown, WebFetchOutput};