Skip to content

Interface: SelectionChangeContext

Makaio Framework


Makaio Framework / contracts / SelectionChangeContext

Defined in: ../../../packages/contracts/src/extension/contributions/session-event-action-types.ts:138

Context passed to a session event action’s onSelectionChange callback.

bus: IMakaioBus

Defined in: ../../../packages/contracts/src/extension/contributions/session-event-action-types.ts:151

Bus instance for runtime queries.


entrypoint: object

Defined in: ../../../packages/contracts/src/extension/contributions/session-event-action-types.ts:142

Entrypoint information for the action.

message: object

Full message object.

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).

messageId: string

The message that was actioned.


selectedEvents: ({ eventId: string; payload: { adapterId: string; adapterName: string; adapterSessionId: string; agentId: string; cwd?: string; model?: string; role?: "lead" | "member"; sessionId: string; }; sessionId: string; timestamp: number; type: "agent.added"; } | { eventId: string; payload: { agentIds: string[]; content: string | { blocks: { content: string; type: "text"; } | { source: { data: string; mimeType: string; type: "base64"; } | { mimeType?: … | …; type: "url"; url: string; }; type: "image"; } | { source: { data: string; mimeType: string; type: "base64"; } | { mimeType?: … | …; type: "url"; url: string; }; type: "document"; } | { attachmentType: "file" | "directory"; displayName?: string; fileName: string; filePath: string; source: { data: string; mimeType: string; type: "base64"; } | { mimeType?: … | …; 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: … | …; type: "image"; } | { source: … | …; type: "document"; } | { attachmentType: … | …; displayName?: … | …; fileName: string; filePath: string; source: … | …; type: "attachment"; } | { content: string; metadata?: … | …; type: "reasoning"; } | { args: Record<…, …>; name: string; toolCallId: string; type: "tool_call"; } | { isError?: … | … | …; output: string; toolCallId: string; type: "tool_output"; })[]; role?: "user" | "assistant" | "system"; }; messageId: string; origin?: "text" | "voice" | "compact"; sessionId: string; source?: "user" | "extension" | "system"; turnId: string; turnNumber: number; }; sessionId: string; timestamp: number; type: "user_message.sent"; } | { eventId: string; payload: { agentId: string; messageId: string; sessionId: string; turnId: string; turnNumber: number; }; sessionId: string; timestamp: number; type: "user_message.acknowledged"; } | { eventId: string; payload: { agentId: string; error?: string; mergedInto?: string; messageId: string; outcome: "error" | "completed" | "superseded" | "merged" | "cancelled" | "rejected"; sessionId: string; supersededBy?: string; turnId: string; turnNumber: number; }; sessionId: string; timestamp: number; type: "user_message.completed"; } | { eventId: string; payload: { agentIds: string[]; initiator?: { source: "user" | "extension" | "system"; sourceId?: string; }; messageId: string; sessionId: string; turnId: string; turnNumber: number; }; sessionId: string; timestamp: number; type: "turn.started"; } | { eventId: string; payload: { error?: string; initiator?: { source: "user" | "extension" | "system"; sourceId?: string; }; sessionId: string; success: boolean; turnId: string; turnNumber: number; }; sessionId: string; timestamp: number; type: "turn.completed"; } | { eventId: string; payload: { messageId: string; role: "user" | "assistant"; turnId: string | null; }; sessionId: string; timestamp: number; type: "message"; } | { eventId: string; payload: { childSessionId: string; forkPointMessageId?: string; kind: "fork" | "branch" | "aside" | "subagent" | "compress" | "rewrite" | "coordinator"; parentSessionId: string; }; sessionId: string; timestamp: number; type: "branch.created"; } | { eventId: string; payload: { childSessionId: string; parentSessionId: string; resultJson?: string; resultMessageId?: string; }; sessionId: string; timestamp: number; type: "branch.merged"; } | { eventId: string; payload: { compressedMessageIds?: string[]; summaryJson: string; tokensAfter?: number; tokensBefore?: number; }; sessionId: string; timestamp: number; type: "squash"; } | { eventId: string; payload: Record<string, unknown>; sessionId: string; timestamp: number; type: string; })[]

Defined in: ../../../packages/contracts/src/extension/contributions/session-event-action-types.ts:140

Currently selected session events.


sessionId: string

Defined in: ../../../packages/contracts/src/extension/contributions/session-event-action-types.ts:149

Active session identifier.