fix(cron): auto-deliver agent output to explicit targets
This commit is contained in:
@@ -80,7 +80,11 @@ export function registerCronAddCommand(cron: Command) {
|
||||
.option("--thinking <level>", "Thinking level for agent jobs (off|minimal|low|medium|high)")
|
||||
.option("--model <model>", "Model override for agent jobs (provider/model or alias)")
|
||||
.option("--timeout-seconds <n>", "Timeout seconds for agent jobs")
|
||||
.option("--deliver", "Deliver agent output", false)
|
||||
.option(
|
||||
"--deliver",
|
||||
"Deliver agent output (required when using last-route delivery without --to)",
|
||||
false,
|
||||
)
|
||||
.option("--channel <channel>", `Delivery channel (${getCronChannelOptions()})`, "last")
|
||||
.option(
|
||||
"--to <dest>",
|
||||
@@ -159,10 +163,10 @@ export function registerCronAddCommand(cron: Command) {
|
||||
: undefined,
|
||||
timeoutSeconds:
|
||||
timeoutSeconds && Number.isFinite(timeoutSeconds) ? timeoutSeconds : undefined,
|
||||
deliver: Boolean(opts.deliver),
|
||||
deliver: opts.deliver ? true : undefined,
|
||||
channel: typeof opts.channel === "string" ? opts.channel : "last",
|
||||
to: typeof opts.to === "string" && opts.to.trim() ? opts.to.trim() : undefined,
|
||||
bestEffortDeliver: Boolean(opts.bestEffortDeliver),
|
||||
bestEffortDeliver: opts.bestEffortDeliver ? true : undefined,
|
||||
};
|
||||
})();
|
||||
|
||||
|
||||
@@ -35,7 +35,11 @@ export function registerCronEditCommand(cron: Command) {
|
||||
.option("--thinking <level>", "Thinking level for agent jobs")
|
||||
.option("--model <model>", "Model override for agent jobs")
|
||||
.option("--timeout-seconds <n>", "Timeout seconds for agent jobs")
|
||||
.option("--deliver", "Deliver agent output", false)
|
||||
.option(
|
||||
"--deliver",
|
||||
"Deliver agent output (required when using last-route delivery without --to)",
|
||||
false,
|
||||
)
|
||||
.option("--channel <channel>", `Delivery channel (${getCronChannelOptions()})`)
|
||||
.option(
|
||||
"--to <dest>",
|
||||
@@ -125,10 +129,10 @@ export function registerCronEditCommand(cron: Command) {
|
||||
thinking,
|
||||
timeoutSeconds:
|
||||
timeoutSeconds && Number.isFinite(timeoutSeconds) ? timeoutSeconds : undefined,
|
||||
deliver: Boolean(opts.deliver),
|
||||
deliver: opts.deliver ? true : undefined,
|
||||
channel: typeof opts.channel === "string" ? opts.channel : undefined,
|
||||
to: typeof opts.to === "string" ? opts.to : undefined,
|
||||
bestEffortDeliver: Boolean(opts.bestEffortDeliver),
|
||||
bestEffortDeliver: opts.bestEffortDeliver ? true : undefined,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user