From feba68ac2b4f68a5b883502f1631d1a70a038956 Mon Sep 17 00:00:00 2001 From: AI Bot Date: Wed, 13 May 2026 01:13:40 +0800 Subject: [PATCH] fix: point local network permission to correct mac settings --- apps/boss-agent-mac/Sources/BossAgentApp.swift | 2 +- local-agent/boss-agent-status.mjs | 2 +- tests/boss-agent-status.test.mjs | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/boss-agent-mac/Sources/BossAgentApp.swift b/apps/boss-agent-mac/Sources/BossAgentApp.swift index 90c7cb4..00f5bcd 100644 --- a/apps/boss-agent-mac/Sources/BossAgentApp.swift +++ b/apps/boss-agent-mac/Sources/BossAgentApp.swift @@ -357,7 +357,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate, WKNavigationDelegate { "notifications": "x-apple.systempreferences:com.apple.Notifications-Settings.extension", "microphone": "x-apple.systempreferences:com.apple.preference.security?Privacy_Microphone", "camera": "x-apple.systempreferences:com.apple.preference.security?Privacy_Camera", - "localNetwork": "x-apple.systempreferences:com.apple.preference.security?Privacy_LocalNetwork", + "localNetwork": "x-apple.systempreferences:com.apple.settings.PrivacySecurity.extension?privacy-localnetwork", ] return URL(string: mapping[target] ?? mapping["all"]!) } diff --git a/local-agent/boss-agent-status.mjs b/local-agent/boss-agent-status.mjs index 232fa0b..e1ee12d 100644 --- a/local-agent/boss-agent-status.mjs +++ b/local-agent/boss-agent-status.mjs @@ -73,7 +73,7 @@ const MACOS_PERMISSION_SETTINGS = { notifications: "x-apple.systempreferences:com.apple.Notifications-Settings.extension", microphone: "x-apple.systempreferences:com.apple.preference.security?Privacy_Microphone", camera: "x-apple.systempreferences:com.apple.preference.security?Privacy_Camera", - localNetwork: "x-apple.systempreferences:com.apple.preference.security?Privacy_LocalNetwork", + localNetwork: "x-apple.systempreferences:com.apple.settings.PrivacySecurity.extension?privacy-localnetwork", }; const AUTO_PREFLIGHT_PERMISSION_KEYS = new Set(["accessibility", "screenRecording", "automation"]); diff --git a/tests/boss-agent-status.test.mjs b/tests/boss-agent-status.test.mjs index fd61837..62c712c 100644 --- a/tests/boss-agent-status.test.mjs +++ b/tests/boss-agent-status.test.mjs @@ -63,6 +63,10 @@ test("boss-agent status exposes unbound QR binding and local permission states", status.permissionSetup.actions.every((action) => action.settingsUrl.startsWith("x-apple.systempreferences:")), true, ); + assert.equal( + status.permissionSetup.actions.find((action) => action.key === "localNetwork")?.settingsUrl, + "x-apple.systempreferences:com.apple.settings.PrivacySecurity.extension?privacy-localnetwork", + ); assert.deepEqual( status.permissions.items.map((item) => [item.key, item.status]), [ @@ -248,6 +252,7 @@ test("boss-agent mac app intercepts permission links and triggers native app per assert.match(swiftSource, /nativePermissionQueryItems/); assert.match(swiftSource, /nativeCamera/); assert.match(swiftSource, /nativeMicrophone/); + assert.match(swiftSource, /privacy-localnetwork/); assert.match(swiftSource, /func application\(_ application: NSApplication, open urls: \[URL\]\)/); assert.match(swiftSource, /isBossAgentDeepLink/); assert.match(swiftSource, /AVCaptureDevice\.authorizationStatus\(for: \.video/);