If there isn’t already a method for doing this, I’m sure Sam would be interested in
adding it in somewhere along the liine. However, there are an probably an awful lot
of other things he (wants,needs).choose to add beforehand.
Sonic Pi’s record button only records the stereo audio output the Sonic Pi generates. Note that this means there is no “source” option - it’s always set to Sonic Pi
Providing means to access the audio from other apps is beyond the scope of Sonic Pi - this would require OS-level audio routing and likely admin permissions on macOS to run kernel-level code.
As @nlb rightly mentions, you can bring in external channels of audio from the sound card via live_audio, so if you can route your audio there, then you can bring it in to mix with Sonic Pi. Ideally all operating systems would provide a flexible audio routing tool such as pipe wire, but sadly that’s not the case today.