Skip to content
Beskid Platform specification

Beskid

Jump to a Beskid service

Beskid

Jump to a Beskid service

Flow and algorithm

Platform spec article

Flow and algorithm

Spec standingStandard

Owner
Piotr Mikstacki
Submitter
Piotr Mikstacki

Document flow and algorithm for the Console Capabilities feature: role-specific normative detail beyond the feature hub.

  • Feature hub: Console Capabilities
  • Sibling articles in this bundle (design model, contracts, flow, examples, verification)
  1. isTty ← Terminal.IsAtty(1) != 0
  2. colorDisabled ← EnvFlagSet("NO_COLOR")
  3. colorForced ← EnvFlagSet("FORCE_COLOR")
  4. model ← Terminal.ProbeColorModel() (honors ForcePlainText internally)
  5. Return Capabilities { ... }
  1. If colorDisabledstrip
  2. Else if colorForceddo not strip
  3. Else if !isTtystrip
  4. Else → do not strip
  1. If ForcePlainText()Basic16
  2. Else if COLORTERM set → TrueColor
  3. Else match TERM (xterm-256color, xterm-color, …)
  4. Default → Indexed256

Downstream Ansi.Sgr reads the model once per IntoPrefix / RGB call path.

See the verification and traceability article in this bundle and compiler/corelib/beskid_corelib/tests/corelib_tests/src/console/.