cron: separate webhook POST delivery from announce (#17901)

* cron: split webhook delivery from announce mode

* cron: validate webhook delivery target

* cron: remove legacy webhook fallback config

* fix: finalize cron webhook delivery prep (#17901) (thanks @advaitpaliwal)

---------

Co-authored-by: Tyler Yust <TYTYYUST@YAHOO.COM>
This commit is contained in:
Advait Paliwal
2026-02-16 02:36:00 -08:00
committed by GitHub
parent d841c9b26b
commit bc67af6ad8
33 changed files with 698 additions and 236 deletions

View File

@@ -154,11 +154,11 @@ describe("gateway.tools config", () => {
});
describe("cron webhook schema", () => {
it("accepts cron.webhook and cron.webhookToken", () => {
it("accepts cron.webhookToken and legacy cron.webhook", () => {
const res = OpenClawSchema.safeParse({
cron: {
enabled: true,
webhook: "https://example.invalid/cron",
webhook: "https://example.invalid/legacy-cron-webhook",
webhookToken: "secret-token",
},
});
@@ -166,10 +166,10 @@ describe("cron webhook schema", () => {
expect(res.success).toBe(true);
});
it("rejects non-http(s) cron.webhook URLs", () => {
it("rejects non-http cron.webhook URLs", () => {
const res = OpenClawSchema.safeParse({
cron: {
webhook: "ftp://example.invalid/cron",
webhook: "ftp://example.invalid/legacy-cron-webhook",
},
});