pub enum SubagentGrantError {
Show 22 variants
OutsideAuthority(PathBuf),
CommitOutsideAuthority(PathBuf),
Inspect {
path: PathBuf,
source: Error,
},
RepositoryCheckout(PathBuf),
MalformedGitData {
path: PathBuf,
reason: &'static str,
},
NotAWorktree(PathBuf),
GitDataExposed {
worktree: PathBuf,
git_data: PathBuf,
writable: PathBuf,
},
BranchOutsideNamespace {
worktree: PathBuf,
head: String,
},
SharedNamespace {
worktree: PathBuf,
namespace: String,
other: String,
},
ReftableRepository(PathBuf),
Ledger(CommitLedgerError),
NoContainerMount,
OutsideContainerMount {
path: PathBuf,
source: MountRootError,
},
Space {
path: PathBuf,
source: Error,
},
SpaceName(IdsExhausted),
Preparation {
space: PathBuf,
source: SpacePreparationError,
},
PreparedOutsideSpace {
path: PathBuf,
space: PathBuf,
},
Repository {
path: PathBuf,
source: Error,
},
UnrepresentablePath(PathBuf),
WorktreeExposed {
worktree: PathBuf,
writable: PathBuf,
},
GitTooOld {
found: String,
},
CommitGrantUnsupported,
}Expand description
Why a SubagentGrant cannot be given.
Variants§
OutsideAuthority(PathBuf)
The launcher cannot write the path, so it cannot hand it on.
CommitOutsideAuthority(PathBuf)
The launcher is a subagent that may not commit in the worktree, so it cannot hand that right on.
Inspect
A path of the grant could not be inspected.
RepositoryCheckout(PathBuf)
The granted path holds a repository checkout, whose git data sits inside it and so would be writable whatever the commit grant says.
MalformedGitData
A linked worktree’s .git file or its git directory is not what git
writes for a linked worktree of the repository it names.
NotAWorktree(PathBuf)
A commit grant names a path that is not a linked worktree.
GitDataExposed
Git data the commit authorization depends on overlaps a path some subagent can write, so a subagent could rewrite it.
Fields
BranchOutsideNamespace
The worktree’s branch does not lie in a subagent branch namespace.
The branch namespace of a committing worktree holds other refs, so it is not that worktree’s own.
ReftableRepository(PathBuf)
The repository stores refs in a reftable, which has no per-namespace directory a grant could cover.
Ledger(CommitLedgerError)
The refs of a committing worktree could not be read.
NoContainerMount
The terminal runs in a container that does not say which host directory it mounts, so a subagent’s paths have no container spelling.
OutsideContainerMount
A path the subagent works in is not inside the container’s workspace mount.
Space
The subagent’s own space could not be created.
SpaceName(IdsExhausted)
Every model-facing id is leased, so the subagent’s space has no name.
Preparation
The embedder’s SubagentSpaces could not prepare the subagent’s
space. The space was removed.
PreparedOutsideSpace
The embedder named a working copy or an environment directory outside the space it prepared. The space was removed.
Fields
Repository
The repository of a committing worktree could not be created.
UnrepresentablePath(PathBuf)
A path the repository of a committing worktree must spell out is not text on one line.
WorktreeExposed
A path handed out with a plain grant contains the committing
worktree, so a subagent holding that grant could replace the worktree
and make the host write its .git file elsewhere.
GitTooOld
The git on the host is older than a commit grant works with.
CommitGrantUnsupported
A commit grant was asked for somewhere the terminal can run no git shim, so the isolation the grant promises could not be kept.
Trait Implementations§
Source§impl Debug for SubagentGrantError
impl Debug for SubagentGrantError
Source§impl Display for SubagentGrantError
impl Display for SubagentGrantError
Source§impl Error for SubagentGrantError
impl Error for SubagentGrantError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<CommitLedgerError> for SubagentGrantError
impl From<CommitLedgerError> for SubagentGrantError
Source§fn from(source: CommitLedgerError) -> Self
fn from(source: CommitLedgerError) -> Self
Source§impl From<IdsExhausted> for SubagentGrantError
impl From<IdsExhausted> for SubagentGrantError
Source§fn from(source: IdsExhausted) -> Self
fn from(source: IdsExhausted) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for SubagentGrantError
impl !UnwindSafe for SubagentGrantError
impl Forget for SubagentGrantError
impl Freeze for SubagentGrantError
impl Move for SubagentGrantError
impl Send for SubagentGrantError
impl Sync for SubagentGrantError
impl Unpin for SubagentGrantError
impl UnsafeUnpin for SubagentGrantError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more