Skip to main content

Module command_tools

Module command_tools 

Source
Expand description

LLM-callable tools for spawning and interacting with sandboxed commands.

These tools are the primary interface for an LLM agent to execute commands:

§goexpect compatibility

All expect operations are backed by expectrl, providing:

  • Full regex matching with capture groups
  • Multi-pattern switch/case via expectrl::Any
  • Configurable timeouts (0 = dump buffer, default = 30s)
  • Cross-platform PTY support (Linux + macOS)

Structs§

OpenShellTool
LLM tool: open an interactive PTY shell session backed by expectrl.
RunCommandTool
LLM tool: run a command inside the sandbox.
ShellBatchTool
LLM tool: run a sequence of send/expect steps in one call.
ShellExpectCasesTool
LLM tool: wait for one of several regex patterns (switch/case).
ShellExpectTool
LLM tool: wait for a regex pattern in PTY output.
ShellReadTool
LLM tool: non-blocking read of available PTY output.
ShellSignalTool
LLM tool: send an OS signal to a shell session’s process.
ShellWriteTool
LLM tool: send input to a PTY session via expectrl.