Files
managing-apps/src/Managing.Application/Abstractions/Grains/IAgentGrain.cs

41 lines
1.4 KiB
C#

using Managing.Application.Abstractions.Models;
namespace Managing.Application.Abstractions.Grains
{
public interface IAgentGrain : IGrainWithIntegerKey
{
/// <summary>
/// Initializes the agent grain with user-specific data.
/// </summary>
/// <param name="userId">The ID of the user (used as grain key).</param>
/// <param name="agentName">The display name of the agent.</param>
Task InitializeAsync(int userId, string agentName);
/// <summary>
/// Updates only the agent name without recalculating summary.
/// </summary>
/// <param name="agentName">The new agent name.</param>
Task UpdateAgentNameAsync(string agentName);
/// <summary>
/// Generates a summary of the agent's stats for the AgentRegistryGrain.
/// </summary>
Task UpdateSummary();
/// <summary>
/// Registers a new bot with this agent.
/// </summary>
Task RegisterBotAsync(Guid botId);
/// <summary>
/// Unregisters a bot from this agent.
/// </summary>
Task UnregisterBotAsync(Guid botId);
/// <summary>
/// Handles stream notifications for agent summary updates.
/// </summary>
/// <param name="updateEvent">The update event from the stream</param>
Task OnAgentSummaryUpdateAsync(AgentSummaryUpdateEvent updateEvent);
}
}