Skip to main content

map_runner_output

Function map_runner_output 

Source
pub fn map_runner_output(output: RunnerOutput, seq: u64) -> SessionEvent
Expand description

Maps a RunnerOutput to a SessionEvent with the given sequence number.

This function is the provider parity enforcement point. Regardless of which LLM provider produced the raw events, this mapping produces identical SessionEvent variants with identical structure.

§Arguments

  • output - The normalized Runner output event.
  • seq - The monotonically increasing sequence number to assign.

§Returns

A SessionEvent ready for checkpointing and broadcast.

§Example

use adk_managed::event_mapping::{RunnerOutput, map_runner_output};
use serde_json::json;

let output = RunnerOutput::TextContent {
    text: "Hello, world!".to_string(),
};
let event = map_runner_output(output, 42);
// event is SessionEvent::Message { content: [...], seq: 42 }