diff --git a/docs/plugins/building-plugins.md b/docs/plugins/building-plugins.md index 28d04f0a5b5..905c32c99c4 100644 --- a/docs/plugins/building-plugins.md +++ b/docs/plugins/building-plugins.md @@ -181,6 +181,10 @@ Hook guard semantics to keep in mind: The `/approve` command handles both exec and plugin approvals with bounded fallback: when an exec approval id is not found, OpenClaw retries the same id through plugin approvals. Plugin approval forwarding can be configured independently via `approvals.plugin` in config. +If custom approval plumbing needs to detect that same bounded fallback case, +prefer `isApprovalNotFoundError` from `openclaw/plugin-sdk/error-runtime` +instead of matching approval-expiry strings manually. + See [SDK Overview hook decision semantics](/plugins/sdk-overview#hook-decision-semantics) for details. ## Registering agent tools diff --git a/docs/plugins/sdk-overview.md b/docs/plugins/sdk-overview.md index b1d07172f5c..25416ea446d 100644 --- a/docs/plugins/sdk-overview.md +++ b/docs/plugins/sdk-overview.md @@ -210,7 +210,7 @@ explicitly promotes one as public. | `plugin-sdk/infra-runtime` | System event/heartbeat helpers | | `plugin-sdk/collection-runtime` | Small bounded cache helpers | | `plugin-sdk/diagnostic-runtime` | Diagnostic flag and event helpers | - | `plugin-sdk/error-runtime` | Error graph, formatting, and shared error classification helpers | + | `plugin-sdk/error-runtime` | Error graph, formatting, shared error classification helpers, `isApprovalNotFoundError` | | `plugin-sdk/fetch-runtime` | Wrapped fetch, proxy, and pinned lookup helpers | | `plugin-sdk/host-runtime` | Hostname and SCP host normalization helpers | | `plugin-sdk/retry-runtime` | Retry config and retry runner helpers |