@workser/cli 0.6.11 → 0.6.12
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 +67 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8684,6 +8684,13 @@ function parseRefs(raw) {
|
|
|
8684
8684
|
|
|
8685
8685
|
// src/commands/task.ts
|
|
8686
8686
|
var STATUSES2 = [
|
|
8687
|
+
/**
|
|
8688
|
+
* LISTED, NOT PLANNED. A goal's later phases get their tasks written down
|
|
8689
|
+
* when the plan is agreed, so the owner can read the whole shape — but those
|
|
8690
|
+
* rows have no subtasks and the runner must never pick them up. `todo` keeps
|
|
8691
|
+
* its meaning: the team may start this now.
|
|
8692
|
+
*/
|
|
8693
|
+
"backlog",
|
|
8687
8694
|
"todo",
|
|
8688
8695
|
"working",
|
|
8689
8696
|
"checking",
|
|
@@ -8691,6 +8698,8 @@ var STATUSES2 = [
|
|
|
8691
8698
|
"accepted",
|
|
8692
8699
|
"archived"
|
|
8693
8700
|
];
|
|
8701
|
+
var PRIORITIES2 = ["urgent", "high", "normal", "low"];
|
|
8702
|
+
var SIZES = ["small", "standard"];
|
|
8694
8703
|
var ROLES = [
|
|
8695
8704
|
"pm",
|
|
8696
8705
|
"architect",
|
|
@@ -8770,10 +8779,21 @@ function registerTask(program3) {
|
|
|
8770
8779
|
task.command("create <title>").description("Open a new root task for the project team").option("--note <text>", "context, constraints and expected outcome").option("--kind <value>", KIND_HELP).option("--label <value...>", "labels to put on the task").option("--app <id...>", "apps the task touches").option("--infra <ref...>", "shared setup it touches").option("--goal <id>", "the business goal this delivers part of").option(
|
|
8771
8780
|
"--phase <name>",
|
|
8772
8781
|
"which slice of that goal \u2014 must match one of its phase names"
|
|
8782
|
+
).option("--priority <value>", `how urgent (${PRIORITIES2.join(" | ")})`).option(
|
|
8783
|
+
"--size <value>",
|
|
8784
|
+
`small lets the channel start it without asking; standard asks (${SIZES.join(" | ")})`
|
|
8785
|
+
).option(
|
|
8786
|
+
"--status <value>",
|
|
8787
|
+
`start it somewhere other than 'todo' \u2014 use 'backlog' for a later phase's work (${STATUSES2.join(" | ")})`
|
|
8773
8788
|
).action(
|
|
8774
8789
|
action(async ({ ctx, args, opts }) => {
|
|
8775
8790
|
requireProject(ctx);
|
|
8776
8791
|
if (opts.kind !== void 0) assertOneOf("--kind", opts.kind, KINDS2);
|
|
8792
|
+
if (opts.priority !== void 0)
|
|
8793
|
+
assertOneOf("--priority", opts.priority, PRIORITIES2);
|
|
8794
|
+
if (opts.size !== void 0) assertOneOf("--size", opts.size, SIZES);
|
|
8795
|
+
if (opts.status !== void 0)
|
|
8796
|
+
assertOneOf("--status", opts.status, STATUSES2);
|
|
8777
8797
|
const hasChannelOrigin = Boolean(
|
|
8778
8798
|
ctx.projectChannelId && ctx.projectChannelMessageId
|
|
8779
8799
|
);
|
|
@@ -8787,6 +8807,11 @@ function registerTask(program3) {
|
|
|
8787
8807
|
// a goal has to be argued for, never assumed.
|
|
8788
8808
|
goalId: opts.goal,
|
|
8789
8809
|
phase: opts.phase,
|
|
8810
|
+
priority: opts.priority,
|
|
8811
|
+
size: opts.size,
|
|
8812
|
+
// `backlog` for a later phase's work: written down so the owner can
|
|
8813
|
+
// read the whole plan, with nothing for the runner to pick up.
|
|
8814
|
+
status: opts.status,
|
|
8790
8815
|
targets: [
|
|
8791
8816
|
...(opts.app ?? []).map((appId) => ({
|
|
8792
8817
|
kind: "app",
|
|
@@ -9423,6 +9448,47 @@ function registerGoal(program3) {
|
|
|
9423
9448
|
);
|
|
9424
9449
|
})
|
|
9425
9450
|
);
|
|
9451
|
+
goal.command("adopt <id>").description(
|
|
9452
|
+
"File tasks that already exist under a part of this plan \u2014 for work done before the plan was written"
|
|
9453
|
+
).option("--task <id...>", "the tasks to file under it").option("--phase <name>", "which part of the plan they belong to").action(
|
|
9454
|
+
action(async ({ ctx, args, opts }) => {
|
|
9455
|
+
requireProject(ctx);
|
|
9456
|
+
const goalId = String(args[0]);
|
|
9457
|
+
const taskIds = opts.task ?? [];
|
|
9458
|
+
if (!taskIds.length) {
|
|
9459
|
+
throw new WorkserError(
|
|
9460
|
+
"Name the tasks to file, e.g. `--task WORK-12 WORK-13`."
|
|
9461
|
+
);
|
|
9462
|
+
}
|
|
9463
|
+
const goal2 = await api(
|
|
9464
|
+
ctx,
|
|
9465
|
+
`/v1/project-goals/${encodeURIComponent(goalId)}`
|
|
9466
|
+
);
|
|
9467
|
+
if (!goal2) throw new WorkserError(`No goal ${goalId}.`);
|
|
9468
|
+
const names = (goal2.phases ?? []).map(
|
|
9469
|
+
(p) => typeof p === "string" ? p : p.name
|
|
9470
|
+
);
|
|
9471
|
+
const phase = String(opts.phase ?? "").trim();
|
|
9472
|
+
if (!phase || !names.includes(phase)) {
|
|
9473
|
+
throw new WorkserError(
|
|
9474
|
+
`--phase must be one of this goal's parts: ${names.join(", ")}.`
|
|
9475
|
+
);
|
|
9476
|
+
}
|
|
9477
|
+
const filed = [];
|
|
9478
|
+
for (const taskId of taskIds) {
|
|
9479
|
+
await api(ctx, `/v1/project-tasks/${encodeURIComponent(taskId)}`, {
|
|
9480
|
+
method: "PATCH",
|
|
9481
|
+
body: { goalId, phase }
|
|
9482
|
+
});
|
|
9483
|
+
filed.push(taskId);
|
|
9484
|
+
}
|
|
9485
|
+
ok({ goalId, phase, filed }, () => {
|
|
9486
|
+
success(
|
|
9487
|
+
`Filed ${filed.length} ${filed.length === 1 ? "task" : "tasks"} under ${import_picocolors30.default.bold(phase)}`
|
|
9488
|
+
);
|
|
9489
|
+
});
|
|
9490
|
+
})
|
|
9491
|
+
);
|
|
9426
9492
|
goal.command("update <id>").description("Change the shape, or move the goal along").option("--title <text>", "the owner's words for what they want").option("--outcome <text>", "what 'done' means").option("--phase <name...>", "replace the ordered phase list").option("--status <value>", `one of: ${STATUSES3.join(" | ")}`).action(
|
|
9427
9493
|
action(async ({ ctx, args, opts }) => {
|
|
9428
9494
|
if (opts.status && !STATUSES3.includes(opts.status)) {
|
|
@@ -11124,7 +11190,7 @@ function colour(d) {
|
|
|
11124
11190
|
|
|
11125
11191
|
// src/index.ts
|
|
11126
11192
|
var pkg = {
|
|
11127
|
-
version: true ? "0.6.
|
|
11193
|
+
version: true ? "0.6.12" : "0.0.0-dev"
|
|
11128
11194
|
};
|
|
11129
11195
|
var program2 = new Command();
|
|
11130
11196
|
program2.name("workser").description(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workser/cli",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.12",
|
|
4
4
|
"description": "Workser CLI — give your local AI agent native DevOps & infrastructure on Workser. The agent runs `workser …` to provision, deploy, and manage real apps.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|