Skip to main content

Interface: MessageActionSnapshot

Defined in: packages/plugin-sdk/src/frontend.ts:30

Immutable message snapshot passed to message actions.

content is null unless the plugin also holds the chat.read permission — the host gates message content per plugin, so actions can render metadata (role, revision, meta) without ever seeing the text.

Properties

branchId

branchId: string | null

Defined in: packages/plugin-sdk/src/frontend.ts:34

Id of the chat branch the message belongs to (null when unknown).


chatId

chatId: string

Defined in: packages/plugin-sdk/src/frontend.ts:32


content

content: string | null

Defined in: packages/plugin-sdk/src/frontend.ts:38

Message text, or null when the plugin lacks chat.read.


messageId

messageId: string

Defined in: packages/plugin-sdk/src/frontend.ts:31


meta

meta: Record<string, unknown>

Defined in: packages/plugin-sdk/src/frontend.ts:42

Message metadata (context exclusions, flags, plugin extras).


name

name: string | null

Defined in: packages/plugin-sdk/src/frontend.ts:40

Optional author/character name shown on the message.


revision

revision: number

Defined in: packages/plugin-sdk/src/frontend.ts:44

Message revision; bumped on every edit/swipe/regenerate.


role

role: string

Defined in: packages/plugin-sdk/src/frontend.ts:36

Message role: 'user' | 'assistant' | 'system' | 'tool'.