docs: typography hygiene + drop one in-body H1 across 5 pages

Replaced 98 typography characters (curly quotes, apostrophes, em/en
dashes, non-breaking hyphens) with ASCII equivalents per
docs/CLAUDE.md heading and content hygiene rules.

- docs/plugins/sdk-migration.md: 20 chars
- docs/help/testing.md: 20 chars
- docs/automation/tasks.md: 20 chars
- docs/plugins/sdk-channel-plugins.md: 19 chars
- docs/channels/yuanbao.md: 19 chars; removed the duplicate '# Yuanbao'
  H1 (Mintlify renders title from frontmatter).
This commit is contained in:
Vincent Koc
2026-05-05 19:45:44 -07:00
parent 8489d0eb68
commit 4395f1dd66
5 changed files with 90 additions and 92 deletions

View File

@@ -23,13 +23,13 @@ pairing, reply threading, and outbound messaging.
Channel plugins do not need their own send/edit/react tools. OpenClaw keeps one
shared `message` tool in core. Your plugin owns:
- **Config** account resolution and setup wizard
- **Security** DM policy and allowlists
- **Pairing** DM approval flow
- **Session grammar** how provider-specific conversation ids map to base chats, thread ids, and parent fallbacks
- **Outbound** sending text, media, and polls to the platform
- **Threading** how replies are threaded
- **Heartbeat typing** optional typing/busy signals for heartbeat delivery targets
- **Config** - account resolution and setup wizard
- **Security** - DM policy and allowlists
- **Pairing** - DM approval flow
- **Session grammar** - how provider-specific conversation ids map to base chats, thread ids, and parent fallbacks
- **Outbound** - sending text, media, and polls to the platform
- **Threading** - how replies are threaded
- **Heartbeat typing** - optional typing/busy signals for heartbeat delivery targets
Core owns the shared message tool, prompt wiring, the outer session-key shape,
generic `:thread:` bookkeeping, and dispatch.
@@ -145,11 +145,11 @@ Most channel plugins do not need approval-specific code.
- If a channel needs native approval delivery, keep channel code focused on target normalization plus transport/presentation facts. Use `createChannelExecApprovalProfile`, `createChannelNativeOriginTargetResolver`, `createChannelApproverDmTargetResolver`, and `createApproverRestrictedNativeApprovalCapability` from `openclaw/plugin-sdk/approval-runtime`. Put the channel-specific facts behind `approvalCapability.nativeRuntime`, ideally via `createChannelApprovalNativeRuntimeAdapter(...)` or `createLazyChannelApprovalNativeRuntimeAdapter(...)`, so core can assemble the handler and own request filtering, routing, dedupe, expiry, gateway subscription, and routed-elsewhere notices. `nativeRuntime` is split into a few smaller seams:
- `createChannelNativeOriginTargetResolver` uses the shared channel-route matcher by default for `{ to, accountId, threadId }` targets. Pass `targetsMatch` only when a channel has provider-specific equivalence rules, such as Slack timestamp prefix matching.
- Pass `normalizeTargetForMatch` to `createChannelNativeOriginTargetResolver` when the channel needs to canonicalize provider ids before the default route matcher or a custom `targetsMatch` callback runs, while preserving the original target for delivery. Use `normalizeTarget` only when the resolved delivery target itself should be canonicalized.
- `availability` whether the account is configured and whether a request should be handled
- `presentation` map the shared approval view model into pending/resolved/expired native payloads or final actions
- `transport` prepare targets plus send/update/delete native approval messages
- `interactions` optional bind/unbind/clear-action hooks for native buttons or reactions
- `observe` optional delivery diagnostics hooks
- `availability` - whether the account is configured and whether a request should be handled
- `presentation` - map the shared approval view model into pending/resolved/expired native payloads or final actions
- `transport` - prepare targets plus send/update/delete native approval messages
- `interactions` - optional bind/unbind/clear-action hooks for native buttons or reactions
- `observe` - optional delivery diagnostics hooks
- If the channel needs runtime-owned objects such as a client, token, Bolt app, or webhook receiver, register them through `openclaw/plugin-sdk/channel-runtime-context`. The generic runtime-context registry lets core bootstrap capability-driven handlers from channel startup state without adding approval-specific wrapper glue.
- Reach for the lower-level `createChannelApprovalHandler` or `createChannelNativeApprovalRuntime` only when the capability-driven seam is not expressive enough yet.
- Native approval channels must route both `accountId` and `approvalKind` through those helpers. `accountId` keeps multi-account approval policy scoped to the right bot account, and `approvalKind` keeps exec vs plugin approval behavior available to the channel without hardcoded branches in core.
@@ -424,7 +424,7 @@ should use `resolveInboundMentionDecision({ facts, policy })`.
<Step title="Build the channel plugin object">
The `ChannelPlugin` interface has many optional adapter surfaces. Start with
the minimum `id` and `setup` and add adapters as you need them.
the minimum - `id` and `setup` - and add adapters as you need them.
Create `src/channel.ts`:
@@ -631,7 +631,7 @@ should use `resolveInboundMentionDecision({ facts, policy })`.
const event = parseWebhookPayload(req);
// Your inbound handler dispatches the message to OpenClaw.
// The exact wiring depends on your platform SDK
// The exact wiring depends on your platform SDK -
// see a real example in the bundled Microsoft Teams or Google Chat plugin package.
await handleAcmeChatInbound(api, event);
@@ -742,10 +742,10 @@ surface unless you are maintaining that bundled plugin family directly.
## Next steps
- [Provider Plugins](/plugins/sdk-provider-plugins) if your plugin also provides models
- [SDK Overview](/plugins/sdk-overview) full subpath import reference
- [SDK Testing](/plugins/sdk-testing) test utilities and contract tests
- [Plugin Manifest](/plugins/manifest) full manifest schema
- [Provider Plugins](/plugins/sdk-provider-plugins) - if your plugin also provides models
- [SDK Overview](/plugins/sdk-overview) - full subpath import reference
- [SDK Testing](/plugins/sdk-testing) - test utilities and contract tests
- [Plugin Manifest](/plugins/manifest) - full manifest schema
## Related

