namespace MCPForUnity.Editor.Services { /// /// Service for checking package updates and version information /// public interface IPackageUpdateService { /// /// Checks if a newer version of the package is available /// /// The current package version /// Update check result containing availability and latest version info UpdateCheckResult CheckForUpdate(string currentVersion); /// /// Compares two version strings to determine if the first is newer than the second /// /// First version string /// Second version string /// True if version1 is newer than version2 bool IsNewerVersion(string version1, string version2); /// /// Determines if the package was installed via Git or Asset Store /// /// True if installed via Git, false if Asset Store or unknown 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; } } }