@droconnell/agent-inbox-cli 2.3.0 → 2.4.0
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/agent-inbox.mjs +13 -2
- package/package.json +1 -1
package/agent-inbox.mjs
CHANGED
|
@@ -34,7 +34,7 @@ import { basename, dirname, isAbsolute, join, relative, sep } from "node:path";
|
|
|
34
34
|
import { spawn } from "node:child_process";
|
|
35
35
|
import { fileURLToPath } from "node:url";
|
|
36
36
|
|
|
37
|
-
export const VERSION = "2.
|
|
37
|
+
export const VERSION = "2.4.0";
|
|
38
38
|
/** The npm package; its command is agent-inbox. (The name agent-inbox itself belongs to someone else on npm.) */
|
|
39
39
|
export const PACKAGE = "@droconnell/agent-inbox-cli";
|
|
40
40
|
const DIR = join(process.env.XDG_CONFIG_HOME || join(homedir(), ".config"), "agent-inbox");
|
|
@@ -217,7 +217,8 @@ async function waitJobs(jobs) {
|
|
|
217
217
|
const lines = [];
|
|
218
218
|
let ok = true;
|
|
219
219
|
for (const { job, agent } of jobs) {
|
|
220
|
-
|
|
220
|
+
// A whole day's replay can take a while (a few hundred conversations, twice each); the rest within minutes.
|
|
221
|
+
const until = Date.now() + (/ on \d{4}-/.test(agent) ? 60 : 15) * 60_000;
|
|
221
222
|
let s;
|
|
222
223
|
for (;;) {
|
|
223
224
|
s = await tool("check_status", { job });
|
|
@@ -566,6 +567,7 @@ const USAGE = [
|
|
|
566
567
|
["test", "run the agents' tests and wait (exit 0 all pass, 1 some fail)"],
|
|
567
568
|
["rehearse <file>", "rehearse the agents the file adds or changes on past conversations and wait"],
|
|
568
569
|
["rehearse [plan] [--on 20] [--topic refund]", "show me before it goes live: past conversations and the tests, with a plan and without"],
|
|
570
|
+
["rehearse [plan] --day [yesterday|2026-11-30] [--yes]", "replay a whole day's conversations, as things are and with the plan: the price first, --yes runs it"],
|
|
569
571
|
["", "(both cost money, and need Tests and rehearsals from CI turned on)"],
|
|
570
572
|
["login <address> --token", "sign in without a browser: paste a personal access token (or pipe it in, or --token <value>)"],
|
|
571
573
|
["login <address> --read", "sign in to look only"],
|
|
@@ -1161,6 +1163,15 @@ Then:
|
|
|
1161
1163
|
const plan = rest[0] && !rest[0].startsWith("--") ? rest[0] : undefined;
|
|
1162
1164
|
const flag = (name) => { const i = rest.indexOf(`--${name}`); return i >= 0 ? rest[i + 1] : undefined; };
|
|
1163
1165
|
const on = flag("on"), topic = flag("topic") ?? (/^topic=(.+)$/i.exec(on ?? "") ?? [])[1];
|
|
1166
|
+
if (rest.includes("--day")) {
|
|
1167
|
+
// A whole day, as things are and with the plan: the price first; --yes starts it (it is charged as tests).
|
|
1168
|
+
const day = flag("day") && !flag("day").startsWith("--") ? flag("day") : "yesterday";
|
|
1169
|
+
const yes = rest.includes("--yes");
|
|
1170
|
+
started = await tool("replay_day", { ...(plan ? { plan } : {}), day, ...(yes ? { confirm: true } : {}) });
|
|
1171
|
+
if (started.isError) stop(started.text);
|
|
1172
|
+
if (!yes) { say(`${started.text.replace(/ Call again with confirm: true to start it\.$/, "")}\nRun it again with --yes to start it.`); break; }
|
|
1173
|
+
started = { ...started, data: { jobs: [{ job: started.data.job, agent: `plan ${plan ?? "(latest)"} on ${started.data.day}` }] } };
|
|
1174
|
+
} else
|
|
1164
1175
|
started = await tool("rehearse", { ...(plan ? { plan } : {}), ...(/^\d+$/.test(on ?? "") ? { conversations: Number(on) } : {}), ...(topic ? { topic } : {}) });
|
|
1165
1176
|
if (!started.isError && started.data?.job) started = { ...started, data: { jobs: [{ job: started.data.job, agent: `plan ${plan ?? "(latest)"}` }] } };
|
|
1166
1177
|
if (!started.isError) say(started.text);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@droconnell/agent-inbox-cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "The Next CLI, built for agents: JSON on every command, an MCP server for any AI tool, live events, apps and webhooks from the terminal, and a support workspace's setup as files in git.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|