pub struct LocalGitTool {
pub root: PathBuf,
pub author: Author,
pub coauthor: Option<String>,
}Expand description
The on-disk GitEngine adapted to newt-core’s
GitTool seam. The binary constructs one per
session (root = workspace, author = the resolved agent identity) and injects
it into the agent loop; execute_tool’s git arm calls
dispatch. A fresh GitEngine::open per call keeps it
stateless and cheap (no long-lived handle across turns).
Fields§
§root: PathBufA Co-authored-by: trailer auto-appended to every commit message — the
AI credit, e.g. Co-authored-by: qwen3:30b (newt-agent v0.6.8) <noreply@newt-agent.com>. The tool owns this (deterministic, always
correct) rather than trusting the model to add it; the system prompt
tells the model it’s automatic so it does not add a second copy.
None disables auto-signing. Skipped when the message already carries a
co-authored-by line (the model signed anyway → don’t duplicate).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LocalGitTool
impl RefUnwindSafe for LocalGitTool
impl Send for LocalGitTool
impl Sync for LocalGitTool
impl Unpin for LocalGitTool
impl UnsafeUnpin for LocalGitTool
impl UnwindSafe for LocalGitTool
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
impl<T> ErasedDestructor for Twhere
T: 'static,
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