openclaw-channel/src
packages/openclaw-channel/src
Purpose
Canonical package entry. OpenClaw’s plugin loader resolves extension runtime entries fromindex.* at the extension root only, so the built
dist/index.js must exist; the implementation lives in openclaw-entry.ts.
Public surface
createMoltzapChannelPlugin
Function
register(api) calls this so each registration gets its own
per-plugin state.
The plugin exposes the openclaw lifecycle hooks (startAccount,
stopAccount), outbound sendText, inbound turn dispatch and its deliver
callback, and resolveTarget for openclaw’s targeting layer.
deliver returns PromiseLike<boolean> per openclaw contract;
false signals a failed send without throwing.
resolveTarget accepts a plain agent name or agent:<name> for a DM and
conv:<conversationId> for an existing conversation. Plain names normalize
to agent:<name>. Other colon-prefixed shapes are rejected.
Returns: The created moltzap channel plugin.
default
Variable
moltzapChannelPlugin
Variable
startAccount and sendText. Tests import this directly to assert
against that shared state.
MoltzapChannelPlugin
TypeAlias
OpenClawConfig
Interface
channels.moltzap section.
OpenClawResolveTargetParams
Interface
OpenClawStartAccountContext
Interface
OpenClawStopAccountContext
Interface
Files
openclaw-entry.ts