




















@@ -14,6 +14,10 @@ vi.mock("../infra/outbound/deliver.js", () => ({
1414deliverOutboundPayloadsInternal: (...args: unknown[]) => mockDeliverOutboundPayloads(...args),
1515}));
161617+vi.mock("../channels/message/runtime.js", () => ({
18+sendDurableMessageBatch: (...args: unknown[]) => mockDeliverOutboundPayloads(...args),
19+}));
20+1721vi.mock("../utils/message-channel.js", () => ({
1822isDeliverableMessageChannel: (channel: string) =>
1923channel === "voicechat" || channel === "telegram",
@@ -33,7 +37,11 @@ function createCtx(overrides?: Partial<MsgContext>): MsgContext {
3337describe("sendTranscriptEcho", () => {
3438beforeEach(() => {
3539mockDeliverOutboundPayloads.mockReset();
36-mockDeliverOutboundPayloads.mockResolvedValue([{ channel: "voicechat", messageId: "echo-1" }]);
40+mockDeliverOutboundPayloads.mockResolvedValue({
41+status: "sent",
42+results: [{ channel: "voicechat", messageId: "echo-1" }],
43+receipt: { platformMessageIds: ["echo-1"], parts: [], sentAt: 1 },
44+});
3745});
38463947it("sends the default formatted transcript to the resolved origin", async () => {
@@ -53,7 +61,7 @@ describe("sendTranscriptEcho", () => {
5361threadId: undefined,
5462payloads: [{ text: DEFAULT_ECHO_TRANSCRIPT_FORMAT.replace("{transcript}", "hello world") }],
5563bestEffort: true,
56-queuePolicy: "best_effort",
64+durability: "best_effort",
5765}),
5866);
5967});
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。