pub struct ContainerShell {
pub container_id: String,
pub workdir: PathBuf,
}Expand description
Commands run inside an already-running container via docker exec.
The case the previous harness handled with a prose instruction. Here the model still calls
bash and cannot route around it, because there is no host shell in its tool surface.
Fields§
§container_id: String§workdir: PathBufWhere the workspace is mounted inside the container.
Trait Implementations§
Source§impl Clone for ContainerShell
impl Clone for ContainerShell
Source§impl Debug for ContainerShell
impl Debug for ContainerShell
Source§impl Shell for ContainerShell
impl Shell for ContainerShell
Source§fn exec(
&self,
command: &str,
_cwd: &Path,
timeout: Duration,
) -> Result<Output, String>
fn exec( &self, command: &str, _cwd: &Path, timeout: Duration, ) -> Result<Output, String>
Run a command to completion. Blocking by contract – see
tools for why.Source§fn describe(&self) -> String
fn describe(&self) -> String
Human-readable description of where commands land, for the system prompt.
A worker that knows it is inside a container does not go looking for the host.
Source§fn exec_user(
&self,
command: &str,
cwd: &Path,
timeout: Duration,
) -> Result<Output, String>
fn exec_user( &self, command: &str, cwd: &Path, timeout: Duration, ) -> Result<Output, String>
Run a command the model issued. Where the executor keeps a persistent session, its
cd and export carry over to the model’s next command, as in a terminal. The default
is exec: a fresh process in cwd.fn exec_host( &self, command: &str, cwd: &Path, timeout: Duration, ) -> Result<Output, String>
Auto Trait Implementations§
impl Forget for ContainerShell
impl Freeze for ContainerShell
impl Move for ContainerShell
impl RefUnwindSafe for ContainerShell
impl Send for ContainerShell
impl Sync for ContainerShell
impl Unpin for ContainerShell
impl UnsafeUnpin for ContainerShell
impl UnwindSafe for ContainerShell
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
Mutably borrows from an owned value. Read more