mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 18:40:44 +00:00
feat(plugin-sdk): add presentation and skills runtime contracts
This commit is contained in:
@@ -1251,16 +1251,19 @@ Compatibility note:
|
||||
## Message tool schemas
|
||||
|
||||
Plugins should own channel-specific `describeMessageTool(...)` schema
|
||||
contributions. Keep provider-specific fields in the plugin, not in shared core.
|
||||
contributions for non-message primitives such as reactions, reads, and polls.
|
||||
Shared send presentation should use the generic `MessagePresentation` contract
|
||||
instead of provider-native button, component, block, or card fields.
|
||||
|
||||
For shared portable schema fragments, reuse the generic helpers exported through
|
||||
`openclaw/plugin-sdk/channel-actions`:
|
||||
Send-capable plugins declare what they can render through message capabilities:
|
||||
|
||||
- `createMessageToolButtonsSchema()` for button-grid style payloads
|
||||
- `createMessageToolCardSchema()` for structured card payloads
|
||||
- `presentation` for semantic presentation blocks (`text`, `context`, `divider`, `buttons`, `select`)
|
||||
- `delivery-pin` for pinned-delivery requests
|
||||
|
||||
If a schema shape only makes sense for one provider, define it in that plugin's
|
||||
own source instead of promoting it into the shared SDK.
|
||||
Core decides whether to render the presentation natively or degrade it to text.
|
||||
Do not expose provider-native UI escape hatches from the generic message tool.
|
||||
Deprecated SDK helpers for legacy native schemas remain exported for existing
|
||||
third-party plugins, but new plugins should not use them.
|
||||
|
||||
## Channel target resolution
|
||||
|
||||
|
||||
@@ -109,13 +109,13 @@ explicitly promotes one as public.
|
||||
| `plugin-sdk/allowlist-config-edit` | Allowlist config edit/read helpers |
|
||||
| `plugin-sdk/group-access` | Shared group-access decision helpers |
|
||||
| `plugin-sdk/direct-dm` | Shared direct-DM auth/guard helpers |
|
||||
| `plugin-sdk/interactive-runtime` | Interactive reply payload normalization/reduction helpers |
|
||||
| `plugin-sdk/interactive-runtime` | Semantic message presentation, delivery, and legacy interactive reply helpers |
|
||||
| `plugin-sdk/channel-inbound` | Compatibility barrel for inbound debounce, mention matching, mention-policy helpers, and envelope helpers |
|
||||
| `plugin-sdk/channel-mention-gating` | Narrow mention-policy helpers without the broader inbound runtime surface |
|
||||
| `plugin-sdk/channel-location` | Channel location context and formatting helpers |
|
||||
| `plugin-sdk/channel-logging` | Channel logging helpers for inbound drops and typing/ack failures |
|
||||
| `plugin-sdk/channel-send-result` | Reply result types |
|
||||
| `plugin-sdk/channel-actions` | `createMessageToolButtonsSchema`, `createMessageToolCardSchema` |
|
||||
| `plugin-sdk/channel-actions` | Channel message-action helpers, plus deprecated native schema helpers kept for plugin compatibility |
|
||||
| `plugin-sdk/channel-targets` | Target parsing/matching helpers |
|
||||
| `plugin-sdk/channel-contract` | Channel contract types |
|
||||
| `plugin-sdk/channel-feedback` | Feedback/reaction wiring |
|
||||
|
||||
Reference in New Issue
Block a user