2023-06-11 15:22:48 +00:00
|
|
|
namespace BotSharp.Abstraction.Agents;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Agent management service
|
|
|
|
|
/// </summary>
|
|
|
|
|
public interface IAgentService
|
|
|
|
|
{
|
2023-06-12 13:28:49 +00:00
|
|
|
Task<Agent> CreateAgent(Agent agent);
|
2023-10-17 20:29:40 +00:00
|
|
|
Task RefreshAgents();
|
2023-10-23 17:41:44 +00:00
|
|
|
Task<List<Agent>> GetAgents(bool? allowRouting = null);
|
2023-08-14 17:00:01 +00:00
|
|
|
|
|
|
|
|
/// <summary>
|
2023-10-18 15:54:03 +00:00
|
|
|
/// Load agent configurations and trigger hooks
|
2023-08-14 17:00:01 +00:00
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="id"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
Task<Agent> LoadAgent(string id);
|
|
|
|
|
|
2023-10-28 20:59:26 +00:00
|
|
|
string RenderedInstruction(Agent agent);
|
|
|
|
|
|
|
|
|
|
string RenderedTemplate(Agent agent, string templateName);
|
|
|
|
|
|
2023-10-18 11:58:36 +00:00
|
|
|
/// <summary>
|
|
|
|
|
/// Get agent detail without trigger any hook.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="id"></param>
|
|
|
|
|
/// <returns>Original agent information</returns>
|
2023-06-27 18:31:13 +00:00
|
|
|
Task<Agent> GetAgent(string id);
|
2023-10-18 11:58:36 +00:00
|
|
|
|
2023-06-11 23:46:02 +00:00
|
|
|
Task<bool> DeleteAgent(string id);
|
2023-09-15 20:19:44 +00:00
|
|
|
Task UpdateAgent(Agent agent, AgentField updateField);
|
2023-09-13 22:34:19 +00:00
|
|
|
Task UpdateAgentFromFile(string id);
|
2023-08-09 21:49:55 +00:00
|
|
|
string GetDataDir();
|
2023-06-27 18:31:13 +00:00
|
|
|
string GetAgentDataDir(string agentId);
|
2023-06-11 15:22:48 +00:00
|
|
|
}
|