



















@@ -1422,7 +1422,9 @@ describe("gateway agent handler", () => {
1422142214231423it.each(
14241424(["channel", "replyChannel"] as const).flatMap((field) =>
1425-(["heartbeat", "cron", "webhook"] as const).map((channel) => [field, channel] as const),
1425+(["heartbeat", "cron", "webhook", "voice"] as const).map(
1426+(channel) => [field, channel] as const,
1427+),
14261428),
14271429)("accepts internal non-delivery %s hint %s", async (field, channel) => {
14281430primeMainAgentRun();
@@ -1469,6 +1471,36 @@ describe("gateway agent handler", () => {
14691471expectStringFieldContains(error, "message", "unknown channel: not-a-real-channel");
14701472});
147114731474+it("keeps voice-originated followups on the voice message channel without delivery", async () => {
1475+mockMainSessionEntry({ sessionId: "voice-session-id" });
1476+mocks.agentCommand.mockResolvedValue({
1477+payloads: [{ text: "ok" }],
1478+meta: { durationMs: 100 },
1479+});
1480+1481+await invokeAgent(
1482+{
1483+message: "exec approval followup",
1484+sessionKey: "agent:main:main",
1485+channel: "voice",
1486+deliver: false,
1487+idempotencyKey: "exec-approval-followup:req-voice",
1488+} as AgentParams,
1489+{ reqId: "exec-approval-followup-voice-1", client: backendGatewayClient() },
1490+);
1491+1492+const callArgs = await waitForAgentCommandCall<{
1493+channel?: string;
1494+deliver?: boolean;
1495+messageChannel?: string;
1496+runContext?: { messageChannel?: string };
1497+}>();
1498+expect(callArgs.channel).toBe("voice");
1499+expect(callArgs.deliver).toBe(false);
1500+expect(callArgs.messageChannel).toBe("voice");
1501+expect(callArgs.runContext?.messageChannel).toBe("voice");
1502+});
1503+14721504it("accepts music generation internal events", async () => {
14731505primeMainAgentRun();
14741506mocks.agentCommand.mockClear();
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。