@sideboard-ai/cli 0.1.322 → 0.1.324
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +19 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -33,6 +33,7 @@ import {
|
|
|
33
33
|
formatScheduleWhen,
|
|
34
34
|
getSchedule,
|
|
35
35
|
listSchedules,
|
|
36
|
+
parseWeeklyDays,
|
|
36
37
|
resolveScheduleThreadId,
|
|
37
38
|
updateSchedule
|
|
38
39
|
} from "@sideboard-ai/core";
|
|
@@ -559,15 +560,27 @@ ${preview.diffStat}`);
|
|
|
559
560
|
if (row.lastError) console.log(chalk.red(` ${row.lastError}`));
|
|
560
561
|
}
|
|
561
562
|
});
|
|
562
|
-
scheduleCmd.command("add").requiredOption("--prompt <text>", "prompt / goal queued when the job fires").option("--name <name>", "short label").option("--at <iso>", "one-shot ISO datetime").option("--every <duration>", "interval (15m, 1h, 6h, 1d)").option("--cron <expr>", "5-field cron").option("--tz <iana>", "timezone for cron").option(
|
|
563
|
+
scheduleCmd.command("add").requiredOption("--prompt <text>", "prompt / goal queued when the job fires").option("--name <name>", "short label").option("--at <iso>", "one-shot ISO datetime").option("--every <duration>", "interval (15m, 1h, 6h, 1d)").option("--time <hh:mm>", "clock time (24-hour). Daily if --days is omitted").option("--days <list>", "daily, weekdays, weekends, or mon,wed,fri").option("--cron <expr>", "5-field cron").option("--tz <iana>", "timezone for --cron or --time").option(
|
|
564
|
+
"--no-archive",
|
|
565
|
+
"Leave the new chat in the sidebar so you can keep talking after the run"
|
|
566
|
+
).option(
|
|
563
567
|
"--thread <id>",
|
|
564
568
|
"existing chat (orchestration or worktree, or self). Omit to create a new Global chat each run"
|
|
565
569
|
).option("--agent <agent>", "claude|cursor|codex|opencode (new chats only)").action((opts) => {
|
|
566
|
-
const
|
|
570
|
+
const time = opts.time ? String(opts.time) : "";
|
|
571
|
+
const cadence = [opts.at, opts.every, opts.cron, time].filter(Boolean);
|
|
567
572
|
if (cadence.length !== 1) {
|
|
568
|
-
throw new Error("Pass exactly one of --at, --every, or --cron");
|
|
573
|
+
throw new Error("Pass exactly one of --at, --every, --time, or --cron");
|
|
574
|
+
}
|
|
575
|
+
if (opts.days && !time) {
|
|
576
|
+
throw new Error("--days needs --time (HH:mm), for example --time 07:30 --days weekdays");
|
|
569
577
|
}
|
|
570
|
-
const when = opts.at ? { kind: "once", at: String(opts.at) } : opts.every ? { kind: "every", every: String(opts.every) } : {
|
|
578
|
+
const when = opts.at ? { kind: "once", at: String(opts.at) } : opts.every ? { kind: "every", every: String(opts.every) } : time ? {
|
|
579
|
+
kind: "weekly",
|
|
580
|
+
time,
|
|
581
|
+
days: parseWeeklyDays(opts.days ? String(opts.days) : "daily"),
|
|
582
|
+
tz: opts.tz ? String(opts.tz) : void 0
|
|
583
|
+
} : {
|
|
571
584
|
kind: "cron",
|
|
572
585
|
expr: String(opts.cron),
|
|
573
586
|
tz: opts.tz ? String(opts.tz) : void 0
|
|
@@ -590,12 +603,13 @@ ${preview.diffStat}`);
|
|
|
590
603
|
when,
|
|
591
604
|
threadId,
|
|
592
605
|
agent,
|
|
606
|
+
archiveChat: opts.archive === false ? false : true,
|
|
593
607
|
createdBy: "cli"
|
|
594
608
|
});
|
|
595
609
|
if (!row.threadId && row.when.kind !== "once") {
|
|
596
610
|
console.log(
|
|
597
611
|
chalk.yellow(
|
|
598
|
-
"Recurring automation has no --thread: each run opens a new orchestration chat."
|
|
612
|
+
row.archiveChat ? "Recurring automation has no --thread: each run opens a new orchestration chat and archives it when that run finishes." : "Recurring automation has no --thread: each run opens a new orchestration chat and leaves it open."
|
|
599
613
|
)
|
|
600
614
|
);
|
|
601
615
|
}
|