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

推荐订阅源

IT之家
IT之家
博客园 - 聂微东
雷峰网
雷峰网
Microsoft Azure Blog
Microsoft Azure Blog
WordPress大学
WordPress大学
Hugging Face - Blog
Hugging Face - Blog
S
SegmentFault 最新的问题
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Tailwind CSS Blog
博客园 - 三生石上(FineUI控件)
V
Visual Studio Blog
博客园 - 司徒正美
爱范儿
爱范儿
月光博客
月光博客
阮一峰的网络日志
阮一峰的网络日志
博客园_首页
博客园 - 【当耐特】
Jina AI
Jina AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
酷 壳 – CoolShell
酷 壳 – CoolShell
大猫的无限游戏
大猫的无限游戏
小众软件
小众软件
人人都是产品经理
人人都是产品经理
V
V2EX

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(gateway): trim startup imports · openclaw/openclaw@b0...
vincentkoc · 2026-04-27 · via Recent Commits to openclaw:main

@@ -1,9 +1,10 @@

1-

import { listChannelPlugins } from "../channels/plugins/index.js";

21

import type { OutboundSendDeps } from "../infra/outbound/send-deps.js";

32

import { createLazyRuntimeSurface } from "../shared/lazy-runtime.js";

43

import type { CliDeps } from "./deps.types.js";

5-

import { createOutboundSendDepsFromCliSource } from "./outbound-send-mapping.js";

6-

import { createChannelOutboundRuntimeSend } from "./send-runtime/channel-outbound-send.js";

4+

import {

5+

CLI_OUTBOUND_SEND_FACTORY,

6+

createOutboundSendDepsFromCliSource,

7+

} from "./outbound-send-mapping.js";

7889

/**

910

* Lazy-loaded per-channel send functions, keyed by channel ID.

@@ -17,6 +18,35 @@ type RuntimeSendModule = {

1718

runtimeSend: RuntimeSend;

1819

};

192021+

const NON_CHANNEL_DEP_KEYS = new Set([

22+

"__proto__",

23+

"constructor",

24+

"cron",

25+

"cronConfig",

26+

"cronEnabled",

27+

"defaultAgentId",

28+

"enqueueSystemEvent",

29+

"getQueueSize",

30+

"hasOwnProperty",

31+

"inspect",

32+

"log",

33+

"migrateOrphanedSessionKeys",

34+

"nowMs",

35+

"onEvent",

36+

"requestHeartbeatNow",

37+

"resolveSessionStorePath",

38+

"runHeartbeatOnce",

39+

"runIsolatedAgentJob",

40+

"runtime",

41+

"sendCronFailureAlert",

42+

"sessionStorePath",

43+

"storePath",

44+

"then",

45+

"toJSON",

46+

"toString",

47+

"valueOf",

48+

]);

49+2050

// Per-channel module caches for lazy loading.

2151

const senderCache = new Map<string, Promise<RuntimeSend>>();

2252

@@ -41,22 +71,40 @@ function createLazySender(

4171

}

42724373

export function createDefaultDeps(): CliDeps {

44-

// Keep the default dependency barrel limited to lazy senders so callers that

45-

// only need outbound deps do not pull channel runtime boundaries on import.

4674

const deps: CliDeps = {};

47-

for (const plugin of listChannelPlugins()) {

48-

deps[plugin.id] = createLazySender(

49-

plugin.id,

50-

async () =>

51-

({

52-

runtimeSend: createChannelOutboundRuntimeSend({

53-

channelId: plugin.id,

54-

unavailableMessage: `${plugin.meta.label ?? plugin.id} outbound adapter is unavailable.`,

55-

}) as RuntimeSend,

56-

}) satisfies RuntimeSendModule,

57-

);

58-

}

59-

return deps;

75+

const resolveSender = (channelId: string) =>

76+

createLazySender(channelId, async () => {

77+

const { createChannelOutboundRuntimeSend } =

78+

await import("./send-runtime/channel-outbound-send.js");

79+

return {

80+

runtimeSend: createChannelOutboundRuntimeSend({

81+

channelId: channelId as import("../channels/plugins/types.public.js").ChannelId,

82+

unavailableMessage: `${channelId} outbound adapter is unavailable.`,

83+

}) as RuntimeSend,

84+

} satisfies RuntimeSendModule;

85+

});

86+87+

Object.defineProperty(deps, CLI_OUTBOUND_SEND_FACTORY, {

88+

configurable: false,

89+

enumerable: false,

90+

value: resolveSender,

91+

writable: false,

92+

});

93+94+

return new Proxy(deps, {

95+

get(target, property, receiver) {

96+

if (typeof property !== "string") {

97+

return Reflect.get(target, property, receiver);

98+

}

99+

const existing = Reflect.get(target, property, receiver);

100+

if (existing !== undefined || NON_CHANNEL_DEP_KEYS.has(property)) {

101+

return existing;

102+

}

103+

const sender = resolveSender(property);

104+

Reflect.set(target, property, sender, receiver);

105+

return sender;

106+

},

107+

});

60108

}

6110962110

export function createOutboundSendDeps(deps: CliDeps): OutboundSendDeps {