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

推荐订阅源

J
Java Code Geeks
博客园 - 司徒正美
博客园 - 【当耐特】
爱范儿
爱范儿
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
IT之家
IT之家
人人都是产品经理
人人都是产品经理
雷峰网
雷峰网
酷 壳 – CoolShell
酷 壳 – CoolShell
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
大猫的无限游戏
大猫的无限游戏
月光博客
月光博客
宝玉的分享
宝玉的分享
V
V2EX
S
SegmentFault 最新的问题
V
Visual Studio Blog
阮一峰的网络日志
阮一峰的网络日志
Martin Fowler
Martin Fowler
Jina AI
Jina AI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园_首页
L
LangChain Blog
D
Docker
腾讯CDC

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(feishu): use full gateway channel runtime · openclaw/...
steipete · 2026-05-31 · via Recent Commits to openclaw:main
11

import * as crypto from "node:crypto";

22

import type * as Lark from "@larksuiteoapi/node-sdk";

3-

import type { ClawdbotConfig, RuntimeEnv, HistoryEntry } from "../runtime-api.js";

3+

import type { ClawdbotConfig, PluginRuntime, RuntimeEnv, HistoryEntry } from "../runtime-api.js";

44

import { raceWithTimeoutAndAbort } from "./async.js";

55

import {

66

handleFeishuMessage,

@@ -164,6 +164,7 @@ function normalizeFeishuChatType(value: unknown): FeishuChatType | undefined {

164164

type RegisterEventHandlersContext = {

165165

cfg: ClawdbotConfig;

166166

accountId: string;

167+

channelRuntime: PluginRuntime["channel"];

167168

runtime?: RuntimeEnv;

168169

chatHistories: Map<string, HistoryEntry[]>;

169170

fireAndForget?: boolean;

@@ -266,7 +267,7 @@ function registerEventHandlers(

266267

eventDispatcher: Lark.EventDispatcher,

267268

context: RegisterEventHandlersContext,

268269

): void {

269-

const { cfg, accountId, runtime, chatHistories, fireAndForget } = context;

270+

const { cfg, accountId, channelRuntime, runtime, chatHistories, fireAndForget } = context;

270271

const log = runtime?.log ?? console.log;

271272

const error = runtime?.error ?? console.error;

272273

const runFeishuHandler = async (params: { task: () => Promise<void>; errorMessage: string }) => {

@@ -286,7 +287,7 @@ function registerEventHandlers(

286287

eventDispatcher.register({

287288

"im.message.receive_v1": createFeishuMessageReceiveHandler({

288289

cfg,

289-

core: getFeishuRuntime(),

290+

channelRuntime,

290291

accountId,

291292

runtime,

292293

chatHistories,

@@ -353,6 +354,7 @@ function registerEventHandlers(

353354

botOpenId: myBotId,

354355

botName: botNames.get(accountId),

355356

runtime,

357+

channelRuntime,

356358

chatHistories,

357359

accountId,

358360

});

@@ -383,6 +385,7 @@ function registerEventHandlers(

383385

botOpenId: myBotId,

384386

botName: botNames.get(accountId),

385387

runtime,

388+

channelRuntime,

386389

chatHistories,

387390

accountId,

388391

});

@@ -396,6 +399,7 @@ function registerEventHandlers(

396399

runtime,

397400

chatHistories,

398401

fireAndForget,

402+

channelRuntime,

399403

}),

400404

"card.action.trigger": async (data: unknown) => {

401405

try {

@@ -409,6 +413,7 @@ function registerEventHandlers(

409413

event,

410414

botOpenId: botOpenIds.get(accountId),

411415

runtime,

416+

channelRuntime,

412417

accountId,

413418

});

414419

if (fireAndForget) {

@@ -432,6 +437,7 @@ export type BotOpenIdSource =

432437

export type MonitorSingleAccountParams = {

433438

cfg: ClawdbotConfig;

434439

account: ResolvedFeishuAccount;

440+

channelRuntime?: PluginRuntime["channel"];

435441

runtime?: RuntimeEnv;

436442

abortSignal?: AbortSignal;

437443

botOpenIdSource?: BotOpenIdSource;

@@ -473,10 +479,12 @@ export async function monitorSingleAccount(params: MonitorSingleAccountParams):

473479

const eventDispatcher = createEventDispatcher(account);

474480

const chatHistories = new Map<string, HistoryEntry[]>();

475481

threadBindingManager = createFeishuThreadBindingManager({ accountId, cfg });

482+

const channelRuntime = params.channelRuntime ?? getFeishuRuntime().channel;

476483477484

registerEventHandlers(eventDispatcher, {

478485

cfg,

479486

accountId,

487+

channelRuntime,

480488

runtime,

481489

chatHistories,

482490

fireAndForget: params.fireAndForget ?? true,