Method ExecuteAsync
- Namespace
- Oscova.Agents.Toolsets
- Assembly
- Oscova.Agents.dll
ExecuteAsync(string, string?, int, CancellationToken)
Executes a shell command using the runtime selected by the host application.
Task<CommandResult> ExecuteAsync(string command, string? workingDirectory, int timeoutSeconds, CancellationToken cancellationToken = default)Parameters
commandstring-
The shell command text to execute.
workingDirectorystring?-
The working directory supplied by the tool call, if any.
timeoutSecondsint-
The command timeout in seconds.
cancellationTokenCancellationToken-
A token that can cancel command execution.
Returns
- Task<CommandResult>
-
The command exit code, output streams, and timeout flag.