@@ -170,7 +170,8 @@ export default definePluginEntry({
170170
171171Wraps ` definePluginEntry ` with channel-specific wiring: it automatically
172172calls ` api.registerChannel({ plugin }) ` , exposes an optional root-help CLI
173- metadata seam, and gates ` registerFull ` on registration mode.
173+ metadata seam, and gates capability and full-runtime callbacks on registration
174+ mode.
174175
175176``` typescript
176177import { defineChannelPluginEntry } from " openclaw/plugin-sdk/channel-core" ;
@@ -187,19 +188,23 @@ export default defineChannelPluginEntry({
187188 registerFull(api ) {
188189 api .registerGatewayMethod (/* ... */ );
189190 },
191+ registerCapabilities(api ) {
192+ api .registerTranscriptSourceProvider (/* ... */ );
193+ },
190194});
191195```
192196
193- | Field | Type | Required | Default |
194- | --------------------- | ---------------------------------------------------------------- | -------- | ------------------- |
195- | ` id ` | ` string ` | Yes | - |
196- | ` name ` | ` string ` | Yes | - |
197- | ` description ` | ` string ` | Yes | - |
198- | ` plugin ` | ` ChannelPlugin ` | Yes | - |
199- | ` configSchema ` | ` OpenClawPluginConfigSchema \| () => OpenClawPluginConfigSchema ` | No | Empty object schema |
200- | ` setRuntime ` | ` (runtime: PluginRuntime) => void ` | No | - |
201- | ` registerCliMetadata ` | ` (api: OpenClawPluginApi) => void ` | No | - |
202- | ` registerFull ` | ` (api: OpenClawPluginApi) => void ` | No | - |
197+ | Field | Type | Required | Default |
198+ | ---------------------- | ---------------------------------------------------------------- | -------- | ------------------- |
199+ | ` id ` | ` string ` | Yes | - |
200+ | ` name ` | ` string ` | Yes | - |
201+ | ` description ` | ` string ` | Yes | - |
202+ | ` plugin ` | ` ChannelPlugin ` | Yes | - |
203+ | ` configSchema ` | ` OpenClawPluginConfigSchema \| () => OpenClawPluginConfigSchema ` | No | Empty object schema |
204+ | ` setRuntime ` | ` (runtime: PluginRuntime) => void ` | No | - |
205+ | ` registerCliMetadata ` | ` (api: OpenClawPluginApi) => void ` | No | - |
206+ | ` registerFull ` | ` (api: OpenClawPluginApi) => void ` | No | - |
207+ | ` registerCapabilities ` | ` (api: OpenClawPluginApi) => void ` | No | - |
203208
204209Callbacks run per registration mode (full table under
205210[ Registration mode] ( #registration-mode ) ):
@@ -214,10 +219,13 @@ Callbacks run per registration mode (full table under
214219 plugin loads.
215220- ` registerFull ` runs only for ` "full" ` and ` "tool-discovery" ` . For
216221 ` "tool-discovery" ` it runs _ instead of_ channel registration: OpenClaw
217- skips ` registerChannel ` /` setRuntime ` entirely and calls only
218- ` registerFull ` , so any provider/tool registration your channel needs for
219- standalone tool discovery or execution must live there, not behind normal
220- channel setup.
222+ skips ` registerChannel ` /` setRuntime ` entirely and calls the full-runtime
223+ callback followed by the capability callback. Keep tool registration in
224+ ` registerFull ` and capability providers in ` registerCapabilities ` .
225+ - ` registerCapabilities ` runs for ` "discovery" ` , ` "full" ` , and
226+ ` "tool-discovery" ` . Register inert advertised providers here so read-only
227+ capability discovery can find them without starting sockets, clients,
228+ workers, or services.
221229- Discovery registration is non-activating, not import-free: OpenClaw may
222230 evaluate the trusted plugin entry and channel plugin module to build the
223231 snapshot. Keep top-level imports side-effect-free and put sockets,
@@ -327,14 +335,14 @@ full activation.
327335
328336` api.registrationMode ` tells your plugin how it was loaded:
329337
330- | Mode | When | What to register |
331- | ------------------ | -------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
332- | ` "full" ` | Normal gateway startup | Everything |
333- | ` "discovery" ` | Read-only capability discovery | Channel registration plus static CLI descriptors; entry code may load, but skip sockets, workers, clients, and services |
334- | ` "tool-discovery" ` | Scoped load to list or run specific plugins' tools | Capability/tool registration only; no channel activation |
335- | ` "setup-only" ` | Disabled/unconfigured channel | Channel registration only |
336- | ` "setup-runtime" ` | Setup flow with runtime available | Channel registration plus only the lightweight runtime needed before the full entry loads |
337- | ` "cli-metadata" ` | Root help / CLI metadata capture | CLI descriptors only |
338+ | Mode | When | What to register |
339+ | ------------------ | -------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
340+ | ` "full" ` | Normal gateway startup | Everything |
341+ | ` "discovery" ` | Read-only capability discovery | Channel registration, static CLI descriptors, and inert providers; skip sockets, workers, clients, and services |
342+ | ` "tool-discovery" ` | Scoped load to list or run specific plugins' tools | Capability/tool registration only; no channel activation |
343+ | ` "setup-only" ` | Disabled/unconfigured channel | Channel registration only |
344+ | ` "setup-runtime" ` | Setup flow with runtime available | Channel registration plus only the lightweight runtime needed before the full entry loads |
345+ | ` "cli-metadata" ` | Root help / CLI metadata capture | CLI descriptors only |
338346
339347` defineChannelPluginEntry ` handles this split automatically. If you use
340348` definePluginEntry ` directly for a channel, check mode yourself and remember
0 commit comments