OptionalrenderFormat one attempt of a retried stage (10.1) into a narrative line — a
depth-1 sub-item of its stage, between the attempts' reads and writes (for
a stage that failed for good, beneath its error line). It replaces the
9.15–10.0 renderRetry, which is removed: this line says "retrying" too.
string → use as the narrative linenull → deliberately exclude this entryundefined → fall back to the library's default sentence
(Attempt 2 of 3 at Fetch failed in 12ms (…), retrying in 1s.)OptionalrenderOptionalrenderOptionalrenderFormat a consumer-emitted event (from scope.$emit(name, payload))
into a narrative line.
string → use as the narrative linenull → deliberately exclude this entryundefined → this formatter does not handle this emit; fall back
to the library's default templateTypical pattern: switch on ctx.name (or a prefix of it) and return a
domain-specific text line for the event types you care about; return
undefined for everything else so the default template handles it.
OptionalrenderOptionalrenderOptionalrenderOptionalrenderFormat an op (scope read/write, or subflow-input key) into a narrative line.
string → use as the narrative linenull → deliberately exclude this entry from the narrativeundefined → this formatter does not handle this op; fall back to
the library's default templateThe undefined return lets a domain-aware formatter handle only the
keys it knows about and leave the rest to the library default — without
having to re-implement the whole default inline.
OptionalrenderOptionalrenderOptionalrender
Pluggable formatter for narrative output. Turns structured event context objects into the text lines that make up the narrative array.
Why "Formatter", not "Renderer"
In web terminology "renderer" usually means "turn data into a visible UI" (pixels, DOM, HTML). This interface does something smaller: it converts event context into a text string. That is more accurately called a formatter.
Behaviour
Each method is optional — unimplemented methods fall back to the default English formatter. Return
nullfromrenderOpto exclude that entry from the narrative entirely.Example