From 26420b28ea037111e370ede8c7e3490966e1aed4 Mon Sep 17 00:00:00 2001 From: "openclaw-docs-sync[bot]" Date: Sat, 25 Apr 2026 23:09:30 +0000 Subject: [PATCH] chore(sync): mirror docs from openclaw/openclaw@2c35a6e599767e2a91ab9ed276c4e9c4c83ebfb8 --- .openclaw-sync/source.json | 4 ++-- docs/plugins/sdk-agent-harness.md | 27 +++++++++++++++++++++++++++ docs/plugins/sdk-subpaths.md | 2 +- 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/.openclaw-sync/source.json b/.openclaw-sync/source.json index c7ba8898e..7e17b03c3 100644 --- a/.openclaw-sync/source.json +++ b/.openclaw-sync/source.json @@ -1,5 +1,5 @@ { "repository": "openclaw/openclaw", - "sha": "496d90c3b5ee849dba2f5aae3c8275236fa2ebb6", - "syncedAt": "2026-04-25T22:48:16.688Z" + "sha": "2c35a6e599767e2a91ab9ed276c4e9c4c83ebfb8", + "syncedAt": "2026-04-25T23:08:06.684Z" } diff --git a/docs/plugins/sdk-agent-harness.md b/docs/plugins/sdk-agent-harness.md index c19f90271..313f0d385 100644 --- a/docs/plugins/sdk-agent-harness.md +++ b/docs/plugins/sdk-agent-harness.md @@ -46,6 +46,23 @@ Before a harness is selected, OpenClaw has already resolved: That split is intentional. A harness runs a prepared attempt; it does not pick providers, replace channel delivery, or silently switch models. +The prepared attempt also includes `params.runtimePlan`, an OpenClaw-owned +policy bundle for runtime decisions that must stay shared across PI and native +harnesses: + +- `runtimePlan.tools.normalize(...)` and + `runtimePlan.tools.logDiagnostics(...)` for provider-aware tool schema policy +- `runtimePlan.transcript.resolvePolicy(...)` for transcript sanitization and + tool-call repair policy +- `runtimePlan.delivery.isSilentPayload(...)` for shared `NO_REPLY` and media + delivery suppression +- `runtimePlan.outcome.classifyRunResult(...)` for model fallback classification +- `runtimePlan.observability` for resolved provider/model/harness metadata + +Harnesses may use the plan for decisions that need to match PI behavior, but +should still treat it as host-owned attempt state. Do not mutate it or use it to +switch providers/models inside a turn. + ## Register a harness **Import:** `openclaw/plugin-sdk/agent-harness` @@ -162,6 +179,16 @@ middleware, but new result transforms should use the runtime-neutral API. The Pi-only `api.registerEmbeddedExtensionFactory(...)` hook has been removed; Pi tool-result transforms must use runtime-neutral middleware. +### Terminal outcome classification + +Native harnesses that own their own protocol projection can use +`classifyAgentHarnessTerminalOutcome(...)` from +`openclaw/plugin-sdk/agent-harness-runtime` when a completed turn produced no +visible assistant text. The helper returns `empty`, `reasoning-only`, or +`planning-only` so OpenClaw's fallback policy can decide whether to retry on a +different model. It intentionally leaves prompt errors, in-flight turns, and +intentional silent replies such as `NO_REPLY` unclassified. + ### Native Codex harness mode The bundled `codex` harness is the native Codex mode for embedded OpenClaw diff --git a/docs/plugins/sdk-subpaths.md b/docs/plugins/sdk-subpaths.md index 9b0a17a2d..f07103fde 100644 --- a/docs/plugins/sdk-subpaths.md +++ b/docs/plugins/sdk-subpaths.md @@ -191,7 +191,7 @@ For the plugin authoring guide, see [Plugin SDK overview](/plugins/sdk-overview) | `plugin-sdk/models-provider-runtime` | `/models` command/provider reply helpers | | `plugin-sdk/skill-commands-runtime` | Skill command listing helpers | | `plugin-sdk/native-command-registry` | Native command registry/build/serialize helpers | - | `plugin-sdk/agent-harness` | Experimental trusted-plugin surface for low-level agent harnesses: harness types, active-run steer/abort helpers, OpenClaw tool bridge helpers, tool progress formatting/detail helpers, and attempt result utilities | + | `plugin-sdk/agent-harness` | Experimental trusted-plugin surface for low-level agent harnesses: harness types, active-run steer/abort helpers, OpenClaw tool bridge helpers, runtime-plan tool policy helpers, terminal outcome classification, tool progress formatting/detail helpers, and attempt result utilities | | `plugin-sdk/provider-zai-endpoint` | Z.AI endpoint detection helpers | | `plugin-sdk/infra-runtime` | System event/heartbeat helpers | | `plugin-sdk/collection-runtime` | Small bounded cache helpers |