@workser/cli 0.6.17 → 0.6.18
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 +25 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9912,6 +9912,7 @@ function statusTag2(status) {
|
|
|
9912
9912
|
// src/commands/goal.ts
|
|
9913
9913
|
var import_picocolors32 = __toESM(require_picocolors(), 1);
|
|
9914
9914
|
var STATUSES3 = ["proposed", "agreed", "working", "delivered", "abandoned"];
|
|
9915
|
+
var PACES = ["slice", "phase", "all"];
|
|
9915
9916
|
function registerGoal(program3) {
|
|
9916
9917
|
const goal = program3.command("goal").description("Business goals and the phases that deliver them");
|
|
9917
9918
|
goal.command("list").description("What this project is working towards").action(
|
|
@@ -9949,6 +9950,9 @@ function registerGoal(program3) {
|
|
|
9949
9950
|
).option(
|
|
9950
9951
|
"--criteria <json>",
|
|
9951
9952
|
`what "done" means per phase, in the OWNER's words: '{"Checkout":["A customer can pay by card and gets a receipt"]}'`
|
|
9953
|
+
).option(
|
|
9954
|
+
"--pace <value>",
|
|
9955
|
+
`how much to do before checking in \u2014 slice (one task, then show), phase (the current phase, the default), all (${PACES.join(" | ")})`
|
|
9952
9956
|
).action(
|
|
9953
9957
|
action(async ({ ctx, args, opts }) => {
|
|
9954
9958
|
requireProject(ctx);
|
|
@@ -9981,11 +9985,17 @@ function registerGoal(program3) {
|
|
|
9981
9985
|
);
|
|
9982
9986
|
}
|
|
9983
9987
|
}
|
|
9988
|
+
if (opts.pace !== void 0 && !PACES.includes(opts.pace)) {
|
|
9989
|
+
throw new WorkserError(
|
|
9990
|
+
`Unknown --pace "${opts.pace}". Use one of: ${PACES.join(", ")}.`
|
|
9991
|
+
);
|
|
9992
|
+
}
|
|
9984
9993
|
const row = await api(ctx, "/v1/project-goals", {
|
|
9985
9994
|
body: {
|
|
9986
9995
|
projectId: ctx.projectId,
|
|
9987
9996
|
title: args[0],
|
|
9988
9997
|
outcome: opts.outcome,
|
|
9998
|
+
pace: opts.pace,
|
|
9989
9999
|
phases: phases.map((name) => ({
|
|
9990
10000
|
name,
|
|
9991
10001
|
criteria: (criteria[name] ?? []).map((text, i) => ({
|
|
@@ -10079,13 +10089,18 @@ function registerGoal(program3) {
|
|
|
10079
10089
|
});
|
|
10080
10090
|
})
|
|
10081
10091
|
);
|
|
10082
|
-
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(
|
|
10092
|
+
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(" | ")}`).option("--pace <value>", `how much to do before checking in (${PACES.join(" | ")})`).action(
|
|
10083
10093
|
action(async ({ ctx, args, opts }) => {
|
|
10084
10094
|
if (opts.status && !STATUSES3.includes(opts.status)) {
|
|
10085
10095
|
throw new WorkserError(
|
|
10086
10096
|
`Unknown status "${opts.status}". Use one of: ${STATUSES3.join(", ")}.`
|
|
10087
10097
|
);
|
|
10088
10098
|
}
|
|
10099
|
+
if (opts.pace && !PACES.includes(opts.pace)) {
|
|
10100
|
+
throw new WorkserError(
|
|
10101
|
+
`Unknown --pace "${opts.pace}". Use one of: ${PACES.join(", ")}.`
|
|
10102
|
+
);
|
|
10103
|
+
}
|
|
10089
10104
|
const row = await api(
|
|
10090
10105
|
ctx,
|
|
10091
10106
|
`/v1/project-goals/${encodeURIComponent(String(args[0]))}`,
|
|
@@ -10095,7 +10110,8 @@ function registerGoal(program3) {
|
|
|
10095
10110
|
title: opts.title,
|
|
10096
10111
|
outcome: opts.outcome,
|
|
10097
10112
|
phases: opts.phase,
|
|
10098
|
-
status: opts.status
|
|
10113
|
+
status: opts.status,
|
|
10114
|
+
pace: opts.pace
|
|
10099
10115
|
}
|
|
10100
10116
|
}
|
|
10101
10117
|
);
|
|
@@ -10119,6 +10135,7 @@ function printGoal(g) {
|
|
|
10119
10135
|
line(statusTag3(g.status));
|
|
10120
10136
|
if (g.outcome) line(`
|
|
10121
10137
|
done means: ${g.outcome}`);
|
|
10138
|
+
if (g.pace) line(import_picocolors32.default.dim(`pace: ${paceLine(g.pace)}`));
|
|
10122
10139
|
const progress = g.progress ?? [];
|
|
10123
10140
|
if (!progress.length) {
|
|
10124
10141
|
line(import_picocolors32.default.dim("\nNo phases agreed yet."));
|
|
@@ -10162,6 +10179,11 @@ function statusTag3(status) {
|
|
|
10162
10179
|
return import_picocolors32.default.yellow("[proposed]");
|
|
10163
10180
|
}
|
|
10164
10181
|
}
|
|
10182
|
+
function paceLine(pace) {
|
|
10183
|
+
if (pace === "slice") return "slice \u2014 do ONE task, then stop and show the owner";
|
|
10184
|
+
if (pace === "all") return "all \u2014 work through the phases; report at the end";
|
|
10185
|
+
return "phase \u2014 the current phase, task by task";
|
|
10186
|
+
}
|
|
10165
10187
|
|
|
10166
10188
|
// src/role-guard.ts
|
|
10167
10189
|
var READS = [
|
|
@@ -11824,7 +11846,7 @@ function colour(d) {
|
|
|
11824
11846
|
|
|
11825
11847
|
// src/index.ts
|
|
11826
11848
|
var pkg = {
|
|
11827
|
-
version: true ? "0.6.
|
|
11849
|
+
version: true ? "0.6.18" : "0.0.0-dev"
|
|
11828
11850
|
};
|
|
11829
11851
|
var program2 = new Command();
|
|
11830
11852
|
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.18",
|
|
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",
|