MessageId
MessageId =
Brand<string,"MessageId">
Defined in: packages/protocol/src/lib/message.ts:18
Opaque identifier for messages sent to the engine.
Every EngineMessage variant carries one. Used for:
- Correlation — EngineOutput echoes the input id, so callers can match responses to requests without external bookkeeping.
- Deduplication — HistoryManager skips duplicate entries when the same MessageId arrives twice in the same session for an assistant_message variant.
- Audit and trace — log lines and history entries are keyed by MessageId, enabling end-to-end request correlation.