/**
 * T2 · Mux frame codec (§4.1) — the 15-byte header + opaque payload, and the CBOR/int
 * control-frame payload codecs.
 *
 * The binary codec is FROZEN in `relay-contracts` (INDEX §4.1, OQ2 resolved: the codec ships
 * in contracts so P1 relay and P2 agent share ONE encoder). P1 re-exports it as the stable
 * `mux/` surface that T6 (mux-session) and the data plane consume, adding NO wire behavior.
 *
 * Security (INV2/INV11): this module imports NO terminal/ANSI parser. DATA payloads are opaque
 * `Uint8Array` and are never inspected here; only OPEN/WINDOW_UPDATE/GOAWAY control frames are
 * shape-validated (via the contracts' Zod guards).
 */
export {
  MUX_HEADER_BYTES,
  MUX_VERSION,
  encodeMuxFrame,
  decodeHeader,
  decodeMuxFrame,
  encodeOpen,
  decodeOpen,
  encodeWindowUpdate,
  decodeWindowUpdate,
  encodeGoaway,
  decodeGoaway,
} from 'relay-contracts'

export { TYPE_TO_BYTE, BYTE_TO_TYPE } from './type-bytes.js'
export type { MuxFrameType, MuxFrameHeader, MuxOpen, GoAwayReason } from 'relay-contracts'
