Skip to main content

Module utils

Module utils 

Source
Expand description

Utility modules for common functionality

Re-exports§

pub use approval::check_approval_policy;
pub use approval::persist_auto_always_policy;
pub use approval::persist_auto_session_policy;
pub use file_extract::FileContent;
pub use file_extract::classify_file;
pub use file_extract::inject_file_content;
pub use file_extract::process_file_with_vision;
pub use image::extract_img_markers;
pub use image::extract_vid_markers;
pub use retry::RetryConfig;
pub use retry::RetryableError;
pub use retry::retry;
pub use retry::retry_with_check;
pub use sanitize::redact_secrets;
pub use sanitize::redact_tool_input;
pub use string::truncate_str;

Modules§

approval
Shared approval utilities used across all channel integrations.
config_watcher
Config hot-reload watcher.
fd_suppress
Temporary fd-level redirection of stdout/stderr to /dev/null.
file_extract
File classification + vision-aware file ingestion pipeline.
git_branch
Resolve the current git branch for a working directory.
image
install
Install method detection.
pdf_vision
PDF page rendering to PNG images.
providers
Shared provider registry — single source of truth for all LLM provider metadata.
retry
Generic retry utilities with exponential backoff
sanitize
Tool input sanitization for safe display in approval messages and UI.
slack_fmt
Convert standard Markdown to Slack mrkdwn format.
string
String utility functions.
text_complete
Heuristic check for whether an LLM response text “looks complete”.

Functions§

tool_context_hint
Extract a short, meaningful context hint from a tool’s input for channel display. Runs the input through the secret sanitizer first so no API keys or tokens can leak into the streaming indicator via command or url fields. Returns a formatted string like ("hint") or empty string if no hint found.