An in-process terminal and TerminalTool for agents
The off-by-default terminal feature wraps a Bashkit session in an in-memory
terminal with vi and interactive less and more. TerminalTool turns it
into one agent tool call: the model sends keys in Vim notation and gets back
the screen, the activity (prompt, continuation, running or exited) and
the commands that finished.
let mut tool = TerminalTool::new(Bash::builder());let out = tool.call(json!({"input": "vi /tmp/n.txt<Enter>"})).await?;TerminalTool::with_sessions adds up to 8 named tabs that share the filesystem
and keep running in the background. Python (bashkit.Terminal) and Node
(Terminal in @everruns/bashkit) expose the same calls.