mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 08:40:44 +00:00
docs(plugins): define config ownership contract
* fix(plugins): flag channel config metadata gaps * docs(plugins): clarify config ownership
This commit is contained in:
@@ -409,12 +409,12 @@ For channel-specific config, use the channel config section instead:
|
||||
|
||||
### Building channel config schemas
|
||||
|
||||
Use `buildChannelConfigSchema` from `openclaw/plugin-sdk/core` to convert a
|
||||
Zod schema into the `ChannelConfigSchema` wrapper that OpenClaw validates:
|
||||
Use `buildChannelConfigSchema` to convert a Zod schema into the
|
||||
`ChannelConfigSchema` wrapper used by plugin-owned config artifacts:
|
||||
|
||||
```typescript
|
||||
import { z } from "zod";
|
||||
import { buildChannelConfigSchema } from "openclaw/plugin-sdk/core";
|
||||
import { buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-config-schema";
|
||||
|
||||
const accountSchema = z.object({
|
||||
token: z.string().optional(),
|
||||
@@ -426,6 +426,11 @@ const accountSchema = z.object({
|
||||
const configSchema = buildChannelConfigSchema(accountSchema);
|
||||
```
|
||||
|
||||
For third-party plugins, the cold-path contract is still the plugin manifest:
|
||||
mirror the generated JSON Schema into `openclaw.plugin.json#channelConfigs` so
|
||||
config schema, setup, and UI surfaces can inspect `channels.<id>` without
|
||||
loading runtime code.
|
||||
|
||||
## Setup wizards
|
||||
|
||||
Channel plugins can provide interactive setup wizards for `openclaw onboard`.
|
||||
|
||||
Reference in New Issue
Block a user