Skip to main content

SubagentGrantError

Enum SubagentGrantError 

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

Fields

§path: PathBuf

The path.

§source: Error

The failure.

§

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.

Fields

§path: PathBuf

The worktree.

§reason: &'static str

What is wrong.

§

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

§worktree: PathBuf

The worktree.

§git_data: PathBuf

Its git directory or repository.

§writable: PathBuf

The writable path it overlaps.

§

BranchOutsideNamespace

The worktree’s branch does not lie in a subagent branch namespace.

Fields

§worktree: PathBuf

The worktree.

§head: String

What its HEAD holds.

§

SharedNamespace

The branch namespace of a committing worktree holds other refs, so it is not that worktree’s own.

Fields

§worktree: PathBuf

The worktree.

§namespace: String

The namespace, refs/heads/subagent/<id>/.

§other: String

A ref in it that is not the worktree’s branch.

§

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.

Fields

§path: PathBuf

The host path.

§source: MountRootError

Why it cannot be mapped.

§

Space

The subagent’s own space could not be created.

Fields

§path: PathBuf

The directory.

§source: Error

The failure.

§

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.

Fields

§space: PathBuf

The space.

§source: SpacePreparationError

The embedder’s error.

§

PreparedOutsideSpace

The embedder named a working copy or an environment directory outside the space it prepared. The space was removed.

Fields

§path: PathBuf

The working copy or environment directory, by its canonical path.

§space: PathBuf

The space.

§

Repository

The repository of a committing worktree could not be created.

Fields

§path: PathBuf

The path being written.

§source: Error

The failure.

§

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.

Fields

§worktree: PathBuf

The worktree.

§writable: PathBuf

The writable path that contains it.

§

GitTooOld

The git on the host is older than a commit grant works with.

Fields

§found: String

What git --version printed.

§

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

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for SubagentGrantError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for SubagentGrantError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<CommitLedgerError> for SubagentGrantError

Source§

fn from(source: CommitLedgerError) -> Self

Converts to this type from the input type.
Source§

impl From<IdsExhausted> for SubagentGrantError

Source§

fn from(source: IdsExhausted) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

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

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more