diff --git a/src/plugins/runtime/types-channel.ts b/src/plugins/runtime/types-channel.ts index ee50b7dd02a..a346a2f8e3a 100644 --- a/src/plugins/runtime/types-channel.ts +++ b/src/plugins/runtime/types-channel.ts @@ -1,3 +1,10 @@ +/** + * Runtime helpers for native channel plugins. + * + * This surface exposes core and channel-specific helpers used by bundled + * plugins. Prefer hooks unless you need tight in-process coupling with the + * OpenClaw messaging/runtime stack. + */ type ReadChannelAllowFromStore = typeof import("../../pairing/pairing-store.js").readChannelAllowFromStore; type UpsertChannelPairingRequest = diff --git a/src/plugins/types.ts b/src/plugins/types.ts index ae5b2d116b4..b5bd28cc110 100644 --- a/src/plugins/types.ts +++ b/src/plugins/types.ts @@ -1266,6 +1266,12 @@ export type OpenClawPluginApi = { registrationMode: PluginRegistrationMode; config: OpenClawConfig; pluginConfig?: Record; + /** + * In-process runtime helpers for trusted native plugins. + * + * This surface is broader than hooks. Prefer hooks for third-party + * automation/integration unless you need native registry integration. + */ runtime: PluginRuntime; logger: PluginLogger; registerTool: ( @@ -1278,14 +1284,20 @@ export type OpenClawPluginApi = { opts?: OpenClawPluginHookOptions, ) => void; registerHttpRoute: (params: OpenClawPluginHttpRouteParams) => void; + /** Register a native messaging channel plugin (channel capability). */ registerChannel: (registration: OpenClawPluginChannelRegistration | ChannelPlugin) => void; registerGatewayMethod: (method: string, handler: GatewayRequestHandler) => void; registerCli: (registrar: OpenClawPluginCliRegistrar, opts?: { commands?: string[] }) => void; registerService: (service: OpenClawPluginService) => void; + /** Register a native model/provider plugin (text inference capability). */ registerProvider: (provider: ProviderPlugin) => void; + /** Register a speech synthesis provider (speech capability). */ registerSpeechProvider: (provider: SpeechProviderPlugin) => void; + /** Register a media understanding provider (media understanding capability). */ registerMediaUnderstandingProvider: (provider: MediaUnderstandingProviderPlugin) => void; + /** Register an image generation provider (image generation capability). */ registerImageGenerationProvider: (provider: ImageGenerationProviderPlugin) => void; + /** Register a web search provider (web search capability). */ registerWebSearchProvider: (provider: WebSearchProviderPlugin) => void; registerInteractiveHandler: (registration: PluginInteractiveHandlerRegistration) => void; onConversationBindingResolved: (