Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/cron/tool/CronSchemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ export const CRON_SCHEDULE_SCHEMA = {
required: ["type", "runAt"],
additionalProperties: false,
properties: {
type: { const: "once" },
// Moonshot/Kimi requires an explicit type alongside const/enum.
type: { type: "string", const: "once" },
runAt: { type: "string" },
},
},
Expand All @@ -14,7 +15,7 @@ export const CRON_SCHEDULE_SCHEMA = {
required: ["type", "expression"],
additionalProperties: false,
properties: {
type: { const: "cron" },
type: { type: "string", const: "cron" },
expression: { type: "string" },
timezone: { type: "string" },
},
Expand All @@ -24,9 +25,9 @@ export const CRON_SCHEDULE_SCHEMA = {
required: ["type", "amount", "unit"],
additionalProperties: false,
properties: {
type: { const: "delay" },
type: { type: "string", const: "delay" },
amount: { type: "number", exclusiveMinimum: 0 },
unit: { enum: ["second", "minute", "hour", "day"] },
unit: { type: "string", enum: ["second", "minute", "hour", "day"] },
},
},
],
Expand Down