feat(macos): add entitlements for automation and privacy permissions#196
Merged
forketyfork merged 2 commits intomainfrom Feb 4, 2026
Merged
feat(macos): add entitlements for automation and privacy permissions#196forketyfork merged 2 commits intomainfrom
forketyfork merged 2 commits intomainfrom
Conversation
Issue: CLI apps running inside Architect terminals could not request macOS automation permissions (e.g., AppleScript). Unlike Ghostty, no permission dialog appeared - the requests just failed silently. Solution: Added proper macOS entitlements and Info.plist usage descriptions following Ghostty's approach. Created entitlements files for production and debug builds, added 13 NS*UsageDescription keys to Info.plist, and updated the bundle script to code-sign the app with entitlements. Also changed the main bundle executable from a shell wrapper to the actual binary, since entitlements only work on signed binaries.
There was a problem hiding this comment.
Pull request overview
This PR adds macOS entitlements and privacy permission descriptions to enable CLI apps running in Architect terminals to request automation and privacy permissions (e.g., AppleScript, camera, microphone). Previously, these requests failed silently without permission dialogs.
Changes:
- Added entitlements files for production and debug builds
- Updated Info.plist with 13 privacy usage descriptions
- Modified bundling script to sign binaries with entitlements and switch from shell wrapper to direct binary execution
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| scripts/bundle-macos.sh | Added debug flag support, switched to direct binary execution, implemented code signing with entitlements, and updated dependency patching logic |
| macos/ArchitectDebug.entitlements | Debug entitlements with library validation disabled for unsigned dylibs |
| macos/Architect.entitlements | Production entitlements for automation and privacy permissions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add comment explaining why a flag is used instead of early return: signing must always happen regardless of Nix dependencies.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CLI apps running inside Architect terminals could not request macOS automation permissions (e.g., AppleScript). Unlike Ghostty, no permission dialog appeared - the requests just failed silently.
Solution
Added proper macOS entitlements and Info.plist usage descriptions, following Ghostty's approach:
macos/Architect.entitlements(production) andmacos/ArchitectDebug.entitlements(debug, withdisable-library-validationfor unsigned dylibs)NS*UsageDescriptionkeys for all privacy-sensitive operations (AppleEvents, Bluetooth, Calendar, Camera, Contacts, LocalNetwork, Location, Microphone, Motion, PhotoLibrary, Reminders, SpeechRecognition, SystemAdministration)--debugflag to select appropriate entitlementsTest plan
zig build && ./scripts/bundle-macos.sh ./zig-out/bin/architect .tmp/test --debugosascript)