// Copyright (c) Microsoft. All rights reserved. using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using Microsoft.Shared.DiagnosticIds; namespace Microsoft.Agents.AI; /// /// Configuration options for file-based skill sources. /// /// /// Use this class to configure file-based skill discovery without relying on /// positional constructor or method parameters. New options can be added here /// without breaking existing callers. /// [Experimental(DiagnosticIds.Experiments.AgentsAIExperiments)] public sealed class AgentFileSkillsSourceOptions { /// /// Gets or sets the allowed file extensions for skill resources. /// When , defaults to .md, .json, .yaml, /// .yml, .csv, .xml, .txt. /// public IEnumerable? AllowedResourceExtensions { get; set; } /// /// Gets or sets the allowed file extensions for skill scripts. /// When , defaults to .py, .js, .sh, /// .ps1, .cs, .csx. /// public IEnumerable? AllowedScriptExtensions { get; set; } /// /// Gets or sets the maximum depth to search for script and resource files within each skill directory. /// A value of 1 searches only the skill root directory. A value of 2 searches the root /// and one level of subdirectories. /// When , the source uses the default depth of 2. /// /// /// Must be greater than or equal to 1; lower values are rejected by the constructor. /// public int? SearchDepth { get; set; } /// /// Gets or sets a predicate that filters discovered script files. /// The predicate receives an containing the skill's name /// and the file's path relative to the skill directory. /// Return to include the file or to exclude it. /// When , all scripts matching the allowed extensions are included. /// public Func? ScriptFilter { get; set; } /// /// Gets or sets a predicate that filters discovered resource files. /// The predicate receives an containing the skill's name /// and the file's path relative to the skill directory. /// Return to include the file or to exclude it. /// When , all resources matching the allowed extensions are included. /// public Func? ResourceFilter { get; set; } }