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

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
MongoDB | Blog
MongoDB | Blog
博客园_首页
博客园 - 三生石上(FineUI控件)
博客园 - 聂微东
B
Blog RSS Feed
D
Docker
IT之家
IT之家
大猫的无限游戏
大猫的无限游戏
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
阮一峰的网络日志
阮一峰的网络日志
罗磊的独立博客
Recent Announcements
Recent Announcements
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
A
About on SuperTechFans
The GitHub Blog
The GitHub Blog
G
Google Developers Blog
V
V2EX
量子位
雷峰网
雷峰网
月光博客
月光博客
云风的 BLOG
云风的 BLOG
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
T
Tailwind CSS 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): route inbound turns through kernel · ...
steipete · 2026-04-30 · via Recent Commits to openclaw:main

@@ -4,7 +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";

7+

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

88

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

99

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

1010

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

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

270270

startId: params.replyToId,

271271

});

272272273-

await runPreparedInboundReplyTurn({

273+

await runInboundReplyTurn({

274274

channel: "discord",

275275

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}`,

288-

accountId,

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)}`);

304-

},

305-

},

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,

276+

raw: interaction,

277+

adapter: {

278+

ingest: () => ({

279+

id: interaction.id,

280+

rawText: ctxPayload.RawBody ?? "",

281+

textForAgent: ctxPayload.BodyForAgent,

282+

textForCommands: ctxPayload.CommandBody,

283+

raw: interaction,

284+

}),

285+

resolveTurn: () => ({

286+

channel: "discord",

287+

accountId,

288+

routeSessionKey: sessionKey,

289+

storePath,

290+

ctxPayload,

291+

recordInboundSession,

292+

record: {

293+

updateLastRoute: interactionCtx.isDirectMessage

294+

? {

295+

sessionKey: route.mainSessionKey,

296+

channel: "discord",

297+

to:

298+

resolveDiscordComponentOriginatingTo(interactionCtx) ??

299+

`user:${interactionCtx.userId}`,

330300

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)}`);

301+

mainDmOwnerPin: pinnedMainDmOwner

302+

? {

303+

ownerRecipient: pinnedMainDmOwner,

304+

senderRecipient: interactionCtx.userId,

305+

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

306+

logVerbose(

307+

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

308+

);

309+

},

310+

}

311+

: undefined,

312+

}

313+

: undefined,

314+

onRecordError: (err) => {

315+

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

348316

},

349317

},

318+

runDispatch: () =>

319+

dispatchReplyWithBufferedBlockDispatcher({

320+

ctx: ctxPayload,

321+

cfg: ctx.cfg,

322+

replyOptions: { onModelSelected },

323+

dispatcherOptions: {

324+

...replyPipeline,

325+

humanDelay: resolveHumanDelayConfig(ctx.cfg, agentId),

326+

deliver: async (payload) => {

327+

const replyToId = replyReference.use();

328+

await deliverDiscordReply({

329+

cfg: ctx.cfg,

330+

replies: [payload],

331+

target: deliverTarget,

332+

token,

333+

accountId,

334+

rest: interaction.client.rest,

335+

runtime,

336+

replyToId,

337+

replyToMode,

338+

textLimit,

339+

maxLinesPerMessage: resolveDiscordMaxLinesPerMessage({

340+

cfg: ctx.cfg,

341+

discordConfig: ctx.discordConfig,

342+

accountId,

343+

}),

344+

tableMode,

345+

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

346+

mediaLocalRoots,

347+

});

348+

replyReference.markSent();

349+

},

350+

onReplyStart: async () => {

351+

try {

352+

const { sendTyping } = await loadTypingRuntime();

353+

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

354+

} catch (err) {

355+

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

356+

}

357+

},

358+

onError: (err) => {

359+

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

360+

},

361+

},

362+

}),

350363

}),

364+

},

351365

});

352366

}