namespace MCPForUnity.Editor.Services
{
/// <summary>
/// Service for checking package updates and version information
/// </summary>
public interface IPackageUpdateService
/// Checks if a newer version of the package is available
/// <param name="currentVersion">The current package version</param>
/// <returns>Update check result containing availability and latest version info</returns>
UpdateCheckResult CheckForUpdate(string currentVersion);
/// Compares two version strings to determine if the first is newer than the second
/// <param name="version1">First version string</param>
/// <param name="version2">Second version string</param>
/// <returns>True if version1 is newer than version2</returns>
bool IsNewerVersion(string version1, string version2);
/// Determines if the package was installed via Git or Asset Store
/// <returns>True if installed via Git, false if Asset Store or unknown</returns>
bool IsGitInstallation();
/// Clears the cached update check data, forcing a fresh check on next request
void ClearCache();
}
/// Result of an update check operation
public class UpdateCheckResult
/// Whether an update is available
public bool UpdateAvailable { get; set; }
/// The latest version available (null if check failed or no update)
public string LatestVersion { get; set; }
/// Whether the check was successful (false if network error, etc.)
public bool CheckSucceeded { get; set; }
/// Optional message about the check result
public string Message { get; set; }