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

推荐订阅源

Apple Machine Learning Research
Apple Machine Learning Research
J
Java Code Geeks
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Last Week in AI
Last Week in AI
雷峰网
雷峰网
博客园_首页
小众软件
小众软件
美团技术团队
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
腾讯CDC
P
Proofpoint News Feed
MongoDB | Blog
MongoDB | Blog
Google DeepMind News
Google DeepMind News
MyScale Blog
MyScale Blog
U
Unit 42
The Cloudflare Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Microsoft Security Blog
Microsoft Security Blog
大猫的无限游戏
大猫的无限游戏
Engineering at Meta
Engineering at Meta
N
Netflix TechBlog - Medium
Microsoft Azure Blog
Microsoft Azure 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
fix(channels): preserve observe-only turn compatibility ·...
steipete · 2026-04-30 · via Recent Commits to openclaw:main

@@ -1,5 +1,6 @@

11

import type { ReplyPayload } from "../../auto-reply/reply-payload.js";

22

import { clearHistoryEntriesIfEnabled } from "../../auto-reply/reply/history.js";

3+

import { EMPTY_CHANNEL_TURN_DISPATCH_COUNTS } from "./dispatch-result.js";

34

export { buildChannelTurnContext, filterChannelTurnSupplementalContext } from "./context.js";

45

export type { BuildChannelTurnContextParams } from "./context.js";

56

import type {

@@ -15,6 +16,7 @@ import type {

1516

PreparedChannelTurn,

1617

PreflightFacts,

1718

RunChannelTurnParams,

19+

RunResolvedChannelTurnParams,

1820

} from "./types.js";

1921

export {

2022

EMPTY_CHANNEL_TURN_DISPATCH_COUNTS,

@@ -49,6 +51,7 @@ export type {

4951

ReplyPlanFacts,

5052

RouteFacts,

5153

RunChannelTurnParams,

54+

RunResolvedChannelTurnParams,

5255

SenderFacts,

5356

SupplementalContextFacts,

5457

} from "./types.js";

@@ -110,6 +113,15 @@ function clearPendingHistoryAfterTurn(params?: ChannelTurnHistoryFinalizeOptions

110113

});

111114

}

112115116+

function resolveObserveOnlyDispatchResult<TDispatchResult>(

117+

params: PreparedChannelTurn<TDispatchResult>,

118+

): TDispatchResult {

119+

return (params.observeOnlyDispatchResult ?? {

120+

queuedFinal: false,

121+

counts: EMPTY_CHANNEL_TURN_DISPATCH_COUNTS,

122+

}) as TDispatchResult;

123+

}

124+113125

export async function dispatchAssembledChannelTurn(

114126

params: AssembledChannelTurn,

115127

): Promise<DispatchedChannelTurnResult> {

@@ -158,7 +170,14 @@ async function dispatchResolvedChannelTurn<TDispatchResult>(

158170

},

159171

): Promise<DispatchedChannelTurnResult<TDispatchResult>> {

160172

if (isPreparedChannelTurn(params)) {

161-

return await runPreparedChannelTurn(params);

173+

return await runPreparedChannelTurn(

174+

params.admission.kind === "observeOnly"

175+

? {

176+

...params,

177+

runDispatch: async () => resolveObserveOnlyDispatchResult(params),

178+

}

179+

: params,

180+

);

162181

}

163182

return (await dispatchAssembledChannelTurn(

164183

params,

@@ -431,3 +450,21 @@ export async function runChannelTurn<

431450432451

return result;

433452

}

453+454+

export async function runResolvedChannelTurn<

455+

TRaw,

456+

TDispatchResult = DispatchedChannelTurnResult["dispatchResult"],

457+

>(

458+

params: RunResolvedChannelTurnParams<TRaw, TDispatchResult>,

459+

): Promise<ChannelTurnResult<TDispatchResult>> {

460+

return await runChannelTurn({

461+

channel: params.channel,

462+

accountId: params.accountId,

463+

raw: params.raw,

464+

log: params.log,

465+

adapter: {

466+

ingest: (raw) => (typeof params.input === "function" ? params.input(raw) : params.input),

467+

resolveTurn: params.resolveTurn,

468+

},

469+

});

470+

}