Single source of truth for serializing an MJCLIResult per format.
Both the runtime host's Emit and the usage commands call this so JSON/MD
envelopes are always rendered identically. Returns the empty string for
text — in text mode the plugin renders its own human output, not a result
blob. No trailing newline; callers add one.
Single source of truth for serializing an MJCLIResult per format. Both the runtime host's
Emitand the usage commands call this so JSON/MD envelopes are always rendered identically. Returns the empty string fortext— in text mode the plugin renders its own human output, not a result blob. No trailing newline; callers add one.