惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

A
About on SuperTechFans
博客园 - 聂微东
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 司徒正美
宝玉的分享
宝玉的分享
美团技术团队
量子位
The Cloudflare Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
IT之家
IT之家
爱范儿
爱范儿
J
Java Code Geeks
博客园 - Franky
Last Week in AI
Last Week in AI
B
Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
I
InfoQ
GbyAI
GbyAI
Recent Announcements
Recent Announcements
小众软件
小众软件
H
Help Net Security
Microsoft Azure Blog
Microsoft Azure Blog
MyScale Blog
MyScale Blog

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
refactor: tighten plugin runtime sdk boundaries · opencla...
steipete · 2026-04-27 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -8,6 +8,7 @@ Docs: https://docs.openclaw.ai

88
99

### Changes

1010
11+

- Plugins/runtime: expose provider-backed thinking policy and normalization through `api.runtime.agent`, letting tool plugins validate thinking overrides without duplicating provider/model level lists. Thanks @openclaw.

1112

- Providers: add Cerebras as a bundled plugin with onboarding, static model catalog, docs, and manifest-owned endpoint metadata.

1213

- Memory/OpenAI-compatible: add optional `memorySearch.inputType`, `queryInputType`, and `documentInputType` config for asymmetric embedding endpoints, including direct query embeddings and provider batch indexing. Carries forward #63313 and #60727. Thanks @HOYALIM and @prospect1314521.

1314

- Ollama/memory: add model-specific retrieval query prefixes for `nomic-embed-text`, `qwen3-embedding`, and `mxbai-embed-large` memory-search queries while leaving document batches unchanged. Carries forward #45013. Thanks @laolin5564.

Original file line numberDiff line numberDiff line change

@@ -1,2 +1,2 @@

1-

491267e919c6bf426f673a9066e703811c7779a32de87edd0ce493147fd4438e plugin-sdk-api-baseline.json

2-

590d21aeb520f34b5bf23abb7b17602b204f170547c772d60b604bb34a3940bb plugin-sdk-api-baseline.jsonl

1+

b81647828ee6599cdd1d76d96ea02c92ccdebb8c1b3b443cefe10ca8bd2ddbfe plugin-sdk-api-baseline.json

2+

ca9f3569352522621857b51872f30b3c31881505fd9eff2451b1b46d77670726 plugin-sdk-api-baseline.jsonl

Original file line numberDiff line numberDiff line change

@@ -62,7 +62,18 @@ Internal OpenClaw runtime code has the same direction: load config once at the C

6262

const identity = api.runtime.agent.resolveAgentIdentity(cfg);

6363
6464

// Get default thinking level

65-

const thinking = api.runtime.agent.resolveThinkingDefault(cfg, provider, model);

65+

const thinking = api.runtime.agent.resolveThinkingDefault({

66+

cfg,

67+

provider,

68+

model,

69+

});

70+
71+

// Validate a user-provided thinking level against the active provider profile

72+

const policy = api.runtime.agent.resolveThinkingPolicy({ provider, model });

73+

const level = api.runtime.agent.normalizeThinkingLevel("extra high");

74+

if (level && policy.levels.some((entry) => entry.id === level)) {

75+

// pass level to an embedded run

76+

}

6677
6778

// Get agent timeout

6879

const timeoutMs = api.runtime.agent.resolveAgentTimeoutMs(cfg);

@@ -86,6 +97,10 @@ Internal OpenClaw runtime code has the same direction: load config once at the C

8697
8798

`runEmbeddedPiAgent(...)` remains as a compatibility alias.

8899
100+

`resolveThinkingPolicy(...)` returns the provider/model's supported thinking levels and optional default. Provider plugins own the model-specific profile through their thinking hooks, so tool plugins should call this runtime helper instead of importing or duplicating provider lists.

101+
102+

`normalizeThinkingLevel(...)` converts user text such as `on`, `x-high`, or `extra high` to the canonical stored level before checking it against the resolved policy.

103+
89104

**Session store helpers** are under `api.runtime.agent.session`:

90105
91106

```typescript

Original file line numberDiff line numberDiff line change

@@ -138,7 +138,7 @@ For the plugin authoring guide, see [Plugin SDK overview](/plugins/sdk-overview)

138138

| `plugin-sdk/allow-from` | `formatAllowFromLowercase` |

139139

| `plugin-sdk/channel-secret-runtime` | Narrow secret-contract collection helpers for channel/plugin secret surfaces |

140140

| `plugin-sdk/secret-ref-runtime` | Narrow `coerceSecretRef` and SecretRef typing helpers for secret-contract/config parsing |

141-

| `plugin-sdk/security-runtime` | Shared trust, DM gating, external-content, constant-time secret comparison, and secret-collection helpers |

141+

| `plugin-sdk/security-runtime` | Shared trust, DM gating, external-content, sensitive text redaction, constant-time secret comparison, and secret-collection helpers |

142142

| `plugin-sdk/ssrf-policy` | Host allowlist and private-network SSRF policy helpers |

143143

| `plugin-sdk/ssrf-dispatcher` | Narrow pinned-dispatcher helpers without the broad infra runtime surface |

144144

| `plugin-sdk/ssrf-runtime` | Pinned-dispatcher, SSRF-guarded fetch, SSRF error, and SSRF policy helpers |

@@ -201,7 +201,7 @@ For the plugin authoring guide, see [Plugin SDK overview](/plugins/sdk-overview)

201201

| `plugin-sdk/provider-zai-endpoint` | Z.AI endpoint detection helpers |

202202

| `plugin-sdk/infra-runtime` | System event/heartbeat helpers |

203203

| `plugin-sdk/collection-runtime` | Small bounded cache helpers |

204-

| `plugin-sdk/diagnostic-runtime` | Diagnostic flag and event helpers |

204+

| `plugin-sdk/diagnostic-runtime` | Diagnostic flag, event, and trace-context helpers |

205205

| `plugin-sdk/error-runtime` | Error graph, formatting, shared error classification helpers, `isApprovalNotFoundError` |

206206

| `plugin-sdk/fetch-runtime` | Wrapped fetch, proxy, and pinned lookup helpers |

207207

| `plugin-sdk/runtime-fetch` | Dispatcher-aware runtime fetch without proxy/guarded-fetch imports |

Original file line numberDiff line numberDiff line change

@@ -124,5 +124,6 @@ Malformed local-model reasoning tags are handled conservatively. Closed `<think>

124124
125125

- Provider plugins can expose `resolveThinkingProfile(ctx)` to define the model's supported levels and default.

126126

- Each profile level has a stored canonical `id` (`off`, `minimal`, `low`, `medium`, `high`, `xhigh`, `adaptive`, or `max`) and may include a display `label`. Binary providers use `{ id: "low", label: "on" }`.

127+

- Tool plugins that need to validate an explicit thinking override should use `api.runtime.agent.resolveThinkingPolicy({ provider, model })` plus `api.runtime.agent.normalizeThinkingLevel(...)`; they should not keep their own provider/model level lists.

127128

- Published legacy hooks (`supportsXHighThinking`, `isBinaryThinking`, and `resolveDefaultThinkingLevel`) remain as compatibility adapters, but new custom level sets should use `resolveThinkingProfile`.

128129

- Gateway rows/defaults expose `thinkingLevels`, `thinkingOptions`, and `thinkingDefault` so ACP/chat clients render the same profile ids and labels that runtime validation uses.

Original file line numberDiff line numberDiff line change

@@ -1 +1,20 @@

1-

export * from "openclaw/plugin-sdk/diagnostics-otel";

1+

export {

2+

createChildDiagnosticTraceContext,

3+

createDiagnosticTraceContext,

4+

emitDiagnosticEvent,

5+

formatDiagnosticTraceparent,

6+

isValidDiagnosticSpanId,

7+

isValidDiagnosticTraceFlags,

8+

isValidDiagnosticTraceId,

9+

onDiagnosticEvent,

10+

parseDiagnosticTraceparent,

11+

type DiagnosticEventMetadata,

12+

type DiagnosticEventPayload,

13+

type DiagnosticTraceContext,

14+

} from "openclaw/plugin-sdk/diagnostic-runtime";

