From e877a7a1b7ff200ae2c7aa48d9b948788f845ef5 Mon Sep 17 00:00:00 2001 From: Gustavo Madeira Santana Date: Fri, 24 Apr 2026 20:55:59 -0400 Subject: [PATCH] docs: document channel CLI discovery metadata --- CHANGELOG.md | 1 + docs/plugins/sdk-entrypoints.md | 28 +++++++++++++++++----------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bd902366bf7..af50a2060eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -170,6 +170,7 @@ Docs: https://docs.openclaw.ai - Plugins/Google Meet: report required manual actions for Chrome joins, use browser automation for Meet entry, and persist the private-WS node opt-in so paired-node realtime sessions keep their intended network policy. Thanks @steipete. - Slack: route native stream fallback replies through the normal chunked sender so long buffered Slack Connect responses are not dropped or duplicated. (#71124) Thanks @martingarramon. - WhatsApp: transcribe accepted voice notes before agent dispatch while keeping spoken transcripts out of command authorization. (#64120) Thanks @rogerdigital. +- Plugins/CLI: expose channel plugin CLI descriptors during discovery-mode plugin loads so snapshot registries keep channel commands visible without activating full runtimes. (#71309) Thanks @gumadeiras. ## 2026.4.23 diff --git a/docs/plugins/sdk-entrypoints.md b/docs/plugins/sdk-entrypoints.md index 3da9fded23d..510c4a4e27b 100644 --- a/docs/plugins/sdk-entrypoints.md +++ b/docs/plugins/sdk-entrypoints.md @@ -121,11 +121,12 @@ export default defineChannelPluginEntry({ - `setRuntime` is called during registration so you can store the runtime reference (typically via `createPluginRuntimeStore`). It is skipped during CLI metadata capture. -- `registerCliMetadata` runs during both `api.registrationMode === "cli-metadata"` - and `api.registrationMode === "full"`. +- `registerCliMetadata` runs during `api.registrationMode === "cli-metadata"`, + `api.registrationMode === "discovery"`, and + `api.registrationMode === "full"`. Use it as the canonical place for channel-owned CLI descriptors so root help - stays non-activating while normal CLI command registration remains compatible - with full plugin loads. + stays non-activating, discovery snapshots include static command metadata, and + normal CLI command registration remains compatible with full plugin loads. - `registerFull` only runs when `api.registrationMode === "full"`. It is skipped during setup-only loading. - Like `definePluginEntry`, `configSchema` can be a lazy factory and OpenClaw @@ -197,19 +198,24 @@ setter before the full channel entry loads. `api.registrationMode` tells your plugin how it was loaded: -| Mode | When | What to register | -| ----------------- | --------------------------------- | ----------------------------------------------------------------------------------------- | -| `"full"` | Normal gateway startup | Everything | -| `"setup-only"` | Disabled/unconfigured channel | Channel registration only | -| `"setup-runtime"` | Setup flow with runtime available | Channel registration plus only the lightweight runtime needed before the full entry loads | -| `"cli-metadata"` | Root help / CLI metadata capture | CLI descriptors only | +| Mode | When | What to register | +| ----------------- | --------------------------------- | ---------------------------------------------------------------------------------------------- | +| `"full"` | Normal gateway startup | Everything | +| `"discovery"` | Read-only capability discovery | Channel registration plus static CLI descriptors; skip sockets, workers, clients, and services | +| `"setup-only"` | Disabled/unconfigured channel | Channel registration only | +| `"setup-runtime"` | Setup flow with runtime available | Channel registration plus only the lightweight runtime needed before the full entry loads | +| `"cli-metadata"` | Root help / CLI metadata capture | CLI descriptors only | `defineChannelPluginEntry` handles this split automatically. If you use `definePluginEntry` directly for a channel, check mode yourself: ```typescript register(api) { - if (api.registrationMode === "cli-metadata" || api.registrationMode === "full") { + if ( + api.registrationMode === "cli-metadata" || + api.registrationMode === "discovery" || + api.registrationMode === "full" + ) { api.registerCli(/* ... */); if (api.registrationMode === "cli-metadata") return; }