From 6603e8fb6028b945d33caa3daf2171bf5209b126 Mon Sep 17 00:00:00 2001 From: "openclaw-docs-sync[bot]" Date: Mon, 4 May 2026 14:07:49 +0000 Subject: [PATCH] chore(sync): mirror docs from openclaw/openclaw@8afc9ef73cb5ad1353151d04ef2d6191219c8f53 --- .openclaw-sync/source.json | 4 ++-- docs/.generated/plugin-sdk-api-baseline.sha256 | 4 ++-- docs/plugins/hooks.md | 16 ++++++++++++++++ 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.openclaw-sync/source.json b/.openclaw-sync/source.json index 0bbd04357..558716d6b 100644 --- a/.openclaw-sync/source.json +++ b/.openclaw-sync/source.json @@ -1,5 +1,5 @@ { "repository": "openclaw/openclaw", - "sha": "d5b0083300a61d31d4a57864bfd394f825120592", - "syncedAt": "2026-05-04T11:05:39.085Z" + "sha": "8afc9ef73cb5ad1353151d04ef2d6191219c8f53", + "syncedAt": "2026-05-04T14:05:45.130Z" } diff --git a/docs/.generated/plugin-sdk-api-baseline.sha256 b/docs/.generated/plugin-sdk-api-baseline.sha256 index 3e3904a90..a4cba7312 100644 --- a/docs/.generated/plugin-sdk-api-baseline.sha256 +++ b/docs/.generated/plugin-sdk-api-baseline.sha256 @@ -1,2 +1,2 @@ -c38441e2e18aa519c5dc22c2b593694444869673447740327c87f16f3d4a0f8d plugin-sdk-api-baseline.json -5711948923b5a4f89ac04a182266ee0fb57275369a3a8112433f3758a7d38c86 plugin-sdk-api-baseline.jsonl +3c0423e26e758e7a5f5febcbaacd6a7ceb8584a8eecd0224f7ce98e6bcb9e9c0 plugin-sdk-api-baseline.json +952ba44c63a9f2107fc10aead1d0cc77ef06ac9a9befcac3ca9e4b0f4427cdfc plugin-sdk-api-baseline.jsonl diff --git a/docs/plugins/hooks.md b/docs/plugins/hooks.md index 094cf4d65..b0e928ea5 100644 --- a/docs/plugins/hooks.md +++ b/docs/plugins/hooks.md @@ -264,6 +264,22 @@ the harness for one more model pass before finalization, `{ action: Codex native `Stop` hooks are relayed into this hook as OpenClaw `before_agent_finalize` decisions. +When returning `action: "revise"`, plugins can include `retry` metadata to make +the extra model pass bounded and replay-safe: + +```typescript +type BeforeAgentFinalizeRetry = { + instruction: string; + idempotencyKey?: string; + maxAttempts?: number; +}; +``` + +`instruction` is appended to the revision reason sent to the harness. +`idempotencyKey` lets the host count retries for the same plugin request across +equivalent finalize decisions, and `maxAttempts` caps how many extra passes the +host will allow before continuing with the natural final answer. + Non-bundled plugins that need `llm_input`, `llm_output`, `before_agent_finalize`, or `agent_end` must set: