benignswarm 0.12.26 → 0.12.27
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/admin.js +1 -1
- package/dist/commands/agent.js +10 -1
- package/dist/commands/wu.js +4 -4
- package/dist/help.js +2 -1
- package/dist/output.js +1 -1
- 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", "units", "blocks", "sla", "takeover", "max-open", "max-in-progress", "require-scope", "require-evidence", "default-approver", "merged-by", "integrator-role", "require-rebased", "require-merge-commit", "require-pushed", "quiet", "summary", "meaning", "expert-role", "reviews", "works", "trials", "email", "repeat", "summary-minutes", "churn", "unmet", "require-cited-changes"];
|
|
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"];
|
|
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", "blocks", "sla", "takeover", "max-open", "max-in-progress", "require-scope", "require-evidence", "default-approver", "merged-by", "integrator-role", "require-rebased", "require-merge-commit", "require-pushed", "quiet", "summary", "meaning", "expert-role", "reviews", "works", "trials", "email", "repeat", "summary-minutes", "churn", "unmet", "require-cited-changes", "checks-every"];
|
|
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", "defer", "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/admin.js
CHANGED
|
@@ -114,7 +114,7 @@ async function agent(action, rest, p, out) {
|
|
|
114
114
|
const [proj, name, extra] = rest;
|
|
115
115
|
if (action === "list" && proj) {
|
|
116
116
|
const r = await c.call("GET", `/projects/${proj}/agents`);
|
|
117
|
-
out.print(table(r.agents, ["name", "vendor", "role_name", "active_keys", "created_at"]), r);
|
|
117
|
+
out.print(table(r.agents, ["name", "scope", "vendor", "role_name", "active_keys", "created_at"]), r);
|
|
118
118
|
}
|
|
119
119
|
else if (action === "create" && proj && name) {
|
|
120
120
|
const r = await c.call("POST", `/projects/${proj}/agents`, { name, vendor: need(p.flags, "vendor"), role: str(p.flags, "role") ?? null, machine: str(p.flags, "machine") ?? null });
|
package/dist/commands/agent.js
CHANGED
|
@@ -109,8 +109,17 @@ export async function status(p, out) {
|
|
|
109
109
|
throw new CliError("usage", "--custom must be valid JSON");
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
+
const every = str(p.flags, "checks-every");
|
|
113
|
+
if (every !== undefined) {
|
|
114
|
+
if (every === "" || every === "none" || every === "0")
|
|
115
|
+
body.checks_every = null;
|
|
116
|
+
else if (/^\d+$/.test(every))
|
|
117
|
+
body.checks_every = Number(every);
|
|
118
|
+
else
|
|
119
|
+
throw new CliError("usage", "--checks-every takes whole minutes (1 to 1440), or none to clear it");
|
|
120
|
+
}
|
|
112
121
|
if (!Object.keys(body).length)
|
|
113
|
-
throw new CliError("usage", "status set needs at least one of --state --goal --task --blocked-on --tags --custom");
|
|
122
|
+
throw new CliError("usage", "status set needs at least one of --state --goal --task --blocked-on --tags --custom --checks-every");
|
|
114
123
|
const r = await client.call("PUT", creds.project ? `/projects/${creds.project}/agents/me/status` : "/agents/me/status", body);
|
|
115
124
|
out.print(fmtStatus(r.status), r);
|
|
116
125
|
return;
|
package/dist/commands/wu.js
CHANGED
|
@@ -455,7 +455,7 @@ export async function milestones(p, out) {
|
|
|
455
455
|
const rows = r.milestones.map((m) => ({ key: m.key, status: m.status === "open" ? (m.ready ? "ready" : `waits on ${m.waiting_on.join(",")}`) : m.status, units: `${m.units.done}/${m.units.total}${m.units.queued ? ` (+${m.units.queued} queued)` : ""}`, "depends on": m.depends_on.join(",") || "-", title: m.title.slice(0, 50) }));
|
|
456
456
|
out.print(rows.length ? `${table(rows, ["key", "status", "units", "depends on", "title"])}\nbschat milestone show <key> for the exit criterion; wu open/assign --milestone <key> puts a unit on one.` : "(no milestones defined; the operator or an assigner defines them on the Process page or with bschat milestone set)", r);
|
|
457
457
|
}
|
|
458
|
-
/** milestone show <key> | milestone close <key> --note ".." [--evidence a,b] [--abandon] | milestone reopen <key> */
|
|
458
|
+
/** milestone show <key> | milestone close <key> --note ".." [--evidence a,b] [--abandon | --defer] | milestone reopen <key> */
|
|
459
459
|
export async function milestone(p, out) {
|
|
460
460
|
const name = resolveAgentName(str(p.flags, "as"));
|
|
461
461
|
const creds = loadAgent(name);
|
|
@@ -466,7 +466,7 @@ export async function milestone(p, out) {
|
|
|
466
466
|
const sub = p.positionals[1];
|
|
467
467
|
const key = p.positionals[2];
|
|
468
468
|
if (!key)
|
|
469
|
-
throw new CliError("usage", 'milestone show <key> | milestone close <key> --note "how the exit criterion was met" [--evidence id,id] [--abandon] | milestone reopen <key>');
|
|
469
|
+
throw new CliError("usage", 'milestone show <key> | milestone close <key> --note "how the exit criterion was met" [--evidence id,id] [--abandon | --defer] | milestone reopen <key>');
|
|
470
470
|
if (sub === "add" || sub === "edit") {
|
|
471
471
|
// One slice in, the rest untouched: fetch the list, add or amend the entry, set it back.
|
|
472
472
|
const cur = (await client.call("GET", `/projects/${project}/milestones`)).milestones;
|
|
@@ -501,8 +501,8 @@ export async function milestone(p, out) {
|
|
|
501
501
|
if (sub === "close") {
|
|
502
502
|
const note = str(p.flags, "note");
|
|
503
503
|
if (!note)
|
|
504
|
-
throw new CliError("usage", 'milestone close <key> --note "how the exit criterion was met" [--evidence id,id] [--abandon]');
|
|
505
|
-
const r = await client.call("POST", `/projects/${project}/milestones/${key}/close`, { how: p.flags.abandon ? "abandoned" : "done", note, evidence: (str(p.flags, "evidence") ?? "").split(",").map((s) => s.trim()).filter(Boolean) });
|
|
504
|
+
throw new CliError("usage", 'milestone close <key> --note "how the exit criterion was met" [--evidence id,id] [--abandon | --defer]');
|
|
505
|
+
const r = await client.call("POST", `/projects/${project}/milestones/${key}/close`, { how: p.flags.abandon ? "abandoned" : p.flags.defer ? "deferred" : "done", note, evidence: (str(p.flags, "evidence") ?? "").split(",").map((s) => s.trim()).filter(Boolean) });
|
|
506
506
|
out.print(`Milestone ${r.milestone.key} ${r.milestone.status}.`, r);
|
|
507
507
|
return;
|
|
508
508
|
}
|
package/dist/help.js
CHANGED
|
@@ -21,6 +21,7 @@ Agent commands
|
|
|
21
21
|
bschat me who am I, role, permissions, channels
|
|
22
22
|
bschat who [--account] what every agent is doing (--account: all projects)
|
|
23
23
|
bschat status set [--state s] [--goal g] [--task t] [--blocked-on b] [--tags a,b] [--custom '{json}']
|
|
24
|
+
[--checks-every <min>|none] not always on but checking on a schedule: say how often
|
|
24
25
|
bschat status history <agent> [--limit n]
|
|
25
26
|
bschat send <channel> <message...> [--reply-to <seq>] @name, @role:name, @role:* are resolved and validated
|
|
26
27
|
bschat send <channel> --body-file <f|-> multi-line / markdown message from a file or stdin (use this for anything long)
|
|
@@ -53,7 +54,7 @@ Agent commands
|
|
|
53
54
|
roles or the operator); --source is where the full brief lives, read only when planning the slice;
|
|
54
55
|
no exit and no dependencies makes a container for ongoing work; milestone edit <key> amends
|
|
55
56
|
bschat milestone show <key> exit criterion, dependencies, counts; wu milestone <n> <key|none> moves a unit
|
|
56
|
-
bschat milestone close <key> --note ".." [--evidence a,b] [--abandon] the lead closes a slice against its exit criterion
|
|
57
|
+
bschat milestone close <key> --note ".." [--evidence a,b] [--abandon | --defer] the lead closes a slice against its exit criterion
|
|
57
58
|
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
59
|
bschat milestone review <key> assigner or operator: request a closure review now (the steward does it when the last unit closes)
|
|
59
60
|
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)
|
package/dist/output.js
CHANGED
|
@@ -16,7 +16,7 @@ export function fmtMessage(m) {
|
|
|
16
16
|
}
|
|
17
17
|
export function fmtStatus(s) {
|
|
18
18
|
const parts = [
|
|
19
|
-
`${s.agent_name}${s.role_name ? `[${s.role_name}]` : ""}${s.liveness === "quiet" ? " (quiet: harness went silent)" : s.liveness === "unknown" ? " (stale, harness unmonitored)" : ""}`,
|
|
19
|
+
`${s.agent_name}${s.role_name ? `[${s.role_name}]` : ""}${s.liveness === "quiet" ? " (quiet: harness went silent)" : s.liveness === "unknown" ? " (stale, harness unmonitored)" : s.liveness === "scheduled" ? ` (checks every ${s.checks_every} min, next ${(s.next_check_at ?? "").slice(11, 16)} UTC)` : s.liveness === "missed" ? ` (missed its ${s.checks_every}-min check)` : ""}`,
|
|
20
20
|
`state=${s.state ?? "-"}`,
|
|
21
21
|
s.goal ? `goal="${s.goal}"` : null,
|
|
22
22
|
s.task ? `task="${s.task}"` : null,
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const CLI_VERSION = "0.12.
|
|
1
|
+
export const CLI_VERSION = "0.12.27";
|