@@ -142,6 +142,7 @@ const auxiliaryDataSchema = z.object({
142142 . union ( [ z . literal ( 'agentStep' ) , z . literal ( 'userPrompt' ) ] )
143143 . optional ( ) ,
144144 keepDuringTruncation : z . boolean ( ) . optional ( ) ,
145+ keepLastTags : z . string ( ) . array ( ) . optional ( ) ,
145146} )
146147
147148export const systemMessageSchema = z
@@ -184,22 +185,12 @@ export const toolMessageSchema = z
184185 . and ( auxiliaryDataSchema )
185186export type ToolMessage = z . infer < typeof toolMessageSchema >
186187
187- export const messageSchema = z
188- . union ( [
189- systemMessageSchema ,
190- userMessageSchema ,
191- assistantMessageSchema ,
192- toolMessageSchema ,
193- ] )
194- . and (
195- z . object ( {
196- providerOptions : providerMetadataSchema . optional ( ) ,
197- timeToLive : z
198- . union ( [ z . literal ( 'agentStep' ) , z . literal ( 'userPrompt' ) ] )
199- . optional ( ) ,
200- keepDuringTruncation : z . boolean ( ) . optional ( ) ,
201- } ) ,
202- )
188+ export const messageSchema = z . union ( [
189+ systemMessageSchema ,
190+ userMessageSchema ,
191+ assistantMessageSchema ,
192+ toolMessageSchema ,
193+ ] )
203194export type Message = z . infer < typeof messageSchema >
204195
205196// ===== MCP Server Types =====
@@ -227,7 +218,6 @@ export const mcpConfigSchema = z.union([
227218] )
228219export type MCPConfig = z . input < typeof mcpConfigSchema >
229220
230-
231221// ============================================================================
232222// Logger Interface
233223// ============================================================================
0 commit comments