Frontend capabilities reported during the ready handshake.
When a frontend starts, it sends a ready event with optional capability
fields. The BEAM uses these to adapt rendering strategy: skipping image
commands on terminals without image support, using native floating windows
on GUIs, using native floating windows, etc.
Summary
Functions
Returns the default capabilities (TUI with full RGB, monospace).
Decodes capability fields, including the capability-format-2 resource-policy tail.
Decodes capability fields under the explicitly reported capability format version.
Returns true if the frontend is a native GUI (not a terminal).
Returns true if the frontend can consume semantic render-model protocol commands.
Returns the safe production width oracle, monospace for now.
Types
@type color_depth() :: :mono | :color_256 | :rgb
@type float_support() :: :emulated | :native
@type frontend_type() :: :tui | :native_gui | :web
@type image_support() :: :none | :kitty | :sixel | :native
@type t() :: %MingaEditor.Frontend.Capabilities{ color_depth: color_depth(), float_support: float_support(), frontend_type: frontend_type(), image_support: image_support(), resource_policy: MingaEditor.Frontend.ResourcePolicy.t(), semantic_ui: boolean(), text_rendering: text_rendering(), unicode_width: unicode_width() }
@type text_rendering() :: :monospace | :proportional
@type unicode_width() :: :wcwidth | :unicode_15
Functions
@spec default() :: t()
Returns the default capabilities (TUI with full RGB, monospace).
Decodes capability fields, including the capability-format-2 resource-policy tail.
@spec from_binary(binary(), non_neg_integer()) :: t()
Decodes capability fields under the explicitly reported capability format version.
Returns true if the frontend is a native GUI (not a terminal).
Returns true if the frontend can consume semantic render-model protocol commands.
@spec width_oracle(t()) :: Minga.Core.WidthOracle.t()
Returns the safe production width oracle, monospace for now.