diff --git a/.openclaw-sync/source.json b/.openclaw-sync/source.json index 35bcb8624..b1e2ef049 100644 --- a/.openclaw-sync/source.json +++ b/.openclaw-sync/source.json @@ -1,15 +1,15 @@ { "repository": "openclaw/openclaw", - "sha": "e259751ec9c9ed10b292ce3e0b987c4b18b19a0c", + "sha": "9e1e59717ffd04609a5165edf9af0c789dcc2621", "sources": { "openclaw": { "repository": "openclaw/openclaw", - "sha": "e259751ec9c9ed10b292ce3e0b987c4b18b19a0c" + "sha": "9e1e59717ffd04609a5165edf9af0c789dcc2621" }, "clawhub": { "repository": "openclaw/clawhub", "sha": "4d3b7dedba7086345165e78869886c5d9af928c5" } }, - "syncedAt": "2026-05-08T02:21:40.362Z" + "syncedAt": "2026-05-08T02:29:11.790Z" } diff --git a/docs/.generated/config-baseline.sha256 b/docs/.generated/config-baseline.sha256 index f661e2131..5f7a7019a 100644 --- a/docs/.generated/config-baseline.sha256 +++ b/docs/.generated/config-baseline.sha256 @@ -1,4 +1,4 @@ -0a77e8265b3bf5d75e06c2e5aad7f0b7c60667de2ec57c9676e2b18305b0cc08 config-baseline.json -b2ed92dd6a269d54f263728a2a761d8f6e60f849ec0562dfad17c959bfe90dfa config-baseline.core.json +885a734aa93cf04f6c14f8d83c1e96a66a5b96705327ea2de7b2aa7314238976 config-baseline.json +074eb9a1480ff40836d98090ccb9be3465345ac4b46e0d273b7995504bbb8008 config-baseline.core.json ed15b24c1ccf0234e6b3435149a6f1c1e709579d1259f1d09402688799b149bd config-baseline.channel.json -dfc16c21bdd6d727c920de871bf7fe86b771c80df86335c6376b436c0c4898ee config-baseline.plugin.json +c4e8d8898eebc4d40f35b167c987870e426e6c82121696dc055ff929f6a24046 config-baseline.plugin.json diff --git a/docs/.generated/plugin-sdk-api-baseline.sha256 b/docs/.generated/plugin-sdk-api-baseline.sha256 index 88f072a17..d8b9d1b47 100644 --- a/docs/.generated/plugin-sdk-api-baseline.sha256 +++ b/docs/.generated/plugin-sdk-api-baseline.sha256 @@ -1,2 +1,2 @@ -887d2fee5f77f1de984bfb6ec0f001c0484c0367dbc8b5f42b62027df352c2e1 plugin-sdk-api-baseline.json -8e2b4e64a801b47c4d45d5d4a2073180abcc1ecf7e677fae035799c6a68f7c82 plugin-sdk-api-baseline.jsonl +fecac0023b0a8de6334740483ef03500c72f3235e5b636e089bf581b00e8734a plugin-sdk-api-baseline.json +b427b2c8bddefb6c0ab4f411065adeec230d1e126a792ed30e6d0a45053dd4e3 plugin-sdk-api-baseline.jsonl diff --git a/docs/gateway/configuration-reference.md b/docs/gateway/configuration-reference.md index ea05b97fe..b2c722d8c 100644 --- a/docs/gateway/configuration-reference.md +++ b/docs/gateway/configuration-reference.md @@ -198,6 +198,9 @@ See [MCP](/cli/mcp#openclaw-as-an-mcp-client-registry) and - `plugins.entries..hooks.allowConversationAccess`: when `true`, trusted non-bundled plugins may read raw conversation content from typed hooks such as `llm_input`, `llm_output`, `before_model_resolve`, `before_agent_reply`, `before_agent_run`, `before_agent_finalize`, and `agent_end`. - `plugins.entries..subagent.allowModelOverride`: explicitly trust this plugin to request per-run `provider` and `model` overrides for background subagent runs. - `plugins.entries..subagent.allowedModels`: optional allowlist of canonical `provider/model` targets for trusted subagent overrides. Use `"*"` only when you intentionally want to allow any model. +- `plugins.entries..llm.allowModelOverride`: explicitly trust this plugin to request model overrides for `api.runtime.llm.complete`. +- `plugins.entries..llm.allowedModels`: optional allowlist of canonical `provider/model` targets for trusted plugin LLM completion overrides. Use `"*"` only when you intentionally want to allow any model. +- `plugins.entries..llm.allowAgentIdOverride`: explicitly trust this plugin to run `api.runtime.llm.complete` against a non-default agent id. - `plugins.entries..config`: plugin-defined config object (validated by native OpenClaw plugin schema when available). - Channel plugin account/runtime settings live under `channels.` and should be described by the owning plugin's manifest `channelConfigs` metadata, not by a central OpenClaw option registry. diff --git a/docs/plugins/sdk-runtime.md b/docs/plugins/sdk-runtime.md index 775e5dbba..7d00c7c0b 100644 --- a/docs/plugins/sdk-runtime.md +++ b/docs/plugins/sdk-runtime.md @@ -133,6 +133,32 @@ Provider and channel execution paths must use the active runtime config snapshot const provider = api.runtime.agent.defaults.provider; // e.g. "anthropic" ``` + + + + Run a host-owned text completion without importing provider internals or + duplicating OpenClaw model/auth/base URL preparation. + + ```typescript + const result = await api.runtime.llm.complete({ + messages: [{ role: "user", content: "Summarize this transcript." }], + purpose: "my-plugin.summary", + maxTokens: 512, + temperature: 0.2, + }); + ``` + + The helper uses the same simple-completion preparation path as OpenClaw's + built-in runtime and the host-owned runtime config snapshot. Context engines + receive a session-bound `llm.complete` capability, so model calls use the + active session's agent and do not silently fall back to the default agent. The + result includes provider/model/agent attribution plus normalized token, + cache, and estimated cost usage when available. + + + Model overrides require operator opt-in via `plugins.entries..llm.allowModelOverride: true` in config. Use `plugins.entries..llm.allowedModels` to restrict trusted plugins to specific canonical `provider/model` targets. Cross-agent completions require `plugins.entries..llm.allowAgentIdOverride: true`. + + Launch and manage background subagent runs.