benignswarm 0.12.32 → 0.12.33
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/commands/operator.js +3 -3
- package/dist/commands/wu.js +14 -5
- package/dist/help.js +3 -2
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -253,12 +253,12 @@ export async function answerAdmin(rest, p, out) {
|
|
|
253
253
|
const n = (await c.call("GET", "/account/needs")).needs.find((x) => x.key === key);
|
|
254
254
|
if (!n)
|
|
255
255
|
throw new CliError("not_found", `nothing waiting with key ${key}; list them with: bschat-admin needs`);
|
|
256
|
-
if (approve && n.kind !== "ask")
|
|
257
|
-
throw new CliError("usage", "--approve accepts an ask
|
|
256
|
+
if (approve && n.kind !== "ask" && n.kind !== "unit_question")
|
|
257
|
+
throw new CliError("usage", "--approve accepts a proposal on an ask or a unit question; this one has none");
|
|
258
258
|
if (n.kind === "ask")
|
|
259
259
|
return out.print(approve ? "Approved the proposal; the asker was told." : "Answered; the asker was told.", await c.call("POST", `/projects/${n.project}/asks/${n.ask_id}/answer`, approve ? { approve: true, answer } : { answer }));
|
|
260
260
|
if (n.kind === "unit_question")
|
|
261
|
-
return out.print(`Ruled on WU #${n.unit}; the asker, owner and reviewers were told.`, await c.call("POST", `/projects/${n.project}/work-units/${n.unit}/rule`, { ruling: answer }));
|
|
261
|
+
return out.print(`Ruled on WU #${n.unit}${approve ? " (proposal approved)" : ""}; the asker, owner and reviewers were told.`, await c.call("POST", `/projects/${n.project}/work-units/${n.unit}/rule`, approve ? { approve: true, ruling: answer } : { ruling: answer }));
|
|
262
262
|
throw new CliError("not_answerable", n.kind === "wake_broken" ? `a broken wake path clears when ${n.agent} shows activity: fix its watcher or harness session` : "a notifier problem clears on the next report that reaches you: fix it with bschat-admin notifier");
|
|
263
263
|
}
|
|
264
264
|
export async function notifierAdmin(p, out) {
|
package/dist/commands/wu.js
CHANGED
|
@@ -166,12 +166,21 @@ export async function wu(p, out) {
|
|
|
166
166
|
out.print(`${fmt(r.unit)}\nReopened: continue on the same branch and resubmit this unit.`, r);
|
|
167
167
|
return;
|
|
168
168
|
}
|
|
169
|
+
case "propose": {
|
|
170
|
+
const text = (p.positionals.slice(3).join(" ") || str(p.flags, "propose") || "").trim();
|
|
171
|
+
if (!text)
|
|
172
|
+
throw new CliError("usage", 'wu propose <n> "the answer you recommend, and why the process allows it"');
|
|
173
|
+
const r = await client.call("POST", `${base}/${num()}/propose`, { proposal: text });
|
|
174
|
+
out.print(`${fmt(r.unit)}\nProposed; whoever rules on the question can approve it as written.`, r);
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
169
177
|
case "ask":
|
|
170
178
|
case "rule": {
|
|
171
|
-
const
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
179
|
+
const approve = sub === "rule" && bool(p.flags, "approve");
|
|
180
|
+
const text = (p.positionals.slice(3).join(" ") || str(p.flags, sub === "ask" ? "question" : "ruling") || str(p.flags, "note") || "").trim();
|
|
181
|
+
if (!text && !approve)
|
|
182
|
+
throw new CliError("usage", sub === "ask" ? 'wu ask <n> "the decision this unit cannot move without"' : 'wu rule <n> "what was decided" | wu rule <n> --approve [--note ".."]');
|
|
183
|
+
const r = await client.call("POST", `${base}/${num()}/${sub}`, sub === "ask" ? { question: text } : approve ? { approve: true, ruling: text } : { ruling: text });
|
|
175
184
|
const q = r.unit.question;
|
|
176
185
|
out.print(`${fmt(r.unit)}\n${sub === "rule" ? "Ruled; the asker, owner and reviewers were told." : q.level === "expert" ? `Asked a ${q.roles.join(" or ")}; it goes to the operator if nobody rules in time.` : "Asked the operator."}`, r);
|
|
177
186
|
return;
|
|
@@ -327,7 +336,7 @@ export async function wu(p, out) {
|
|
|
327
336
|
return;
|
|
328
337
|
}
|
|
329
338
|
default:
|
|
330
|
-
throw new CliError("usage", "wu open|assign|start [--branch b|--here]|decline|submit|approve|changes|classify|tags|done [--keep-worktree]|abandon|note|show|list");
|
|
339
|
+
throw new CliError("usage", "wu open|assign|start [--branch b|--here]|decline|submit|approve|changes|classify|tags|done [--keep-worktree]|abandon|note|ask|rule|propose|show|list");
|
|
331
340
|
}
|
|
332
341
|
}
|
|
333
342
|
/** The project's process: the tag vocabulary, who reviews what, requirements, and the working agreements. */
|
package/dist/help.js
CHANGED
|
@@ -71,7 +71,8 @@ Agent commands
|
|
|
71
71
|
bschat wu reopen <n> --note ".." owner or reviewer: withdraw an unmerged approval (verification failed); resubmit the same unit
|
|
72
72
|
bschat wu supersede <n> --by <m> owner or assigner: this unit continues as #m; anyone blocked on #n now waits on #m
|
|
73
73
|
bschat wu ask <n> "question" owner, reviewer or assigner: a decision this unit cannot move without (tag expert first, then the operator)
|
|
74
|
-
bschat wu rule <n> "decision"
|
|
74
|
+
bschat wu rule <n> "decision" | --approve the tag's expert: answer an open question, or approve its proposal as written (operator questions are answered in the console)
|
|
75
|
+
bschat wu propose <n> "answer" owner, reviewer, assigner or expert: recommend an answer to the unit's open question, approvable as written
|
|
75
76
|
bschat wu escalate <n> [--note ..] the tag's expert: pass the question to the operator
|
|
76
77
|
bschat wu wait <n> --on <m> | --clear owner or assigner: this unit cannot move until #m closes; reminders pause meanwhile
|
|
77
78
|
bschat wu scope <n> --scope ".." --note ".." assigner or operator: amend what a unit covers; recorded and announced
|
|
@@ -173,7 +174,7 @@ bschat-admin login (approve it in your signed-in browser); the session lasts 30
|
|
|
173
174
|
bschat-admin role edit <name> [--project p] --reviews a,b --works c --trials d which tags a role reviews, works and trials ("*" all, "" none)
|
|
174
175
|
bschat-admin needs decisions waiting on you (asks, unit questions, broken wake paths, alert failures)
|
|
175
176
|
bschat-admin answer <key> "decision" answer one; the asker is @mentioned
|
|
176
|
-
bschat-admin answer <key> --approve [--note ".."] accept an ask
|
|
177
|
+
bschat-admin answer <key> --approve [--note ".."] accept the proposal on an ask or a unit question as written
|
|
177
178
|
bschat-admin notifier [--agent name|none] [--email yes|no] [--repeat m] how you are reached away from the console, and the last report
|
|
178
179
|
bschat-admin account [--summary-minutes m] plan, usage and the account summary period
|
|
179
180
|
bschat-admin worktree forget <project> <id> delete a stale worktree record (never the directory)
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const CLI_VERSION = "0.12.
|
|
1
|
+
export const CLI_VERSION = "0.12.33";
|