15+

export { emptyPluginConfigSchema, type OpenClawPluginApi } from "openclaw/plugin-sdk/plugin-entry";

16+

export type {

17+

OpenClawPluginService,

18+

OpenClawPluginServiceContext,

19+

} from "openclaw/plugin-sdk/plugin-entry";

20+

export { redactSensitiveText } from "openclaw/plugin-sdk/security-runtime";

Original file line numberDiff line numberDiff line change

@@ -1 +1,12 @@

1-

export * from "openclaw/plugin-sdk/diagnostics-prometheus";

1+

export type {

2+

DiagnosticEventMetadata,

3+

DiagnosticEventPayload,

4+

} from "openclaw/plugin-sdk/diagnostic-runtime";

5+

export {

6+

emptyPluginConfigSchema,

7+

type OpenClawPluginApi,

8+

type OpenClawPluginHttpRouteHandler,

9+

type OpenClawPluginService,

10+

type OpenClawPluginServiceContext,

11+

} from "openclaw/plugin-sdk/plugin-entry";

12+

export { redactSensitiveText } from "openclaw/plugin-sdk/security-runtime";

Original file line numberDiff line numberDiff line change

@@ -1 +1,10 @@

1-

export * from "openclaw/plugin-sdk/diffs";

1+

export type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime";

2+

export {

3+

definePluginEntry,

4+

type AnyAgentTool,

5+

type OpenClawPluginApi,

6+

type OpenClawPluginConfigSchema,

7+

type OpenClawPluginToolContext,

8+

type PluginLogger,

9+

} from "openclaw/plugin-sdk/plugin-entry";

10+

export { resolvePreferredOpenClawTmpDir } from "openclaw/plugin-sdk/temp-path";

Original file line numberDiff line numberDiff line change

@@ -30,6 +30,7 @@ export {

3030

export { PAIRING_APPROVED_MESSAGE } from "openclaw/plugin-sdk/channel-status";

3131

export { chunkTextForOutbound } from "openclaw/plugin-sdk/text-chunking";

3232

export type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime";

33+

export { GoogleChatConfigSchema } from "openclaw/plugin-sdk/channel-config-schema-legacy";

3334

export {

3435

GROUP_POLICY_BLOCKED_LABEL,

3536

isDangerousNameMatchingEnabled,

@@ -41,11 +42,7 @@ export { fetchRemoteMedia, resolveChannelMediaMaxBytes } from "openclaw/plugin-s

4142

export { loadOutboundMediaFromUrl } from "openclaw/plugin-sdk/outbound-media";

4243

export type { PluginRuntime } from "openclaw/plugin-sdk/runtime-store";

4344

export { fetchWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime";

44-

export {

45-

GoogleChatConfigSchema,

46-

type GoogleChatAccountConfig,

47-

type GoogleChatConfig,

48-

} from "openclaw/plugin-sdk/googlechat-runtime-shared";

45+

export type { GoogleChatAccountConfig, GoogleChatConfig } from "openclaw/plugin-sdk/config-runtime";

4946

export { extractToolSend } from "openclaw/plugin-sdk/tool-send";

5047

export { resolveInboundMentionDecision } from "openclaw/plugin-sdk/channel-inbound";

5148

export { resolveInboundRouteEnvelopeBuilderWithRuntime } from "openclaw/plugin-sdk/inbound-envelope";

Original file line numberDiff line numberDiff line change

@@ -1 +1,6 @@

1-

export * from "openclaw/plugin-sdk/llm-task";

1+

export * from "./src/runtime-api.js";

2+

export {

3+

definePluginEntry,

4+

type AnyAgentTool,

5+

type OpenClawPluginApi,

6+

} from "openclaw/plugin-sdk/plugin-entry";