benignswarm 0.12.16 → 0.12.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/args.js +1 -1
- package/dist/commands/watch.js +8 -0
- package/dist/commands/wu.js +17 -0
- package/dist/help.js +3 -0
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/args.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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"];
|
|
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"];
|
|
4
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"];
|
|
5
5
|
export function parse(argv) {
|
|
6
6
|
const options = {};
|
package/dist/commands/watch.js
CHANGED
|
@@ -202,6 +202,14 @@ async function wakeOnce(name, exec, requeueAfter, followDelay, maxUnanswered, lo
|
|
|
202
202
|
log(`wake command exited ${code}; will retry next poll. If this repeats, the harness needs environment the LaunchAgent lacks (see --env).`);
|
|
203
203
|
return;
|
|
204
204
|
}
|
|
205
|
+
// Tell the server a wake-up was queued, so it can tell a busy agent from a broken wake path
|
|
206
|
+
// (no harness activity long after). Best effort: a failure here must not block waking.
|
|
207
|
+
try {
|
|
208
|
+
await Client.forAgent(loadAgent(name), undefined, { presence: false }).call("POST", "/agents/me/wake", { queued_at: new Date().toISOString(), reason: summary.slice(0, 300), tier: u.tier });
|
|
209
|
+
}
|
|
210
|
+
catch (e) {
|
|
211
|
+
log(`could not report the wake-up to the server: ${e.message}`);
|
|
212
|
+
}
|
|
205
213
|
}
|
|
206
214
|
else {
|
|
207
215
|
process.stdout.write(wake + "\n");
|
package/dist/commands/wu.js
CHANGED
|
@@ -141,7 +141,24 @@ export async function wu(p, out) {
|
|
|
141
141
|
out.print(`${fmt(u)}\n${u.status === "classifying" ? `Waiting for ${u.reviewers[0]?.name} to classify it.` : `Routed to ${u.reviewers.map((x) => `@${x.name}`).join(", ")}; you will be told in chat when it is reviewed.`}`, r);
|
|
142
142
|
return;
|
|
143
143
|
}
|
|
144
|
+
case "reopen": {
|
|
145
|
+
const note = str(p.flags, "note");
|
|
146
|
+
if (!note)
|
|
147
|
+
throw new CliError("usage", 'wu reopen <n> --note "why the approval is withdrawn"');
|
|
148
|
+
const r = await client.call("POST", `${base}/${num()}/reopen`, { note });
|
|
149
|
+
out.print(`${fmt(r.unit)}\nReopened: continue on the same branch and resubmit this unit.`, r);
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
case "supersede": {
|
|
153
|
+
const by = str(p.flags, "by");
|
|
154
|
+
if (!by)
|
|
155
|
+
throw new CliError("usage", 'wu supersede <n> --by <m> [--note ".."] (this unit continues as #m)');
|
|
156
|
+
const r = await client.call("POST", `${base}/${num()}/supersede`, { by: Number(by), note: str(p.flags, "note") ?? "" });
|
|
157
|
+
out.print(fmt(r.unit), r);
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
144
160
|
case "approve":
|
|
161
|
+
case "proceed":
|
|
145
162
|
case "changes": {
|
|
146
163
|
const note = str(p.flags, "note");
|
|
147
164
|
if (!note)
|
package/dist/help.js
CHANGED
|
@@ -60,6 +60,9 @@ Agent commands
|
|
|
60
60
|
bschat wu review <n> reviewer's checkout: fetch the submitted branch from origin and open
|
|
61
61
|
../<repo>-review-wu<n> detached at the submitted head (refused if origin differs)
|
|
62
62
|
bschat wu approve|changes <n> --note ".." your approval covers the tags your role reviews; classify <n> --tags a,b
|
|
63
|
+
bschat wu proceed <n> --note ".." reviewer: this step is good, carry on; back to the owner, NOT an approval
|
|
64
|
+
bschat wu reopen <n> --note ".." owner or reviewer: withdraw an unmerged approval (verification failed); resubmit the same unit
|
|
65
|
+
bschat wu supersede <n> --by <m> owner or assigner: this unit continues as #m; anyone blocked on #n now waits on #m
|
|
63
66
|
bschat wu tags <n> --add a --remove b retag (owner before review, a reviewer during it; may add a reviewer)
|
|
64
67
|
bschat wu done <n> --merged <sha> [--keep-worktree] after approval; verifies the sha is on the target; removes the unit's clean worktree
|
|
65
68
|
bschat wu abandon <n> [--note ..] wu list [--all] / wu show <n> for state and timeline
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const CLI_VERSION = "0.12.
|
|
1
|
+
export const CLI_VERSION = "0.12.18";
|