MessageMiddlewareContext
Interface: MessageMiddlewareContext
Defined in: src/core/agent/middleware/types.ts:218
The message a message middleware is deciding about.
Properties
content
readonlycontent:string
Defined in: src/core/agent/middleware/types.ts:228
The content as THIS middleware sees it — earlier transforms applied.
history
readonlyhistory: readonlyLLMMessage[]
Defined in: src/core/agent/middleware/types.ts:230
Conversation so far. Empty at 'input'.
identity?
readonlyoptionalidentity?:MemoryIdentity
Defined in: src/core/agent/middleware/types.ts:231
phase
readonlyphase:"input"|"output"
Defined in: src/core/agent/middleware/types.ts:226
'input' runs at the very top of the run, BEFORE the user's message is
committed — so the window strategies, the injections, the slots, the
request bytes and every later slice all see the transformed text and
agree with each other. 'output' runs where the final answer is
captured, so the record and the caller receive the same string.
signal?
readonlyoptionalsignal?:AbortSignal
Defined in: src/core/agent/middleware/types.ts:232
