namespace MCPForUnity.Editor.Services
{
/// <summary>
/// Interface for server management operations
/// </summary>
public interface IServerManagementService
/// Clear the local uvx cache for the MCP server package
/// <returns>True if successful, false otherwise</returns>
bool ClearUvxCache();
/// Start the local HTTP server in a new terminal window.
/// Stops any existing server on the port and clears the uvx cache first.
/// <returns>True if server was started successfully, false otherwise</returns>
bool StartLocalHttpServer();
/// Stop the local HTTP server by finding the process listening on the configured port
bool StopLocalHttpServer();
/// Stop the Unity-managed local HTTP server if a handshake/pidfile exists,
/// even if the current transport selection has changed.
bool StopManagedLocalHttpServer();
/// Best-effort detection: returns true if a local MCP HTTP server appears to be running
/// on the configured local URL/port (used to drive UI state even if the session is not active).
bool IsLocalHttpServerRunning();
/// Attempts to get the command that will be executed when starting the local HTTP server
/// <param name="command">The command that will be executed when available</param>
/// <param name="error">Reason why a command could not be produced</param>
/// <returns>True if a command is available, false otherwise</returns>
bool TryGetLocalHttpServerCommand(out string command, out string error);
/// Check if the configured HTTP URL is a local address
/// <returns>True if URL is local (localhost, 127.0.0.1, etc.)</returns>
bool IsLocalUrl();
/// Check if the local HTTP server can be started
/// <returns>True if HTTP transport is enabled and URL is local</returns>
bool CanStartLocalServer();
}