class LittleGhost::Tools::Shell
Shell lets an agent run one executable through the configured Sandbox. It accepts an argument vector, so model-supplied values are not interpreted as shell syntax.
The child environment is cleared, runtime is limited to 30 seconds, and each output stream is limited to 1 MB. These defaults reduce accidental exposure but do not create an isolation boundary; the configured sandbox remains responsible for security.
Public Instance Methods
Source
# File lib/little_ghost/tools/shell.rb, line 27 def call(input) result = sandbox.execute_program( input.fetch("command"), timeout: DEFAULT_TIMEOUT, context:, max_output_bytes: MAX_OUTPUT_BYTES, environment: {}, inherit_environment: false ) JSON.generate( stdout: result.stdout, stderr: result.stderr, exit_status: result.exit_code, success: result.success? ) end
Executes input["command"] and returns a JSON result containing standard output, standard error, exit status, and success.