Skip to main content

Module tools

Module tools 

Source
Expand description

Deterministic tools capability.

Provides search (ripgrep via grep-searcher + ignore), file I/O, listing, file outline, git inspection, and process lifecycle (run_command, run_test, run_build_command, inspect_test_results, manage_packages, cancel_handle).

Implementation status:

MethodStatus
searchimplemented
read_fileimplemented
write_fileimplemented
delete_fileimplemented
list_directoryimplemented
get_file_outlineimplemented (regex extractor)
gitimplemented (system git CLI)
run_commandimplemented
run_testimplemented
run_build_commandimplemented
inspect_test_resultsimplemented
manage_packagesimplemented
cancel_handleimplemented

§Per-session opt-in

All deterministic tools are gated by a per-thread feature flag. Pipelines must call hostlib_enable("tools:deterministic") (registered by ToolsCapability::register_builtins) before any of the tool methods will execute. Until then, calls return HostlibError::Backend with an explanatory message. The per-session opt-in model keeps the deterministic-tool surface sandbox-friendly.

Re-exports§

pub use permissions::FEATURE_TOOLS_DETERMINISTIC;

Modules§

long_running
Long-running tool handle machinery.
permissions
Per-thread “enabled features” registry for the deterministic tools.

Structs§

ToolsCapability
Tools capability handle.