View File

@@ -19,18 +19,18 @@ the new architecture, this guide helps you migrate.
The old plugin system provided two wide-open surfaces that let plugins import
anything they needed from a single entry point:
- **`openclaw/plugin-sdk/compat`** a single import that re-exported dozens of
- **`openclaw/plugin-sdk/compat`** - a single import that re-exported dozens of
helpers. It was introduced to keep older hook-based plugins working while the
new plugin architecture was being built.
- **`openclaw/plugin-sdk/infra-runtime`** a broad runtime helper barrel that
- **`openclaw/plugin-sdk/infra-runtime`** - a broad runtime helper barrel that
mixed system events, heartbeat state, delivery queues, fetch/proxy helpers,
file helpers, approval types, and unrelated utilities.
- **`openclaw/plugin-sdk/config-runtime`** a broad config compatibility barrel
- **`openclaw/plugin-sdk/config-runtime`** - a broad config compatibility barrel
that still carries deprecated direct load/write helpers during the migration
window.
- **`openclaw/extension-api`** a bridge that gave plugins direct access to
- **`openclaw/extension-api`** - a bridge that gave plugins direct access to
host-side helpers like the embedded agent runner.
- **`api.registerEmbeddedExtensionFactory(...)`** a removed Pi-only bundled
- **`api.registerEmbeddedExtensionFactory(...)`** - a removed Pi-only bundled
extension hook that could observe embedded-runner events such as
`tool_result`.
@@ -55,9 +55,9 @@ registration behavior.
The old approach caused problems:
- **Slow startup** importing one helper loaded dozens of unrelated modules
- **Circular dependencies** broad re-exports made it easy to create import cycles
- **Unclear API surface** no way to tell which exports were stable vs internal
- **Slow startup** - importing one helper loaded dozens of unrelated modules
- **Circular dependencies** - broad re-exports made it easy to create import cycles
- **Unclear API surface** - no way to tell which exports were stable vs internal
The modern plugin SDK fixes this: each import path (`openclaw/plugin-sdk/\<subpath\>`)
is a small, self-contained module with a clear purpose and documented contract.
@@ -679,7 +679,7 @@ canonical replacement.
`buildCommandsMessagePaginated`, `buildHelpMessage`.
**New (`openclaw/plugin-sdk/command-status`)**: same signatures, same
exports just imported from the narrower subpath. `command-auth`
exports - just imported from the narrower subpath. `command-auth`
re-exports them as compat stubs.
```typescript
@@ -698,7 +698,7 @@ canonical replacement.
`openclaw/plugin-sdk/channel-inbound` or
`openclaw/plugin-sdk/channel-mention-gating`.
**New**: `resolveInboundMentionDecision({ facts, policy })` returns a
**New**: `resolveInboundMentionDecision({ facts, policy })` - returns a
single decision object instead of two split calls.
Downstream channel plugins (Slack, Discord, Matrix, MS Teams) have already
@@ -714,7 +714,7 @@ canonical replacement.
`channelActions*` helpers in `openclaw/plugin-sdk/channel-actions` are
deprecated alongside raw "actions" channel exports. Expose capabilities
through the semantic `presentation` surface instead channel plugins
through the semantic `presentation` surface instead - channel plugins
declare what they render (cards, buttons, selects) rather than which raw
action names they accept.
@@ -756,7 +756,7 @@ canonical replacement.
| `ProviderDiscoveryResult` | `ProviderCatalogResult` |
| `ProviderPluginDiscovery` | `ProviderPluginCatalog` |
Plus the legacy `ProviderCapabilities` static bag provider plugins
Plus the legacy `ProviderCapabilities` static bag - provider plugins
should use explicit provider hooks such as `buildReplayPolicy`,
`normalizeToolSchemas`, and `wrapStreamFn` rather than a static object.
@@ -809,12 +809,12 @@ canonical replacement.
</Accordion>
<Accordion title="Memory plugin registration → registerMemoryCapability">
**Old**: three separate calls
**Old**: three separate calls -
`api.registerMemoryPromptSection(...)`,
`api.registerMemoryFlushPlan(...)`,
`api.registerMemoryRuntime(...)`.
**New**: one call on the memory-state API
**New**: one call on the memory-state API -
`registerMemoryCapability(pluginId, { promptBuilder, flushPlanResolver, runtime })`.
Same slots, single registration call. Additive memory helpers
@@ -906,9 +906,9 @@ This is a temporary escape hatch, not a permanent solution.
## Related
- [Getting Started](/plugins/building-plugins) build your first plugin
- [SDK Overview](/plugins/sdk-overview) full subpath import reference
- [Channel Plugins](/plugins/sdk-channel-plugins) building channel plugins
- [Provider Plugins](/plugins/sdk-provider-plugins) building provider plugins
- [Plugin Internals](/plugins/architecture) architecture deep dive
- [Plugin Manifest](/plugins/manifest) manifest schema reference
- [Getting Started](/plugins/building-plugins) - build your first plugin
- [SDK Overview](/plugins/sdk-overview) - full subpath import reference
- [Channel Plugins](/plugins/sdk-channel-plugins) - building channel plugins
- [Provider Plugins](/plugins/sdk-provider-plugins) - building provider plugins
- [Plugin Internals](/plugins/architecture) - architecture deep dive
- [Plugin Manifest](/plugins/manifest) - manifest schema reference