3.8 Elements

An element is a JSON object with common fields and type-specific state. Its ref identifies the meaning of the element rather than its screen position.

3.8.1 Common fields #

The common fields and defaults are:

FieldDefaultMeaning
refRequiredSemantic identity, unique within the turn (§3.2)
typeRequiredNegotiated element type
nameAbsentDisplay label
class[]Presentation hints
helpAbsentExplanatory text
requiredfalseA validating answer must supply a value
defaultAbsentValue assumed when an optional input is omitted
secretfalseSecret-handling rules apply (§3.4)
enabledtrueWhether the element can be answered
errorAbsentValidation error set by UPDATE

Additional keys are type-specific state (§3.B). A surface MAY substitute translations keyed by element ref or turn id, with the supplied name and help as fallbacks.

3.8.2 Unavailable elements #

An element with enabled: false remains on the page. A surface SHOULD show it as unavailable, with help explaining why. It MUST NOT collect input for it. An answer supplying a value for it is a protocol error.

3.8.3 Roles #

Element types have three roles:

  • Outputs: text, progress, and log provide information. They receive no answers and are exempt from required.
  • Inputs: string, boolean, select, and table collect typed values under their refs.
  • Actions: action reports a selection without a value. An automated surface that can answer all inputs can select the primary action without interpreting navigation semantics.

Edit this page