ExecuteShellCommandTool
class ExecuteShellCommandTool(executor: ShellCommandExecutor, confirmationHandler: ShellCommandConfirmationHandler) : Tool<ExecuteShellCommandTool.Args, ExecuteShellCommandTool.Result> (source)
Executes shell commands with user approval and automatic timeout.
Before running any command, asks the user for confirmation. If approved, runs the command and captures everything it prints. If the command takes too long, cancels it automatically.
Functions
Link copied to clipboard
Link copied to clipboard
open fun decodeResult(rawResult: JSONElement, serializer: JSONSerializer): ExecuteShellCommandTool.Result
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun encodeResult(result: ExecuteShellCommandTool.Result, serializer: JSONSerializer): JSONElement
Link copied to clipboard
open override fun encodeResultToString(result: ExecuteShellCommandTool.Result, serializer: JSONSerializer): String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open suspend override fun execute(args: ExecuteShellCommandTool.Args): ExecuteShellCommandTool.Result
Runs a command after asking the user for permission.
Link copied to clipboard