@@ -33,10 +33,11 @@ import kotlin.jvm.optionals.getOrNull
3333 * skipSummarization, endOfAgent - the requested tool confirmations, the context-compaction summary,
3434 * the resumable-run `agentState`, the rewind marker `rewindBeforeInvocationId`, and the workflow
3535 * `route`), the streaming/error signals (`partial`, `turnComplete`, `interrupted`, `errorMessage`,
36- * `errorCode`, `finishReason`), the token `usageMetadata` ([UsageMetadataCodec]),
37- * `groundingMetadata` ([GroundingMetadataCodec]) and context `cacheMetadata`
38- * ([CacheMetadataCodec]), a workflow node's `output` and `nodeInfo` ([WorkflowCodec]), long-running
39- * tool ids, the timestamp, and the `isolationScope`.
36+ * `errorCode`, `finishReason`), the live transcriptions ([TranscriptionCodec]), the token
37+ * `usageMetadata` ([UsageMetadataCodec]), `groundingMetadata` ([GroundingMetadataCodec]), context
38+ * `cacheMetadata` ([CacheMetadataCodec]), `avgLogProbs`, `modelVersion`, `customMetadata`, a
39+ * workflow node's `output` and `nodeInfo` ([WorkflowCodec]), long-running tool ids, the timestamp,
40+ * and the `isolationScope`. Every other field is dropped.
4041 */
4142internal object EventCodec {
4243
@@ -57,6 +58,8 @@ internal object EventCodec {
5758 if (event.partial) builder.partial(true )
5859 if (event.turnComplete) builder.turnComplete(true )
5960 if (event.interrupted) builder.interrupted(true )
61+ event.inputTranscription?.let { builder.inputTranscription(TranscriptionCodec .toJava(it)) }
62+ event.outputTranscription?.let { builder.outputTranscription(TranscriptionCodec .toJava(it)) }
6063 event.errorMessage?.let { builder.errorMessage(it) }
6164 event.errorCode?.let { builder.errorCode(GenaiFinishReason (it)) }
6265 event.finishReason?.let { builder.finishReason(it.toGenai()) }
@@ -106,6 +109,10 @@ internal object EventCodec {
106109 partial = event.partial().getOrNull() ? : false ,
107110 turnComplete = event.turnComplete().getOrNull() ? : false ,
108111 interrupted = event.interrupted().getOrNull() ? : false ,
112+ inputTranscription =
113+ event.inputTranscription().getOrNull()?.let { TranscriptionCodec .fromJava(it) },
114+ outputTranscription =
115+ event.outputTranscription().getOrNull()?.let { TranscriptionCodec .fromJava(it) },
109116 errorMessage = event.errorMessage().getOrNull(),
110117 // toString() preserves the raw value; knownEnum().name would collapse an unrecognized code to
111118 // FINISH_REASON_UNSPECIFIED (errorCode is a free-form String on the Kotlin side).
0 commit comments