mirror of
https://github.com/wu736139669/hapi.git
synced 2026-11-25 05:07:05 +00:00
Replace CLI version string comparison with file modification time (mtime) based detection. This provides a more reliable way to detect when the CLI binary has been updated, especially for bun-compiled executables where package.json may not be accessible. Changes: - Add getInstalledCliMtimeMs() utility to check CLI binary or package.json mtime - Store startedWithCliMtimeMs in daemon state on startup - Use mtime comparison in version check loop for daemon auto-restart - Move version flag handling to early CLI startup before daemon initialization - Fix machine active state merging to prefer newer activeAt timestamp This improves daemon restart behavior when CLI is updated via package managers.