Skip to content

Interface: PreUserMessageInput

Makaio Framework


Makaio Framework / hooks / PreUserMessageInput

Defined in: ../../../packages/hooks/src/runners/pre-user-message-runner.ts:36

optional adapterId?: string

Defined in: ../../../packages/hooks/src/runners/pre-user-message-runner.ts:38


optional agentId?: string

Defined in: ../../../packages/hooks/src/runners/pre-user-message-runner.ts:37


optional cwd?: string

Defined in: ../../../packages/hooks/src/runners/pre-user-message-runner.ts:43


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


optional messageId?: string

Defined in: ../../../packages/hooks/src/runners/pre-user-message-runner.ts:42


optional sessionContext?: object

Defined in: ../../../packages/hooks/src/runners/pre-user-message-runner.ts:41

optional extractedContext?: unknown

Structured context from compression (if hasCompression=true).

optional hasCompression?: boolean

Whether compression is active (extractedContext present). If true, Agent should use fresh mode with compressed context.

optional hasConnectorSwap?: 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.

optional hasNewTransforms?: boolean

Whether transforms have been applied since last turn. If true, Agent should use fresh mode (history changed).

optional isFirstTurn?: boolean

Whether this is the first turn in the session. If true, no native history exists yet.

optional messageHistory?: object[]

Curated message history assembled via getFullConversation(). Only used if Agent decides to inject (fresh mode).

optional turnContext?: 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().


optional sessionId?: string

Defined in: ../../../packages/hooks/src/runners/pre-user-message-runner.ts:40