feat(agent): add persistent klogging settings

- Add settings API and UI to toggle keylog
- Persist preference in settings.json
- Expose klogging state in status endpoint
- Inject build version into web console
- Bump version automatically on build
This commit is contained in:
2026-09-01 23:36:39 +03:00
parent a3c78820ed
commit ac31e52a8c
13 changed files with 329 additions and 14 deletions
+17
View File
@@ -17,6 +17,23 @@ var (
writerWG sync.WaitGroup
)
func Running() bool {
mu.Lock()
defer mu.Unlock()
return running
}
func SetEnabled(on bool) error {
if err := config.SetKeylogEnabled(on); err != nil {
return err
}
if !on {
Stop()
return nil
}
return Start()
}
func Start() error {
if !config.KeylogEnabled() {
return nil