You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(gateway): expose idempotencyKey on chat.history __openclaw envelope (#79844)
When a user message is sent with an idempotencyKey, that key is persisted on
the transcript message but was only available as a top-level message field on
hydration. Clients consuming chat.history (and the SSE inline message stream)
expect identity-style metadata to live inside the __openclaw envelope alongside
seq, id, importedFrom, etc.
Hoist the persisted idempotencyKey into __openclaw at hydration time:
- parsedSessionEntryToMessage (chat.history reads + recent-tail reads)
- SessionHistorySseState.appendInlineMessage (live SSE inline append)
- broadcastSessionMessage in server-session-events (inline broadcast path)
The original top-level field is preserved for back-compat, so no existing
reader breaks.
Tests:
- session-utils.fs.test.ts: idempotencyKey surfaces on full + recent reads
- session-history-state.test.ts: idempotencyKey surfaces on inline append
0 commit comments