@@ -212,9 +212,23 @@ text, structured values, and raw binary.
212212Restish should generate a useful ` Accept ` header based on registered content
213213types and their quality values.
214214
215- That ordering is user-visible and can affect what servers return. If CBOR is
216- preferred over JSON, users may observe CBOR responses from APIs that support
217- both.
215+ That ordering is user-visible and can affect what servers return. The default
216+ ordering should favor broadly interoperable, text-friendly structured formats
217+ before compact binary structured formats such as CBOR, MessagePack, and Ion.
218+ JSON and vendor JSON should be the strongest default preference; NDJSON and
219+ YAML should remain preferred over binary structured formats without tying JSON.
220+ Binary formats remain first-class decoding and output targets, but binary
221+ response negotiation should be opt-in through an explicit ` Accept ` header, an
222+ API profile, or an endpoint that only returns that format. Separately, users can
223+ still emit a binary structured document from any decoded response with an
224+ explicit output format such as ` -o cbor ` .
225+
226+ This is deliberately independent of whether stdout is a TTY. Varying
227+ server-side negotiation based on redirection would make the same command ask
228+ for different representations depending on the shell plumbing around it. The
229+ more predictable model is: default negotiation asks for the representation most
230+ likely to work everywhere; output selection decides whether Restish preserves
231+ the original body bytes or decodes and re-renders them.
218232
219233The negotiation algorithm is:
220234
@@ -235,10 +249,12 @@ exact list may grow as built-in aliases are added, but the quality order and
235249deduplication rules remain stable:
236250
237251``` text
238- application/cbor ;q=0.9, application/msgpack ;q=0.8, application/x-msgpack ;q=0.8, application/vnd.msgpack ;q=0.8, application/ion ;q=0.8, text/ion ;q=0.8, application/json ;q=0.5, application/x-ndjson ;q=0.5, application/ndjson ;q=0.5 , application/jsonl ;q=0.5 , application/jsonlines ;q=0.5 , application/yaml ;q=0.5 , application/x-yaml ;q=0.5, text/yaml ;q=0.5 , text/x-yaml ;q=0.5 , application/x-www-form-urlencoded;q=0.3, multipart/form-data;q=0.3, text/event-stream;q=0.2, text/plain;q=0.2, text/*;q=0.2, application/octet-stream;q=0.1, */*;q=0.1
252+ application/json ;q=0.9, application/x-ndjson ;q=0.8, application/ndjson ;q=0.8, application/jsonl ;q=0.8, application/jsonlines ;q=0.8, application/yaml ;q=0.8, application/x-yaml ;q=0.8, text/yaml ;q=0.8, text/x-yaml ;q=0.8 , application/cbor ;q=0.6 , application/msgpack ;q=0.6 , application/x-msgpack ;q=0.6 , application/vnd.msgpack ;q=0.6, application/ion ;q=0.6 , text/ion ;q=0.6 , application/x-www-form-urlencoded;q=0.3, multipart/form-data;q=0.3, application/xml;q=0.2, text/xml;q=0.2 , text/event-stream;q=0.2, text/plain;q=0.2, text/*;q=0.2, application/octet-stream;q=0.1, */*;q=0.1
239253```
240254
241- Quality ordering should be stable and deliberate.
255+ Quality ordering should be stable and deliberate. It is part of the CLI's
256+ product contract because generated commands, generic requests, verbose output,
257+ and server behavior all expose it.
242258
243259Restish should not advertise suffix forms like ` application/*+json ` unless the
244260runtime has an explicit reason to do so. Accept generation is based on concrete
0 commit comments