pub trait Runtime: Send + Sync {
// Required methods
fn create<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
cwd: &'life2 Path,
launch_command: &'life3 str,
env: &'life4 [(String, String)],
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait;
fn send_message<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
handle: &'life1 str,
msg: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn is_alive<'life0, 'life1, 'async_trait>(
&'life0 self,
handle: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn destroy<'life0, 'life1, 'async_trait>(
&'life0 self,
handle: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
How an agent process is executed (tmux, raw process, docker, …).
The runtime returns an opaque handle string that the caller stores in
Session::runtime_handle and passes back to other methods.
Required Methods§
Sourcefn create<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
cwd: &'life2 Path,
launch_command: &'life3 str,
env: &'life4 [(String, String)],
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn create<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
cwd: &'life2 Path,
launch_command: &'life3 str,
env: &'life4 [(String, String)],
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Spawn a new isolated execution context (e.g. tmux session) and run the
given launch command in it. launch_command is a single shell string
— the runtime is responsible for any escaping/wrapping it needs.