littleshop/LittleShop/Services/IBotDiscoveryService.cs
SysAdmin 86f19ba044
All checks were successful
Build and Deploy LittleShop / Deploy to Pre-Production (CT109) (push) Successful in 59s
Build and Deploy LittleShop / Deploy to Production VPS (Manual Only) (push) Has been skipped
feat: Add AlexHost deployment pipeline and bot control functionality
- Add Gitea Actions workflow for manual AlexHost deployment
- Add docker-compose.alexhost.yml for production deployment
- Add deploy-alexhost.sh script with server-side build support
- Add Bot Control feature (Start/Stop/Restart) for remote bot management
- Add discovery control endpoint in TeleBot
- Update TeleBot with StartPollingAsync/StopPolling/RestartPollingAsync
- Fix platform architecture issues by building on target server
- Update docker-compose configurations for all environments

Deployment tested successfully:
- TeleShop: healthy at https://teleshop.silentmary.mywire.org
- TeleBot: healthy with discovery integration
- SilverPay: connectivity verified

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 12:33:46 +00:00

42 lines
1.4 KiB
C#

using LittleShop.DTOs;
namespace LittleShop.Services;
/// <summary>
/// Service for discovering and configuring remote TeleBot instances
/// </summary>
public interface IBotDiscoveryService
{
/// <summary>
/// Probe a remote TeleBot instance to discover its status
/// </summary>
Task<DiscoveryResult> ProbeRemoteBotAsync(string ipAddress, int port);
/// <summary>
/// Initialize a remote TeleBot instance with a BotKey
/// </summary>
Task<InitializeResult> InitializeRemoteBotAsync(Guid botId, string ipAddress, int port);
/// <summary>
/// Push configuration (bot token and settings) to a remote TeleBot instance
/// </summary>
Task<ConfigureResult> PushConfigurationAsync(Guid botId, string botToken, Dictionary<string, object>? settings = null);
/// <summary>
/// Test basic connectivity to a remote address
/// </summary>
Task<bool> TestConnectivityAsync(string ipAddress, int port);
/// <summary>
/// Get the status of a remote TeleBot instance
/// </summary>
Task<DiscoveryProbeResponse?> GetRemoteStatusAsync(string ipAddress, int port, string botKey);
/// <summary>
/// Control a remote TeleBot instance (start/stop/restart)
/// </summary>
/// <param name="botId">The bot ID in LittleShop</param>
/// <param name="action">Action to perform: "start", "stop", or "restart"</param>
Task<BotControlResult> ControlBotAsync(Guid botId, string action);
}