Expand description
Bounded, SSRF-guarded local clone cache for remote repositories.
A repo URL is shallow-fetched (--depth 1) into
<data>/cache/repos/<host>/<owner>/<repo>/<ref> and reused while fresh, so
the agent can read a remote project like a local one without re-cloning on
every call. The clone URL is validated through crate::core::web::url_guard
(https-only, blocks private/loopback), and every git call is time-bounded.
Constants§
- DEFAULT_
CLONE_ TIMEOUT_ SECS - Default wall-clock timeout for a clone/fetch.
Functions§
- ensure_
repo - Ensure a fresh local checkout of
repoexists and return its path. - repo_
cache_ dir - Cache directory for a repo+ref, with every path segment sanitized so a hostile owner/repo/ref cannot escape the cache root.