pub enum DevToolError {
PathEscape(String),
ReadOnly(&'static str),
BashDisabled,
NotRead(String),
Stale {
path: String,
detail: String,
},
NoMatch(String),
Ambiguous {
path: String,
count: usize,
},
Excluded(String),
Timeout(Duration),
Io(Error),
Other(String),
}Expand description
Errors produced by the developer tools.
Variants§
PathEscape(String)
The requested path resolves outside the workspace root.
ReadOnly(&'static str)
A mutating operation was attempted on a read-only workspace.
BashDisabled
bash execution is disabled for this workspace.
NotRead(String)
edit_file was called on a file that has not been read in this session.
Stale
The file changed since this session and agent read it, or since the decision that approved the write was shown: the write did not happen (spec 3.1 §7.26, I66).
Maps to an AdkError with category Conflict and code
devtools.stale, whose message the model sees.
NoMatch(String)
old_string was not found in the target file.
Ambiguous
old_string matched more than once and replace_all was not set.
Excluded(String)
The path matches one of the workspace’s exclusion patterns, which by default
name secret files such as .env and private keys.
Maps to an AdkError with category Forbidden and code
devtools.path_excluded, so a caller can ask for approval and read the file
through a workspace that does not exclude it. Implements spec 3.1 §10 D5.
Timeout(Duration)
A bash command exceeded its timeout.
Io(Error)
An underlying I/O error.
Other(String)
Any other error (e.g. invalid arguments, bad regex).
Trait Implementations§
Source§impl Debug for DevToolError
impl Debug for DevToolError
Source§impl Display for DevToolError
impl Display for DevToolError
Source§impl Error for DevToolError
impl Error for DevToolError
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<DevToolError> for AdkError
The category, code and whether the model sees the message, for each error the model can
act on (spec 3.1 §7.33 fix 6, §10 D9): a rejection’s message reaches the model, so it
learns to read before editing or to give a more specific string; an I/O failure other
than a missing file stays internal and hidden.
impl From<DevToolError> for AdkError
The category, code and whether the model sees the message, for each error the model can act on (spec 3.1 §7.33 fix 6, §10 D9): a rejection’s message reaches the model, so it learns to read before editing or to give a more specific string; an I/O failure other than a missing file stays internal and hidden.