feat(core): add macos-notifications skill - #33
Open
jawad-factory wants to merge 1 commit into
Open
Conversation
Wiring Droid CLI hooks to macOS notifications has an invisible failure mode: terminal-notifier links NSUserNotification, which macOS 26 no longer delivers, yet it still exits 0 when the banner is discarded. The hook looks healthy while delivering nothing. The setup steps are already in the hooks docs; the silent failure is documented nowhere, so an agent fixing this cold will install terminal-notifier, see exit 0, and report success while leaving the user broken. This encodes the trap, the diagnostic order, hooks.json vs settings.json precedence, and a verified osascript reference hook. Placed in core for discoverability, named macOS-specific so it will not misfire for other platforms. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
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.
Description
Adds a
macos-notificationsskill to thecoreplugin, covering how to wire Droid CLI hooks to macOS desktop notifications and how to diagnose them when they silently do nothing.The motivating problem is a failure mode that is effectively invisible.
terminal-notifier, which most guides recommend, links againstNSUserNotification(deprecated in macOS 11, no longer delivered in macOS 26), and its Homebrew bundle isadhoc, linker-signedwithInfo.plist=not boundand noTeamIdentifier, so macOS will not grant it notification authorization. Critically it returns exit 0 even when macOS discards the banner, so the hook reports success while delivering nothing. Version 2.0.0 is the final release (2017) and unmaintained, so there is nothing to upgrade to.This was hit in practice: a correctly-wired
Stop/Notificationhook produced no banners while every diagnostic returned success.The setup steps themselves are already in the public hooks docs, so a skill that only listed them would be redundant. The silent-failure behavior is documented nowhere, and an agent asked to fix notifications cold will install
terminal-notifier, observe exit 0, and confidently report success, reproducing exactly the broken state. Encoding that trap is the point.What the skill covers:
hooks.jsonvssettings.jsonprecedence: whenhooks.jsonexists, thehookskey insettings.jsonis fully ignored, making stale entries there dead config that would silently reactivate if the file were removednmandcodesigninvocations that prove the terminal-notifier diagnosis instead of asserting itosascriptreference hook script#Wover#S:#Ibecause the window index shifts on close/reorder, plusautomatic-renamebeing global-on but per-window-off once a window is namedPlaced in
corefor discoverability, since that plugin is pre-installed by the CLI. Named and described as explicitly macOS-specific so it will not misfire for users on other platforms.Related Issue
Closes CLI-1588
Potential Risk & Impact
Low. This is additive and documentation-only: one new
SKILL.md, oneskills/symlink, and one README line. No existing skill, script, or workflow is modified, and nothing executes at install time.Two things worth a reviewer's attention:
nm/codesignchecks rather than assuming older macOS behaves identically. No Linuxnotify-sendguidance is included, because none of it was tested.osascripthas no equivalent of terminal-notifier's-execute(click-to-focus) or-group(coalescing). The skill states both losses rather than presenting the swap as free.How Has This Been Tested?
.github/workflows/check-skills.yml) extracted and run locally:All skills are accounted for., exit 0core's sibling convention ofname+version+ blockdescriptionskills/macos-notificationssymlink resolves, and is recorded with mode120000matching the existingskills/reviewsymlinkStop,Notification, bare-env, and the non-tmux fallback path$(...)/backtick text, confirming it is passed through literally rather than evaluatedEnvironment: macOS 26.5.2 (25F84, arm64), terminal-notifier 2.0.0, tmux with iTerm2, bash 3.2.57 (the script deliberately avoids bash 4+ syntax).
End-to-end delivery was confirmed by a human observing the actual banners, since exit codes are unreliable here and the notification database is not readable.