Crate gestura_core_explorer

Crate gestura_core_explorer 

Source
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§

ExplorerEntry
A single entry returned by list_dir.
ExplorerGitPathStatus
Combined staged/unstaged/untracked status for a single path.
ExplorerGitStatusResponse
Response payload for the git-status query.
ExplorerListDirResponse
Response payload for a directory listing.
ExplorerRootResponse
Response payload for the workspace root query.

Enums§

ExplorerEntryKind
Kind of a directory entry.
ExplorerError
Errors returned by the explorer helpers.
ExplorerGitChangeKind
Kind of change reported by git status --porcelain.

Functions§

canonical_root
Canonicalize the workspace root path.
ensure_safe_rel_path
Validate that rel is a safe, non-escaping relative path.
list_dir
List directory entries under root/dir_rel, returning at most max_entries.
normalize_git_change_path
Normalize a git porcelain path into a safe rel_path string.
resolve_under_root
Resolve rel under root, ensuring the result stays within the root after symlink resolution.