Skip to main content

Module bash

Module bash 

Source
Expand description

Bash Tool Implementation

This module implements the BashTool for executing shell commands with:

  • Cross-platform support (Windows PowerShell/CMD, macOS, Linux)
  • Safety checks for dangerous commands
  • Warning pattern detection
  • Background task execution
  • Configurable timeout
  • Output truncation

Requirements: 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9

Structs§

BashTool
Bash Tool for executing shell commands
SafetyCheckResult
Safety check result for command validation
SandboxConfig
Sandbox configuration for command execution

Constants§

DEFAULT_TIMEOUT_SECS
Default timeout for command execution (5 minutes)
MAX_OUTPUT_LENGTH
Maximum output length before truncation (128KB)
MAX_TIMEOUT_SECS
Maximum timeout allowed (30 minutes)