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

推荐订阅源

雷峰网
雷峰网
WordPress大学
WordPress大学
MyScale Blog
MyScale Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
T
The Blog of Author Tim Ferriss
U
Unit 42
罗磊的独立博客
G
Google Developers Blog
Microsoft Azure Blog
Microsoft Azure Blog
The Cloudflare Blog
aimingoo的专栏
aimingoo的专栏
Vercel News
Vercel News
N
Netflix TechBlog - Medium
H
Hackread – Cybersecurity News, Data Breaches, AI and More
云风的 BLOG
云风的 BLOG
Hugging Face - Blog
Hugging Face - Blog
大猫的无限游戏
大猫的无限游戏
F
Fortinet All Blogs
博客园 - 聂微东
Stack Overflow Blog
Stack Overflow Blog
小众软件
小众软件
博客园 - 【当耐特】
H
Help Net Security
The GitHub Blog
The GitHub 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(cli): preserve Discord voice outbound helper (#85529)...
giodl73-repo · 2026-05-29 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -85,6 +85,15 @@ describe("createDefaultDeps", () => {

8585

expectUnusedRuntimeFactoriesNotLoaded("telegram");

8686

});

8787
88+

it("does not create channel senders for Discord voice helper keys", async () => {

89+

const createDefaultDeps = await loadCreateDefaultDeps("discord-voice-helper");

90+

const deps = createDefaultDeps();

91+
92+

expect(deps.discordVoice).toBeUndefined();

93+

expect(deps.sendDiscordVoice).toBeUndefined();

94+

expect(runtimeFactories.discord).not.toHaveBeenCalled();

95+

});

96+
8897

it("reuses cached runtime send surfaces after first lazy load", async () => {

8998

const createDefaultDeps = await loadCreateDefaultDeps("module-cache");

9099

const deps = createDefaultDeps();

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,4 @@

1+

import { normalizeChannelId } from "../channels/registry.js";

12

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

23

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

34

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

@@ -47,6 +48,10 @@ const NON_CHANNEL_DEP_KEYS = new Set([

4748

"valueOf",

4849

]);

4950
51+

function resolveKnownChannelId(raw: string): string | undefined {

52+

return normalizeChannelId(raw) ?? undefined;

53+

}

54+
5055

// Per-channel module caches for lazy loading.

5156

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

5257

@@ -100,7 +105,11 @@ export function createDefaultDeps(): CliDeps {

100105

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

101106

return existing;

102107

}

103-

const sender = resolveSender(property);

108+

const channelId = resolveKnownChannelId(property);

109+

if (!channelId) {

110+

return existing;

111+

}

112+

const sender = resolveSender(channelId);

104113

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

105114

return sender;

106115

},

Original file line numberDiff line numberDiff line change

@@ -1,5 +1,8 @@

11

import { describe, expect, it, vi } from "vitest";

2-

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

2+

import {

3+

CLI_OUTBOUND_SEND_FACTORY,

4+

createOutboundSendDepsFromCliSource,

5+

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

36
47

describe("createOutboundSendDepsFromCliSource", () => {

58

it("adds generic legacy aliases for channel-keyed send deps", () => {

@@ -29,4 +32,23 @@ describe("createOutboundSendDepsFromCliSource", () => {

2932

sendImessage: deps.imessage,

3033

});

3134

});

35+
36+

it("does not manufacture Discord voice helper deps from the lazy channel factory", () => {

37+

const sendFactory = vi.fn((channelId: string) => vi.fn().mockName(channelId));

38+

const outbound = createOutboundSendDepsFromCliSource({

39+

[CLI_OUTBOUND_SEND_FACTORY]: sendFactory,

40+

});

41+
42+

expect(outbound.discordVoice).toBeUndefined();

43+

expect(outbound.sendDiscordVoice).toBeUndefined();

44+

expect(sendFactory).not.toHaveBeenCalled();

45+

});

46+
47+

it("preserves explicitly provided Discord voice helper deps", () => {

48+

const discordVoice = vi.fn();

49+

const outbound = createOutboundSendDepsFromCliSource({ discordVoice });

50+
51+

expect(outbound.discordVoice).toBe(discordVoice);

52+

expect(outbound.sendDiscordVoice).toBe(discordVoice);

53+

});

3254

});

Original file line numberDiff line numberDiff line change

@@ -1,3 +1,4 @@

1+

import { normalizeChannelId } from "../channels/registry.js";

12

import {

23

resolveLegacyOutboundSendDepKeys,

34

type OutboundSendDeps,

@@ -46,6 +47,10 @@ function resolveChannelIdFromLegacyOutboundKey(key: string): string | undefined

4647

return normalizedStem || undefined;

4748

}

4849
50+

function resolveKnownChannelId(raw: string): string | undefined {

51+

return normalizeChannelId(raw) ?? undefined;

52+

}

53+
4954

/**

5055

* Pass CLI send sources through as-is — both CliOutboundSendSource and

5156

* OutboundSendDeps are now channel-ID-keyed records.

@@ -82,8 +87,9 @@ export function createOutboundSendDepsFromCliSource(deps: CliOutboundSendSource)

8287

}

8388
8489

const resolveFactoryValue = (key: string): unknown => {

85-

const channelId =

90+

const candidate =

8691

outbound[key] === undefined ? (resolveChannelIdFromLegacyOutboundKey(key) ?? key) : key;

92+

const channelId = resolveKnownChannelId(candidate);

8793

if (!channelId || channelId === "then" || channelId === "toJSON") {

8894

return undefined;

8995

}