Skip to content

abso-core

Public

abso is version control for agents: the client, the engine and a server you can run on your own Cloudflare account.

Check passed
MCP
show on this site's /mcp
CLI
abso show 72 --json
JSON
/christopher/abso-core/versions/72?format=json

Asks become threads: abso reply <ask> "..." adds to an ask from either side, open or answered, and --question hands the turn to the asker until they reply. abso ask <N> shows one ask with its whole thread and whose turn it is; abso waiting --asked lists the asks you sent. An ack's note is the thread's first reply. reply is an MCP tool too. Needs an Issues server with the reply, ask and asked routes.

of shared·pinch··Not checked

Version 71 · Files at version 72

6 files, 258 lines added, 15 removed.

--- a/client/src/api.ts
+++ b/client/src/api.ts
@@ -450,6 +450,16 @@
450450 return this.#issues("GET", `/issue/${id}`);
451451 }
452452
453+ /** The asks this agent sent: the open ones, then the latest answered, each with its thread. */
454+ asked(): Promise<{ asks: readonly (Ask & { title: string | null })[] }> {
455+ return this.#issues("GET", this.agentPath("asked"));
456+ }
458+ /** One ask, open or closed, with its thread and who it waits on. */
459+ askThread(id: number): Promise<{ ask: Ask & { title: string | null } }> {
460+ return this.#issues("GET", `/ask/${id}`);
461+ }
453463 /** Open asks of someone (an agent, or person:<id>), soonest due first; every open ask without `of`. */
454464 waiting(of?: string): Promise<{ asks: readonly (Ask & { title: string | null })[] }> {
455465 return this.#issues("GET", `/waiting?${query({ of })}`);
@@ -630,6 +640,11 @@
630640 return this.#issues("POST", this.agentPath(`ack/${id}`), body);
631641 }
632642
643+ /** Adds to an ask's thread, as its asker or the one asked; the other side hears it, and the ask stays as it is. */
644+ reply(id: number, body: { text: string; question?: boolean }): Promise<{ ask: Ask; news?: IssueNews }> {
645+ return this.#issues("POST", this.agentPath(`reply/${id}`), body);
646+ }
633648 /** Takes back an ask this agent made, with a note on why; the one asked hears it. */
634649 withdraw(id: number, body: { note?: string }): Promise<{ ask: Ask; news?: IssueNews }> {
635650 return this.#issues("POST", this.agentPath(`withdraw/${id}`), body);
--- a/client/src/issues-wire.ts
+++ b/client/src/issues-wire.ts
@@ -85,8 +85,22 @@
8585 outcome?: "withdrawn";
8686 /** When the one asked acknowledged it without answering yet, with their note; it stays open. Absent until then. */
8787 ack?: { at: number; note: string };
88+ /** Its thread: what the asker and the one asked said on it, oldest first. The answer closes it and isn't one of these. Absent from older servers. */
89+ replies?: AskReply[];
90+ /** Who it waits on now: the one asked, or the asker while the newest reply is a question from the one asked. Null once it's closed. Absent from older servers. */
91+ waitingOn?: string | null;
8892}
8993
94+/** One reply on an ask, from the asker or the one asked. Neither opens nor closes it. */
95+export interface AskReply {
96+ id: number;
97+ by: string;
98+ text: string;
99+ at: number;
100+ /** A question back from the one asked: the ask waits on the asker until they reply. */
101+ question?: true;
102+}
90104export interface Claim {
91105 agent: string;
92106 change: number;
--- a/client/src/issues.ts
+++ b/client/src/issues.ts
@@ -27,6 +27,7 @@
2727import { fromEnv } from "./env-names.ts";
2828import { ignoredHere } from "./fetch.ts";
2929import { loadIgnore, relativeTo } from "./folder.ts";
30+import type { AskReply } from "./issues-wire.ts";
3031import { queuedLines, standing } from "./queue.ts";
3132import { seenText, shortWhen } from "./times.ts";
3233
@@ -70,16 +71,35 @@
7071 return ` ${String(i.id).padStart(3)} ${i.status.padEnd(11)} ${q(i.title)}${detail.length > 0 ? ` (${detail.join("; ")})` : ""}`;
7172}
7273
73−function askLine(a: Ask & { title?: string | null }, api?: Pick<Api, "attachmentUrl">): string {
74+/** The first line of a reply, for lists; abso ask <N> shows it whole. */
75+const firstLine = (text: string): string => {
76+ const line = text.split("\n")[0]!;
77+ return line.length < text.length ? `${line} ...` : line;
78+};
80+/** One reply in an ask's thread. */
81+function replyLine(r: AskReply, indent: string, whole: boolean): string {
82+ return `${indent}${r.by}, ${shortWhen(r.at)}${r.question ? ", a question" : ""}: ${q(whole ? r.text : firstLine(r.text))}`;
83+}
85+/**
86+ * An ask: its head line, its files and options, then, in a list, its newest reply, or with `thread`, every
87+ * reply, oldest first; then its answer. Older servers send no thread, only the one asked's acknowledgement.
88+ */
89+function askLine(a: Ask & { title?: string | null }, api?: Pick<Api, "attachmentUrl">, thread = false): string {
7490 const what = a.review ? "a review" : a.kind === "task" ? "a task" : "a question";
7591 const where = a.issue === null ? "" : ` on issue ${a.issue}${a.title ? ` (${q(a.title)})` : ""}`;
92+ const replies = a.replies;
7693 const extra = [
7794 // Who answered, and when, on the ask's own line, so a handled ask can't pass for an open one.
7895 a.answer
7996 ? `${a.outcome === "withdrawn" ? "withdrawn" : "answered"} by ${a.answer.by}, ${shortWhen(a.answer.at)}`
8097 : "",
81− !a.answer && a.ack ? `acknowledged ${shortWhen(a.ack.at)}, not answered yet` : "",
98+ !a.answer && a.ack && replies === undefined ? `acknowledged ${shortWhen(a.ack.at)}, not answered yet` : "",
8299 !a.answer && !a.ack && a.seen !== undefined ? seenText(a.seen) : "",
100+ replies && replies.length > 0 ? (replies.length === 1 ? "1 reply" : `${replies.length} replies`) : "",
101+ // Whose turn it is, when it isn't the one asked's: they asked something back.
102+ !a.answer && a.waitingOn && a.waitingOn !== a.of ? `waiting on ${a.waitingOn}` : "",
83103 a.due ? `due ${a.due}` : "",
84104 a.blocks.length > 0 ? `blocks ${a.blocks.join(", ")}` : "",
85105 ].filter((x) => x !== "");
@@ -87,7 +107,10 @@
87107 const lines = [head, ...attachmentLines(api, a.attachments, " ")];
88108 if (a.options.length > 0) lines.push(` options: ${a.options.map((o, i) => `${i + 1}. ${q(o)}`).join(", ")}`);
89109 if (a.recommendation) lines.push(` ${a.recommendation.by} recommends: ${q(a.recommendation.text)}`);
90− if (!a.answer && a.ack && a.ack.note !== "") lines.push(` ${a.of} acknowledged: ${q(a.ack.note)}`);
110+ if (replies === undefined) {
111+ if (!a.answer && a.ack && a.ack.note !== "") lines.push(` ${a.of} acknowledged: ${q(a.ack.note)}`);
112+ } else if (thread) lines.push(...replies.map((r) => replyLine(r, " ", true)));
113+ else if (replies.length > 0) lines.push(replyLine(replies[replies.length - 1]!, " last: ", false));
91114 if (a.answer && a.outcome === "withdrawn") {
92115 if (a.answer.words !== "") lines.push(` why: ${q(a.answer.words)}`);
93116 } else if (a.answer)
@@ -624,6 +647,7 @@
624647 if (str(args, "note") !== undefined)
625648 throw new UsageError('--note goes with --withdraw: abso ask --withdraw <ask> --note "why"');
626649 const [of, ...words] = args.positionals;
650+ if (of !== undefined && words.length === 0 && /^\d+$/.test(of)) return showAsk(args, env, of);
627651 if (of === undefined || words.length === 0)
628652 throw new UsageError(
629653 'abso ask <who> "<question>" [--issue <N>] [--review | --task] [--due <YYYY-MM-DD>] [--blocks <N,N>] [--options "A|B|C"]; who is an agent, or person:<id>',
@@ -659,6 +683,49 @@
659683 };
660684}
661685
686+/** abso ask <N>: one ask, open or closed, with its whole thread, its answer and whose turn it is. */
687+async function showAsk(args: Parsed, env: Env, word: string): Promise<Output> {
688+ const others = ["issue", "due", "blocks", "options", "attach"].filter((f) => str(args, f) !== undefined);
689+ if (others.length > 0 || bool(args, "review") || bool(args, "task"))
690+ throw new UsageError('abso ask <N> shows ask N; to ask, say who and what: abso ask <who> "<question>"');
691+ const id = issueNumber(word, "the ask number");
692+ const { api, config } = openIssues(env);
693+ const { ask } = await api.askThread(id);
694+ const side = ask.of === config.agent || ask.by === config.agent;
695+ const turn = ask.waitingOn === config.agent ? "you" : ask.waitingOn;
696+ const steps = !side
697+ ? ""
698+ : ask.answer
699+ ? `abso reply ${id} "..." still adds to it.`
700+ : ask.of === config.agent
701+ ? `abso reply ${id} "..." adds to it; abso answer ${id} "..." answers and closes it.`
702+ : `abso reply ${id} "..." adds to it.`;
703+ const next = [!ask.answer && turn ? `It waits on ${turn}.` : "", steps].join(" ");
704+ return {
705+ text: [askLine(ask, api, true), next.trim()].filter((l) => l !== "").join("\n"),
706+ json: { ask },
707+ };
708+}
710+/** abso reply <ask> "<words>" [--question]: add to an ask's thread, as its asker or the one asked. */
711+export async function runReply(args: Parsed, env: Env): Promise<Output> {
712+ const [first, ...words] = args.positionals;
713+ const id = issueNumber(first, "the ask number");
714+ if (words.length === 0)
715+ throw new UsageError(
716+ `abso reply <ask> "<words>" [--question]: adds to an ask's thread, as its asker or the one asked`,
717+ );
718+ const { api, config } = openIssues(env);
719+ const question = bool(args, "question");
720+ const r = await api.reply(id, { text: words.join(" "), ...(question ? { question: true } : {}) });
721+ const other = r.ask.by === config.agent ? r.ask.of : r.ask.by;
722+ const turn =
723+ !r.ask.answer && r.ask.waitingOn
724+ ? ` It waits on ${r.ask.waitingOn === config.agent ? "you" : r.ask.waitingOn}.`
725+ : "";
726+ return { text: `Replied on ask ${id}. ${other} hears it.${turn}`, json: { ask: r.ask } };
727+}
662729/** abso ask --withdraw <ask> [--note "why"]: the asker takes an ask back. It closes like an answer, and the one asked hears it. */
663730async function withdrawAsk(args: Parsed, env: Env, word: string): Promise<Output> {
664731 const others = ["issue", "due", "blocks", "options", "attach"].filter((f) => str(args, f) !== undefined);
@@ -708,7 +775,8 @@
708775
709776export async function runWaiting(args: Parsed, env: Env): Promise<Output> {
710777 if (args.positionals.length > 0)
711− throw new UsageError("waiting takes no words: abso waiting [--of <agent or person:id>] [--mine]");
778+ throw new UsageError("waiting takes no words: abso waiting [--of <agent or person:id>] [--mine] [--asked]");
779+ if (bool(args, "asked")) return askedOf(args, env);
712780 const { api, config } = openIssues(env);
713781 const mine = bool(args, "mine") || str(args, "of") === config.agent;
714782 const of = mine ? config.agent : str(args, "of");
@@ -728,7 +796,7 @@
728796 : [
729797 `${plural(asks.length, "open ask")}${of ? ` of ${of}` : ""}, soonest due first:`,
730798 ...asks.map((a) => askLine(a, api)),
731− 'abso answer <ask> "..." answers one asked of you.',
799+ 'abso ask <N> shows one with its thread; abso reply <N> "..." adds to it; abso answer <N> "..." answers one asked of you.',
732800 ]),
733801 ].join("\n"),
734802 json: {
@@ -740,6 +808,35 @@
740808 };
741809}
742810
811+/** abso waiting --asked: the asks you sent, open ones first, then the latest answered, each with its newest reply. */
812+async function askedOf(args: Parsed, env: Env): Promise<Output> {
813+ if (bool(args, "mine") || str(args, "of") !== undefined)
814+ throw new UsageError("--asked lists the asks you sent; it takes no --mine or --of");
815+ const { api, config } = openIssues(env);
816+ const { asks } = await api.asked();
817+ const open = asks.filter((a) => !a.answer);
818+ const closed = asks.filter((a) => a.answer);
819+ return {
820+ text: [
821+ ...(asks.length === 0
822+ ? [`${config.agent} hasn't asked anything yet.`]
823+ : [
824+ ...(open.length > 0
825+ ? [`${plural(open.length, "open ask")} you sent:`, ...open.map((a) => askLine(a, api))]
826+ : []),
827+ ...(closed.length > 0
828+ ? [
829+ `${closed.length === 1 ? "The latest answered" : `The latest ${closed.length} answered`}:`,
830+ ...closed.map((a) => askLine(a, api)),
831+ ]
832+ : []),
833+ "abso ask <N> shows one with its whole thread.",
834+ ]),
835+ ].join("\n"),
836+ json: { asks },
837+ };
838+}
743840/** abso ack <ask> ["note"]: tell the asker you have it, and answer later. The ask stays open until abso answer. */
744841export async function runAck(args: Parsed, env: Env): Promise<Output> {
745842 const [first, ...words] = args.positionals;
@@ -748,7 +845,7 @@
748845 const note = words.join(" ");
749846 const r = await api.ack(id, note !== "" ? { note } : {});
750847 return {
751− text: `Acknowledged ask ${id}. ${r.ask.by} hears it; the ask stays open until abso answer ${id} "...".`,
848+ text: `Acknowledged ask ${id}. ${r.ask.by} hears it; abso reply ${id} "..." adds more as you go, and the ask stays open until abso answer ${id} "...".`,
752849 json: { ask: r.ask },
753850 };
754851}
--- a/client/src/main.ts
+++ b/client/src/main.ts
@@ -41,7 +41,7 @@
4141import { runDraftSync, runLand, runSwitch } from "./drafts.ts";
4242import { runExport } from "./export.ts";
4343import { runBlame, runWhere, runWho, runWhy } from "./history.ts";
44−import { runAck, runAnswer, runAsk, runIssue, runIssues, runSearch, runWaiting } from "./issues.ts";
44+import { runAck, runAnswer, runAsk, runIssue, runIssues, runReply, runSearch, runWaiting } from "./issues.ts";
4545import { adminToken, issuedPublic, keyList, keyListText, keyNew, keyRevoke } from "./key-admin.ts";
4646import { browserSkip, openInBrowser } from "./open-browser.ts";
4747import { initInOrg, runOrg, runOrgs } from "./orgs.ts";
@@ -445,9 +445,9 @@
445445 attach: "string",
446446 },
447447 usage:
448− 'abso ask <who> "<question>" [--issue <N>] [--review | --task] [--due <YYYY-MM-DD>] [--blocks <N,N>] [--options "A|B|C"] [--attach <file,file>] | abso ask --withdraw <ask> [--note "why"]',
448+ 'abso ask <who> "<question>" [--issue <N>] [--review | --task] [--due <YYYY-MM-DD>] [--blocks <N,N>] [--options "A|B|C"] [--attach <file,file>] | abso ask <N> | abso ask --withdraw <ask> [--note "why"]',
449449 about:
450− "Ask an agent, or a person (person:<id>), something; they hear it. On an issue, it holds the issue at Blocked (In review for --review) until answered. --task asks for something done instead of an answer; --options gives the choices; --blocks names the issues waiting on it. --attach sends files with the question, as on an issue. --withdraw takes back an ask you made that no longer needs an answer: it leaves their waiting list, stops holding the issue, keeps your --note as why, and they hear it.",
450+ "Ask an agent, or a person (person:<id>), something; they hear it. Who must be one of the project's agents or members; a name that isn't is refused, with the closest one suggested. abso ask <N> shows ask N, open or closed, with its whole thread, its answer and whose turn it is. On an issue, it holds the issue at Blocked (In review for --review) until answered. --task asks for something done instead of an answer; --options gives the choices; --blocks names the issues waiting on it. --attach sends files with the question, as on an issue. --withdraw takes back an ask you made that no longer needs an answer: it leaves their waiting list, stops holding the issue, keeps your --note as why, and they hear it.",
451451 run: runAsk,
452452 },
453453 search: {
@@ -458,10 +458,10 @@
458458 run: runSearch,
459459 },
460460 waiting: {
461− flags: { of: "string", mine: "boolean" },
462− usage: "abso waiting [--of <agent or person:id>] [--mine]",
461+ flags: { of: "string", mine: "boolean", asked: "boolean" },
462+ usage: "abso waiting [--of <agent or person:id>] [--mine] [--asked]",
463463 about:
464− "The open asks, soonest due first: every one, those of someone (--of), or those of you (--mine). --mine also lists your publishes still in the merge queue and where each stands; the outcome comes as news.",
464+ "The open asks, soonest due first: every one, those waiting on someone (--of), or those waiting on you (--mine), each with its newest reply. An ask waits on the one asked until they answer, or on the asker after a reply with --question, until the asker replies. --mine also lists your publishes still in the merge queue and where each stands; the outcome comes as news. --asked lists the asks you sent instead, open ones first, then the latest answered.",
465465 run: runWaiting,
466466 },
467467 answer: {
@@ -476,9 +476,16 @@
476476 flags: {},
477477 usage: 'abso ack <ask> ["<note>"]',
478478 about:
479− "Acknowledge an ask of you without answering it yet: the asker hears it, with your note, and the ask stays open, shown as acknowledged. abso answer closes it later.",
479+ "Acknowledge an ask of you without answering it yet: it's the first reply in its thread. The asker hears it, with your note, and the ask stays open. abso reply adds more; abso answer closes it later.",
480480 run: runAck,
481481 },
482+ reply: {
483+ flags: { question: "boolean" },
484+ usage: 'abso reply <ask> "<words>" [--question]',
485+ about:
486+ 'Add to an ask\'s thread, as its asker or the one asked, open or closed: "ok, let me check", what you found, a follow-up. The other side hears it, and the ask stays as it is; abso answer still closes it. --question, from the one asked, asks the asker something back: the ask waits on them until they reply. On a public project, anyone can read the thread.',
487+ run: runReply,
488+ },
482489 unqueue: {
483490 flags: {},
484491 usage: "abso unqueue",
--- a/client/src/mcp.ts
+++ b/client/src/mcp.ts
@@ -53,6 +53,7 @@
5353 "waiting",
5454 "answer",
5555 "ack",
56+ "reply",
5657 "orgs",
5758 "org",
5859] as const;
--- a/client/test/issues.test.ts
+++ b/client/test/issues.test.ts
@@ -29,6 +29,32 @@
2929const seen: string[] = [];
3030/** The bodies of the copy requests it took. */
3131const copies: Record<string, unknown>[] = [];
32+/** The bodies of the replies it took. */
33+const replies: { text: string; question?: boolean }[] = [];
34+/** An open ask of fay's from desk with a thread: fay's ack, then a question back, so it waits on desk. */
35+const threaded = {
36+ id: 7,
37+ issue: 3,
38+ title: "Sync is slow",
39+ by: "desk",
40+ of: "fay",
41+ kind: "question",
42+ question: "Which way?",
43+ review: false,
44+ due: null,
45+ recommendation: null,
46+ options: [],
47+ blocks: [],
48+ at: 0,
49+ answer: null,
50+ seen: 0,
51+ ack: { at: 0, note: "ok, let me check" },
52+ replies: [
53+ { id: 1, by: "fay", text: "ok, let me check", at: 0 },
54+ { id: 2, by: "fay", text: "staging or live?\nlive is 906", at: 0, question: true },
55+ ],
56+ waitingOn: "desk",
57+};
3258const dirs: string[] = [];
3359
3460before(async () => {
@@ -71,6 +97,36 @@
7197 return send(200, {
7298 ask: { id: Number(ack[2]), by: "desk", of: ack[1], answer: null, ack: { at: Date.now(), note: "" } },
7399 });
100+ // A reply answers with the ask; from the one asked, a question makes it wait on the asker.
101+ const reply = /\/a\/([^/]+)\/reply\/(\d+)$/.exec(req.url ?? "");
102+ if (req.method === "POST" && reply) {
103+ let raw = "";
104+ req.on("data", (c: Buffer) => (raw += c.toString("utf8")));
105+ req.on("end", () => {
106+ const body = JSON.parse(raw) as { text: string; question?: boolean };
107+ replies.push(body);
108+ send(200, {
109+ ask: {
110+ id: Number(reply[2]),
111+ by: "desk",
112+ of: reply[1],
113+ answer: null,
114+ waitingOn: body.question ? "desk" : reply[1],
115+ },
116+ });
117+ });
118+ return;
119+ }
120+ // One ask with its thread, and the asks an agent sent.
121+ const one = /\/ask\/(\d+)$/.exec(req.url ?? "");
122+ if (req.method === "GET" && one) return send(200, { ask: { ...threaded, id: Number(one[1]) } });
123+ if (req.method === "GET" && /\/a\/[^/]+\/asked$/.test(req.url ?? ""))
124+ return send(200, {
125+ asks: [
126+ threaded,
127+ { ...threaded, id: 8, replies: [], answer: { by: "fay", words: "yes", at: 0 }, waitingOn: null },
128+ ],
129+ });
74130 send(500, { error: "a stand-in" });
75131 });
76132 await new Promise<void>((ok) => issues.listen(0, "127.0.0.1", ok));
@@ -146,7 +202,8 @@
146202
147203 it("are MCP tools", () => {
148204 const names = mcpTools().map((t) => t.name);
149− for (const n of ["issues", "issue", "search", "ask", "waiting", "answer"]) assert.ok(names.includes(n), n);
205+ for (const n of ["issues", "issue", "search", "ask", "waiting", "answer", "ack", "reply"])
206+ assert.ok(names.includes(n), n);
150207 assert.deepEqual(argvFor("ask", { args: ["alice", "Which login?"], issue: "3", review: true }), [
151208 "ask",
152209 "--issue=3",
@@ -210,13 +267,65 @@
210267 const before = seen.length;
211268 const r = await main(["ack", "7", "on it after the deploy"], { cwd: fay, env: ENV(), write: () => {} });
212269 assert.equal(r.exit, 0, r.stdout + r.stderr);
213− assert.equal(r.stdout, 'Acknowledged ask 7. desk hears it; the ask stays open until abso answer 7 "...".\n');
270+ assert.equal(
271+ r.stdout,
272+ 'Acknowledged ask 7. desk hears it; abso reply 7 "..." adds more as you go, and the ask stays open until abso answer 7 "...".\n',
273+ );
214274 const posts = seen.slice(before).filter((s) => s.startsWith("POST"));
215275 assert.deepEqual(posts.length, 1, posts.join("\n"));
216276 assert.match(posts[0]!, /^POST \/p\/issues\d+\/a\/fay\/ack\/7$/);
217277 assert.equal((await main(["ack"], { cwd: fay, env: ENV(), write: () => {} })).exit, 1);
218278 });
219279
280+ it("reply is one POST to reply/<ask> with the words, and says whose turn it is", async () => {
281+ const fay = await folder("fay");
282+ const before = seen.length;
283+ const r = await main(["reply", "7", "staging or live?", "--question"], { cwd: fay, env: ENV(), write: () => {} });
284+ assert.equal(r.exit, 0, r.stdout + r.stderr);
285+ const posts = seen.slice(before).filter((s) => s.startsWith("POST"));
286+ assert.equal(posts.length, 1, posts.join("\n"));
287+ assert.match(posts[0]!, /^POST \/p\/issues\d+\/a\/fay\/reply\/7$/);
288+ assert.deepEqual(replies.at(-1), { text: "staging or live?", question: true });
289+ assert.equal(r.stdout, "Replied on ask 7. desk hears it. It waits on desk.\n");
290+ assert.equal((await main(["reply", "7"], { cwd: fay, env: ENV(), write: () => {} })).exit, 1);
291+ });
293+ it("ask <N> reads one ask with its whole thread, oldest first, and whose turn it is", async () => {
294+ const fay = await folder("fay");
295+ const before = seen.length;
296+ const r = await main(["ask", "7"], { cwd: fay, env: ENV(), write: () => {} });
297+ assert.equal(r.exit, 0, r.stdout + r.stderr);
298+ assert.match(seen.slice(before).join("\n"), /^GET \/p\/issues\d+\/ask\/7$/m);
299+ assert.match(
300+ r.stdout,
301+ /^ {2}ask 7: desk, .* asks fay a question on issue 3 \("Sync is slow"\) \(2 replies; waiting on desk\): "Which way\?"$/m,
302+ );
303+ const ack = r.stdout.indexOf(' fay, Jan 1 1970 00:00 UTC: "ok, let me check"');
304+ const back = r.stdout.indexOf(' fay, Jan 1 1970 00:00 UTC, a question: "staging or live?\\nlive is 906"');
305+ assert.ok(ack > 0 && back > ack, r.stdout);
306+ assert.match(
307+ r.stdout,
308+ /^It waits on desk\. abso reply 7 "\.\.\." adds to it; abso answer 7 "\.\.\." answers and closes it\.$/m,
309+ );
310+ // The asker reads it as their turn, and can't answer it.
311+ const desk = await folder("desk");
312+ const d = await main(["ask", "7"], { cwd: desk, env: ENV(), write: () => {} });
313+ assert.match(d.stdout, /^It waits on you\. abso reply 7 "\.\.\." adds to it\.$/m);
314+ });
316+ it("waiting --asked lists the asks you sent, open first, then the latest answered", async () => {
317+ const fay = await folder("fay");
318+ const before = seen.length;
319+ const r = await main(["waiting", "--asked"], { cwd: fay, env: ENV(), write: () => {} });
320+ assert.equal(r.exit, 0, r.stdout + r.stderr);
321+ assert.match(seen.slice(before).join("\n"), /^GET \/p\/issues\d+\/a\/fay\/asked$/m);
322+ assert.match(r.stdout, /^1 open ask you sent:$/m);
323+ assert.match(r.stdout, /^ {4}last: fay, .*, a question: "staging or live\? \.\.\."$/m);
324+ assert.ok(r.stdout.indexOf("ask 7:") < r.stdout.indexOf("The latest answered:"), r.stdout);
325+ assert.ok(r.stdout.indexOf("The latest answered:") < r.stdout.indexOf("ask 8:"), r.stdout);
326+ assert.match(r.stdout, /^ {4}answer: "yes"$/m);
327+ });
220329 it("an acknowledged ask reads as acknowledged, not answered, with the note under it", () => {
221330 const ask = {
222331 id: 7,