• Streaming: translate one legacy SSE event to its modern equivalent.

    Returns the input unchanged when the event_type is not one of the legacy ones we know how to map. Two non-trivial cases:

    1. content.start carries content: <Content> — the modern step.start expects step: {type: 'model_output', content: [<Content>]}.
    2. interaction.start / interaction.complete wrap an interaction object that may itself carry the legacy outputs field; recurse.

    Parameters

    • data: unknown

    Returns unknown