fix(tts): preserve audio-only hook transcript

This commit is contained in:
Peter Steinberger
2026-04-25 06:27:00 +01:00
parent 88ea3d839b
commit 5b59079fd4
10 changed files with 138 additions and 7 deletions

View File

@@ -190,6 +190,11 @@ Use message hooks for channel-level routing and delivery policy:
- `message_sending`: rewrite `content` or return `{ cancel: true }`.
- `message_sent`: observe final success or failure.
For audio-only TTS replies, `content` may contain the hidden spoken transcript
even when the channel payload has no visible text/caption. Rewriting that
`content` updates the hook-visible transcript only; it is not rendered as a
media caption.
Message hook contexts expose stable correlation fields when available:
`ctx.sessionKey`, `ctx.runId`, `ctx.messageId`, `ctx.senderId`, `ctx.trace`,
`ctx.traceId`, `ctx.spanId`, `ctx.parentSpanId`, and `ctx.callDepth`. Prefer