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

推荐订阅源

量子位
Recent Announcements
Recent Announcements
D
Docker
V
V2EX
阮一峰的网络日志
阮一峰的网络日志
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
The GitHub Blog
The GitHub Blog
U
Unit 42
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
月光博客
月光博客
腾讯CDC
B
Blog
博客园_首页
罗磊的独立博客
D
DataBreaches.Net
IT之家
IT之家
酷 壳 – CoolShell
酷 壳 – CoolShell
L
LangChain Blog
aimingoo的专栏
aimingoo的专栏
MongoDB | Blog
MongoDB | Blog
GbyAI
GbyAI
Stack Overflow Blog
Stack Overflow Blog
M
MIT News - Artificial intelligence

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(runtime): add prepared runtime foundation (#7824...
mcaxtr · 2026-05-08 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -37,6 +37,11 @@ Telegraph style. Root rules only. Read scoped `AGENTS.md` before subtree work.

3737

- New seams: backwards-compatible, documented, versioned. Third-party plugins exist.

3838

- Channels: `src/channels/**` is implementation; plugin authors get SDK seams.

3939

- Providers: core owns generic loop; provider plugins own auth/catalog/runtime hooks.

40+

- Request-time runtime resolution: when a path already knows the provider id, model ref, channel id, outbound target, capability family, or attachment class, carry that as a prepared runtime fact instead of rediscovering it later.

41+

- Prepared runtime facts should be small typed values produced once near startup, reply dispatch, model selection, tool planning, or channel resolution, then passed through context to consumers. Prefer `AgentRuntimePlan`, `ProviderRuntimePluginHandle`, scoped model/catalog helpers, active/runtime registries, manifest/public-artifact lookups, single-provider resolvers, and lazy registry construction.

42+

- Avoid broad request-time rediscovery: hot reply/tool/outbound/media paths should not call broad plugin/provider/channel/capability loaders such as `loadOpenClawPlugins`, `resolveProviderPluginsForHooks`, `resolvePluginCapabilityProviders`, `resolvePluginDiscoveryProvidersRuntime`, `getChannelPlugin`, or broad model/tool/media registry builders just to answer a question the caller already knows. Do not build multimodal/provider registries for document-only or otherwise non-participating paths.

43+

- Compatibility fallbacks are allowed only for startup/setup/admin/standalone/legacy callers that genuinely lack prepared facts. Keep them explicit, tested, and outside migrated hot reply/tool/outbound paths.

44+

- Do not fix repeated request-time discovery by adding scattered cache layers. Move the canonical fact earlier, reuse the existing prepared-runtime object, and delete duplicate lookup branches when the last migrated caller stops needing them.

4045

- Gateway protocol changes: additive first; incompatible needs versioning/docs/client follow-through.

4146

- Config contract: exported types, schema/help, metadata, baselines, docs aligned. Retired public keys stay retired; compat in raw migration/doctor.

4247

- Direction: manifest-first control plane; targeted runtime loaders; no hidden contract bypasses; broad mutable registries transitional.

Original file line numberDiff line numberDiff line change

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

6161

- Control UI/chat: add an agent-first filter to the chat session picker, keep chat controls/composer responsive across phone/tablet/desktop widths, keep desktop chat controls on one row, avoid duplicate avatar refreshes during initial chat load, and hide that row while scrolling down the transcript. Thanks @BunsDev.

6262

- Control UI/chat: collapse consecutive duplicate text messages into one bubble with a count so repeated text-only messages stay compact without hiding nearby context.

6363

- Control UI/chat and Sessions: label inherited thinking defaults separately from explicit overrides while preserving provider-supplied option labels. Fixes #77581. Thanks @BunsDev and @Beandon13.

64+

- Agents/runtime: add prepared runtime foundation contracts for carrying provider, model, tool, TTS, and outbound runtime facts through later reply-path migrations. Thanks @mcaxtr.

6465

- Agents/subagents: preserve every grouped child result when direct completion fallback has to bypass the requester-agent announce turn. Thanks @vincentkoc.

6566

- TTS/telephony: honor provider voice/model overrides in telephony synthesis providers so Google Meet agent speech logs match the backend that actually produced the audio. Thanks @vincentkoc.

6667

- Voice Call/realtime: bound the paced Twilio audio queue and close overloaded realtime streams before provider audio can pile up behind the websocket backpressure guard. Thanks @vincentkoc.

Original file line numberDiff line numberDiff line change

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

1-

259c4d22d5fe84ca6b27f9d061dddca4459e4eddd516729564f250d823dbd819 plugin-sdk-api-baseline.json

2-

b2bf16d3c5859b06240b5f41ed5803af8e82338da3e56ace1569520ac0732a5a plugin-sdk-api-baseline.jsonl

1+

28e280d21693216c99cfa8da553589b41741d37c0ada956e316ee01d3d6c202c plugin-sdk-api-baseline.json

2+

633dae33da97f6a073c5561709c57d5c0b7ff67af0512d0261f05455c24b38de plugin-sdk-api-baseline.jsonl

Original file line numberDiff line numberDiff line change

@@ -101,6 +101,15 @@ export const pluginSdkDocMetadata = {

101101

"runtime-store": {

102102

category: "runtime",

103103

},

104+

"agent-runtime": {

105+

category: "runtime",

106+

},

107+

"speech-core": {

108+

category: "provider",

109+

},

110+

"tts-runtime": {

111+

category: "runtime",

112+

},

104113

"allow-from": {

105114

category: "utilities",

106115

},

Original file line numberDiff line numberDiff line change

@@ -0,0 +1,51 @@

1+

import type { OpenClawConfig } from "../config/types.openclaw.js";

2+

import { findNormalizedProviderValue, normalizeProviderId } from "./provider-id.js";

3+
4+

function dedupeCatalogScopeRefs(values: Array<string | undefined>): string[] {

5+

const refs = new Set<string>();

6+

for (const value of values) {

7+

const trimmed = value?.trim();

8+

if (trimmed) {

9+

refs.add(trimmed);

10+

}

11+

}

12+

return [...refs];

13+

}

14+
15+

function providerFromModelRef(value: string | undefined): string | undefined {

16+

const trimmed = value?.trim();

17+

if (!trimmed) {

18+

return undefined;

19+

}

20+

const slash = trimmed.indexOf("/");

21+

if (slash <= 0) {

22+

return undefined;

23+

}

24+

const provider = normalizeProviderId(trimmed.slice(0, slash));

25+

return provider || undefined;

26+

}

27+
28+

export function resolveModelCatalogScope(params: {

29+

cfg?: OpenClawConfig;

30+

provider: string;

31+

model: string;

32+

}): { providerRefs: string[]; modelRefs: string[] } {

33+

const provider = params.provider.trim();

34+

const model = params.model.trim();

35+

const providerConfig = findNormalizedProviderValue(params.cfg?.models?.providers, provider);

36+

return {

37+

providerRefs: dedupeCatalogScopeRefs([provider, providerConfig?.api]),

38+

modelRefs: dedupeCatalogScopeRefs([provider && model ? `${provider}/${model}` : model, model]),

39+

};

40+

}

41+
42+

export function resolveProviderDiscoveryProviderIdsForCatalogScope(params: {

43+

providerRefs?: readonly string[];

44+

modelRefs?: readonly string[];

45+

}): string[] | undefined {

46+

const providerIds = dedupeCatalogScopeRefs([

47+

...(params.providerRefs ?? []),

48+

...(params.modelRefs ?? []).map(providerFromModelRef),

49+

]);

50+

return providerIds.length > 0 ? providerIds : undefined;

51+

}

Original file line numberDiff line numberDiff line change

@@ -6,6 +6,7 @@ import type { ThinkLevel } from "../../auto-reply/thinking.js";

66

import type { OpenClawConfig } from "../../config/types.openclaw.js";

77

import {

88

prepareProviderExtraParams as prepareProviderExtraParamsRuntime,

9+

type ProviderRuntimePluginHandle,

910

resolveProviderExtraParamsForTransport as resolveProviderExtraParamsForTransportRuntime,

1011

wrapProviderStreamFn as wrapProviderStreamFnRuntime,

1112

} from "../../plugins/provider-hook-runtime.js";

@@ -207,6 +208,7 @@ export function resolvePreparedExtraParams(params: {

207208

resolvedExtraParams?: Record<string, unknown>;

208209

model?: ProviderRuntimeModel;

209210

resolvedTransport?: SupportedTransport;

211+

providerRuntimeHandle?: ProviderRuntimePluginHandle;

210212

}): Record<string, unknown> {

211213

const resolvedExtraParams =

212214

params.resolvedExtraParams ??

@@ -253,6 +255,7 @@ export function resolvePreparedExtraParams(params: {

253255

provider: params.provider,

254256

config: params.cfg,

255257

workspaceDir: params.workspaceDir,

258+

runtimeHandle: params.providerRuntimeHandle,

256259

context: {

257260

config: params.cfg,

258261

agentDir: params.agentDir,

@@ -267,6 +270,7 @@ export function resolvePreparedExtraParams(params: {

267270

provider: params.provider,

268271

config: params.cfg,

269272

workspaceDir: params.workspaceDir,

273+

runtimeHandle: params.providerRuntimeHandle,

270274

context: {

271275

config: params.cfg,

272276

agentDir: params.agentDir,

Original file line numberDiff line numberDiff line change

@@ -105,6 +105,7 @@ function makeForwardedRuntimePlan(overrides: RuntimePlanOverrides = {}): AgentRu

105105

provider: "anthropic",

106106

modelId: "test-model",

107107

resolveSystemPromptContribution: vi.fn(),

108+

transformSystemPrompt: vi.fn((context) => context.systemPrompt),

108109

},

109110

transcript: {

110111

policy: transcriptPolicy,

Original file line numberDiff line numberDiff line change

@@ -1,6 +1,7 @@

11

import type { AgentTool } from "@mariozechner/pi-agent-core";

22

import type { TSchema } from "typebox";

33

import type { OpenClawConfig } from "../../config/types.openclaw.js";

4+

import type { ProviderRuntimePluginHandle } from "../../plugins/provider-hook-runtime.js";

45

import type { ProviderRuntimeModel } from "../../plugins/provider-runtime-model.types.js";

56

import {

67

inspectProviderToolSchemasWithPlugin,

@@ -19,6 +20,7 @@ type ProviderToolSchemaParams<TSchemaType extends TSchema = TSchema, TResult = u

1920

modelId?: string;

2021

modelApi?: string | null;

2122

model?: ProviderRuntimeModel;

23+

runtimeHandle?: ProviderRuntimePluginHandle;

2224

};

2325
2426

function buildProviderToolSchemaContext<TSchemaType extends TSchema = TSchema, TResult = unknown>(

@@ -51,6 +53,7 @@ export function normalizeProviderToolSchemas<

5153

config: params.config,

5254

workspaceDir: params.workspaceDir,

5355

env: params.env,

56+

runtimeHandle: params.runtimeHandle,

5457

context: buildProviderToolSchemaContext(params, provider),

5558

});

5659

return Array.isArray(pluginNormalized)

@@ -68,6 +71,7 @@ export function logProviderToolSchemaDiagnostics(params: ProviderToolSchemaParam

6871

config: params.config,

6972

workspaceDir: params.workspaceDir,

7073

env: params.env,

74+

runtimeHandle: params.runtimeHandle,

7175

context: buildProviderToolSchemaContext(params, provider),

7276

});

7377

if (!Array.isArray(diagnostics)) {