

























@@ -286,7 +286,7 @@ async function directCronReq(
286286}
287287288288function expectCronJobIdFromResponse(response: { ok?: unknown; payload?: unknown }) {
289-expect(response.ok).toBe(true);
289+expect(response.ok, JSON.stringify((response as { error?: unknown }).error ?? null)).toBe(true);
290290const value = (response.payload as { id?: unknown } | null)?.id;
291291const id = typeof value === "string" ? value : "";
292292expect(id.length > 0).toBe(true);
@@ -704,7 +704,7 @@ describe("gateway server cron", () => {
704704const mergeUpdateRes = await directCronReq(cronState, "cron.update", {
705705id: mergeJobId,
706706patch: {
707-delivery: { mode: "announce", channel: "telegram", to: "19098680" },
707+delivery: { mode: "announce", channel: "last", to: "19098680" },
708708},
709709});
710710expect(mergeUpdateRes.ok).toBe(true);
@@ -718,7 +718,7 @@ describe("gateway server cron", () => {
718718expect(merged?.payload?.message).toBe("hello");
719719expect(merged?.payload?.model).toBe("opus");
720720expect(merged?.delivery?.mode).toBe("announce");
721-expect(merged?.delivery?.channel).toBe("telegram");
721+expect(merged?.delivery?.channel).toBe("last");
722722expect(merged?.delivery?.to).toBe("19098680");
723723724724const modelOnlyPatchRes = await directCronReq(cronState, "cron.update", {
@@ -810,7 +810,7 @@ describe("gateway server cron", () => {
810810patch: {
811811delivery: {
812812mode: "announce",
813-channel: "signal",
813+channel: "last",
814814to: "+15550001111",
815815bestEffort: true,
816816},
@@ -826,7 +826,7 @@ describe("gateway server cron", () => {
826826expect(deliveryPatched?.payload?.kind).toBe("agentTurn");
827827expect(deliveryPatched?.payload?.message).toBe("hello");
828828expect(deliveryPatched?.delivery?.mode).toBe("announce");
829-expect(deliveryPatched?.delivery?.channel).toBe("signal");
829+expect(deliveryPatched?.delivery?.channel).toBe("last");
830830expect(deliveryPatched?.delivery?.to).toBe("+15550001111");
831831expect(deliveryPatched?.delivery?.bestEffort).toBe(true);
832832@@ -1564,8 +1564,7 @@ describe("gateway server cron", () => {
15641564sessionTarget: "isolated",
15651565delivery: {
15661566mode: "announce",
1567-channel: "telegram",
1568-to: "19098680",
1567+channel: "last",
15691568failureDestination: {
15701569mode: "webhook",
15711570to: "https://example.invalid/failure-destination",
@@ -1593,8 +1592,7 @@ describe("gateway server cron", () => {
15931592sessionTarget: "isolated",
15941593delivery: {
15951594mode: "announce",
1596-channel: "telegram",
1597-to: "19098680",
1595+channel: "last",
15981596bestEffort: true,
15991597failureDestination: {
16001598mode: "webhook",
@@ -1697,8 +1695,7 @@ describe("gateway server cron", () => {
16971695payload: { kind: "agentTurn", message: "test" },
16981696delivery: {
16991697mode: "announce",
1700-channel: "feishu",
1701-to: "ou_founder",
1698+channel: "last",
17021699},
17031700});
17041701const jobId = expectCronJobIdFromResponse(addRes);
@@ -1720,8 +1717,7 @@ describe("gateway server cron", () => {
1720171717211718expectFailureAnnounceCall({
17221719 jobId,
1723-channel: "feishu",
1724-to: "ou_founder",
1720+channel: "last",
17251721sessionKey: "agent:avery:feishu:direct:ou_founder",
17261722message: '⚠️ Cron job "session target failure fallback" failed: unknown error',
17271723});
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。