Ask for Screen Recording from the agent and Accessibility on first input

This commit is contained in:
Viktor Liu
2026-08-06 12:56:25 +02:00
parent fcfe643375
commit ef1d406edd
4 changed files with 71 additions and 17 deletions
+7
View File
@@ -9,6 +9,13 @@ import (
)
func newAgentResources() (vncserver.ScreenCapturer, vncserver.InputInjector, error) {
// Ask for Screen Recording here and nowhere else: this process runs as the
// console user, which is what TCC requires for a user-scope service, and it
// is the point where somebody is demonstrably trying to view the screen.
// Granting it also requires the capturing process to restart, which comes
// for free since the agent is respawned per session.
vncserver.PrimeScreenCapturePermission()
capturer := vncserver.NewMacPoller()
injector, err := vncserver.NewMacInputInjector()
if err != nil {