@koda-sl/baker-cli 0.233.0-dev.bfa5a91e4 → 0.233.0
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/cli.js
CHANGED
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
ulid,
|
|
59
59
|
validateCanvasDeep,
|
|
60
60
|
ytDlpBlockSignal
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-EKLAHWSF.js";
|
|
62
62
|
import {
|
|
63
63
|
csvOrJson,
|
|
64
64
|
daysAgoIso,
|
|
@@ -5617,6 +5617,33 @@ var researchFetchResponseSchema = z17.object({
|
|
|
5617
5617
|
provider: z17.literal("firecrawl")
|
|
5618
5618
|
});
|
|
5619
5619
|
|
|
5620
|
+
// ../api/src/scheduledTaskModes.ts
|
|
5621
|
+
var TASK_MODES = {
|
|
5622
|
+
remind: {
|
|
5623
|
+
label: "Just reminds you",
|
|
5624
|
+
description: "Opens the Task on schedule and leaves it for you. Nothing runs."
|
|
5625
|
+
},
|
|
5626
|
+
recommend: {
|
|
5627
|
+
label: "Recommends",
|
|
5628
|
+
description: "Opens a Task with what it would change and why. Touches nothing itself."
|
|
5629
|
+
},
|
|
5630
|
+
propose: {
|
|
5631
|
+
label: "Prepares for review",
|
|
5632
|
+
description: "Does the work and leaves it for you to review, then publish."
|
|
5633
|
+
},
|
|
5634
|
+
publish: {
|
|
5635
|
+
label: "Publishes on its own",
|
|
5636
|
+
description: "Does the work and publishes it as soon as it finishes \u2014 nobody reviews it first."
|
|
5637
|
+
}
|
|
5638
|
+
};
|
|
5639
|
+
var TASK_MODE_IDS = Object.keys(TASK_MODES);
|
|
5640
|
+
function modeDescription(mode) {
|
|
5641
|
+
return TASK_MODES[mode].description;
|
|
5642
|
+
}
|
|
5643
|
+
function isTaskMode(value) {
|
|
5644
|
+
return TASK_MODE_IDS.some((id) => id === value);
|
|
5645
|
+
}
|
|
5646
|
+
|
|
5620
5647
|
// ../api/src/studio.ts
|
|
5621
5648
|
import { z as z18 } from "zod";
|
|
5622
5649
|
var studioGenerationStatusSchema = z18.enum(["running", "completed", "partial", "failed"]);
|
|
@@ -43371,24 +43398,14 @@ function failIfModeAndSpawnAgent(args, mode) {
|
|
|
43371
43398
|
failValidation4("--mode and --spawn-agent/--no-spawn-agent set the same thing. Use --mode on its own.");
|
|
43372
43399
|
}
|
|
43373
43400
|
}
|
|
43374
|
-
var
|
|
43375
|
-
|
|
43376
|
-
{ id: "recommend", does: "Opens a Task with what it would change and why. Touches nothing itself." },
|
|
43377
|
-
{ id: "propose", does: "Does the work and leaves it for the user to review, then publish." },
|
|
43378
|
-
{ id: "publish", does: "Does the work and publishes it as soon as it finishes \u2014 nobody reviews it first." }
|
|
43379
|
-
];
|
|
43380
|
-
var TASK_MODE_IDS = TASK_MODES.map((mode) => mode.id);
|
|
43381
|
-
var TASK_MODE_ARG_DESCRIPTION = `How far a run of this task goes on its own. ${TASK_MODES.map(
|
|
43382
|
-
(mode) => `${mode.id}: ${mode.does}`
|
|
43401
|
+
var TASK_MODE_ARG_DESCRIPTION = `How far a run of this task goes on its own. ${TASK_MODE_IDS.map(
|
|
43402
|
+
(id) => `${id}: ${modeDescription(id)}`
|
|
43383
43403
|
).join(" ")} Only set publish when the user asked for it outright \u2014 those runs go live unreviewed and can spend money.`;
|
|
43384
|
-
function isKnownTaskMode(raw) {
|
|
43385
|
-
return typeof raw === "string" && TASK_MODE_IDS.some((id) => id === raw);
|
|
43386
|
-
}
|
|
43387
43404
|
function parseModeFlag(raw) {
|
|
43388
43405
|
if (raw === void 0) {
|
|
43389
43406
|
return void 0;
|
|
43390
43407
|
}
|
|
43391
|
-
if (!
|
|
43408
|
+
if (!isTaskMode(raw)) {
|
|
43392
43409
|
failValidation4(`--mode must be one of: ${TASK_MODE_IDS.join(", ")}.`);
|
|
43393
43410
|
}
|
|
43394
43411
|
return raw;
|
|
@@ -43452,7 +43469,7 @@ registerSchema({
|
|
|
43452
43469
|
type: "string",
|
|
43453
43470
|
description: `${TASK_MODE_ARG_DESCRIPTION} Defaults to propose, or to the template's own mode with --template.`,
|
|
43454
43471
|
required: false,
|
|
43455
|
-
enum: TASK_MODE_IDS
|
|
43472
|
+
enum: [...TASK_MODE_IDS]
|
|
43456
43473
|
},
|
|
43457
43474
|
"no-spawn-agent": {
|
|
43458
43475
|
type: "boolean",
|
|
@@ -43857,7 +43874,7 @@ registerSchema({
|
|
|
43857
43874
|
type: "string",
|
|
43858
43875
|
description: TASK_MODE_ARG_DESCRIPTION,
|
|
43859
43876
|
required: false,
|
|
43860
|
-
enum: TASK_MODE_IDS
|
|
43877
|
+
enum: [...TASK_MODE_IDS]
|
|
43861
43878
|
},
|
|
43862
43879
|
"spawn-agent": {
|
|
43863
43880
|
type: "string",
|