Skip to content

Interface: ContextAssemblyResult

Makaio Framework


Makaio Framework / services-core / ContextAssemblyResult

Defined in: ../../../packages/services/core/src/session/context/types.ts:16

Result of context assembly.

hasSquashBoundary: boolean

Defined in: ../../../packages/services/core/src/session/context/types.ts:20

Whether a squash boundary was encountered


incomplete: boolean

Defined in: ../../../packages/services/core/src/session/context/types.ts:26

Whether parent chain is incomplete (missing session in ancestry)


messages: object[]

Defined in: ../../../packages/services/core/src/session/context/types.ts:18

Assembled messages in chronological order

optional adapterMessageId?: string

Adapter’s stable message identifier for fork detection

optional adapterSessionId?: string

Provider’s session ID for context continuity

optional agentId?: string

Agent ID (required for assistant, null for user)

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"; })[]

Structured blocks (text, reasoning, tool_call, tool_output)

contentText: string

Plain text content for FTS5 search

optional editOf?: string

If this is an edit, references the original message

messageId: string

Unique message identifier

optional origin?: "text" | "voice" | "compact"

Origin of the message (e.g. ‘voice’, ‘text’). NULL for messages predating this field.

role: "user" | "assistant" = SessionMessageRoleSchema

Message role: ‘user’ or ‘assistant’

sessionId: string

Session this message belongs to

timestamp: number

Message timestamp (Unix ms)

turnId: string | null

Turn this message belongs to. NULL for native imports (no turn tracking).


sessionChain: string[]

Defined in: ../../../packages/services/core/src/session/context/types.ts:22

Sessions traversed (for debugging)


truncated: boolean

Defined in: ../../../packages/services/core/src/session/context/types.ts:24

Whether results were truncated due to limit or pagination