docs: prefer channel-core in channel sdk docs

This commit is contained in:
Peter Steinberger 2026-04-04 07:43:16 +01:00
parent 6e6b4f6004
commit 359c6dedbe
No known key found for this signature in database
4 changed files with 14 additions and 11 deletions

View File

@ -136,8 +136,8 @@ Auth-only channels can usually stop at the default path: core handles approvals
import {
createChatChannelPlugin,
createChannelPluginBase,
} from "openclaw/plugin-sdk/core";
import type { OpenClawConfig } from "openclaw/plugin-sdk/core";
} from "openclaw/plugin-sdk/channel-core";
import type { OpenClawConfig } from "openclaw/plugin-sdk/channel-core";
import { acmeChatApi } from "./client.js"; // your platform API client
type ResolvedAccount = {
@ -244,7 +244,7 @@ Auth-only channels can usually stop at the default path: core handles approvals
Create `index.ts`:
```typescript index.ts
import { defineChannelPluginEntry } from "openclaw/plugin-sdk/core";
import { defineChannelPluginEntry } from "openclaw/plugin-sdk/channel-core";
import { acmeChatPlugin } from "./src/channel.js";
export default defineChannelPluginEntry({
@ -290,7 +290,7 @@ Auth-only channels can usually stop at the default path: core handles approvals
Create `setup-entry.ts` for lightweight loading during onboarding:
```typescript setup-entry.ts
import { defineSetupPluginEntry } from "openclaw/plugin-sdk/core";
import { defineSetupPluginEntry } from "openclaw/plugin-sdk/channel-core";
import { acmeChatPlugin } from "./src/channel.js";
export default defineSetupPluginEntry(acmeChatPlugin);

View File

@ -60,14 +60,14 @@ export default definePluginEntry({
## `defineChannelPluginEntry`
**Import:** `openclaw/plugin-sdk/core`
**Import:** `openclaw/plugin-sdk/channel-core`
Wraps `definePluginEntry` with channel-specific wiring. Automatically calls
`api.registerChannel({ plugin })`, exposes an optional root-help CLI metadata
seam, and gates `registerFull` on registration mode.
```typescript
import { defineChannelPluginEntry } from "openclaw/plugin-sdk/core";
import { defineChannelPluginEntry } from "openclaw/plugin-sdk/channel-core";
export default defineChannelPluginEntry({
id: "my-channel",
@ -114,13 +114,13 @@ export default defineChannelPluginEntry({
## `defineSetupPluginEntry`
**Import:** `openclaw/plugin-sdk/core`
**Import:** `openclaw/plugin-sdk/channel-core`
For the lightweight `setup-entry.ts` file. Returns just `{ plugin }` with no
runtime or CLI wiring.
```typescript
import { defineSetupPluginEntry } from "openclaw/plugin-sdk/core";
import { defineSetupPluginEntry } from "openclaw/plugin-sdk/channel-core";
export default defineSetupPluginEntry(myChannelPlugin);
```

View File

@ -26,11 +26,14 @@ Always import from a specific subpath:
```typescript
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
import { defineChannelPluginEntry } from "openclaw/plugin-sdk/core";
import { defineChannelPluginEntry } from "openclaw/plugin-sdk/channel-core";
```
Each subpath is a small, self-contained module. This keeps startup fast and
prevents circular dependency issues.
prevents circular dependency issues. For channel-specific entry/build helpers,
prefer `openclaw/plugin-sdk/channel-core`; keep `openclaw/plugin-sdk/core` for
the broader umbrella surface and shared helpers such as
`buildChannelConfigSchema`.
Do not add or depend on provider-named convenience seams such as
`openclaw/plugin-sdk/slack`, `openclaw/plugin-sdk/discord`,

View File

@ -178,7 +178,7 @@ disabled channel inspection).
```typescript
// setup-entry.ts
import { defineSetupPluginEntry } from "openclaw/plugin-sdk/core";
import { defineSetupPluginEntry } from "openclaw/plugin-sdk/channel-core";
import { myChannelPlugin } from "./src/channel.js";
export default defineSetupPluginEntry(myChannelPlugin);