I have updated the entitlement file as below:
$ codesign -d --entitlements - xyz.app
Executable=/Applications//.app/Contents/MacOS/applet
[Dict]
[Key] com.apple.security.automation.apple-events
[Value]
[Bool] true
[Key] com.apple.security.cs.allow-jit
[Value]
[Bool] true
[Key] com.apple.security.temporary-exception.apple-events
[Value]
[Array]
[String] com.apple.Terminal
But I'm still getting the error "Not authorzed to send apple events to terminal".