Skip to main content

Module tools

Module tools 

Source
Expand description

Sandboxed tools exposed to the model as OpenAI function calls. Target-crate tools (read_file, list_dir, grep, optional rg, web_fetch, and gated edit_file) resolve paths relative to the scheduler crate or public URLs; comparison tools read other schedulers under scheds/rust but never write them. Host-topology tools run fixed read-only commands or read fixed sysfs CPU cache metadata paths. Absolute paths and .. are rejected, and canonicalized targets must stay inside their configured roots.

ConstantsΒ§

DEFAULT_WEB_FETCH_BYTES πŸ”’
LOCAL_TOOL_TIMEOUT πŸ”’
MAX_GREP_MATCHES πŸ”’
MAX_READ_BYTES πŸ”’
MAX_RG_OUTPUT_BYTES πŸ”’
MAX_SCHED_READ_BYTES πŸ”’
MAX_TOPOLOGY_OUTPUT_BYTES πŸ”’
MAX_WEB_FETCH_BYTES πŸ”’

FunctionsΒ§

collapse_text πŸ”’
count_occurrences πŸ”’
cpu_cache_sizes πŸ”’
cpu_cache_sizes_from_root πŸ”’
decode_basic_entities πŸ”’
edit_file πŸ”’
execute_tool
Dispatch a tool call. allow_edit gates edit_file.
execute_tool_async
Async dispatch for tools that may perform network I/O.
fuzzy_line_match πŸ”’
Find a unique block of lines in content whose whitespace-trimmed text equals the trimmed lines of needle (ignoring indentation and blank lines around the block). Returns the byte range [start, end) of that block, or None if there is not exactly one match.
grep πŸ”’
grep_dir πŸ”’
grep_schedulers πŸ”’
html_to_text πŸ”’
is_disallowed_host πŸ”’
is_disallowed_ip πŸ”’
is_write_tool
True for write-capable tools (used by the controller to count edits per round).
list_dir πŸ”’
list_schedulers πŸ”’
lscpu_e πŸ”’
nearest_lines πŸ”’
Up to 5 file lines (with 1-based line numbers) that contain anchor, for error feedback when old_string doesn’t match.
normalized_crate_relative_path πŸ”’
numactl_hardware πŸ”’
openai_tools_json
The function-calling tool schema advertised to the model.
parse_prefixed_u32 πŸ”’
read_file πŸ”’
read_path πŸ”’
read_scheduler_file πŸ”’
read_trimmed πŸ”’
resolve πŸ”’
Resolve a crate-relative path inside sandbox, rejecting ../absolute and escapes.
resolve_scheduler_path πŸ”’
rg πŸ”’
rg_available πŸ”’
rg_glob_arg πŸ”’
run_fixed_topology_command πŸ”’
scheduler_dir πŸ”’
strip_line_number_prefixes πŸ”’
Strip a leading line-number+tab prefix (as emitted by read_file’s "{:>6}\t" format) from each line. Preserves a trailing newline.
truncate_lossy πŸ”’
validate_public_url πŸ”’
web_fetch πŸ”’
web_fetch_content_type_allowed πŸ”’
web_fetch_max_bytes πŸ”’