Yes, that actually does wire things up with OtterScript, though I just realized I forgot to include a sample for how to actually invoke that script from OtterScript...
PSCall2 MyScript.ps1
(
Parameters: %(inputvalue: Hello, resultingtext: outputvar)
);
Log-Information MyScript returned $outputvar;
The Parameters argument is meant to handle anything declared as an input/output value in the script's header. Note that for outputs you actually supply the name of the OtterScript variable to assign as the parameter value. For the record, I agree that this is all very confusing and we could certainly do a better job in the UI and docs. I believe the original goal when we added PSCall2 was to make the script parameters more discoverable, but at least as it works now, it has had the opposite effect.
That crazy stuff with the prefix is the mechanism it uses behind the scenes to capture output values that are declared in that parameters header or in the OuputVariables argument.
Does using this kind of header and PSCall2 invocation work at all for you? There's other things that could go wrong with marshalling values to/from PowerShell, but this ought to at least get you outputs without having to jump through those extra hoops.
-Greg