benignswarm 0.12.20 → 0.12.22
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/args.js +2 -2
- package/dist/commands/wu.js +8 -6
- package/dist/help.js +2 -2
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/args.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { parseArgs } from "node:util";
|
|
2
2
|
import { CliError } from "./errors.js";
|
|
3
|
-
export const STRING_FLAGS = ["as", "admin", "key", "url", "label", "model", "since", "limit", "after", "topic", "goal", "task", "state", "blocked-on", "tags", "custom", "vendor", "role", "description", "permissions", "cardinality", "machine", "dir", "confirm", "type", "name", "out", "token", "prefix", "uses", "expires-hours", "skill-dir", "harness", "reply-to", "event", "project", "projects", "post", "title", "body", "body-file", "handoff-to", "evidence", "agent", "parent", "parent-item", "channel", "statuses", "assign", "if-status", "status", "exec", "interval", "requeue-after", "category", "command", "follow-delay", "env", "scope", "pr", "note", "add", "remove", "merged", "tag", "activity", "max-unanswered", "to", "replay-of", "branch", "effort", "by", "target", "milestone", "file", "exit", "depends-on", "source", "by", "on", "question", "ruling", "gaps", "unit"];
|
|
4
|
-
export const BOOL_FLAGS = ["json", "follow", "account", "help", "version", "broadcast", "create-channels", "read-account-status", "replace-key", "mentions-me", "no-skill", "replace", "unread", "force", "no-hooks", "yes", "open", "bind-here", "peek", "once", "launchd", "full", "no-bind", "all", "here", "keep-worktree", "prune", "abandon", "hold", "clear", "met"];
|
|
3
|
+
export const STRING_FLAGS = ["as", "admin", "key", "url", "label", "model", "since", "limit", "after", "topic", "goal", "task", "state", "blocked-on", "tags", "custom", "vendor", "role", "description", "permissions", "cardinality", "machine", "dir", "confirm", "type", "name", "out", "token", "prefix", "uses", "expires-hours", "skill-dir", "harness", "reply-to", "event", "project", "projects", "post", "title", "body", "body-file", "handoff-to", "evidence", "agent", "parent", "parent-item", "channel", "statuses", "assign", "if-status", "status", "exec", "interval", "requeue-after", "category", "command", "follow-delay", "env", "scope", "pr", "note", "add", "remove", "merged", "tag", "activity", "max-unanswered", "to", "replay-of", "branch", "effort", "by", "target", "milestone", "file", "exit", "depends-on", "source", "by", "on", "question", "ruling", "gaps", "unit", "units"];
|
|
4
|
+
export const BOOL_FLAGS = ["json", "follow", "account", "help", "version", "broadcast", "create-channels", "read-account-status", "replace-key", "mentions-me", "no-skill", "replace", "unread", "force", "no-hooks", "yes", "open", "bind-here", "peek", "once", "launchd", "full", "no-bind", "all", "here", "keep-worktree", "prune", "abandon", "hold", "clear", "met", "shared"];
|
|
5
5
|
export function parse(argv) {
|
|
6
6
|
const options = {};
|
|
7
7
|
for (const f of STRING_FLAGS)
|
package/dist/commands/wu.js
CHANGED
|
@@ -508,9 +508,10 @@ export async function milestone(p, out) {
|
|
|
508
508
|
const met = bool(p.flags, "met");
|
|
509
509
|
const gaps = str(p.flags, "gaps");
|
|
510
510
|
if (met === !!gaps)
|
|
511
|
-
throw new CliError("usage", 'milestone verdict <key> --met --note "how the exit criterion is met" [--evidence id,id] or milestone verdict <key> --gaps "what is missing" [--note ".."]');
|
|
511
|
+
throw new CliError("usage", 'milestone verdict <key> --met --note "how the exit criterion is met" [--evidence id,id] or milestone verdict <key> --gaps "what is missing" [--units n,m] [--note ".."] (--units: the units that address the gaps, wherever they live; the slice is reviewed again when they close)');
|
|
512
512
|
const evidence = (str(p.flags, "evidence") ?? "").split(",").map((x) => x.trim().replace(/^evidence:/, "")).filter(Boolean);
|
|
513
|
-
const
|
|
513
|
+
const units = (str(p.flags, "units") ?? "").split(",").map((x) => Number(x.trim().replace(/^#/, ""))).filter((n) => Number.isInteger(n) && n > 0);
|
|
514
|
+
const r = await client.call("POST", `/projects/${project}/milestones/${key}/verdict`, { met, note: str(p.flags, "note") ?? "", evidence, gaps: gaps ?? "", units });
|
|
514
515
|
out.print(met ? `Milestone ${r.milestone.key} is done; dependent slices that are now ready were announced.` : `Milestone ${r.milestone.key} stays open; the assigners were told the gaps.`, r);
|
|
515
516
|
return;
|
|
516
517
|
}
|
|
@@ -556,19 +557,20 @@ export async function lock(p, out) {
|
|
|
556
557
|
const lockName = p.positionals[1];
|
|
557
558
|
if (cmd === "locks") {
|
|
558
559
|
const r = await client.call("GET", `/projects/${project}/locks`);
|
|
559
|
-
out.print(r.locks.length ? r.locks.map((l) => `${l.name}: ${l.holder_name ? `held by ${l.holder_name}${l.unit ? ` (WU #${l.unit})` : ""} since ${l.acquired_at.slice(11, 16)} UTC` : "free"}${l.waiting.length ? ` · waiting: ${l.waiting.map((w) => `${w.name}${w.unit ? ` (#${w.unit})` : ""}`).join(", ")}` : ""}`).join("\n") : "No locks in this project. Take one with: bschat lock <name> [--unit n]", r);
|
|
560
|
+
out.print(r.locks.length ? r.locks.map((l) => `${l.name}${l.machine ? ` on ${l.machine}` : " (shared)"}: ${l.holder_name ? `held by ${l.holder_name}${l.unit ? ` (WU #${l.unit})` : ""} since ${l.acquired_at.slice(11, 16)} UTC` : "free"}${l.waiting.length ? ` · waiting: ${l.waiting.map((w) => `${w.name}${w.unit ? ` (#${w.unit})` : ""}`).join(", ")}` : ""}`).join("\n") : "No locks in this project. Take one with: bschat lock <name> [--unit n]", r);
|
|
560
561
|
return;
|
|
561
562
|
}
|
|
562
563
|
if (!lockName)
|
|
563
564
|
throw new CliError("usage", `${cmd} <name> (e.g. bschat lock build --unit 60 --note "exact run")`);
|
|
564
565
|
if (cmd === "unlock") {
|
|
565
|
-
const r = await client.call("POST", `/projects/${project}/locks/${lockName}/release`, {});
|
|
566
|
+
const r = await client.call("POST", `/projects/${project}/locks/${lockName}/release`, { shared: bool(p.flags, "shared") });
|
|
566
567
|
out.print(r.lock.holder_name ? `${lockName} released; now held by ${r.lock.holder_name}${r.lock.unit ? ` (WU #${r.lock.unit})` : ""}.` : `${lockName} released; free.`, r);
|
|
567
568
|
return;
|
|
568
569
|
}
|
|
569
570
|
const unit = str(p.flags, "unit");
|
|
570
|
-
|
|
571
|
+
// Scoped to this machine unless --shared: the resource is this box's CPU and disk.
|
|
572
|
+
const r = await client.call("POST", `/projects/${project}/locks/${lockName}/acquire`, { unit: unit ? Number(unit) : null, note: str(p.flags, "note") ?? "", shared: bool(p.flags, "shared") });
|
|
571
573
|
out.print(r.acquired
|
|
572
|
-
? `You hold ${lockName}${unit ? ` for WU #${unit}` : ""}. Release it when done: bschat unlock ${lockName}`
|
|
574
|
+
? `You hold ${lockName}${r.lock.machine ? ` on ${r.lock.machine}` : " (shared)"}${unit ? ` for WU #${unit}` : ""}. Release it when done: bschat unlock ${lockName}`
|
|
573
575
|
: `${lockName} is held by ${r.lock.holder_name}${r.lock.unit ? ` (WU #${r.lock.unit})` : ""}; you are ${r.position === 1 ? "next" : `#${r.position} in line`}. You will be @mentioned when it is yours; do not poll. Leave the queue: bschat unlock ${lockName}`, r);
|
|
574
576
|
}
|
package/dist/help.js
CHANGED
|
@@ -54,9 +54,9 @@ Agent commands
|
|
|
54
54
|
no exit and no dependencies makes a container for ongoing work; milestone edit <key> amends
|
|
55
55
|
bschat milestone show <key> exit criterion, dependencies, counts; wu milestone <n> <key|none> moves a unit
|
|
56
56
|
bschat milestone close <key> --note ".." [--evidence a,b] [--abandon] the lead closes a slice against its exit criterion
|
|
57
|
-
bschat milestone verdict <key> --met --note ".." [--evidence a,b] | --gaps ".." the closure reviewer judges the exit against the evidence
|
|
57
|
+
bschat milestone verdict <key> --met --note ".." [--evidence a,b] | --gaps ".." [--units n,m] the closure reviewer judges the exit against the evidence; gap units re-trigger the review when they close
|
|
58
58
|
bschat milestone review <key> assigner or operator: request a closure review now (the steward does it when the last unit closes)
|
|
59
|
-
bschat lock <name> [--unit n] [--note ..] take
|
|
59
|
+
bschat lock <name> [--unit n] [--note ..] [--shared] take this machine's <name> (build slot, scratch) or queue; --shared for a project-wide resource (a test board)
|
|
60
60
|
bschat unlock <name> | bschat locks release it (also released when your unit closes); see holders and queues
|
|
61
61
|
(refused while it has units not done); milestone reopen <key> undoes it
|
|
62
62
|
Global: --effort <high|medium|low|...> reasoning effort to report (else BSCHAT_EFFORT, CLAUDE_EFFORT, codex model_reasoning_effort)
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const CLI_VERSION = "0.12.
|
|
1
|
+
export const CLI_VERSION = "0.12.22";
|