Table of Contents

Method ExecCommandAsync

Namespace
Oscova.Agents.Toolsets
Assembly
Oscova.Agents.dll

ExecCommandAsync(string, int?, CancellationToken)

Executes a command through the current run's shell executor. Approval is required by default.

[ToolNetworkScope(NetworkScope.Incidental)]
public Task<object> ExecCommandAsync(string command, int? timeoutSeconds = null, CancellationToken cancellationToken = default)

Parameters

command string

The shell command to execute.

timeoutSeconds int?

Optional per-call timeout in seconds; defaults and clamps applied.

cancellationToken CancellationToken

A token that can cancel command execution.

Returns

Task<object>

The command exit code, output streams, timeout flag, and truncation flag.