Based on the provided contexts, there isn't a direct solution or feature within Spine or its Photoshop scripts that supports exporting PSD layers for every pose of an animation directly through a script with the specific requirements you've mentioned (such as iterating every frame of an animation and outputting its layers with "outputType": "layers" and "exportType": "animation"). The Spine User Guide and forum discussions mainly cover exporting animations as image sequences, PSD exports for current poses, or using Photoshop scripts for preparing assets for Spine, but they do not detail a method for exporting PSD layers for every pose within an animation through scripting.
However, a workaround could involve manually adjusting the animation to the desired frame in Spine and exporting the current pose as a PSD with layers, repeating this process for each frame you wish to export. This method is obviously more manual and time-consuming and doesn't utilize a script to automate the process across all frames of an animation.