java.lang.Object
io.agentscope.extensions.sandbox.kubernetes.client.CommandExecutor

public class CommandExecutor extends Object
Executes commands inside a sandbox via POST /execute.
  • Constructor Details

  • Method Details

    • run

      public ExecutionResult run(String command)
      Runs a command with the default timeout of 60 seconds.
      Parameters:
      command - shell command
      Returns:
      execution result
    • run

      public ExecutionResult run(String command, Duration timeout)
      Runs a command with the given timeout.
      Parameters:
      command - shell command
      timeout - request timeout (currently used as retry budget hint)
      Returns:
      execution result