BotMessageRoot
Defined in: packages/core/src/message/index.ts:73
Explicit lifecycle for one rendered platform message.
Type Parameters
Section titled “Type Parameters”Host
Message
Section titled “Message”Message
Snapshot
Section titled “Snapshot”Snapshot
Interaction
Section titled “Interaction”Interaction
Properties
Section titled “Properties”sessionId
Section titled “sessionId”
readonlysessionId:string|undefined
Defined in: packages/core/src/message/index.ts:87
readonlyuuid:string
Defined in: packages/core/src/message/index.ts:74
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get close():
Effect<void>
Defined in: packages/core/src/message/index.ts:194
Explicitly releases the renderer, platform cache, target, timer and client registration. The returned Effect is single-flight: every caller gets the same close, and a second close after completion is a no-op.
Returns
Section titled “Returns”Effect<void>
closed
Section titled “closed”Get Signature
Section titled “Get Signature”get closed():
boolean
Defined in: packages/core/src/message/index.ts:116
true while closing or after close, so callers never use a closing root.
Returns
Section titled “Returns”boolean
Get Signature
Section titled “Get Signature”get host():
Host
Defined in: packages/core/src/message/index.ts:111
Returns
Section titled “Returns”Host
interactionListener
Section titled “interactionListener”Get Signature
Section titled “Get Signature”get interactionListener(): (
interaction) =>Effect<void>
Defined in: packages/core/src/message/index.ts:166
Routes one platform interaction through the root’s serialized handler.
Returns
Section titled “Returns”(interaction) => Effect<void>
paused
Section titled “paused”Get Signature
Section titled “Get Signature”get paused():
boolean
Defined in: packages/core/src/message/index.ts:141
Whether platform interactions and live edits are paused.
Returns
Section titled “Returns”boolean
sessionVersion
Section titled “sessionVersion”Get Signature
Section titled “Get Signature”get sessionVersion():
number
Defined in: packages/core/src/message/index.ts:126
The state version the platform message currently shows.
Returns
Section titled “Returns”number
snapshot
Section titled “snapshot”Get Signature
Section titled “Get Signature”get snapshot():
Effect<State>
Defined in: packages/core/src/message/index.ts:136
Encodes every mounted instance’s model, for a later mount({ state }).
Returns
Section titled “Returns”Effect<State>
Get Signature
Section titled “Get Signature”get state():
RootState
Defined in: packages/core/src/message/index.ts:121
The explicit root lifecycle state.
Returns
Section titled “Returns”Methods
Section titled “Methods”pause()
Section titled “pause()”pause():
void
Defined in: packages/core/src/message/index.ts:146
Freezes live edits and drops platform interactions until resume.
Returns
Section titled “Returns”void
resume()
Section titled “resume()”resume():
void
Defined in: packages/core/src/message/index.ts:156
Resumes live edits and platform interactions.
Returns
Section titled “Returns”void
setSessionVersion()
Section titled “setSessionVersion()”setSessionVersion(
version):void
Defined in: packages/core/src/message/index.ts:131
Updates the version the host stamps on the next commit.
Parameters
Section titled “Parameters”version
Section titled “version”number
Returns
Section titled “Returns”void
make()
Section titled “make()”
staticmake<Host,Message,Snapshot,Interaction>(options):BotMessageRoot<Host,Message,Snapshot,Interaction>
Defined in: packages/core/src/message/index.ts:105
Creates a root. Mount code owns the lifecycle; direct construction is not public.
Type Parameters
Section titled “Type Parameters”Host
Message
Section titled “Message”Message
Snapshot
Section titled “Snapshot”Snapshot
Interaction
Section titled “Interaction”Interaction
Parameters
Section titled “Parameters”options
Section titled “options”BotMessageRootOptions<Host, Message, Snapshot, Interaction>
Returns
Section titled “Returns”BotMessageRoot<Host, Message, Snapshot, Interaction>