Files
Jarvis/App/Jarvis.Debug.entitlements
james.maes c7242ed64c fix(app,wizard,scripts): suppress wizard-redundant banners + wire DevOverlay menu + add camera entitlement
User reported four issues clustered around setup UX and missing
features after the previous round of fixes:

1. 'No API key configured' banner pops up DURING the wizard's API-key
   stage. Same for 'Limited hotkey mode' during the TCC stage. AppDelegate
   was enqueuing both banners at startup BEFORE deciding whether the
   wizard would open, so the wizard's own apiKey / TCC stages stacked
   on top of redundant banners covering the same prerequisites.

2. AppDelegate called hidProbe.requestListenEventAccess() at launch (the
   prompting variant), so on first launch macOS could fire a TCC dialog
   OUTSIDE the wizard's TCC stage flow — surprising the user with a
   permission prompt before they'd seen any explainer copy.

3. 'Show Dev Overlay' menu item was a stub that enqueued a 'Dev Overlay
   lands in Phase 4' banner. The DevOverlay package has been fully
   implemented for some time (DevOverlayWindow with show/hide/toggle);
   nobody had wired the menu item to it.

4. Camera entitlement (com.apple.security.device.camera) was missing from
   BOTH Jarvis.Debug.entitlements and Jarvis.Release.entitlements. macOS
   non-sandboxed apps don't strictly require it, but having it acts as a
   hint to the system and is required if sandboxing is ever enabled.
   Without it, NSCameraUsageDescription alone may surface camera prompts
   in some macOS versions but not be reliably honored.

Fixes:

- AppDelegate.applicationWillFinishLaunching:
    * Compute apiKeyStored/inputMonitoringGranted but DON'T enqueue
      banners until after the wizard's open/closed decision is made.
    * Switched the launch-time TCC probe from requestListenEventAccess
      (prompts) to isListenEventAccessGranted (IOHIDCheckAccess — query
      only). The wizard's TCC stage owns the actual prompt now.
    * After the wizard decision: enqueue keychainEmpty/inputMonitoringDenied
      ONLY if the wizard isn't going to address them.

- AppDelegate menu wiring:
    * devOverlayToggleAction now calls toggleDevOverlay() which lazily
      constructs a DevOverlayWindow on first toggle and routes the menu
      item to its toggle() primitive.
    * Removed the showDevOverlayStubBanner placeholder.
    * Added 'import DevOverlay' (project.yml + Package wiring also updated).

- project.yml:
    * Added DevOverlay package declaration (path: packages/DevOverlay).
    * Added DevOverlay product to the Jarvis target's dependencies.
    * Re-ran xcodegen to regenerate Jarvis.xcodeproj.

- App/Jarvis.{Debug,Release}.entitlements:
    * Added com.apple.security.device.camera. Doesn't violate the
      MAIN_FORBIDDEN list in verify-entitlements.sh.

Verified: check-app-builds clean; codesign reflects the new camera
entitlement; relaunched (PID 43128); 'Show Dev Overlay' now toggles
the actual DevOverlayWindow; banner spam during wizard is gone.
2026-05-02 07:53:23 -05:00

15 lines
409 B
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.device.audio-input</key>
<true/>
<key>com.apple.security.device.camera</key>
<true/>
<key>com.apple.security.get-task-allow</key>
<true/>
</dict>
</plist>