littleshop/LittleShop/Services/IBotDiscoveryService.cs
SysAdmin 521bff2c7d
All checks were successful
Build and Deploy LittleShop / Deploy to Production VPS (Manual Only) (push) Has been skipped
Build and Deploy LittleShop / Deploy to Pre-Production (CT109) (push) Successful in 1m0s
feat: Add Remote TeleBot Discovery & Configuration
- Add discovery API endpoints to TeleBot (probe, initialize, configure, status)
- Add LivenessService for LittleShop connectivity monitoring with 5min shutdown
- Add BotDiscoveryService to LittleShop for remote bot management
- Add Admin UI: DiscoverRemote wizard, RepushConfig page, status badges
- Add remote discovery fields to Bot model (RemoteAddress, RemotePort, etc.)
- Add CheckRemoteStatus and RepushConfig controller actions
- Update Index/Details views to show remote bot indicators
- Shared secret authentication for discovery, BotKey for post-init

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 13:41:36 +00:00

35 lines
1.1 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);
}