feat: implement health checks in daemon event loop (bd-gqo)

Add health checks to checkDaemonHealth() function:
- Database integrity check using PRAGMA quick_check(1)
- Disk space check with 100MB warning threshold (platform-specific)
- Memory usage check with 500MB heap warning threshold

Platform-specific disk space implementations:
- Unix: uses unix.Statfs
- Windows: uses windows.GetDiskFreeSpaceEx
- WASM: returns unsupported (false)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-11-28 23:10:44 -08:00
parent 5882a2f105
commit 39909c1f80
5 changed files with 175 additions and 78 deletions

View File

@@ -0,0 +1,10 @@
//go:build wasm
package main
// checkDiskSpace returns the available disk space in MB for the given path.
// Returns (availableMB, true) on success, (0, false) on failure.
// WASM builds don't support disk space checks.
func checkDiskSpace(path string) (uint64, bool) {
return 0, false
}