// Copyright (c) Microsoft. All rights reserved.
using System;
using System.Diagnostics.CodeAnalysis;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.AI;
using Microsoft.Shared.DiagnosticIds;
using Microsoft.Shared.Diagnostics;
namespace Microsoft.Agents.AI;
///
/// A file-path-backed skill script. Represents a script file on disk that requires an external runner to run.
///
[Experimental(DiagnosticIds.Experiments.AgentsAIExperiments)]
public sealed class AgentFileSkillScript : AgentSkillScript
{
private readonly AgentFileSkillScriptRunner? _runner;
///
/// Initializes a new instance of the class.
///
/// The script name.
/// The absolute file path to the script.
/// Optional external runner for running the script. An is thrown from if no runner is provided.
internal AgentFileSkillScript(string name, string fullPath, AgentFileSkillScriptRunner? runner = null)
: base(name)
{
this.FullPath = Throw.IfNullOrWhitespace(fullPath);
this._runner = runner;
}
///
/// Gets the absolute file path to the script.
///
public string FullPath { get; }
///
public override async Task