慣性聚合 高效追讀感興趣之博客、新聞、科技資訊
閱原文 以慣性聚合開啟

推薦訂閱源

博客园 - 司徒正美
V
V2EX
T
Tailwind CSS Blog
有赞技术团队
有赞技术团队
aimingoo的专栏
aimingoo的专栏
Apple Machine Learning Research
Apple Machine Learning Research
IT之家
IT之家
Blog — PlanetScale
Blog — PlanetScale
A
About on SuperTechFans
月光博客
月光博客
T
The Blog of Author Tim Ferriss
宝玉的分享
宝玉的分享
Martin Fowler
Martin Fowler
博客园 - 聂微东
The GitHub Blog
The GitHub Blog
V
Visual Studio Blog
WordPress大学
WordPress大学
酷 壳 – CoolShell
酷 壳 – CoolShell
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI

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 test: trim doctor command hotspots · openclaw/openclaw@c66f16a test: isolate agent auth and spawn hotspots · openclaw/openclaw@9285935 test: stabilize MCP startup disposal race · openclaw/openclaw@dd9d2eb test: merge browser contract server suites · openclaw/openclaw@5817a76 test: narrow ollama provider discovery setup · openclaw/openclaw@a0d9598 build: declare qa-lab aimock runtime dependency · openclaw/openclaw@24431e5 test: speed up safe-bins exec harness · openclaw/openclaw@ee856ab test: preserve tool helpers in embedded runner mocks · openclaw/openclaw@acd86a0 refactor: move memory embeddings into provider plugins · openclaw/openclaw@77e6e4c test: reuse system-run temp fixtures · openclaw/openclaw@7e9ff0f test: trim hotspot wait overhead · openclaw/openclaw@12a59b0 Check: avoid duplicate boundary prep · openclaw/openclaw@baf11b8 test: reduce hotspot fixture overhead · openclaw/openclaw@3a59edd feat(ui): overhaul settings and slash command UX (#67819) thanks @Bun… · openclaw/openclaw@2cfb660 QA Matrix: exit cleanly on failure · openclaw/openclaw@42805d2 QA Matrix: isolate scenario coverage · openclaw/openclaw@7e659e1 Matrix: refresh crypto bootstrap state · openclaw/openclaw@94081d8 QA Lab: add provider registry · openclaw/openclaw@bb7e982 Matrix: add plugin changelog · openclaw/openclaw@4acab55 test: trim more hotspot overhead · openclaw/openclaw@f485311
修:门之 discord 实时语音,以唤名启之 (#85915) · openclaw/openclaw@17dcdea
steipete · 2026-05-24 · via Recent Commits to openclaw:main

@@ -2431,6 +2431,149 @@ describe("DiscordVoiceManager", () => {

24312431

expectUserMessageIncludes("normal answer");

24322432

});

243324332434+

it("requires the agent wake name before realtime agent-proxy consults", async () => {

2435+

agentCommandMock.mockResolvedValueOnce({ payloads: [{ text: "wake answer" }] });

2436+

const manager = createManager(

2437+

{

2438+

groupPolicy: "open",

2439+

voice: {

2440+

enabled: true,

2441+

mode: "agent-proxy",

2442+

realtime: { provider: "openai", consultPolicy: "auto", requireWakeName: true },

2443+

},

2444+

},

2445+

undefined,

2446+

{

2447+

agents: {

2448+

list: [{ id: "agent-1", identity: { name: "Molty" } }],

2449+

},

2450+

},

2451+

);

2452+2453+

await manager.join({ guildId: "g1", channelId: "1001" });

2454+

const entry = getSessionEntry(manager) as {

2455+

realtime?: {

2456+

beginSpeakerTurn: (

2457+

context: { extraSystemPrompt?: string; senderIsOwner: boolean; speakerLabel: string },

2458+

userId: string,

2459+

) => { close: () => void; sendInputAudio: (audio: Buffer) => void };

2460+

};

2461+

};

2462+

const bridgeParams = lastRealtimeBridgeParams() as

2463+

| {

2464+

audioSink?: { sendAudio: (audio: Buffer) => void };

2465+

autoRespondToAudio?: boolean;

2466+

interruptResponseOnInputAudio?: boolean;

2467+

onTranscript?: (role: "user" | "assistant", text: string, isFinal: boolean) => void;

2468+

}

2469+

| undefined;

2470+2471+

expect(bridgeParams?.autoRespondToAudio).toBe(false);

2472+

expect(bridgeParams?.interruptResponseOnInputAudio).toBe(false);

2473+

bridgeParams?.audioSink?.sendAudio(Buffer.alloc(48_000));

2474+2475+

const guestTurn = entry.realtime?.beginSpeakerTurn(

2476+

{ extraSystemPrompt: undefined, senderIsOwner: false, speakerLabel: "Guest" },

2477+

"u-guest",

2478+

);

2479+

guestTurn?.sendInputAudio(Buffer.alloc(8));

2480+

bridgeParams?.onTranscript?.("user", "agent-1 status of PR 123", true);

2481+

await new Promise((resolve) => setTimeout(resolve, 260));

2482+2483+

expect(controlRealtimeVoiceAgentRunMock).not.toHaveBeenCalled();

2484+

expect(agentCommandMock).not.toHaveBeenCalled();

2485+

expect(realtimeSessionMock.handleBargeIn).not.toHaveBeenCalled();

2486+2487+

const ownerTurn = entry.realtime?.beginSpeakerTurn(

2488+

{ extraSystemPrompt: undefined, senderIsOwner: true, speakerLabel: "Owner" },

2489+

"u-owner",

2490+

);

2491+

ownerTurn?.sendInputAudio(Buffer.alloc(8));

2492+

bridgeParams?.onTranscript?.("user", "Hey, Molty, status of PR 123", true);

2493+

await new Promise((resolve) => setTimeout(resolve, 260));

2494+2495+

expect(controlRealtimeVoiceAgentRunMock).toHaveBeenCalledWith({

2496+

sessionKey: "discord:g1:c1",

2497+

text: "status of PR 123",

2498+

});

2499+

expect(lastAgentCommandArgs().message).toContain("status of PR 123");

2500+

expect(lastAgentCommandArgs().message).not.toContain("Molty");

2501+

expect(lastAgentCommandArgs().message).not.toContain("Hey");

2502+

expect(lastAgentCommandArgs().userId).toBe("u-owner");

2503+

expectUserMessageIncludes("wake answer");

2504+

});

2505+2506+

it("leaves non-OpenAI agent-proxy realtime auto-response enabled when wake names are requested", async () => {

2507+

resolveConfiguredRealtimeVoiceProviderMock.mockReturnValueOnce({

2508+

provider: { id: "google" },

2509+

providerConfig: { model: "gemini-live", voice: "default" },

2510+

});

2511+

const manager = createManager({

2512+

groupPolicy: "open",

2513+

voice: {

2514+

enabled: true,

2515+

mode: "agent-proxy",

2516+

realtime: { provider: "google", consultPolicy: "auto", requireWakeName: true },

2517+

},

2518+

});

2519+2520+

await manager.join({ guildId: "g1", channelId: "1001" });

2521+

const bridgeParams = lastRealtimeBridgeParams() as

2522+

| {

2523+

autoRespondToAudio?: boolean;

2524+

interruptResponseOnInputAudio?: boolean;

2525+

}

2526+

| undefined;

2527+2528+

expect(bridgeParams?.autoRespondToAudio).toBe(true);

2529+

expect(bridgeParams?.interruptResponseOnInputAudio).toBe(true);

2530+

});

2531+2532+

it("uses configured wake names before realtime agent-proxy consults", async () => {

2533+

agentCommandMock.mockResolvedValueOnce({ payloads: [{ text: "configured wake answer" }] });

2534+

const manager = createManager({

2535+

groupPolicy: "open",

2536+

voice: {

2537+

enabled: true,

2538+

mode: "agent-proxy",

2539+

realtime: {

2540+

provider: "openai",

2541+

consultPolicy: "auto",

2542+

requireWakeName: true,

2543+

wakeNames: ["Claw", "Claw Bot"],

2544+

},

2545+

},

2546+

});

2547+2548+

await manager.join({ guildId: "g1", channelId: "1001" });

2549+

const entry = getSessionEntry(manager) as {

2550+

realtime?: {

2551+

beginSpeakerTurn: (

2552+

context: { extraSystemPrompt?: string; senderIsOwner: boolean; speakerLabel: string },

2553+

userId: string,

2554+

) => { close: () => void; sendInputAudio: (audio: Buffer) => void };

2555+

};

2556+

};

2557+

const turn = entry.realtime?.beginSpeakerTurn(

2558+

{ extraSystemPrompt: undefined, senderIsOwner: true, speakerLabel: "Owner" },

2559+

"u-owner",

2560+

);

2561+

turn?.sendInputAudio(Buffer.alloc(8));

2562+

const bridgeParams = lastRealtimeBridgeParams() as

2563+

| {

2564+

onTranscript?: (role: "user" | "assistant", text: string, isFinal: boolean) => void;

2565+

}

2566+

| undefined;

2567+2568+

bridgeParams?.onTranscript?.("user", "Claw Bot, ship it", true);

2569+

await new Promise((resolve) => setTimeout(resolve, 260));

2570+2571+

expect(lastAgentCommandArgs().message).toContain("ship it");

2572+

expect(lastAgentCommandArgs().message).not.toContain("Claw");

2573+

expect(lastAgentCommandArgs().message).not.toContain("Bot");

2574+

expectUserMessageIncludes("configured wake answer");

2575+

});

2576+24342577

it("lets status questions fall back to normal realtime handling when no run is active", async () => {

24352578

agentCommandMock.mockResolvedValueOnce({ payloads: [{ text: "status answer" }] });

24362579

controlRealtimeVoiceAgentRunMock.mockResolvedValueOnce({

@@ -3319,6 +3462,7 @@ describe("DiscordVoiceManager", () => {

33193462

voice: "cedar",

33203463

toolPolicy: "safe-read-only",

33213464

consultPolicy: "always",

3465+

requireWakeName: true,

33223466

providers: {

33233467

openai: {

33243468

interruptResponseOnInputAudio: false,