of

fun of(part: ActivityPart, translation: A2uiTranslation = A2uiTranslation.Default): A2uiPayload?

The payload an a2ui-surface activity carries, or null when part is some other kind of activity.

Three content shapes are recognised, in this order: an a2ui_operations array; a lifecycle object keyed by status; and a bare envelope with a version, which the A2A bridge sends and the middleware does not. Anything else is Malformed.