mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-05 22:32:12 +00:00
docs: refresh native approval routing refs
This commit is contained in:
@@ -944,8 +944,8 @@ Default slash command settings:
|
||||
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="Exec approvals in Discord">
|
||||
Discord supports button-based exec approvals in DMs and can optionally post approval prompts in the originating channel.
|
||||
<Accordion title="Approvals in Discord">
|
||||
Discord supports button-based approval handling in DMs and can optionally post approval prompts in the originating channel.
|
||||
|
||||
Config path:
|
||||
|
||||
@@ -967,7 +967,16 @@ Default slash command settings:
|
||||
- remote-mode support via `gateway.remote.*` when applicable
|
||||
- URL overrides are override-safe: CLI overrides do not reuse implicit credentials, and env overrides use env credentials only
|
||||
|
||||
Exec approvals expire after 30 minutes by default. If approvals fail with unknown approval IDs, verify approver resolution and feature enablement.
|
||||
Approval resolution behavior:
|
||||
|
||||
- IDs prefixed with `plugin:` resolve through `plugin.approval.resolve`.
|
||||
- Other IDs resolve through `exec.approval.resolve`.
|
||||
- Discord does not do an extra exec-to-plugin fallback hop here; the id
|
||||
prefix decides which gateway method it calls.
|
||||
|
||||
Exec approvals expire after 30 minutes by default. If approvals fail with
|
||||
unknown approval IDs, verify approver resolution, feature enablement, and
|
||||
that the delivered approval id kind matches the pending request.
|
||||
|
||||
Related docs: [Exec approvals](/tools/exec-approvals)
|
||||
|
||||
|
||||
@@ -67,6 +67,8 @@ Most channel plugins do not need approval-specific code.
|
||||
- If a channel can infer stable owner-like DM identities from existing config, use `createResolvedApproverActionAuthAdapter` from `openclaw/plugin-sdk/approval-runtime` to restrict same-chat `/approve` without adding approval-specific core logic.
|
||||
- If a channel needs native approval delivery, keep channel code focused on target normalization and transport hooks. Use `createChannelExecApprovalProfile`, `createChannelNativeOriginTargetResolver`, `createChannelApproverDmTargetResolver`, `createApproverRestrictedNativeApprovalCapability`, and `createChannelNativeApprovalRuntime` from `openclaw/plugin-sdk/approval-runtime` so core owns request filtering, routing, dedupe, expiry, and gateway subscription.
|
||||
- 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.
|
||||
- Preserve the delivered approval id kind end-to-end. Native clients should not
|
||||
guess or rewrite exec vs plugin approval routing from channel-local state.
|
||||
- `createApproverRestrictedNativeApprovalAdapter` still exists as a compatibility wrapper, but new code should prefer the capability builder and expose `approvalCapability` on the plugin.
|
||||
|
||||
For hot channel entrypoints, prefer the narrower runtime subpaths when you only
|
||||
|
||||
@@ -544,6 +544,8 @@ Shared behavior:
|
||||
- Slack approvers can be explicit (`execApprovals.approvers`) or inferred from `commands.ownerAllowFrom`
|
||||
- the requester does not need to be an approver
|
||||
- the originating chat can approve directly with `/approve` when that chat already supports commands and replies
|
||||
- native Discord approval buttons route by approval id kind: `plugin:` ids go
|
||||
straight to plugin approvals, everything else goes to exec approvals
|
||||
- native Telegram approval buttons follow the same bounded exec-to-plugin fallback as `/approve`
|
||||
- when native `target` enables origin-chat delivery, approval prompts include the command text
|
||||
- pending exec approvals expire after 30 minutes by default
|
||||
|
||||
Reference in New Issue
Block a user