Add audio input and camera permissions to entitlements
This PR adds camera and audio entitlements to the desktop app.
Why?
While opencode doesn't need camera or audio, it has a built-in terminal which can be used to run the project that you're working with.
For example I am working on an app that requires camera and audio permissions and without this I am not able to run the app in my local because macOS doesn't allow camera or audio if it is not included in the entitlements file.
This has been already considered in terminal emulators like Ghostty or Alacrritty for such scenarios.
The following comment was made by an LLM, it may be inaccurate:
No duplicate PRs found
cc @Brendonovich
@adamdotdevin @Brendonovich I only added audio and camera. Does it make sense to inherit from what Ghostty has to avoid another PR in the future?
Like this:
<key>com.apple.security.automation.apple-events</key>
<true/>
<key>com.apple.security.device.audio-input</key>
<true/>
<key>com.apple.security.device.camera</key>
<true/>
<key>com.apple.security.personal-information.addressbook</key>
<true/>
<key>com.apple.security.personal-information.calendars</key>
<true/>
<key>com.apple.security.personal-information.location</key>
<true/>
<key>com.apple.security.personal-information.photos-library</key>
I think adding all of them would make sense. Does this cause OC to prompt for all these things on startup or does it just give it the ability to prompt for them when needed?
Does this cause OC to prompt for all these things on startup or does it just give it the ability to prompt for them when needed
No opencode doesn't prompt it neither gets the permissions.
It just gives OC the entitlements and authorization by mac that it can request for such permissions and the apps you run via OC's terminal can request for such permissions.