pub struct NativeHarnessConfig { /* private fields */ }Expand description
Host configuration that enables in-process AgentKind::Harness turns.
Each session keeps its durable harness history in
<data_root>/<session id>/, outside the session worktree; hosts remove
that directory when they delete the session. Its tmp directory is the
TMPDIR and tool cache of the session’s commands, which cannot read the
rest of the data root; utility prompts get a fresh one each.
bash runs inside the native sandbox, which needs the host to call
super::dispatch_sandbox_helper first in main; where the sandbox
cannot run, commands run without it and every turn reports why.
Implementations§
Source§impl NativeHarnessConfig
impl NativeHarnessConfig
Sourcepub fn new(data_root: PathBuf) -> Self
pub fn new(data_root: PathBuf) -> Self
Configures harness storage under data_root, reading provider
settings from the process environment.
Sourcepub fn with_environment(
data_root: PathBuf,
environment: impl Fn() -> BTreeMap<String, String> + Send + Sync + 'static,
) -> Self
pub fn with_environment( data_root: PathBuf, environment: impl Fn() -> BTreeMap<String, String> + Send + Sync + 'static, ) -> Self
Configures harness storage under data_root with an explicit
environment source for provider settings and bash grants. A
relative data_root is resolved against the current directory.
Provider API keys come from the API key file the environment
locates, auth/api_keys.json in Agentty’s data directory:
AGENTTY_ROOT, else ~/.agentty. A key variable is only imported into
that file.
Sourcepub fn with_trusted_cargo_cache(self, cache_root: PathBuf) -> Self
pub fn with_trusted_cargo_cache(self, cache_root: PathBuf) -> Self
Makes session turns reuse the per-project Cargo caches under
cache_root, which the host fills through
super::TrustedCargoCache::refresh with the same root. A relative
cache_root is resolved against the current directory.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for NativeHarnessConfig
impl !UnwindSafe for NativeHarnessConfig
impl Forget for NativeHarnessConfig
impl Freeze for NativeHarnessConfig
impl Move for NativeHarnessConfig
impl Send for NativeHarnessConfig
impl Sync for NativeHarnessConfig
impl Unpin for NativeHarnessConfig
impl UnsafeUnpin for NativeHarnessConfig
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<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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