Skip to content

Interface: SessionEventTypeMap

Makaio Framework


Makaio Framework / contracts / SessionEventTypeMap

Defined in: ../../../packages/contracts/src/session/schemas/event.ts:217

Map of session event types to their payload schemas.

Plugin Extension Pattern: Plugins can extend this interface via TypeScript declaration merging to add custom event types:

// In plugin code
declare module '@makaio/contracts' {
interface SessionEventTypeMap {
'timeline.summary': {
messageId: string;
role: 'user' | 'assistant';
summary: string;
};
}
}

Core event types are defined here to maintain type safety for the base system. Plugins augment this map without modifying source code.

agent.added: object

Defined in: ../../../packages/contracts/src/session/schemas/event.ts:230

Agent added to session (correlation link).

adapterId: string

adapterName: string

adapterSessionId: string

agentId: string

optional cwd?: string

optional model?: string

optional role?: "lead" | "member"

sessionId: string


branch.created: object

Defined in: ../../../packages/contracts/src/session/schemas/event.ts:281

Branch created from parent session.

childSessionId: string

optional forkPointMessageId?: string

kind: "fork" | "branch" | "aside" | "subagent" | "compress" | "rewrite" | "coordinator"

parentSessionId: string


branch.merged: object

Defined in: ../../../packages/contracts/src/session/schemas/event.ts:291

Branch merged into parent session.

childSessionId: string

parentSessionId: string

optional resultJson?: string

optional resultMessageId?: string


fork-summary.generated: object

Defined in: ../../../packages/services/core/src/session/session-events/__tests__/shared.ts:68

Fork summary generation event. Matches the UI chat view contract.

fromMessageId: string

optional personaName?: string

summaryText: string

toMessageId: string


git.checkout: object

Defined in: ../../../packages/services/core/src/session/session-events/__tests__/shared.ts:25

currentBranch: string

optional previousBranch?: string

repoPath: string

optional worktree?: string


git.commit: object

Defined in: ../../../packages/services/core/src/session/session-events/__tests__/shared.ts:15

author: string

branch: string

commitTimestamp: string

email: string

hash: string

message: string

repoPath: string

optional worktree?: string


git.merge: object

Defined in: ../../../packages/services/core/src/session/session-events/__tests__/shared.ts:31

mergeCommit: string

repoPath: string

sourceBranch: string

targetBranch: string

optional worktree?: string


git.pr.context: object

Defined in: ../../../packages/services/core/src/session/session-events/__tests__/shared.ts:38

branch: string

prId: string

prNumber: number

prTitle: string

prUrl: string

repoPath: string


message: object

Defined in: ../../../packages/contracts/src/session/schemas/event.ts:221

Message correlation event linking messages table to session events.

messageId: string

role: "user" | "assistant"

turnId: string | null


question-extractor.result: object

Defined in: ../../../packages/services/core/src/session/session-events/__tests__/shared.ts:46

questions: object[]

turnId: string


session.compacted: object

Defined in: ../../../packages/contracts/src/session/schemas/event.ts:312

Emitted on the parent session when a Claude Code compaction boundary is imported. Uses the plugin event path — not a core event type.

compressChildSessionId: string

Makaio session ID of the compress child (post-compaction session).

preTokens: number | null

Approximate token count before compaction.

summary: string | null

Summary text from the isCompactSummary user message when available.

trigger: "manual" | "auto"

Whether compaction was triggered manually (/compact) or automatically.


skill.activated: object

Defined in: ../../../packages/contracts/src/skill/types.ts:38

Skill activated for a session agent.

agentId: string

skillName: string

trigger: "model" | "user" | "auto" | "reinjection"

optional turnNumber?: number


skill.catalog.built: object

Defined in: ../../../packages/contracts/src/skill/types.ts:31

Skill catalog built for a session agent.

optional adapterId?: string

agentId: string

cwd: string

skillNames: string[]


skill.deactivated: object

Defined in: ../../../packages/contracts/src/skill/types.ts:45

Skill deactivated for a session agent.

agentId: string

reason: "user" | "cwd_changed" | "session_end" | "replaced"

skillName: string


squash: object

Defined in: ../../../packages/contracts/src/session/schemas/event.ts:301

Context compression event.

optional compressedMessageIds?: string[]

summaryJson: string

optional tokensAfter?: number

optional tokensBefore?: number


timeline.summary: object

Defined in: ../../../packages/services/core/src/session/session-events/__tests__/shared.ts:53

messageId: string

role: "user" | "assistant"

summary: string


tool.tracked: object

Defined in: ../../../packages/services/core/src/session/session-events/__tests__/shared.ts:58

operationCount: number

toolCallId: string

toolName: string

trackedCallId: string


turn.completed: object

Defined in: ../../../packages/contracts/src/session/schemas/event.ts:255

Turn completed event.

optional error?: string

optional initiator?: object

source: "user" | "extension" | "system"

Origin category

optional sourceId?: string

Identifier for the specific origin.

Examples: 'routine:validation', 'loop', 'subagent:xyz'.

sessionId: string

success: boolean

turnId: string


turn.started: object

Defined in: ../../../packages/contracts/src/session/schemas/event.ts:244

Turn started event.

agentIds: string[]

optional initiator?: object

source: "user" | "extension" | "system"

Origin category

optional sourceId?: string

Identifier for the specific origin.

Examples: 'routine:validation', 'loop', 'subagent:xyz'.

messageId: string

sessionId: string

turnId: string


user_message.acknowledged: object

Defined in: ../../../packages/contracts/src/session/schemas/event.ts:271

User message acknowledged by agent.

agentId: string

Agent that acknowledged

messageId: string

User message identifier

sessionId: string

Makaio session ID

turnId: string

Turn identifier (UUID)

turnNumber: number

Monotonic per-session ordinal (1-based).


user_message.completed: object

Defined in: ../../../packages/contracts/src/session/schemas/event.ts:276

User message processing completed.

agentId: string

Agent that completed processing

optional error?: string

Error message when outcome=‘error’

optional mergedInto?: string

Present when outcome=‘merged’: the messageId this was folded into

messageId: string

User message identifier

outcome: "error" | "completed" | "superseded" | "merged" | "cancelled" | "rejected" = MessageOutcomeSchema

Processing outcome

sessionId: string

Makaio session ID

optional supersededBy?: string

Present when outcome=‘superseded’: the messageId that replaced this one

turnId: string

Turn identifier (UUID)

turnNumber: number

Monotonic per-session ordinal (1-based).


user_message.sent: object

Defined in: ../../../packages/contracts/src/session/schemas/event.ts:266

User message sent to session.

agentIds: string[]

Targeted agent IDs

content: 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"; } = MessageInputSchema

Message content

messageId: string

User message identifier

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

Message origin (for example, voice input pipeline)

sessionId: string

Makaio session ID

optional source?: "user" | "extension" | "system"

Request source provenance from session.sendMessage payload

turnId: string

Turn identifier (UUID)

turnNumber: number

Monotonic per-session ordinal (1-based).