fix(webui): harden automation management API

Maintainer edit: redact external channel chat identifiers from the WebUI automation payload and reject malformed or unschedulable automation updates before they mutate cron jobs.
This commit is contained in:
chengyongru
2026-06-14 22:19:28 +08:00
parent 747f0a08c7
commit 8b42d0760e
6 changed files with 107 additions and 33 deletions
+2 -6
View File
@@ -395,9 +395,7 @@ describe("App layout", () => {
payload: {
message: "Send a quiz",
kind: "agent_turn",
session_key: "weixin:wx-chat",
origin_channel: "weixin",
origin_chat_id: "wx-chat",
},
state: {
next_run_at_ms: Date.UTC(2026, 3, 17, 11, 30, 0),
@@ -406,11 +404,9 @@ describe("App layout", () => {
run_history: [],
},
origin: {
session_key: "weixin:wx-chat",
channel: "weixin",
chat_id: "wx-chat",
title: "Scheduled cron job triggered",
preview: "memory with dream state",
title: "",
preview: "",
},
},
{