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

推荐订阅源

云风的 BLOG
云风的 BLOG
M
MIT News - Artificial intelligence
Recent Announcements
Recent Announcements
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Stack Overflow Blog
Stack Overflow Blog
J
Java Code Geeks
Microsoft Azure Blog
Microsoft Azure Blog
罗磊的独立博客
博客园 - 【当耐特】
H
Help Net Security
腾讯CDC
大猫的无限游戏
大猫的无限游戏
GbyAI
GbyAI
Last Week in AI
Last Week in AI
Jina AI
Jina AI
博客园 - 聂微东
Blog — PlanetScale
Blog — PlanetScale
A
About on SuperTechFans
Apple Machine Learning Research
Apple Machine Learning Research
P
Proofpoint News Feed
Y
Y Combinator Blog
C
Check Point 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(channels): add shared turn kernel · openclaw/ope...
steipete · 2026-04-30 · via Recent Commits to openclaw:main

@@ -4,6 +4,7 @@ import {

44

resolveEnvelopeFormatOptions,

55

} from "openclaw/plugin-sdk/channel-inbound";

66

import { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime";

7+

import { runPreparedInboundReplyTurn } from "openclaw/plugin-sdk/inbound-reply-dispatch";

78

import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime";

89

import { getAgentScopedMediaLocalRoots } from "openclaw/plugin-sdk/media-runtime";

910

import { createNonExitingRuntime, logVerbose } from "openclaw/plugin-sdk/runtime-env";

@@ -238,35 +239,6 @@ export async function dispatchDiscordComponentEvent(params: {

238239

resolveDiscordComponentOriginatingTo(interactionCtx) ?? `channel:${interactionCtx.channelId}`,

239240

});

240241241-

await recordInboundSession({

242-

storePath,

243-

sessionKey: ctxPayload.SessionKey ?? sessionKey,

244-

ctx: ctxPayload,

245-

updateLastRoute: interactionCtx.isDirectMessage

246-

? {

247-

sessionKey: route.mainSessionKey,

248-

channel: "discord",

249-

to:

250-

resolveDiscordComponentOriginatingTo(interactionCtx) ?? `user:${interactionCtx.userId}`,

251-

accountId,

252-

mainDmOwnerPin: pinnedMainDmOwner

253-

? {

254-

ownerRecipient: pinnedMainDmOwner,

255-

senderRecipient: interactionCtx.userId,

256-

onSkip: ({ ownerRecipient, senderRecipient }) => {

257-

logVerbose(

258-

`discord: skip main-session last route for ${senderRecipient} (pinned owner ${ownerRecipient})`,

259-

);

260-

},

261-

}

262-

: undefined,

263-

}

264-

: undefined,

265-

onRecordError: (err) => {

266-

logVerbose(`discord: failed updating component session meta: ${String(err)}`);

267-

},

268-

});

269-270242

const deliverTarget = `channel:${interactionCtx.channelId}`;

271243

const typingChannelId = interactionCtx.channelId;

272244

const { createChannelReplyPipeline } = await loadReplyPipelineRuntime();

@@ -298,48 +270,83 @@ export async function dispatchDiscordComponentEvent(params: {

298270

startId: params.replyToId,

299271

});

300272301-

await dispatchReplyWithBufferedBlockDispatcher({

302-

ctx: ctxPayload,

303-

cfg: ctx.cfg,

304-

replyOptions: { onModelSelected },

305-

dispatcherOptions: {

306-

...replyPipeline,

307-

humanDelay: resolveHumanDelayConfig(ctx.cfg, agentId),

308-

deliver: async (payload) => {

309-

const replyToId = replyReference.use();

310-

await deliverDiscordReply({

311-

cfg: ctx.cfg,

312-

replies: [payload],

313-

target: deliverTarget,

314-

token,

315-

accountId,

316-

rest: interaction.client.rest,

317-

runtime,

318-

replyToId,

319-

replyToMode,

320-

textLimit,

321-

maxLinesPerMessage: resolveDiscordMaxLinesPerMessage({

322-

cfg: ctx.cfg,

323-

discordConfig: ctx.discordConfig,

273+

await runPreparedInboundReplyTurn({

274+

channel: "discord",

275+

accountId,

276+

routeSessionKey: sessionKey,

277+

storePath,

278+

ctxPayload,

279+

recordInboundSession,

280+

record: {

281+

updateLastRoute: interactionCtx.isDirectMessage

282+

? {

283+

sessionKey: route.mainSessionKey,

284+

channel: "discord",

285+

to:

286+

resolveDiscordComponentOriginatingTo(interactionCtx) ??

287+

`user:${interactionCtx.userId}`,

324288

accountId,

325-

}),

326-

tableMode,

327-

chunkMode: resolveChunkMode(ctx.cfg, "discord", accountId),

328-

mediaLocalRoots,

329-

});

330-

replyReference.markSent();

331-

},

332-

onReplyStart: async () => {

333-

try {

334-

const { sendTyping } = await loadTypingRuntime();

335-

await sendTyping({ rest: feedbackRest, channelId: typingChannelId });

336-

} catch (err) {

337-

logVerbose(`discord: typing failed for component reply: ${String(err)}`);

338-

}

339-

},

340-

onError: (err) => {

341-

logError(`discord component dispatch failed: ${String(err)}`);

289+

mainDmOwnerPin: pinnedMainDmOwner

290+

? {

291+

ownerRecipient: pinnedMainDmOwner,

292+

senderRecipient: interactionCtx.userId,

293+

onSkip: ({ ownerRecipient, senderRecipient }) => {

294+

logVerbose(

295+

`discord: skip main-session last route for ${senderRecipient} (pinned owner ${ownerRecipient})`,

296+

);

297+

},

298+

}

299+

: undefined,

300+

}

301+

: undefined,

302+

onRecordError: (err) => {

303+

logVerbose(`discord: failed updating component session meta: ${String(err)}`);

342304

},

343305

},

306+

runDispatch: () =>

307+

dispatchReplyWithBufferedBlockDispatcher({

308+

ctx: ctxPayload,

309+

cfg: ctx.cfg,

310+

replyOptions: { onModelSelected },

311+

dispatcherOptions: {

312+

...replyPipeline,

313+

humanDelay: resolveHumanDelayConfig(ctx.cfg, agentId),

314+

deliver: async (payload) => {

315+

const replyToId = replyReference.use();

316+

await deliverDiscordReply({

317+

cfg: ctx.cfg,

318+

replies: [payload],

319+

target: deliverTarget,

320+

token,

321+

accountId,

322+

rest: interaction.client.rest,

323+

runtime,

324+

replyToId,

325+

replyToMode,

326+

textLimit,

327+

maxLinesPerMessage: resolveDiscordMaxLinesPerMessage({

328+

cfg: ctx.cfg,

329+

discordConfig: ctx.discordConfig,

330+

accountId,

331+

}),

332+

tableMode,

333+

chunkMode: resolveChunkMode(ctx.cfg, "discord", accountId),

334+

mediaLocalRoots,

335+

});

336+

replyReference.markSent();

337+

},

338+

onReplyStart: async () => {

339+

try {

340+

const { sendTyping } = await loadTypingRuntime();

341+

await sendTyping({ rest: feedbackRest, channelId: typingChannelId });

342+

} catch (err) {

343+

logVerbose(`discord: typing failed for component reply: ${String(err)}`);

344+

}

345+

},

346+

onError: (err) => {

347+

logError(`discord component dispatch failed: ${String(err)}`);

348+

},

349+

},

350+

}),

344351

});

345352

}