Skip to main content

Module tools

Module tools 

Source
Expand description

Deterministic tools capability.

Ports the Swift CoreToolExecutor surface: search (ripgrep via grep-searcher + ignore), file I/O, listing, file outline, git via gix (currently shelled-out — see [git] for the rationale), and process lifecycle (run_command, run_test, run_build_command, inspect_test_results, manage_packages).

Implementation status:

MethodStatus
searchimplemented
read_fileimplemented
write_fileimplemented
delete_fileimplemented
list_directoryimplemented
get_file_outlineimplemented (regex extractor)
gitimplemented (system git CLI)
run_commandunimplemented (issue C2)
run_testunimplemented (issue C2)
run_build_commandunimplemented (issue C2)
inspect_test_resultsunimplemented (issue C2)
manage_packagesunimplemented (issue C2)

§Per-session opt-in

All seven 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. This matches the “per-session opt-in” model called out in issue #567 and keeps the deterministic-tool surface sandbox-friendly.

Re-exports§

pub use permissions::FEATURE_TOOLS_DETERMINISTIC;

Modules§

permissions
Per-thread “enabled features” registry for the deterministic tools.

Structs§

ToolsCapability
Tools capability handle.