pub enum ReachReason {
Credential,
FrozenTrustFile,
FrozenTrustRoot,
FrozenSystemIntegrity,
OutsideWorkspace,
Unconfined,
ForeignTemp,
}Expand description
Why a not-auto-approved command’s path reach was flagged — so the nudge can explain the actual reason instead of a one-size-fits-all “outside the working directory”. A peer’s hidden file and a path genuinely above cwd both deny, but the remedy differs, and conflating them is what reads as “directory parsing is broken”.
Variants§
Credential
A known credential store (.ssh, .aws, keychain…).
FrozenTrustFile
A file safe-chains reads its OWN permissions from (~/.config/safe-chains.toml,
~/.claude/settings.json). Distinct from OutsideWorkspace because the generic remedy
there — grant the path — is not merely unhelpful but FALSE: the write face is frozen, so
following the advice changes nothing. For safe-chains’ own config it is also circular,
telling the user to edit the file they are being stopped from editing.
FrozenTrustRoot
The DIRECTORY a trust file lives in. Distinct from FrozenTrustFile because only HALF of
it is refused: writing a file into ~/.config is ordinary and stays allowed, and only
removing or replacing the directory is not. Copy that said “this is refused” flatly would
misdescribe a directory the user explicitly granted.
FrozenSystemIntegrity
One of the files that decide who may log in (/etc/passwd, /etc/sudoers, /etc/pam.d,
the loader and boot). Same false-remedy problem as FrozenTrustFile.
OutsideWorkspace
Genuinely above/outside the working directory.
Unconfined
A path built by an interpolation that nothing confines (./out/$i, > $(cmd)). It is not
outside anything — it names WHATEVER the value turns out to be, which is why it cannot be
admitted — so the remedy is to constrain the spelling, not to grant a directory.
ForeignTemp
A temp path that is NOT this session’s scratchpad. Reading and writing it is fine; RUNNING
code from it is not, because anonymous /tmp is where downloaded/foreign code lands. This
is the one reach whose remedy is usually “that IS my working directory” — so the nudge says
how to bless it rather than implying the agent did something wrong.
Implementations§
Trait Implementations§
Source§impl Clone for ReachReason
impl Clone for ReachReason
Source§fn clone(&self) -> ReachReason
fn clone(&self) -> ReachReason
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ReachReason
Source§impl Debug for ReachReason
impl Debug for ReachReason
impl Eq for ReachReason
Source§impl PartialEq for ReachReason
impl PartialEq for ReachReason
impl StructuralPartialEq for ReachReason
Auto Trait Implementations§
impl Freeze for ReachReason
impl RefUnwindSafe for ReachReason
impl Send for ReachReason
impl Sync for ReachReason
impl Unpin for ReachReason
impl UnsafeUnpin for ReachReason
impl UnwindSafe for ReachReason
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.