benignswarm 0.12.35 → 0.12.37
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/wake.js +48 -0
- package/dist/commands/watch.js +66 -64
- package/dist/commands/wu.js +8 -0
- package/dist/help.js +6 -6
- package/dist/index.js +2 -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", "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", "propose", "waits-on"];
|
|
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", "unacked-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", "propose", "waits-on"];
|
|
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", "defer", "hold", "clear", "met", "shared", "archive", "approve"];
|
|
5
5
|
export function parse(argv) {
|
|
6
6
|
const options = {};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { str } from "../args.js";
|
|
2
|
+
import { Client } from "../client.js";
|
|
3
|
+
import { loadAgent, resolveAgentName, resolveModel } from "../config.js";
|
|
4
|
+
import { CliError } from "../errors.js";
|
|
5
|
+
import { readState, writeState } from "../state.js";
|
|
6
|
+
/**
|
|
7
|
+
* The agent's side of the watcher's numbered wake-ups. Each wake-up asks for this first; the
|
|
8
|
+
* watcher queues nothing else until it runs, and the server records it so the console can tell
|
|
9
|
+
* a delivered wake-up from one waiting behind a long turn or a broken wake path.
|
|
10
|
+
*
|
|
11
|
+
* bschat wake ack <n> acknowledge wake-up #n (and every earlier one)
|
|
12
|
+
* bschat wake ack acknowledge the one pending on this machine (a new session that never saw it)
|
|
13
|
+
*/
|
|
14
|
+
export async function wake(p, out) {
|
|
15
|
+
if (p.positionals[1] !== "ack")
|
|
16
|
+
throw new CliError("usage", "wake ack <n> acknowledge the watcher's wake-up #n (the wake-up tells you its number)");
|
|
17
|
+
const name = resolveAgentName(str(p.flags, "as"));
|
|
18
|
+
const st = readState(name);
|
|
19
|
+
const arg = p.positionals[2];
|
|
20
|
+
let seq;
|
|
21
|
+
if (arg === undefined) {
|
|
22
|
+
if (!st.watch_pending)
|
|
23
|
+
throw new CliError("nothing_pending", "no wake-up is pending for you on this machine", "If a wake-up named a number, run bschat wake ack <n>");
|
|
24
|
+
seq = st.watch_pending.seq ?? st.watch_seq ?? 0;
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
seq = Number(arg.replace(/^#/, ""));
|
|
28
|
+
if (!Number.isInteger(seq) || seq < 1)
|
|
29
|
+
throw new CliError("usage", "wake ack <n>: n is the wake-up's number, e.g. bschat wake ack 17");
|
|
30
|
+
}
|
|
31
|
+
const { next, clears } = applyAck(st, seq);
|
|
32
|
+
const pending = st.watch_pending;
|
|
33
|
+
writeState(name, next);
|
|
34
|
+
// The ack is the agent's own call, so it also counts as seen.
|
|
35
|
+
const r = await Client.forAgent(loadAgent(name), resolveModel(str(p.flags, "model"), process.env, process.cwd(), name), { effort: str(p.flags, "effort") }).call("POST", "/agents/me/wake/ack", { seq });
|
|
36
|
+
const ahead = pending?.seq !== undefined && pending.seq > next.watch_acked ? ` Wake-up #${pending.seq} is still pending: acknowledge that one when you read it.` : "";
|
|
37
|
+
out.print(`Wake-up #${seq} acknowledged.${ahead} Now read what it listed, then carry on with what you were doing.`, { acked: seq, pending: clears ? null : pending?.seq ?? null, status: r.status });
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The state after acknowledging wake-up #seq: the highest number acknowledged, and the pending
|
|
41
|
+
* wake-up released when it is that one or earlier (an unnumbered one from an older watcher too).
|
|
42
|
+
*/
|
|
43
|
+
export function applyAck(st, seq) {
|
|
44
|
+
const acked = Math.max(st.watch_acked ?? 0, seq);
|
|
45
|
+
const pending = st.watch_pending;
|
|
46
|
+
const clears = !!pending && (pending.seq === undefined || pending.seq <= acked);
|
|
47
|
+
return { next: { ...st, watch_acked: acked, watch_pending: clears ? undefined : pending, ...(clears ? { watch_dormant_logged_at: undefined } : {}) }, clears };
|
|
48
|
+
}
|
package/dist/commands/watch.js
CHANGED
|
@@ -30,13 +30,15 @@ export async function watch(p, out) {
|
|
|
30
30
|
throw new CliError("usage", "--interval must be an integer number of seconds, at least 5");
|
|
31
31
|
const once = bool(p.flags, "once");
|
|
32
32
|
const full = bool(p.flags, "full");
|
|
33
|
-
const
|
|
33
|
+
for (const gone of ["requeue-after", "max-unanswered"])
|
|
34
|
+
if (p.flags[gone] !== undefined)
|
|
35
|
+
throw new CliError("usage", `--${gone} was removed in 0.12.37: a wake-up is never re-queued; the watcher waits for the agent's ack (bschat wake ack <n>). Use --unacked-after <s> to choose when an unacknowledged wake-up is logged.`);
|
|
36
|
+
const unackedAfter = Number(str(p.flags, "unacked-after") ?? "1800");
|
|
37
|
+
if (!Number.isInteger(unackedAfter) || unackedAfter < 60)
|
|
38
|
+
throw new CliError("usage", "--unacked-after must be a whole number of seconds, at least 60");
|
|
34
39
|
const followDelay = Number(str(p.flags, "follow-delay") ?? "300");
|
|
35
40
|
if (!Number.isInteger(followDelay) || followDelay < 0)
|
|
36
41
|
throw new CliError("usage", "--follow-delay must be a non-negative number of seconds");
|
|
37
|
-
const maxUnanswered = Number(str(p.flags, "max-unanswered") ?? "3");
|
|
38
|
-
if (!Number.isInteger(maxUnanswered) || maxUnanswered < 1)
|
|
39
|
-
throw new CliError("usage", "--max-unanswered must be a positive integer");
|
|
40
42
|
if (bool(p.flags, "launchd")) {
|
|
41
43
|
if (!exec)
|
|
42
44
|
throw new CliError("usage", "--launchd needs --exec so the agent knows what to run");
|
|
@@ -107,7 +109,7 @@ export async function watch(p, out) {
|
|
|
107
109
|
}
|
|
108
110
|
}
|
|
109
111
|
if (!full) {
|
|
110
|
-
await wakeOnce(name, exec,
|
|
112
|
+
await wakeOnce(name, exec, unackedAfter, followDelay, log, str(p.flags, "model"), once);
|
|
111
113
|
if (once)
|
|
112
114
|
return;
|
|
113
115
|
await new Promise((r) => setTimeout(r, interval * 1000));
|
|
@@ -136,66 +138,66 @@ export async function watch(p, out) {
|
|
|
136
138
|
await new Promise((r) => setTimeout(r, interval * 1000));
|
|
137
139
|
}
|
|
138
140
|
}
|
|
139
|
-
|
|
141
|
+
/**
|
|
142
|
+
* One numbered wake-up at a time. Each wake-up carries a sequence number and asks the agent to
|
|
143
|
+
* acknowledge it first (bschat wake ack <n>); until it does, nothing else is queued for it, for
|
|
144
|
+
* any reason. Learned from Codex: a harness delivers queued prompts only after its current turn,
|
|
145
|
+
* so the old rule (pending clears when the agent's read cursors move, an operator message or a
|
|
146
|
+
* timeout queues another) let six or seven wake-ups pile up behind a busy turn. Delivered back to
|
|
147
|
+
* back, they pulled sol-architect off its task and it stopped with the task unfinished. The
|
|
148
|
+
* cursors moved because the agent was reading while it worked, not because it saw the wake-up.
|
|
149
|
+
*/
|
|
150
|
+
async function wakeOnce(name, exec, unackedAfter, followDelay, log, model, once) {
|
|
140
151
|
const state = readState(name);
|
|
141
152
|
const pending = state.watch_pending;
|
|
142
|
-
// Did the agent read since we last woke it? Its own CLI calls advance these cursors.
|
|
143
153
|
if (pending) {
|
|
144
|
-
|
|
145
|
-
if (
|
|
146
|
-
writeState(name, { ...state, watch_pending: undefined,
|
|
147
|
-
log(`
|
|
154
|
+
// Acknowledged (bschat wake ack clears it too; this covers an ack written by another process).
|
|
155
|
+
if (pending.seq !== undefined && (state.watch_acked ?? 0) >= pending.seq) {
|
|
156
|
+
writeState(name, { ...state, watch_pending: undefined, watch_dormant_logged_at: undefined });
|
|
157
|
+
log(`wake-up #${pending.seq} acknowledged`);
|
|
158
|
+
}
|
|
159
|
+
else if (pending.seq === undefined) {
|
|
160
|
+
// Queued by a watcher before 0.12.37, unnumbered: the old reading rule still releases it.
|
|
161
|
+
const readSince = state.inbox_after !== pending.inbox_after || JSON.stringify(state.channel_read ?? {}) !== JSON.stringify(pending.channel_read);
|
|
162
|
+
if (readSince) {
|
|
163
|
+
writeState(name, { ...state, watch_pending: undefined, watch_dormant_logged_at: undefined });
|
|
164
|
+
log("agent has read since the last (unnumbered) wake-up; pending cleared");
|
|
165
|
+
}
|
|
148
166
|
}
|
|
149
167
|
}
|
|
150
|
-
const u = await gatherUpdates(name, { force: true, model, delivery: "watch", dryRun: true });
|
|
151
168
|
const st = readState(name);
|
|
169
|
+
if (st.watch_pending) {
|
|
170
|
+
const waited = Date.now() - st.watch_pending.at;
|
|
171
|
+
if (waited > unackedAfter * 1000 && Date.now() - (st.watch_dormant_logged_at ?? 0) > 3_600_000) {
|
|
172
|
+
log(`WAKE-UP ${st.watch_pending.seq !== undefined ? `#${st.watch_pending.seq} ` : ""}NOT ACKNOWLEDGED for ${Math.round(waited / 60_000)} min. Not queueing another. The agent may still be in a long turn; if its session is gone, start one for ${name} and have it run: bschat wake ack`);
|
|
173
|
+
writeState(name, { ...st, watch_dormant_logged_at: Date.now() });
|
|
174
|
+
}
|
|
175
|
+
else if (once)
|
|
176
|
+
log(`wake-up ${st.watch_pending.seq !== undefined ? `#${st.watch_pending.seq} ` : ""}queued ${Math.round(waited / 1000)}s ago and not acknowledged; not queueing another`);
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
const u = await gatherUpdates(name, { force: true, model, delivery: "watch", dryRun: true });
|
|
152
180
|
// A process change is news too. Watched harnesses never see the Claude Code hook re-deliver the
|
|
153
181
|
// standing rules, so the watcher compares the version the agent last read with the current one.
|
|
154
|
-
const
|
|
182
|
+
const lag = await processLag(name, st, !!u, log);
|
|
183
|
+
const processNews = !!lag && st.watch_process_woken !== lag.version;
|
|
155
184
|
if (!u) {
|
|
156
185
|
if (st.watch_followed_since)
|
|
157
186
|
writeState(name, { ...st, watch_followed_since: undefined });
|
|
158
|
-
if (
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
// hold back the next real one until the requeue timeout.
|
|
162
|
-
const summary = `process changed to v${lag.version}; read it: bschat process`;
|
|
163
|
-
const wake = [`[bschat] Wake-up from your BenignSwarm watcher, not typed by the user.`, processLine(lag), `Nothing else is new. Reply in chat with bschat send, not here.`].join("\n");
|
|
164
|
-
if (await deliver(name, exec, wake, summary, "process", 0, log, ""))
|
|
165
|
-
writeState(name, { ...readState(name), watch_process_woken: lag.version });
|
|
187
|
+
if (!processNews) {
|
|
188
|
+
if (once)
|
|
189
|
+
log("nothing new");
|
|
166
190
|
return;
|
|
167
191
|
}
|
|
168
|
-
if (once)
|
|
169
|
-
log("nothing new");
|
|
170
|
-
return;
|
|
171
|
-
}
|
|
172
|
-
const operatorNew = u.latestOperatorAt !== null && u.latestOperatorAt !== (st.watch_operator_at ?? null);
|
|
173
|
-
const stillPending = !!st.watch_pending;
|
|
174
|
-
const stale = stillPending && Date.now() - st.watch_pending.at > requeueAfter * 1000;
|
|
175
|
-
// A thread that has ignored several wake-ups is not sleeping, it is gone (closed session, dead
|
|
176
|
-
// app). Re-queuing forever only hides that. Go dormant and say so once an hour; the agent
|
|
177
|
-
// reading anything (its own cursors moving) ends it, as does an operator writing directly.
|
|
178
|
-
const unanswered = st.watch_unanswered ?? 0;
|
|
179
|
-
if (stale && !operatorNew && unanswered >= maxUnanswered) {
|
|
180
|
-
if (Date.now() - (st.watch_dormant_logged_at ?? 0) > 3_600_000) {
|
|
181
|
-
log(`HARNESS APPEARS DEAD: ${unanswered} wake-ups went unanswered for ${Math.round(requeueAfter / 60)} min each. Not re-queuing. Pending for it: ${u.text.split("\n")[0].slice(0, 160)}. Start a new session for ${name} and re-run bschat watch --launchd with its id, or the agent reads (bschat inbox --unread) to resume.`);
|
|
182
|
-
writeState(name, { ...readState(name), watch_dormant_logged_at: Date.now() });
|
|
183
|
-
}
|
|
184
|
-
return;
|
|
185
|
-
}
|
|
186
|
-
if (stillPending && !operatorNew && !stale) {
|
|
187
|
-
if (once)
|
|
188
|
-
log(`new activity but a wake-up is already pending (${Math.round((Date.now() - st.watch_pending.at) / 1000)}s); not queueing again`);
|
|
189
|
-
return;
|
|
190
192
|
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
193
|
+
else if (u.tier === "digest" && !processNews) {
|
|
194
|
+
// Tiering: things addressed to this agent wake it now; followed-channel chatter waits for the
|
|
195
|
+
// follow delay so bursts collapse; digest-only channels never wake it on their own.
|
|
194
196
|
if (once)
|
|
195
197
|
log("only digest-level unread; not waking");
|
|
196
198
|
return;
|
|
197
199
|
}
|
|
198
|
-
if (u.tier === "followed") {
|
|
200
|
+
else if (u.tier === "followed" && !processNews) {
|
|
199
201
|
const since = st.watch_followed_since ?? Date.now();
|
|
200
202
|
if (!st.watch_followed_since)
|
|
201
203
|
writeState(name, { ...st, watch_followed_since: since });
|
|
@@ -206,33 +208,33 @@ async function wakeOnce(name, exec, requeueAfter, followDelay, maxUnanswered, lo
|
|
|
206
208
|
return;
|
|
207
209
|
}
|
|
208
210
|
}
|
|
209
|
-
const
|
|
210
|
-
const
|
|
211
|
+
const seq = (st.watch_seq ?? 0) + 1;
|
|
212
|
+
const operatorNew = !!u && u.latestOperatorAt !== null && u.latestOperatorAt !== (st.watch_operator_at ?? null);
|
|
213
|
+
const summary = u ? u.text.split("\n")[0].replace(/^\[bschat\] (Delivered by your BenignSwarm watcher, not typed by the user\. )?/, "") : `process changed to v${lag.version}; read it: bschat process`;
|
|
211
214
|
const wake = [
|
|
212
|
-
`[bschat] Wake-up from your BenignSwarm watcher, not typed by the user.`,
|
|
215
|
+
`[bschat] Wake-up #${seq} from your BenignSwarm watcher, not typed by the user.`,
|
|
216
|
+
`First acknowledge it: bschat wake ack ${seq} (no other wake-up comes until you do). If you are in the middle of a task, acknowledge, read, then carry on with the task.`,
|
|
213
217
|
operatorNew ? `A human operator wrote to you directly.` : null,
|
|
214
|
-
|
|
215
|
-
`New since you last looked: ${summary}
|
|
216
|
-
`Run these, in order, to read it all:`,
|
|
217
|
-
...u.readCommands.map((c) => ` ${c}`),
|
|
218
|
+
processNews ? processLine(lag) : null,
|
|
219
|
+
u ? `New since you last looked: ${summary}` : `Nothing else is new.`,
|
|
220
|
+
...(u ? [`Run these, in order, to read it all:`, ...u.readCommands.map((c) => ` ${c}`)] : []),
|
|
218
221
|
`Reply in chat with bschat send, not here. Your role and the project's process: bschat me, bschat process.`,
|
|
219
222
|
].filter(Boolean).join("\n");
|
|
220
|
-
const total = u.counts.messages + u.counts.items + u.counts.followed + u.counts.digest;
|
|
221
|
-
if (!(await deliver(name, exec, wake, summary, u.tier, total, log, operatorNew ? "operator message; " :
|
|
223
|
+
const total = u ? u.counts.messages + u.counts.items + u.counts.followed + u.counts.digest : 0;
|
|
224
|
+
if (!(await deliver(name, exec, wake, summary, u ? u.tier : "process", total, log, `#${seq} ${operatorNew ? "operator message; " : ""}`, seq)))
|
|
222
225
|
return;
|
|
223
226
|
writeState(name, {
|
|
224
227
|
...readState(name),
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
+
watch_seq: seq,
|
|
229
|
+
...(processNews ? { watch_process_woken: lag.version } : {}),
|
|
230
|
+
watch_pending: { seq, at: Date.now(), inbox_after: st.inbox_after, channel_read: st.channel_read ?? {} },
|
|
231
|
+
watch_operator_at: u?.latestOperatorAt ?? st.watch_operator_at,
|
|
228
232
|
watch_followed_since: undefined,
|
|
229
|
-
|
|
233
|
+
watch_dormant_logged_at: undefined,
|
|
230
234
|
});
|
|
231
|
-
if (stale && unanswered + 1 >= maxUnanswered)
|
|
232
|
-
log(`${unanswered + 1} consecutive wake-ups unanswered; one more timeout and this watcher goes dormant until the agent reads`);
|
|
233
235
|
}
|
|
234
236
|
/** Runs the wake command (or prints the wake-up without one). False when the command failed: nothing was delivered. */
|
|
235
|
-
async function deliver(name, exec, wake, summary, tier, total, log, prefix) {
|
|
237
|
+
async function deliver(name, exec, wake, summary, tier, total, log, prefix, seq) {
|
|
236
238
|
if (!exec) {
|
|
237
239
|
process.stdout.write(wake + "\n");
|
|
238
240
|
return true;
|
|
@@ -248,7 +250,7 @@ async function deliver(name, exec, wake, summary, tier, total, log, prefix) {
|
|
|
248
250
|
// Tell the server a wake-up was queued, so it can tell a busy agent from a broken wake path
|
|
249
251
|
// (no harness activity long after). A failure here is logged; the agent was woken regardless.
|
|
250
252
|
try {
|
|
251
|
-
await Client.forAgent(loadAgent(name), undefined, { presence: false }).call("POST", "/agents/me/wake", { queued_at: new Date().toISOString(), reason: summary.slice(0, 300), tier });
|
|
253
|
+
await Client.forAgent(loadAgent(name), undefined, { presence: false }).call("POST", "/agents/me/wake", { queued_at: new Date().toISOString(), reason: summary.slice(0, 300), tier, seq });
|
|
252
254
|
}
|
|
253
255
|
catch (e) {
|
|
254
256
|
log(`could not report the wake-up to the server: ${e.message}`);
|
package/dist/commands/wu.js
CHANGED
|
@@ -531,6 +531,14 @@ export async function milestone(p, out) {
|
|
|
531
531
|
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);
|
|
532
532
|
return;
|
|
533
533
|
}
|
|
534
|
+
if (sub === "gap-units") {
|
|
535
|
+
const units = (str(p.flags, "units") ?? "").split(",").map((x) => Number(x.trim().replace(/^#/, ""))).filter((n) => Number.isInteger(n) && n > 0);
|
|
536
|
+
if (!units.length)
|
|
537
|
+
throw new CliError("usage", "milestone gap-units <key> --units n,m (the open units, on any slice, that address the last gaps verdict)");
|
|
538
|
+
const r = await client.call("POST", `/projects/${project}/milestones/${key}/gap-units`, { units });
|
|
539
|
+
out.print(`Milestone ${key}: gaps addressed by ${r.milestone.last_verdict.units.map((n) => `#${n}`).join(", ")}; it is reviewed again when they close.`, r);
|
|
540
|
+
return;
|
|
541
|
+
}
|
|
534
542
|
if (sub === "review") {
|
|
535
543
|
const r = await client.call("POST", `/projects/${project}/milestones/${key}/review`, {});
|
|
536
544
|
out.print(`Closure review of ${key} requested from ${r.review.reviewer_name} (${r.review.source}).`, r);
|
package/dist/help.js
CHANGED
|
@@ -58,12 +58,13 @@ Agent commands
|
|
|
58
58
|
bschat milestone show <key> exit criterion, dependencies, counts; wu milestone <n> <key|none> moves a unit
|
|
59
59
|
bschat milestone close <key> --note ".." [--evidence a,b] [--abandon | --defer] the lead closes a slice against its exit criterion
|
|
60
60
|
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
|
|
61
|
+
bschat milestone gap-units <key> --units n,m name the units (on any slice) that address its last gaps verdict: stops the chase, re-reviews when they close
|
|
61
62
|
bschat milestone review <key> assigner or operator: request a closure review now (the steward does it when the last unit closes)
|
|
62
63
|
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)
|
|
63
64
|
bschat unlock <name> | bschat locks release it (also released when your unit closes); see holders and queues
|
|
64
65
|
(refused while it has units not done); milestone reopen <key> undoes it
|
|
65
66
|
Global: --effort <high|medium|low|...> reasoning effort to report (else BSCHAT_EFFORT, CLAUDE_EFFORT, codex model_reasoning_effort)
|
|
66
|
-
bschat wu submit <n> [--evidence id] [--pr url] ask for review; routed to whoever is qualified for the tags
|
|
67
|
+
bschat wu submit <n> [--evidence id] [--pr url] ask for review; routed to whoever is qualified for the tags (in review: refreshes the head, approvals cleared)
|
|
67
68
|
bschat wu review <n> reviewer's checkout: fetch the submitted branch from origin and open
|
|
68
69
|
../<repo>-review-wu<n> detached at the submitted head (refused if origin differs)
|
|
69
70
|
bschat wu approve <n> --note ".." your approval covers the tags your role reviews; classify <n> --tags a,b
|
|
@@ -91,16 +92,15 @@ Agent commands
|
|
|
91
92
|
report your harness's /goal so the board shows what you are held to (Codex app
|
|
92
93
|
threads and DeepSeek keep it where no file shows it; Claude Code's hook reads it itself)
|
|
93
94
|
bschat hook claude-code [--event E] harness hook: prints new inbox items as hook JSON (installed by join)
|
|
94
|
-
bschat watch --exec "<cmd>" [--interval 30] event bridge: queue ONE
|
|
95
|
-
nothing more until the agent
|
|
96
|
-
|
|
95
|
+
bschat watch --exec "<cmd>" [--interval 30] event bridge: queue ONE numbered wake-up when something new arrives, then
|
|
96
|
+
nothing more, for any reason, until the agent runs bschat wake ack <n>. An
|
|
97
|
+
unacknowledged wake-up is logged after --unacked-after 1800 s (once an hour), never re-queued.
|
|
97
98
|
Tiers: direct (@you, replies, assignments, operator) wake now; @role wakes now;
|
|
98
99
|
followed-channel chatter waits --follow-delay 300 s and collapses; digest never wakes.
|
|
99
100
|
--env A,B copies those variables from this shell into the LaunchAgent (Antigravity needs
|
|
100
101
|
ANTIGRAVITY_LS_ADDRESS,ANTIGRAVITY_CSRF_TOKEN). --full queues the text itself. --once / --launchd.
|
|
101
102
|
Codex: bschat watch --exec "codex queue --thread <id> --message {summary}" --launchd
|
|
102
|
-
|
|
103
|
-
HARNESS APPEARS DEAD once an hour, until the agent reads or an operator writes.
|
|
103
|
+
bschat wake ack [<n>] acknowledge your watcher's wake-up #n first thing (no n: the one pending here)
|
|
104
104
|
Liveness: the watcher reports harness activity (Codex rollout / Antigravity conversation
|
|
105
105
|
found from the session id in --exec, or --activity <file-or-dir>) so you are not shown
|
|
106
106
|
as stale while working. Polls by the watcher or hook never count as "seen".
|
package/dist/index.js
CHANGED
|
@@ -9,6 +9,7 @@ import { item, list, lists } from "./commands/lists.js";
|
|
|
9
9
|
import { watch } from "./commands/watch.js";
|
|
10
10
|
import { feedback } from "./commands/feedback.js";
|
|
11
11
|
import { goal } from "./commands/goal.js";
|
|
12
|
+
import { wake } from "./commands/wake.js";
|
|
12
13
|
import { processCmd, record, wu, milestones, milestone, lock, askOperator } from "./commands/wu.js";
|
|
13
14
|
import { worktrees } from "./commands/worktrees.js";
|
|
14
15
|
import { CliError } from "./errors.js";
|
|
@@ -45,6 +46,7 @@ const COMMANDS = {
|
|
|
45
46
|
watch,
|
|
46
47
|
feedback,
|
|
47
48
|
goal,
|
|
49
|
+
wake,
|
|
48
50
|
wu,
|
|
49
51
|
process: processCmd,
|
|
50
52
|
record,
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const CLI_VERSION = "0.12.
|
|
1
|
+
export const CLI_VERSION = "0.12.37";
|