Interface: PreUserMessageInput
Makaio Framework / hooks / PreUserMessageInput
Interface: PreUserMessageInput
Section titled “Interface: PreUserMessageInput”Defined in: ../../../packages/hooks/src/runners/pre-user-message-runner.ts:36
Properties
Section titled “Properties”adapterId?
Section titled “adapterId?”
optionaladapterId?:string
Defined in: ../../../packages/hooks/src/runners/pre-user-message-runner.ts:38
agentId?
Section titled “agentId?”
optionalagentId?:string
Defined in: ../../../packages/hooks/src/runners/pre-user-message-runner.ts:37
optionalcwd?:string
Defined in: ../../../packages/hooks/src/runners/pre-user-message-runner.ts:43
message
Section titled “message”message:
string| {blocks: {content:string;type:"text"; } | {source: {data:string;mimeType:string;type:"base64"; } | {mimeType?:string;type:"url";url:string; };type:"image"; } | {source: {data:string;mimeType:string;type:"base64"; } | {mimeType?:string;type:"url";url:string; };type:"document"; } | {attachmentType:"file"|"directory";displayName?:string;fileName:string;filePath:string;source: {data:string;mimeType:string;type:"base64"; } | {mimeType?:string;type:"url";url:string; };type:"attachment"; } | {content:string;metadata?:Record<string,unknown>;type:"reasoning"; } | {args:Record<string,unknown>;name:string;toolCallId:string;type:"tool_call"; } | {isError?:boolean;output:string;toolCallId:string;type:"tool_output"; } | ({content:string;type:"text"; } | {source: {data:string;mimeType:string;type:"base64"; } | {mimeType?:string;type:"url";url:string; };type:"image"; } | {source: {data:string;mimeType:string;type:"base64"; } | {mimeType?:string;type:"url";url:string; };type:"document"; } | {attachmentType:"file"|"directory";displayName?:string;fileName:string;filePath:string;source: {data:string;mimeType:string;type:"base64"; } | {mimeType?:string;type:"url";url:string; };type:"attachment"; } | {content:string;metadata?:Record<string,unknown>;type:"reasoning"; } | {args:Record<string,unknown>;name:string;toolCallId:string;type:"tool_call"; } | {isError?:boolean;output:string;toolCallId:string;type:"tool_output"; })[];role?:"user"|"assistant"|"system"; }
Defined in: ../../../packages/hooks/src/runners/pre-user-message-runner.ts:39
messageId?
Section titled “messageId?”
optionalmessageId?:string
Defined in: ../../../packages/hooks/src/runners/pre-user-message-runner.ts:42
sessionContext?
Section titled “sessionContext?”
optionalsessionContext?:object
Defined in: ../../../packages/hooks/src/runners/pre-user-message-runner.ts:41
extractedContext?
Section titled “extractedContext?”
optionalextractedContext?:unknown
Structured context from compression (if hasCompression=true).
hasCompression?
Section titled “hasCompression?”
optionalhasCompression?:boolean
Whether compression is active (extractedContext present). If true, Agent should use fresh mode with compressed context.
hasConnectorSwap?
Section titled “hasConnectorSwap?”
optionalhasConnectorSwap?:boolean
Whether a connector swap occurred before this message (e.g., cwd/model change). If true, native resume is infeasible and adapters should use fresh mode.
hasNewTransforms?
Section titled “hasNewTransforms?”
optionalhasNewTransforms?:boolean
Whether transforms have been applied since last turn. If true, Agent should use fresh mode (history changed).
isFirstTurn?
Section titled “isFirstTurn?”
optionalisFirstTurn?:boolean
Whether this is the first turn in the session. If true, no native history exists yet.
messageHistory?
Section titled “messageHistory?”
optionalmessageHistory?:object[]
Curated message history assembled via getFullConversation(). Only used if Agent decides to inject (fresh mode).
turnContext?
Section titled “turnContext?”
optionalturnContext?:Record<string,JsonValue>
Turn-scoped context assembled by PreUserMessage hooks and the orchestrator. Keys are plugin-defined (e.g., ‘skillCatalog’, ‘skills’, ‘predictedTools’). Adapters consume this to prepend context blocks.
Constrained to JSON-safe types to ensure serialization succeeds.
ADAPTER CONTRACT: Every adapter MUST materialize turnContext into the LLM-facing message using serializeTurnContext().
sessionId?
Section titled “sessionId?”
optionalsessionId?:string
Defined in: ../../../packages/hooks/src/runners/pre-user-message-runner.ts:40