Expand description
Workspace-bounded file-system exploration utilities for Gestura.
gestura-core-explorer provides lightweight exploration helpers used by the
agent pipeline and presentation layers to inspect a workspace safely.
§Responsibilities
- directory listing with stable sorting and truncation reporting
- root-relative path handling suitable for UI and agent consumption
- workspace-bounded resolution to avoid accidental path escape
- related status helpers such as git-aware inspection surfaces
§Safety model
Explorer operations are designed around a workspace root. Canonicalization and root-bounded resolution help ensure that symlinks or path traversal do not silently escape the intended workspace. Entries that resolve outside the workspace are omitted rather than exposed.
§Stable import paths
Most code should import through gestura_core::explorer::*.
Structs§
- Explorer
Entry - A single entry returned by
list_dir. - Explorer
GitPath Status - Combined staged/unstaged/untracked status for a single path.
- Explorer
GitStatus Response - Response payload for the git-status query.
- Explorer
List DirResponse - Response payload for a directory listing.
- Explorer
Root Response - Response payload for the workspace root query.
Enums§
- Explorer
Entry Kind - Kind of a directory entry.
- Explorer
Error - Errors returned by the explorer helpers.
- Explorer
GitChange Kind - Kind of change reported by
git status --porcelain.
Functions§
- canonical_
root - Canonicalize the workspace root path.
- ensure_
safe_ rel_ path - Validate that
relis a safe, non-escaping relative path. - list_
dir - List directory entries under
root/dir_rel, returning at mostmax_entries. - normalize_
git_ change_ path - Normalize a git porcelain path into a safe
rel_pathstring. - resolve_
under_ root - Resolve
relunderroot, ensuring the result stays within the root after symlink resolution.