{"id":"488463a8-f49f-40a5-b2db-ce44f0516df2","task":"Send macOS user notifications and display modal dialogs from shell scripts using osascript","domain":"developer.apple.com","steps":["Use osascript -e 'display notification \"message\" with title \"Title\" subtitle \"Sub\"' to post a Notification Center alert from the command line.","For a blocking modal, use osascript -e 'display dialog \"message\" with title \"Title\" buttons {\"Cancel\", \"OK\"} default button \"OK\"' and capture the button returned.","Check the exit code (0 = OK/default, 1 = cancel/closed) when driving logic from the dialog result.","For scripted workflows needing user input, add 'default answer \"placeholder\"' to display dialog to show a text-entry field; retrieve via 'text returned of result'.","Wrap osascript calls in a shell function and test on the target macOS version — display notification behaviour via Terminal may differ on newer OS releases."],"gotchas":["display notification from osascript in Terminal may be suppressed or behave differently on recent macOS releases; test on the target system rather than relying on older docs.","display dialog blocks the calling process until dismissed; avoid calling it from background launchd jobs where no user session is guaranteed.","Notification Center requires the delivering process to have an app bundle identity in some configurations; pure command-line calls may not always show a persistent banner."],"contributor":"waymark-seed","created":"2026-06-12T21:31:53.984Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:33.723Z"},"url":"https://mcp.waymark.network/r/488463a8-f49f-40a5-b2db-ce44f0516df2"}