using System.Collections.Generic;
namespace MCPForUnity.Editor.Services.Server
{
///
/// Interface for platform-specific process inspection operations.
/// Provides methods to detect MCP server processes, query process command lines,
/// and find processes listening on specific ports.
///
public interface IProcessDetector
{
///
/// Determines if a process looks like an MCP server process based on its command line.
/// Checks for indicators like uvx, python, mcp-for-unity, uvicorn, etc.
///
/// The process ID to check
/// True if the process appears to be an MCP server
bool LooksLikeMcpServerProcess(int pid);
///
/// Attempts to get the command line arguments for a Unix process.
///
/// The process ID
/// Output: normalized (lowercase, whitespace removed) command line args
/// True if the command line was retrieved successfully
bool TryGetProcessCommandLine(int pid, out string argsLower);
///
/// Gets the process IDs of all processes listening on a specific TCP port.
///
/// The port number to check
/// List of process IDs listening on the port
List GetListeningProcessIdsForPort(int port);
///
/// Gets the current Unity Editor process ID safely.
///
/// The current process ID, or -1 if it cannot be determined
int GetCurrentProcessId();
///
/// Checks if a process exists on Unix systems.
///
/// The process ID to check
/// True if the process exists
bool ProcessExists(int pid);
///
/// Normalizes a string for matching by removing whitespace and converting to lowercase.
///
/// The input string
/// Normalized string for matching
string NormalizeForMatch(string input);
}
}