pub enum Runtime {
Claude(ClaudeConfig),
Codex(CodexConfig),
}Expand description
The runtime flavor driving an agent pane.
Variants§
Claude(ClaudeConfig)
Codex(CodexConfig)
Implementations§
Source§impl Runtime
impl Runtime
Sourcepub fn required_deps(&self) -> Vec<&'static str>
pub fn required_deps(&self) -> Vec<&'static str>
Executables the runtime expects on PATH. Checked at spawn time before any destructive step (teardown, tmux creation).
Sourcepub fn build_command(
&self,
agent: AgentId,
mcp_config: &Path,
startup: &str,
) -> String
pub fn build_command( &self, agent: AgentId, mcp_config: &Path, startup: &str, ) -> String
Assemble the shell command string a tmux session will run to start this agent. Runtime owns all per-flavor CLI decoration; callers supply only the runtime-agnostic inputs.
Sourcepub fn post_spawn(&self, session: &str, startup: &str) -> Result<()>
pub fn post_spawn(&self, session: &str, startup: &str) -> Result<()>
Post-spawn hook: runs once after the tmux session exists. Claude
is a no-op — startup already landed via the CLI positional arg
assembled in Self::build_command. Codex has no CLI slot for
a second prompt, so the hook pastes startup into the pane as a
follow-on user turn.
Sourcepub fn defaults_for(agent: AgentId) -> Self
pub fn defaults_for(agent: AgentId) -> Self
Default runtime for agent. Claude unless AGENT_RUNTIME=codex
picks the codex flavor. Explicit netsky agent N --type <flavor>
overrides this and constructs the runtime directly.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Runtime
impl RefUnwindSafe for Runtime
impl Send for Runtime
impl Sync for Runtime
impl Unpin for Runtime
impl UnsafeUnpin for Runtime
impl UnwindSafe for Runtime
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> 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