Skip to main content

Crate lash_tool_support

Crate lash_tool_support 

Source

Structs§

PathEntry
StaticToolProvider
A ToolProvider that serves a fixed set of ToolDefinitions from a cache, delegating execution to an StaticToolExecute.
TruncationMeta

Constants§

FS_DEFAULTS_PREAMBLE
Shared preamble describing default filesystem-listing behavior. Used by ls and glob so both tools document hidden-file and .gitignore handling in identical wording.

Traits§

StaticToolExecute
Per-call execution behavior for a StaticToolProvider.

Functions§

agent_surface
build_path_entry
Build a normalized filesystem entry for tool output. Returns the entry plus raw mtime for optional sorting.
canonicalize_under
Resolve path against base (via resolve_under) and then canonicalize it on disk, resolving symlinks to their real path. Fails if the path does not exist. Use this only when a tool needs a real, existence-checked path (e.g. a security/scope decision or distinguishing a file from a directory); prefer resolve_under for write/patch targets that may not exist yet.
compact_diff
Generate a compact unified diff between old and new content. Truncates to max_lines lines if the diff is too long.
display_relative
Render path relative to base for display, falling back to the file name (then the full path) when path is not under base. Backslashes are normalized to forward slashes so output is stable across platforms.
filesystem_entries_output_schema
filesystem_entries_result
Build the standard result envelope returned by filesystem listing tools.
normalize_lexical
Lexically collapse . and .. components in path without touching the filesystem. Leading .. components (that would escape the root) are preserved verbatim, matching Path::join intuitions for relative roots.
object_schema
parse_optional_bool
Parse optional bool arg with a default.
parse_optional_usize_arg
Parse an optional positive integer arg. Accepts null or "none" when allow_none is true.
path_entry_output_schema
require_str
Extract a required non-empty string arg, or return ToolResult::err.
resolve_under
Resolve a possibly-relative path against base, returning a lexically normalized PathBuf.
rg_file_list
run_blocking
Run blocking filesystem work off the async runtime.
run_blocking_value
Run blocking work off the async runtime and return a typed value.