@koda-sl/baker-cli 0.96.0 → 0.97.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/README.md +5 -3
- package/dist/cli.js +56 -8
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2347,12 +2347,14 @@ baker actions status temp_hero jx123 # batch resolve real IDs and temp_* r
|
|
|
2347
2347
|
baker actions claim <action-id> # live — returns action details + skill-loading hints
|
|
2348
2348
|
baker actions release <action-id>
|
|
2349
2349
|
|
|
2350
|
-
baker actions create --name "Build hero" --tags landing,creative --description "..."
|
|
2351
|
-
# → returns { ok, data: { tempId }, hints: [...] } — check hints for tags/dependencies/description reminders
|
|
2350
|
+
baker actions create --name "Build hero" --priority high --tags landing,creative --description "..."
|
|
2351
|
+
# → returns { ok, data: { tempId }, hints: [...] } — check hints for tags/priority/dependencies/description reminders
|
|
2352
2352
|
# If the name/description reads as recurring or future-dated (e.g. "weekly", "every Monday", "schedule"),
|
|
2353
2353
|
# create emits a hint to use `baker scheduled-actions create` instead of a Work Action.
|
|
2354
|
-
# If no --tags are passed, create emits a
|
|
2354
|
+
# If no --tags are passed, create emits a MISSING --tags hint — the action is invisible to the backlog's tag filter.
|
|
2355
|
+
# If no --priority is passed, create emits a MISSING --priority hint — the action ranks as normal/medium in the do-first order.
|
|
2355
2356
|
baker actions update <action-id> --name "Better name" --tags google-ads,strategy # --tags REPLACES the set; '' clears
|
|
2357
|
+
baker actions update <action-id> --priority urgent # urgent|high|medium|low; 'none' clears
|
|
2356
2358
|
baker actions complete <action-id-or-tempId> --note "What was done" # stages — applies on chat publish
|
|
2357
2359
|
baker actions discard <action-id> --reason "obsolete"
|
|
2358
2360
|
|
package/dist/cli.js
CHANGED
|
@@ -483,6 +483,33 @@ var SCHEDULE_SIGNALS = [
|
|
|
483
483
|
/\bremind(?:er|s)?\b/i,
|
|
484
484
|
/\brun\s+at\b/i
|
|
485
485
|
];
|
|
486
|
+
var ACTION_PRIORITIES = ["urgent", "high", "medium", "low"];
|
|
487
|
+
function parsePriority(value, { allowClear }) {
|
|
488
|
+
if (value === void 0) {
|
|
489
|
+
return void 0;
|
|
490
|
+
}
|
|
491
|
+
if (typeof value !== "string") {
|
|
492
|
+
failValidation(
|
|
493
|
+
`--priority must be one of: ${ACTION_PRIORITIES.join(", ")}${allowClear ? ", or 'none' to clear" : ""}.`
|
|
494
|
+
);
|
|
495
|
+
}
|
|
496
|
+
const trimmed = value.trim().toLowerCase();
|
|
497
|
+
if (trimmed === "") {
|
|
498
|
+
if (allowClear) {
|
|
499
|
+
return null;
|
|
500
|
+
}
|
|
501
|
+
return void 0;
|
|
502
|
+
}
|
|
503
|
+
if (allowClear && (trimmed === "none" || trimmed === "clear")) {
|
|
504
|
+
return null;
|
|
505
|
+
}
|
|
506
|
+
if (ACTION_PRIORITIES.includes(trimmed)) {
|
|
507
|
+
return trimmed;
|
|
508
|
+
}
|
|
509
|
+
failValidation(
|
|
510
|
+
`Unknown --priority "${value}". Expected one of: ${ACTION_PRIORITIES.join(", ")}${allowClear ? ", or 'none' to clear" : ""}.`
|
|
511
|
+
);
|
|
512
|
+
}
|
|
486
513
|
function looksScheduled(name, description) {
|
|
487
514
|
const haystack = `${name}
|
|
488
515
|
${description}`;
|
|
@@ -570,7 +597,7 @@ var completeCommand = defineCommand2({
|
|
|
570
597
|
import { defineCommand as defineCommand3 } from "citty";
|
|
571
598
|
registerSchema({
|
|
572
599
|
command: "actions.create",
|
|
573
|
-
description: "Stage creation of a new action (applies when the chat is published). Returns a tempId you can use to link in the same draft.
|
|
600
|
+
description: "Stage creation of a new action (applies when the chat is published). Returns a tempId you can use to link in the same draft. Pass --tags (REQUIRED \u2014 run `baker actions tags list` for the taxonomy) and --priority (one of urgent|high|medium|low \u2014 drives the dependency-aware 'Do first' ordering). After creating, check if this action blocks or is blocked by other actions and wire dependencies with `baker actions link`.",
|
|
574
601
|
args: {
|
|
575
602
|
name: { type: "string", description: "Action name (short, action-verb, \u22646 words)", required: true },
|
|
576
603
|
description: {
|
|
@@ -583,6 +610,11 @@ registerSchema({
|
|
|
583
610
|
description: "Comma-separated tag slugs (e.g. google-ads,audit-finding). Must be known \u2014 see `baker actions tags list`.",
|
|
584
611
|
required: false
|
|
585
612
|
},
|
|
613
|
+
priority: {
|
|
614
|
+
type: "string",
|
|
615
|
+
description: `User priority for the do-first ordering. One of: ${ACTION_PRIORITIES.join(", ")}.`,
|
|
616
|
+
required: false
|
|
617
|
+
},
|
|
586
618
|
"temp-id": { type: "string", description: "Custom tempId (auto-generated if omitted)", required: false }
|
|
587
619
|
}
|
|
588
620
|
});
|
|
@@ -595,6 +627,7 @@ var createCommand = defineCommand3({
|
|
|
595
627
|
name: { type: "string", description: "Action name", required: false },
|
|
596
628
|
description: { type: "string", description: "Description", required: false, default: "" },
|
|
597
629
|
tags: { type: "string", description: "Comma-separated tag slugs (see `baker actions tags list`)", required: false },
|
|
630
|
+
priority: { type: "string", description: `User priority: ${ACTION_PRIORITIES.join("|")}`, required: false },
|
|
598
631
|
"temp-id": { type: "string", description: "Optional custom tempId", required: false }
|
|
599
632
|
},
|
|
600
633
|
run: async ({ args }) => {
|
|
@@ -606,12 +639,14 @@ var createCommand = defineCommand3({
|
|
|
606
639
|
const chatId = requireChatId();
|
|
607
640
|
const tempId = args["temp-id"] || generateTempId();
|
|
608
641
|
const tags = parseTagList(args.tags);
|
|
642
|
+
const priority = parsePriority(args.priority, { allowClear: false });
|
|
609
643
|
const response = await apiPost("/api/actions/create", {
|
|
610
644
|
chatId,
|
|
611
645
|
tempId,
|
|
612
646
|
name,
|
|
613
647
|
description: args.description ?? "",
|
|
614
|
-
...tags ? { tags } : {}
|
|
648
|
+
...tags ? { tags } : {},
|
|
649
|
+
...priority !== void 0 && priority !== null ? { priority } : {}
|
|
615
650
|
});
|
|
616
651
|
const hints = [];
|
|
617
652
|
if (looksScheduled(name, args.description ?? "")) {
|
|
@@ -625,7 +660,12 @@ var createCommand = defineCommand3({
|
|
|
625
660
|
}
|
|
626
661
|
if (!tags || tags.length === 0) {
|
|
627
662
|
hints.push(
|
|
628
|
-
"
|
|
663
|
+
"MISSING --tags. This action is invisible to the backlog's tag filter. Re-run with --tags <slug,...> (`baker actions tags list` for the taxonomy, `baker actions tags create --slug <slug>` to mint) \u2014 or `baker actions update <tempId> --tags <slug,...>`."
|
|
664
|
+
);
|
|
665
|
+
}
|
|
666
|
+
if (priority === void 0) {
|
|
667
|
+
hints.push(
|
|
668
|
+
`MISSING --priority. Without it this action ranks as 'normal' (medium) in the do-first ordering, so urgent/high client work won't surface first. Re-run with --priority ${ACTION_PRIORITIES.join("|")} \u2014 or \`baker actions update <tempId> --priority <level>\`.`
|
|
629
669
|
);
|
|
630
670
|
}
|
|
631
671
|
writeJson({ ...response, hints });
|
|
@@ -1161,7 +1201,7 @@ var unlinkCommand = defineCommand15({
|
|
|
1161
1201
|
import { defineCommand as defineCommand16 } from "citty";
|
|
1162
1202
|
registerSchema({
|
|
1163
1203
|
command: "actions.update",
|
|
1164
|
-
description: "Stage an update on a claimed action (name, description, and/or
|
|
1204
|
+
description: "Stage an update on a claimed action (name, description, tags, and/or priority). Applies on publish. --tags REPLACES the tag set; pass --tags '' to clear. --priority accepts urgent|high|medium|low or 'none' to clear back to unset (== normal).",
|
|
1165
1205
|
args: {
|
|
1166
1206
|
id: { type: "string", description: "Action ID (must be claimed by current chat)", required: true },
|
|
1167
1207
|
name: { type: "string", description: "New name", required: false },
|
|
@@ -1170,6 +1210,11 @@ registerSchema({
|
|
|
1170
1210
|
type: "string",
|
|
1171
1211
|
description: "Comma-separated tag slugs \u2014 REPLACES existing tags ('' clears)",
|
|
1172
1212
|
required: false
|
|
1213
|
+
},
|
|
1214
|
+
priority: {
|
|
1215
|
+
type: "string",
|
|
1216
|
+
description: `User priority: ${ACTION_PRIORITIES.join("|")}, or 'none' to clear.`,
|
|
1217
|
+
required: false
|
|
1173
1218
|
}
|
|
1174
1219
|
}
|
|
1175
1220
|
});
|
|
@@ -1183,7 +1228,8 @@ var updateCommand = defineCommand16({
|
|
|
1183
1228
|
"action-id": { type: "string", description: "Action ID", required: false },
|
|
1184
1229
|
name: { type: "string", description: "New name", required: false },
|
|
1185
1230
|
description: { type: "string", description: "New description", required: false },
|
|
1186
|
-
tags: { type: "string", description: "Comma-separated tag slugs \u2014 REPLACES existing ('' clears)", required: false }
|
|
1231
|
+
tags: { type: "string", description: "Comma-separated tag slugs \u2014 REPLACES existing ('' clears)", required: false },
|
|
1232
|
+
priority: { type: "string", description: `Priority: ${ACTION_PRIORITIES.join("|")}|none`, required: false }
|
|
1187
1233
|
},
|
|
1188
1234
|
run: async ({ args }) => {
|
|
1189
1235
|
try {
|
|
@@ -1193,8 +1239,9 @@ var updateCommand = defineCommand16({
|
|
|
1193
1239
|
}
|
|
1194
1240
|
validateConvexId(id);
|
|
1195
1241
|
const tags = parseTagList(args.tags);
|
|
1196
|
-
|
|
1197
|
-
|
|
1242
|
+
const priority = parsePriority(args.priority, { allowClear: true });
|
|
1243
|
+
if (args.name === void 0 && args.description === void 0 && tags === void 0 && priority === void 0) {
|
|
1244
|
+
failValidation("Provide at least one of --name, --description, --tags, --priority.");
|
|
1198
1245
|
}
|
|
1199
1246
|
const chatId = requireChatId();
|
|
1200
1247
|
await apiPost("/api/actions/update", {
|
|
@@ -1202,7 +1249,8 @@ var updateCommand = defineCommand16({
|
|
|
1202
1249
|
actionId: id,
|
|
1203
1250
|
name: args.name,
|
|
1204
1251
|
description: args.description,
|
|
1205
|
-
...tags !== void 0 ? { tags } : {}
|
|
1252
|
+
...tags !== void 0 ? { tags } : {},
|
|
1253
|
+
...priority !== void 0 ? { priority } : {}
|
|
1206
1254
|
});
|
|
1207
1255
|
writeOk();
|
|
1208
1256
|
} catch (err) {
|