Confidential terms set the stage for a strategic exit from aerospace in favor of defense-sector battery development.