// Copyright (c) Microsoft. All rights reserved. using System; using System.Collections.Generic; namespace Microsoft.Agents.AI.Tools.Shell; /// /// Configuration for . New knobs will be /// added as properties here so the constructor surface stays binary-stable. /// public sealed class LocalShellExecutorOptions { /// Execution mode. Defaults to . public ShellMode Mode { get; set; } = ShellMode.Persistent; /// /// Override path to the shell binary. Falls back to the /// AGENT_FRAMEWORK_SHELL environment variable, then OS defaults. /// Mutually exclusive with . /// public string? Shell { get; set; } /// /// Override argv for the shell launch. The first element is the binary; /// subsequent elements are passed as a launch-time prefix. Mutually /// exclusive with . /// public IReadOnlyList? ShellArgv { get; set; } /// /// Working directory for the spawned shell. Defaults to the current /// process directory. Required when /// is . /// public string? WorkingDirectory { get; set; } /// /// When (the default), every command in /// persistent mode is prefixed with a cd back into /// so a wandering cd in one call /// doesn't leak to the next. /// public bool ConfineWorkingDirectory { get; set; } = true; /// /// Extra environment variables. Pass a value to /// remove an inherited variable. /// public IReadOnlyDictionary? Environment { get; set; } /// /// When , the spawned shell does not inherit the /// parent process environment. /// public bool CleanEnvironment { get; set; } /// /// Optional . When , a /// default policy seeded with /// is used. /// public ShellPolicy? Policy { get; set; } /// /// Per-command timeout. (the default) disables /// timeouts. See for the /// recommended value. /// public TimeSpan? Timeout { get; set; } /// Per-stream cap before head+tail truncation. Defaults to 64 KiB. public int MaxOutputBytes { get; set; } = 64 * 1024; /// /// Set to to allow /// to produce an /// AIFunction without an ApprovalRequiredAIFunction wrapper. /// public bool AcknowledgeUnsafe { get; set; } }