- MCP
- blame on this site's /mcp
- CLI
- abso blame client/src/issues.ts --version 17 --json
- JSON
- /christopher/abso-core/blame/client/src/issues.ts?version=17&format=json
518 linesFirst import 79% · pinch 12% · review 5% · infra-split 4%Last change review in version 17,
518 lines from 9 changes in 5 versions.
review16The client says abso, not avcs, in everything a person reads: the hints after an issue view and abso issue new, the help for issue, issues, ask, answer and waiting, the 'abso:' prefix on notices from run, publish --check, the queue and serve, the 'News from abso' header, the MCP server's name and the claude mcp add example, and the view mod's status line. Only printed words changed: file and folder names (avcs.json, .avcs/, ~/.avcs/token), environment variables and wire headers are as they were, and the tests were updated to the new words (704 pass, biome ci clean).Compare1// Issues (#54): abso issues, abso issue, abso ask, abso waiting and avcs
3// AVCS_ISSUES_SERVER), and takes the same token. Statuses come from the work: a start note naming
review16The client says abso, not avcs, in everything a person reads: the hints after an issue view and abso issue new, the help for issue, issues, ask, answer and waiting, the 'abso:' prefix on notices from run, publish --check, the queue and serve, the 'News from abso' header, the MCP server's name and the claude mcp add example, and the view mod's status line. Only printed words changed: file and folder names (avcs.json, .avcs/, ~/.avcs/token), environment variables and wire headers are as they were, and the tests were updated to the new words (704 pass, biome ci clean).Compare4// an issue (abso start --issue N) puts it In progress, an open ask Blocked or
6// are quoted as JSON, so none can print as another line (#30).
pinch5abso issue new and abso issue N --comment take --attach <file,file> (abso issue 171). Each file goes up to the Issues Worker first (POST /p/:project/a/:agent/attachments, the bytes as the body and the name URI-encoded in X-Avcs-Name), and the write carries the ids the uploads answered. Nothing is sent if a file is missing or over 10 MB. --attach anywhere else is refused. The issue's page lists each attachment under the issue or comment carrying it: id, name, size and its link. The wire types gain Attachment and attachments?. MCP's issue tool takes attach too, since its parameters come from the flags. The server side is abso 621 (off until Cloud binds the bucket). Tests: client/test/attach.test.ts, against a stand-in Issues server. Checked: biome ci, npm run check (698 pass).Compare8import { readFileSync, statSync } from "node:fs";
9import { basename, resolve } from "node:path";
10import type { Api, Ask, Attachment, Draft, DraftBody, IssuePage, IssueRow } from "./api.ts";
12import { type Env, type Output, open, plural } from "./commands.ts";
13import { type Config, readMachineServers, trustedServers } from "./config.ts";
14import { issuesServerFor, tokenGoesTo } from "./core.ts";
15import { seenText, shortWhen } from "./times.ts";
17const q = (s: string): string => JSON.stringify(s);
19/** The folder, with its Api pointed at the Issues Worker: the token goes only where tokenGoesTo allows, as for the avcs server. */
20function openIssues(env: Env): { config: Config; api: Api } {
21 const { config, api } = open(env);
22 const server = env.env.AVCS_ISSUES_SERVER || issuesServerFor(config.server, readMachineServers(env.env));
23 if (server === undefined)
24 throw new UsageError(
review17New folders keep their state in .abso/, and the machine's sign-in, servers and admin token are read from ~/.abso/ first, then ~/.avcs/. A folder made before, with only .avcs/, is untouched: it keeps working, is never half-moved, and no older client or mod loses it. stateDir(root) and homeFile/homeWritePath are in the new client/src/state-dir.ts and replace the old AVCS_DIR constant everywhere. abso login writes only to ~/.abso/ and leaves ~/.avcs/ alone; logout removes both copies. The edit mod and the view mod read either folder. .abso is skipped like .avcs (including its odd spellings), the git exclude names whichever folder is in use, and the messages name .abso. Not changed: avcs.json (the server reads that name, so abso.json needs the server to learn it first), .avcsignore, env var names and wire headers. Tests: 709 run, 708 pass (one is skipped), including new ones for the folder choice, the home-file order and box sign-in; biome ci has no errors.Compare25 `${config.server} has no Issues Worker beside it that abso knows; ~/.abso/servers.json or AVCS_ISSUES_SERVER names one`,
27 if (config.token !== undefined && !tokenGoesTo(server, trustedServers(env.env))) {
28 throw new UsageError(
review17New folders keep their state in .abso/, and the machine's sign-in, servers and admin token are read from ~/.abso/ first, then ~/.avcs/. A folder made before, with only .avcs/, is untouched: it keeps working, is never half-moved, and no older client or mod loses it. stateDir(root) and homeFile/homeWritePath are in the new client/src/state-dir.ts and replace the old AVCS_DIR constant everywhere. abso login writes only to ~/.abso/ and leaves ~/.avcs/ alone; logout removes both copies. The edit mod and the view mod read either folder. .abso is skipped like .avcs (including its odd spellings), the git exclude names whichever folder is in use, and the messages name .abso. Not changed: avcs.json (the server reads that name, so abso.json needs the server to learn it first), .avcsignore, env var names and wire headers. Tests: 709 run, 708 pass (one is skipped), including new ones for the folder choice, the home-file order and box sign-in; biome ci has no errors.Compare29 `the Issues Worker is ${server}, and abso sends your token only to its own servers and this machine. If ${server} is yours, name it in ~/.abso/servers.json or AVCS_TRUSTED_SERVERS.`,
31 }
32 api.issuesServer = server;
33 return { config, api };
34}
36function issueNumber(word: string | undefined, what = "an issue number"): number {
37 if (word === undefined || !/^#?\d+$/.test(word)) throw new UsageError(`${what} is a number, like 12`);
38 return Number(word.replace("#", ""));
39}
41/** One issue as a line. */
42export function issueLine(i: IssueRow): string {
43 const detail = [
44 i.agent !== null && !i.agents.includes(i.agent) ? `for ${i.agent}` : "",
45 i.agents.length > 0 ? i.agents.join(", ") : "",
46 i.blockedBy.length > 0 ? `blocked by ${i.blockedBy.join(", ")}` : "",
47 (i.labels ?? []).length > 0 ? `labels ${i.labels.join(", ")}` : "",
48 i.versions.length > 0 ? `${i.versions.length === 1 ? "version" : "versions"} ${i.versions.join(", ")}` : "",
49 i.waitingOn.length > 0 ? `waiting on ${i.waitingOn.join(", ")}` : "",
50 i.parent !== null ? `under ${i.parent}` : "",
51 i.children > 0 ? plural(i.children, "sub-issue") : "",
52 `updated ${shortWhen(i.updated)}`,
53 ].filter((d) => d !== "");
54 return ` ${String(i.id).padStart(3)} ${i.status.padEnd(11)} ${q(i.title)}${detail.length > 0 ? ` (${detail.join("; ")})` : ""}`;
55}
57function askLine(a: Ask & { title?: string | null }): string {
58 const what = a.review ? "a review" : a.kind === "task" ? "a task" : "a question";
59 const where = a.issue === null ? "" : ` on issue ${a.issue}${a.title ? ` (${q(a.title)})` : ""}`;
60 const extra = [
61 // Who answered, and when, on the ask's own line, so a handled ask can't pass for an open one.
infra-split14An asker can take back an ask: abso ask --withdraw <ask> [--note "why"]
An ask that later decisions have overtaken used to sit in the asked person's waiting list for good. Only they could answer it, and "none of these" wasn't an option. Now the one who asked can withdraw it.
- `abso ask --withdraw <ask> [--note "why"]` sends one call to the server's withdraw route. It's refused before any call when mixed with a question or the other ask flags. `--note-file` reads the note from a file or stdin, like every text flag.
- A withdrawn ask closes the way an answered one does: it leaves the waiting list, and it stops holding its issue at Blocked. The ask keeps its question. The asker's note is kept as why, and the one asked hears it.
- Ask gains `outcome?: "withdrawn"`. Older servers leave it out. The asks list and an issue's page show "withdrawn by <asker>" and the note, instead of "answered by".
- The server side of the route comes with the hosted Issues service. Until it's there, the call answers with that server's error.
Tests: the new usage mistakes, and the single POST to the asker's own route. Checked: npx biome ci . and npm run check exit 0 (704 pass, 1 skipped).Compare62 a.answer
63 ? `${a.outcome === "withdrawn" ? "withdrawn" : "answered"} by ${a.answer.by}, ${shortWhen(a.answer.at)}`
64 : "",
66 a.due ? `due ${a.due}` : "",
67 a.blocks.length > 0 ? `blocks ${a.blocks.join(", ")}` : "",
68 ].filter((x) => x !== "");
69 const head = ` ask ${a.id}: ${a.by}, ${shortWhen(a.at)}, asks ${a.of} ${what}${where}${extra.length > 0 ? ` (${extra.join("; ")})` : ""}: ${q(a.question)}`;
70 const lines = [head];
71 if (a.options.length > 0) lines.push(` options: ${a.options.map((o, i) => `${i + 1}. ${q(o)}`).join(", ")}`);
72 if (a.recommendation) lines.push(` ${a.recommendation.by} recommends: ${q(a.recommendation.text)}`);
infra-split14An asker can take back an ask: abso ask --withdraw <ask> [--note "why"]
An ask that later decisions have overtaken used to sit in the asked person's waiting list for good. Only they could answer it, and "none of these" wasn't an option. Now the one who asked can withdraw it.
- `abso ask --withdraw <ask> [--note "why"]` sends one call to the server's withdraw route. It's refused before any call when mixed with a question or the other ask flags. `--note-file` reads the note from a file or stdin, like every text flag.
- A withdrawn ask closes the way an answered one does: it leaves the waiting list, and it stops holding its issue at Blocked. The ask keeps its question. The asker's note is kept as why, and the one asked hears it.
- Ask gains `outcome?: "withdrawn"`. Older servers leave it out. The asks list and an issue's page show "withdrawn by <asker>" and the note, instead of "answered by".
- The server side of the route comes with the hosted Issues service. Until it's there, the call answers with that server's error.
Tests: the new usage mistakes, and the single POST to the asker's own route. Checked: npx biome ci . and npm run check exit 0 (704 pass, 1 skipped).Compare73 if (a.answer && a.outcome === "withdrawn") {
74 if (a.answer.words !== "") lines.push(` why: ${q(a.answer.words)}`);
75 } else if (a.answer) lines.push(` answer: ${q(a.answer.words)}`);
77}
79/** One edit in an issue's activity: what changed, and who was told. */
80function editLine(e: IssuePage["edits"][number]): string {
81 const c = e.changes;
82 const said = [
83 c.title ? `title ${q(String(c.title.from))} to ${q(String(c.title.to))}` : "",
84 c.description ? "the description" : "",
85 c.parent ? (c.parent.to === null ? "no parent" : `parent issue ${String(c.parent.to)}`) : "",
86 c.agent ? (c.agent.to === null ? "no Agent" : `Agent ${String(c.agent.to)}`) : "",
87 c.blockedBy
88 ? (c.blockedBy.to as number[]).length === 0
89 ? "blocked by nothing"
90 : `blocked by ${(c.blockedBy.to as number[]).join(", ")}`
91 : "",
92 c.labels
93 ? (c.labels.to as string[]).length === 0
94 ? "no labels"
95 : `labels ${(c.labels.to as string[]).join(", ")}`
96 : "",
97 ].filter((x) => x !== "");
98 return ` ${e.by}, ${shortWhen(e.at)}: ${said.join("; ")} (${e.notified.length > 0 ? `told ${e.notified.join(", ")}` : "told nobody"})`;
99}
101/** Labels as typed, lower-cased, since the Worker refuses upper case (Security): --label Friction means friction. */
102function labelList(value: string): string[] {
103 return listOf(value).map((l) => l.toLowerCase());
104}
106/** A comma-separated list of names or issue numbers; "none" is the empty list. */
107function listOf(value: string): string[] {
108 return value.trim() === "none"
109 ? []
110 : value
111 .split(",")
112 .map((v) => v.trim())
113 .filter((v) => v !== "");
114}
pinch5abso issue new and abso issue N --comment take --attach <file,file> (abso issue 171). Each file goes up to the Issues Worker first (POST /p/:project/a/:agent/attachments, the bytes as the body and the name URI-encoded in X-Avcs-Name), and the write carries the ids the uploads answered. Nothing is sent if a file is missing or over 10 MB. --attach anywhere else is refused. The issue's page lists each attachment under the issue or comment carrying it: id, name, size and its link. The wire types gain Attachment and attachments?. MCP's issue tool takes attach too, since its parameters come from the flags. The server side is abso 621 (off until Cloud binds the bucket). Tests: client/test/attach.test.ts, against a stand-in Issues server. Checked: biome ci, npm run check (698 pass).Compare116/** The most one attachment may be: the Issues Worker's cap, checked here before sending (abso issue 171). */
117const ATTACH_MAX = 10 * 1024 * 1024;
119/** Uploads each file --attach names (comma-separated), in order, and answers their ids. Nothing is sent if a file is missing or too big. */
120async function uploadAttachments(api: Api, cwd: string, value: string | undefined): Promise<string[]> {
121 if (value === undefined) return [];
122 const paths = listOf(value);
123 if (paths.length === 0) throw new UsageError("--attach names files, comma-separated: --attach shot.png,after.png");
124 const files = paths.map((p) => {
125 const full = resolve(cwd, p);
126 let size: number;
127 try {
128 size = statSync(full).size;
129 } catch {
130 throw new UsageError(`--attach ${p}: no such file`);
131 }
132 if (size > ATTACH_MAX)
133 throw new UsageError(`--attach ${p} is ${sizeText(size)}; one attachment is at most ${sizeText(ATTACH_MAX)}`);
134 return { full, name: basename(full) };
135 });
136 const ids: string[] = [];
137 for (const f of files) ids.push((await api.attachmentUpload(readFileSync(f.full), f.name)).id);
138 return ids;
139}
141function sizeText(n: number): string {
142 return n < 1024 ? `${n} B` : n < 1024 * 1024 ? `${Math.round(n / 1024)} KB` : `${(n / (1024 * 1024)).toFixed(1)} MB`;
143}
145/** Attachments as lines under what carries them: name, size and where it's served. */
146function attachmentLines(
147 api: Pick<Api, "attachmentUrl"> | undefined,
148 files: readonly Attachment[] | undefined,
149 indent: string,
150): string[] {
151 return (files ?? []).map(
152 (a) => `${indent}attached ${a.id}: ${q(a.name)}, ${sizeText(a.size)}${api ? `, ${api.attachmentUrl(a.id)}` : ""}`,
153 );
154}
pinch5abso issue new and abso issue N --comment take --attach <file,file> (abso issue 171). Each file goes up to the Issues Worker first (POST /p/:project/a/:agent/attachments, the bytes as the body and the name URI-encoded in X-Avcs-Name), and the write carries the ids the uploads answered. Nothing is sent if a file is missing or over 10 MB. --attach anywhere else is refused. The issue's page lists each attachment under the issue or comment carrying it: id, name, size and its link. The wire types gain Attachment and attachments?. MCP's issue tool takes attach too, since its parameters come from the flags. The server side is abso 621 (off until Cloud binds the bucket). Tests: client/test/attach.test.ts, against a stand-in Issues server. Checked: biome ci, npm run check (698 pass).Compare157export function issuePage(p: IssuePage, api?: Pick<Api, "attachmentUrl">): string[] {
159 const facts = [
160 i.parent !== null ? `Under issue ${i.parent}.` : "",
161 `Opened by ${i.opened.by}, ${shortWhen(i.opened.at)}.`,
162 i.agent !== null ? `Agent: ${i.agent}.` : "",
163 i.agents.length > 0 ? `Working on it: ${i.agents.join(", ")}.` : "",
164 i.blockedBy.length > 0 ? `Blocked by: issue${i.blockedBy.length === 1 ? "" : "s"} ${i.blockedBy.join(", ")}.` : "",
165 (i.labels ?? []).length > 0 ? `Labels: ${i.labels.join(", ")}.` : "",
166 i.versions.length > 0 ? `Versions: ${i.versions.join(", ")}.` : "",
167 i.waitingOn.length > 0 ? `Waiting on: ${i.waitingOn.join(", ")}.` : "",
168 i.closed
169 ? `${i.closed.how === "done" ? "Done" : "Dropped"} by ${i.closed.by}${i.closed.version !== null ? ` in version ${i.closed.version}` : ""}, ${shortWhen(i.closed.at)}.`
170 : "",
171 ].filter((f) => f !== "");
172 return [
173 `Issue ${i.id}: ${q(i.title)} [${i.status}]`,
174 facts.join(" "),
175 ...(i.lines ? [`From ${i.lines.file} lines ${i.lines.from}-${i.lines.to} at version ${i.lines.version}.`] : []),
176 ...(i.description !== "" ? ["", ...i.description.split("\n").map((l) => ` ${l}`)] : []),
pinch5abso issue new and abso issue N --comment take --attach <file,file> (abso issue 171). Each file goes up to the Issues Worker first (POST /p/:project/a/:agent/attachments, the bytes as the body and the name URI-encoded in X-Avcs-Name), and the write carries the ids the uploads answered. Nothing is sent if a file is missing or over 10 MB. --attach anywhere else is refused. The issue's page lists each attachment under the issue or comment carrying it: id, name, size and its link. The wire types gain Attachment and attachments?. MCP's issue tool takes attach too, since its parameters come from the flags. The server side is abso 621 (off until Cloud binds the bucket). Tests: client/test/attach.test.ts, against a stand-in Issues server. Checked: biome ci, npm run check (698 pass).Compare177 ...attachmentLines(api, i.attachments, " "),
179 ...(p.comments.length > 0
180 ? [
181 "",
182 "Comments:",
pinch5abso issue new and abso issue N --comment take --attach <file,file> (abso issue 171). Each file goes up to the Issues Worker first (POST /p/:project/a/:agent/attachments, the bytes as the body and the name URI-encoded in X-Avcs-Name), and the write carries the ids the uploads answered. Nothing is sent if a file is missing or over 10 MB. --attach anywhere else is refused. The issue's page lists each attachment under the issue or comment carrying it: id, name, size and its link. The wire types gain Attachment and attachments?. MCP's issue tool takes attach too, since its parameters come from the flags. The server side is abso 621 (off until Cloud binds the bucket). Tests: client/test/attach.test.ts, against a stand-in Issues server. Checked: biome ci, npm run check (698 pass).Compare183 ...p.comments.flatMap((c) => [
184 ` ${c.by}${c.kind === "objection" ? " objects" : ""}, ${shortWhen(c.at)}: ${q(c.text)}`,
185 ...attachmentLines(api, c.attachments, " "),
186 ]),
188 : []),
189 ...((p.edits ?? []).length > 0 ? ["", "Edits:", ...p.edits.map(editLine)] : []),
190 ...(p.children.length > 0 ? ["", "Sub-issues:", ...p.children.map(issueLine)] : []),
191 ...((i.watchers ?? []).length > 0 ? ["", `Watchers: ${i.watchers.join(", ")}.`] : []),
192 "",
review16The client says abso, not avcs, in everything a person reads: the hints after an issue view and abso issue new, the help for issue, issues, ask, answer and waiting, the 'abso:' prefix on notices from run, publish --check, the queue and serve, the 'News from abso' header, the MCP server's name and the claude mcp add example, and the view mod's status line. Only printed words changed: file and folder names (avcs.json, .avcs/, ~/.avcs/token), environment variables and wire headers are as they were, and the tests were updated to the new words (704 pass, biome ci clean).Compare193 `abso start "..." --issue ${i.id} starts on it; abso issue ${i.id} --comment "..." comments; abso ask <who> "..." --issue ${i.id} asks.`,
195}
197export async function runIssues(args: Parsed, env: Env): Promise<Output> {
198 if (args.positionals.length > 0)
199 throw new UsageError(
review16The client says abso, not avcs, in everything a person reads: the hints after an issue view and abso issue new, the help for issue, issues, ask, answer and waiting, the 'abso:' prefix on notices from run, publish --check, the queue and serve, the 'News from abso' header, the MCP server's name and the claude mcp add example, and the view mod's status line. Only printed words changed: file and folder names (avcs.json, .avcs/, ~/.avcs/token), environment variables and wire headers are as they were, and the tests were updated to the new words (704 pass, biome ci clean).Compare200 "issues takes no words: abso issues [--open] [--status <s>] [--agent <a>] [--parent <N>] [--label <l,l>] | abso issues --labels; abso issue <N> shows one",
202 const { api } = openIssues(env);
203 if (bool(args, "drafts")) {
204 const { drafts } = await api.drafts();
205 return {
206 text:
207 drafts.length === 0
review16The client says abso, not avcs, in everything a person reads: the hints after an issue view and abso issue new, the help for issue, issues, ask, answer and waiting, the 'abso:' prefix on notices from run, publish --check, the queue and serve, the 'News from abso' header, the MCP server's name and the claude mcp add example, and the view mod's status line. Only printed words changed: file and folder names (avcs.json, .avcs/, ~/.avcs/token), environment variables and wire headers are as they were, and the tests were updated to the new words (704 pass, biome ci clean).Compare208 ? 'No drafts. abso issue draft "<title>" saves one: only you see it, and nobody hears of it.'
210 `${plural(drafts.length, "draft")}, newest first (only you see them):`,
211 ...drafts.map(draftLine),
review16The client says abso, not avcs, in everything a person reads: the hints after an issue view and abso issue new, the help for issue, issues, ask, answer and waiting, the 'abso:' prefix on notices from run, publish --check, the queue and serve, the 'News from abso' header, the MCP server's name and the claude mcp add example, and the view mod's status line. Only printed words changed: file and folder names (avcs.json, .avcs/, ~/.avcs/token), environment variables and wire headers are as they were, and the tests were updated to the new words (704 pass, biome ci clean).Compare212 "abso issue draft <D> --open opens one as an issue; --delete deletes it.",
214 json: { drafts },
215 };
216 }
217 if (bool(args, "labels")) {
218 const { labels } = await api.issueLabels();
219 return {
220 text:
221 labels.length === 0
review16The client says abso, not avcs, in everything a person reads: the hints after an issue view and abso issue new, the help for issue, issues, ask, answer and waiting, the 'abso:' prefix on notices from run, publish --check, the queue and serve, the 'News from abso' header, the MCP server's name and the claude mcp add example, and the view mod's status line. Only printed words changed: file and folder names (avcs.json, .avcs/, ~/.avcs/token), environment variables and wire headers are as they were, and the tests were updated to the new words (704 pass, biome ci clean).Compare222 ? 'No labels yet. abso issue new "<title>" --label friction labels a new issue; abso issue <N> --label <l> labels one.'
224 `${plural(labels.length, "label")} in use:`,
225 ...labels.map((l) => ` ${l.label}: ${l.open} open of ${l.total}`),
review16The client says abso, not avcs, in everything a person reads: the hints after an issue view and abso issue new, the help for issue, issues, ask, answer and waiting, the 'abso:' prefix on notices from run, publish --check, the queue and serve, the 'News from abso' header, the MCP server's name and the claude mcp add example, and the view mod's status line. Only printed words changed: file and folder names (avcs.json, .avcs/, ~/.avcs/token), environment variables and wire headers are as they were, and the tests were updated to the new words (704 pass, biome ci clean).Compare226 "abso issues --label <label> lists a label's issues.",
228 json: { labels },
229 };
230 }
231 const parent = str(args, "parent");
232 const filter = {
233 ...(str(args, "status") ? { status: str(args, "status")! } : {}),
234 ...(str(args, "agent") ? { agent: str(args, "agent")! } : {}),
235 ...(parent !== undefined ? { parent: issueNumber(parent, "--parent") } : {}),
236 ...(str(args, "label") !== undefined ? { labels: labelList(str(args, "label")!) } : {}),
237 open: bool(args, "open"),
238 };
239 const { issues } = await api.issues(filter);
240 const scope = [
241 filter.open ? "open " : "",
242 filter.status ? `${filter.status} ` : "",
243 filter.labels ? `${filter.labels.join(", ")} ` : "",
244 ].join("");
245 return {
246 text:
247 issues.length === 0
review16The client says abso, not avcs, in everything a person reads: the hints after an issue view and abso issue new, the help for issue, issues, ask, answer and waiting, the 'abso:' prefix on notices from run, publish --check, the queue and serve, the 'News from abso' header, the MCP server's name and the claude mcp add example, and the view mod's status line. Only printed words changed: file and folder names (avcs.json, .avcs/, ~/.avcs/token), environment variables and wire headers are as they were, and the tests were updated to the new words (704 pass, biome ci clean).Compare248 ? `No ${scope}issues${filter.agent ? ` for ${filter.agent}` : ""}${parent !== undefined ? ` under ${parent}` : ""}. abso issue new "<title>" opens one.`
250 `${plural(issues.length, `${scope}issue`)}, most recently updated first:`,
251 ...issues.map(issueLine),
review16The client says abso, not avcs, in everything a person reads: the hints after an issue view and abso issue new, the help for issue, issues, ask, answer and waiting, the 'abso:' prefix on notices from run, publish --check, the queue and serve, the 'News from abso' header, the MCP server's name and the claude mcp add example, and the view mod's status line. Only printed words changed: file and folder names (avcs.json, .avcs/, ~/.avcs/token), environment variables and wire headers are as they were, and the tests were updated to the new words (704 pass, biome ci clean).Compare252 "abso issue <N> shows one.",
254 json: { issues },
255 };
256}
258/** A new issue's fields from the command line, as open and drafts take them; `title` only when words were given. */
259function openFields(args: Parsed, title: string): DraftBody {
260 const lines = str(args, "lines");
261 const at = lines === undefined ? undefined : /^(.+):(\d+)(?:-(\d+))?@(\d+)$/.exec(lines);
262 if (lines !== undefined && !at)
263 throw new UsageError("--lines is <file>:<from>-<to>@<version>, like src/a.ts:10-14@140");
264 const parent = str(args, "parent");
265 return {
266 ...(title !== "" ? { title } : {}),
267 ...(str(args, "description") ? { description: str(args, "description")! } : {}),
268 ...(parent !== undefined ? { parent: issueNumber(parent, "--parent") } : {}),
269 ...(at ? { lines: { file: at[1]!, from: Number(at[2]), to: Number(at[3] ?? at[2]), version: Number(at[4]) } } : {}),
270 ...(str(args, "agent") ? { agent: str(args, "agent")! } : {}),
271 ...(str(args, "blocked-by") !== undefined
272 ? { blockedBy: listOf(str(args, "blocked-by")!).map((b) => issueNumber(b, "--blocked-by")) }
273 : {}),
274 ...(str(args, "notify") !== undefined ? { notify: listOf(str(args, "notify")!) } : {}),
275 ...(str(args, "label") !== undefined ? { labels: labelList(str(args, "label")!) } : {}),
276 };
277}
279/** One draft as a line: its number, title, and what else it holds. */
280function draftLine(d: Draft): string {
281 const b = d.body;
282 const more = [
283 b.agent ? `for ${b.agent}` : "",
284 b.parent ? `under ${b.parent}` : "",
285 (b.labels ?? []).length > 0 ? `labels ${b.labels!.join(", ")}` : "",
286 b.description ? "a description" : "",
287 ].filter((m) => m !== "");
288 return ` draft ${d.id}: ${b.title ? q(b.title) : "(no title yet)"}${more.length > 0 ? ` (${more.join("; ")})` : ""}, saved ${shortWhen(d.saved)}`;
289}
291/**
292 * Drafts (abso issue 3): an issue not opened yet, this agent's alone, with no
293 * number and no news. `abso issue draft "<title>" [fields]` saves a new one;
294 * `abso issue draft <D> [fields]` changes one; --open opens it as an issue;
295 * --delete deletes it. `abso issues --drafts` lists them.
296 */
297async function runDraft(api: Api, args: Parsed, words: string[]): Promise<Output> {
298 const [d, ...more] = words;
299 if (d !== undefined && /^\d+$/.test(d) && more.length === 0) {
300 const id = Number(d);
301 if (bool(args, "delete") && bool(args, "open")) throw new UsageError("--open or --delete, not both");
302 if (bool(args, "delete")) {
303 await api.deleteDraft(id);
304 return { text: `Deleted draft ${id}.`, json: { draft: id, deleted: true } };
305 }
306 if (bool(args, "open")) {
307 const r = await api.openDraft(id, openFields(args, ""));
308 return {
review16The client says abso, not avcs, in everything a person reads: the hints after an issue view and abso issue new, the help for issue, issues, ask, answer and waiting, the 'abso:' prefix on notices from run, publish --check, the queue and serve, the 'News from abso' header, the MCP server's name and the claude mcp add example, and the view mod's status line. Only printed words changed: file and folder names (avcs.json, .avcs/, ~/.avcs/token), environment variables and wire headers are as they were, and the tests were updated to the new words (704 pass, biome ci clean).Compare309 text: `Opened draft ${id} as issue ${r.id}. abso start "..." --issue ${r.id} starts on it.`,
311 };
312 }
313 // Saving replaces the draft's body, so the fields given go over what it holds.
314 const found = (await api.drafts()).drafts.find((x) => x.id === id);
review16The client says abso, not avcs, in everything a person reads: the hints after an issue view and abso issue new, the help for issue, issues, ask, answer and waiting, the 'abso:' prefix on notices from run, publish --check, the queue and serve, the 'News from abso' header, the MCP server's name and the claude mcp add example, and the view mod's status line. Only printed words changed: file and folder names (avcs.json, .avcs/, ~/.avcs/token), environment variables and wire headers are as they were, and the tests were updated to the new words (704 pass, biome ci clean).Compare315 if (!found) throw new UsageError(`you have no draft ${id}; abso issues --drafts lists yours`);
317 return { text: `Saved draft ${id}.`, json: { draft: id } };
318 }
319 if (bool(args, "open") || bool(args, "delete"))
review16The client says abso, not avcs, in everything a person reads: the hints after an issue view and abso issue new, the help for issue, issues, ask, answer and waiting, the 'abso:' prefix on notices from run, publish --check, the queue and serve, the 'News from abso' header, the MCP server's name and the claude mcp add example, and the view mod's status line. Only printed words changed: file and folder names (avcs.json, .avcs/, ~/.avcs/token), environment variables and wire headers are as they were, and the tests were updated to the new words (704 pass, biome ci clean).Compare320 throw new UsageError("--open and --delete take a draft's number: abso issue draft <D> --open");
322 return {
review16The client says abso, not avcs, in everything a person reads: the hints after an issue view and abso issue new, the help for issue, issues, ask, answer and waiting, the 'abso:' prefix on notices from run, publish --check, the queue and serve, the 'News from abso' header, the MCP server's name and the claude mcp add example, and the view mod's status line. Only printed words changed: file and folder names (avcs.json, .avcs/, ~/.avcs/token), environment variables and wire headers are as they were, and the tests were updated to the new words (704 pass, biome ci clean).Compare323 text: `Saved draft ${r.id}. Only you see it, and nobody hears of it. abso issue draft ${r.id} --open opens it as an issue.`,
325 };
326}
328export async function runIssue(args: Parsed, env: Env): Promise<Output> {
329 const [first, ...rest] = args.positionals;
330 const { api } = openIssues(env);
331 if (first === "draft") return runDraft(api, args, rest);
332 if (first === "new") {
333 if (rest.length === 0)
334 throw new UsageError(
review16The client says abso, not avcs, in everything a person reads: the hints after an issue view and abso issue new, the help for issue, issues, ask, answer and waiting, the 'abso:' prefix on notices from run, publish --check, the queue and serve, the 'News from abso' header, the MCP server's name and the claude mcp add example, and the view mod's status line. Only printed words changed: file and folder names (avcs.json, .avcs/, ~/.avcs/token), environment variables and wire headers are as they were, and the tests were updated to the new words (704 pass, biome ci clean).Compare335 'abso issue new "<title>" [--description "..."] [--parent <N>] [--lines <file>:<from>-<to>@<version>] [--agent <agent>] [--blocked-by <N,N>] [--notify <who,who>] [--label <l,l>]',
pinch5abso issue new and abso issue N --comment take --attach <file,file> (abso issue 171). Each file goes up to the Issues Worker first (POST /p/:project/a/:agent/attachments, the bytes as the body and the name URI-encoded in X-Avcs-Name), and the write carries the ids the uploads answered. Nothing is sent if a file is missing or over 10 MB. --attach anywhere else is refused. The issue's page lists each attachment under the issue or comment carrying it: id, name, size and its link. The wire types gain Attachment and attachments?. MCP's issue tool takes attach too, since its parameters come from the flags. The server side is abso 621 (off until Cloud binds the bucket). Tests: client/test/attach.test.ts, against a stand-in Issues server. Checked: biome ci, npm run check (698 pass).Compare337 const fields = { ...openFields(args, rest.join(" ")), title: rest.join(" ") };
338 const attachments = await uploadAttachments(api, env.cwd, str(args, "attach"));
339 const r = await api.issueOpen({ ...fields, ...(attachments.length > 0 ? { attachments } : {}) });
340 return {
review16The client says abso, not avcs, in everything a person reads: the hints after an issue view and abso issue new, the help for issue, issues, ask, answer and waiting, the 'abso:' prefix on notices from run, publish --check, the queue and serve, the 'News from abso' header, the MCP server's name and the claude mcp add example, and the view mod's status line. Only printed words changed: file and folder names (avcs.json, .avcs/, ~/.avcs/token), environment variables and wire headers are as they were, and the tests were updated to the new words (704 pass, biome ci clean).Compare341 text: `Opened issue ${r.id}${attachments.length > 0 ? ` with ${plural(attachments.length, "attachment")} (${attachments.join(", ")})` : ""}. abso start "..." --issue ${r.id} starts on it.`,
pinch5abso issue new and abso issue N --comment take --attach <file,file> (abso issue 171). Each file goes up to the Issues Worker first (POST /p/:project/a/:agent/attachments, the bytes as the body and the name URI-encoded in X-Avcs-Name), and the write carries the ids the uploads answered. Nothing is sent if a file is missing or over 10 MB. --attach anywhere else is refused. The issue's page lists each attachment under the issue or comment carrying it: id, name, size and its link. The wire types gain Attachment and attachments?. MCP's issue tool takes attach too, since its parameters come from the flags. The server side is abso 621 (off until Cloud binds the bucket). Tests: client/test/attach.test.ts, against a stand-in Issues server. Checked: biome ci, npm run check (698 pass).Compare342 json: { id: r.id, ...(attachments.length > 0 ? { attachments } : {}) },
343 };
345 if (first === undefined || rest.length > 0)
346 throw new UsageError(
review16The client says abso, not avcs, in everything a person reads: the hints after an issue view and abso issue new, the help for issue, issues, ask, answer and waiting, the 'abso:' prefix on notices from run, publish --check, the queue and serve, the 'News from abso' header, the MCP server's name and the claude mcp add example, and the view mod's status line. Only printed words changed: file and folder names (avcs.json, .avcs/, ~/.avcs/token), environment variables and wire headers are as they were, and the tests were updated to the new words (704 pass, biome ci clean).Compare347 'abso issue <N> [--comment "..." | --object "..." | --drop | --reopen | --done [--done-by <version>] | an edit], or abso issue new "<title>"',
349 const id = issueNumber(first);
350 const comment = str(args, "comment");
351 const object = str(args, "object");
352 const doneBy = str(args, "done-by");
353 const markingDone = bool(args, "done") || doneBy !== undefined;
354 const edits = ["title", "description", "parent", "agent", "blocked-by", "label", "unlabel"].filter(
355 (f) => str(args, f) !== undefined,
356 );
357 if (
358 [
359 comment !== undefined,
360 object !== undefined,
361 bool(args, "drop"),
362 bool(args, "reopen"),
363 markingDone,
364 edits.length > 0,
365 ].filter(Boolean).length > 1
366 )
367 throw new UsageError("one of --comment, --object, --drop, --reopen, --done or an edit at a time");
368 if (edits.length > 0) {
369 const parent = str(args, "parent");
370 const agent = str(args, "agent");
371 const blockedBy = str(args, "blocked-by");
372 const r = await api.issueEdit(id, {
373 ...(str(args, "title") !== undefined ? { title: str(args, "title")! } : {}),
374 ...(str(args, "description") !== undefined ? { description: str(args, "description")! } : {}),
375 ...(parent !== undefined ? { parent: parent === "none" ? null : issueNumber(parent, "--parent") } : {}),
376 ...(agent !== undefined ? { agent: agent === "none" ? null : agent } : {}),
377 ...(blockedBy !== undefined ? { blockedBy: listOf(blockedBy).map((b) => issueNumber(b, "--blocked-by")) } : {}),
378 ...(bool(args, "quiet") ? { notify: false } : {}),
379 ...(str(args, "notify") !== undefined ? { also: listOf(str(args, "notify")!) } : {}),
380 ...(str(args, "label") !== undefined ? { addLabels: labelList(str(args, "label")!) } : {}),
381 ...(str(args, "unlabel") !== undefined ? { removeLabels: labelList(str(args, "unlabel")!) } : {}),
382 // A labels-only edit tells nobody unless --notify names people.
383 ...(edits.every((f) => f === "label" || f === "unlabel") && str(args, "notify") !== undefined
384 ? { notify: true }
385 : {}),
386 });
387 return {
388 text: `Edited issue ${id}. ${r.notified.length > 0 ? `Told ${r.notified.join(", ")}.` : "Told nobody."}`,
389 json: { issue: id, edit: r.edit, notified: r.notified },
390 };
391 }
392 if (bool(args, "quiet") || str(args, "notify") !== undefined)
393 throw new UsageError(
394 "--quiet and --notify go with an edit (--title, --description, --parent, --agent, --blocked-by, --label or --unlabel)",
395 );
pinch5abso issue new and abso issue N --comment take --attach <file,file> (abso issue 171). Each file goes up to the Issues Worker first (POST /p/:project/a/:agent/attachments, the bytes as the body and the name URI-encoded in X-Avcs-Name), and the write carries the ids the uploads answered. Nothing is sent if a file is missing or over 10 MB. --attach anywhere else is refused. The issue's page lists each attachment under the issue or comment carrying it: id, name, size and its link. The wire types gain Attachment and attachments?. MCP's issue tool takes attach too, since its parameters come from the flags. The server side is abso 621 (off until Cloud binds the bucket). Tests: client/test/attach.test.ts, against a stand-in Issues server. Checked: biome ci, npm run check (698 pass).Compare396 if (str(args, "attach") !== undefined && comment === undefined && object === undefined)
review16The client says abso, not avcs, in everything a person reads: the hints after an issue view and abso issue new, the help for issue, issues, ask, answer and waiting, the 'abso:' prefix on notices from run, publish --check, the queue and serve, the 'News from abso' header, the MCP server's name and the claude mcp add example, and the view mod's status line. Only printed words changed: file and folder names (avcs.json, .avcs/, ~/.avcs/token), environment variables and wire headers are as they were, and the tests were updated to the new words (704 pass, biome ci clean).Compare397 throw new UsageError("--attach goes with abso issue new or --comment (or --object)");
pinch5abso issue new and abso issue N --comment take --attach <file,file> (abso issue 171). Each file goes up to the Issues Worker first (POST /p/:project/a/:agent/attachments, the bytes as the body and the name URI-encoded in X-Avcs-Name), and the write carries the ids the uploads answered. Nothing is sent if a file is missing or over 10 MB. --attach anywhere else is refused. The issue's page lists each attachment under the issue or comment carrying it: id, name, size and its link. The wire types gain Attachment and attachments?. MCP's issue tool takes attach too, since its parameters come from the flags. The server side is abso 621 (off until Cloud binds the bucket). Tests: client/test/attach.test.ts, against a stand-in Issues server. Checked: biome ci, npm run check (698 pass).Compare399 const attachments = await uploadAttachments(api, env.cwd, str(args, "attach"));
400 const r = await api.issueComment(id, (comment ?? object)!, object !== undefined, attachments);
pinch5abso issue new and abso issue N --comment take --attach <file,file> (abso issue 171). Each file goes up to the Issues Worker first (POST /p/:project/a/:agent/attachments, the bytes as the body and the name URI-encoded in X-Avcs-Name), and the write carries the ids the uploads answered. Nothing is sent if a file is missing or over 10 MB. --attach anywhere else is refused. The issue's page lists each attachment under the issue or comment carrying it: id, name, size and its link. The wire types gain Attachment and attachments?. MCP's issue tool takes attach too, since its parameters come from the flags. The server side is abso 621 (off until Cloud binds the bucket). Tests: client/test/attach.test.ts, against a stand-in Issues server. Checked: biome ci, npm run check (698 pass).Compare402 text: `${object !== undefined ? "Objected" : "Commented"} on issue ${id}${attachments.length > 0 ? ` with ${plural(attachments.length, "attachment")} (${attachments.join(", ")})` : ""}. Its agents hear it.`,
403 json: { id: r.id, issue: id, ...(attachments.length > 0 ? { attachments } : {}) },
405 }
406 if (bool(args, "drop")) {
407 await api.issueDrop(id);
408 return { text: `Dropped issue ${id}.`, json: { issue: id, dropped: true } };
409 }
410 if (bool(args, "reopen")) {
411 await api.issueReopen(id);
412 return { text: `Reopened issue ${id}.`, json: { issue: id, reopened: true } };
413 }
414 if (markingDone) {
415 let version: number | null = null;
416 if (doneBy !== undefined) {
417 version = issueNumber(doneBy, "--done-by");
418 if (version < 1) throw new UsageError("--done-by is a published version, 1 or more");
419 try {
420 await api.show(version, { draft: null });
421 } catch {
422 throw new UsageError(`no version ${version}`);
423 }
424 }
425 await api.issueDone(id, version);
426 return {
427 text: version === null ? `Marked issue ${id} done.` : `Marked issue ${id} done in version ${version}.`,
428 json: { issue: id, done: true, ...(version !== null ? { version } : {}) },
429 };
430 }
431 const page = await api.issue(id);
pinch5abso issue new and abso issue N --comment take --attach <file,file> (abso issue 171). Each file goes up to the Issues Worker first (POST /p/:project/a/:agent/attachments, the bytes as the body and the name URI-encoded in X-Avcs-Name), and the write carries the ids the uploads answered. Nothing is sent if a file is missing or over 10 MB. --attach anywhere else is refused. The issue's page lists each attachment under the issue or comment carrying it: id, name, size and its link. The wire types gain Attachment and attachments?. MCP's issue tool takes attach too, since its parameters come from the flags. The server side is abso 621 (off until Cloud binds the bucket). Tests: client/test/attach.test.ts, against a stand-in Issues server. Checked: biome ci, npm run check (698 pass).Compare432 return { text: issuePage(page, api).join("\n"), json: { ...page } };
435export async function runAsk(args: Parsed, env: Env): Promise<Output> {
infra-split14An asker can take back an ask: abso ask --withdraw <ask> [--note "why"]
An ask that later decisions have overtaken used to sit in the asked person's waiting list for good. Only they could answer it, and "none of these" wasn't an option. Now the one who asked can withdraw it.
- `abso ask --withdraw <ask> [--note "why"]` sends one call to the server's withdraw route. It's refused before any call when mixed with a question or the other ask flags. `--note-file` reads the note from a file or stdin, like every text flag.
- A withdrawn ask closes the way an answered one does: it leaves the waiting list, and it stops holding its issue at Blocked. The ask keeps its question. The asker's note is kept as why, and the one asked hears it.
- Ask gains `outcome?: "withdrawn"`. Older servers leave it out. The asks list and an issue's page show "withdrawn by <asker>" and the note, instead of "answered by".
- The server side of the route comes with the hosted Issues service. Until it's there, the call answers with that server's error.
Tests: the new usage mistakes, and the single POST to the asker's own route. Checked: npx biome ci . and npm run check exit 0 (704 pass, 1 skipped).Compare436 const withdraw = str(args, "withdraw");
437 if (withdraw !== undefined) return withdrawAsk(args, env, withdraw);
438 if (str(args, "note") !== undefined)
review16The client says abso, not avcs, in everything a person reads: the hints after an issue view and abso issue new, the help for issue, issues, ask, answer and waiting, the 'abso:' prefix on notices from run, publish --check, the queue and serve, the 'News from abso' header, the MCP server's name and the claude mcp add example, and the view mod's status line. Only printed words changed: file and folder names (avcs.json, .avcs/, ~/.avcs/token), environment variables and wire headers are as they were, and the tests were updated to the new words (704 pass, biome ci clean).Compare439 throw new UsageError('--note goes with --withdraw: abso ask --withdraw <ask> --note "why"');
441 if (of === undefined || words.length === 0)
442 throw new UsageError(
review16The client says abso, not avcs, in everything a person reads: the hints after an issue view and abso issue new, the help for issue, issues, ask, answer and waiting, the 'abso:' prefix on notices from run, publish --check, the queue and serve, the 'News from abso' header, the MCP server's name and the claude mcp add example, and the view mod's status line. Only printed words changed: file and folder names (avcs.json, .avcs/, ~/.avcs/token), environment variables and wire headers are as they were, and the tests were updated to the new words (704 pass, biome ci clean).Compare443 '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>',
445 const { api } = openIssues(env);
446 if (bool(args, "review") && bool(args, "task")) throw new UsageError("an ask is a review or a task, not both");
447 const issue = str(args, "issue");
448 const blocks = str(args, "blocks");
449 const options = str(args, "options");
450 const r = await api.ask({
451 of,
452 question: words.join(" "),
453 ...(issue !== undefined ? { issue: issueNumber(issue, "--issue") } : {}),
454 ...(bool(args, "review") ? { review: true } : {}),
455 ...(bool(args, "task") ? { kind: "task" as const } : {}),
456 ...(str(args, "due") ? { due: str(args, "due")! } : {}),
457 ...(blocks !== undefined ? { blocks: blocks.split(",").map((b) => issueNumber(b.trim(), "--blocks")) } : {}),
458 ...(options !== undefined
459 ? {
460 options: options
461 .split("|")
462 .map((o) => o.trim())
463 .filter((o) => o !== ""),
464 }
465 : {}),
466 });
review16The client says abso, not avcs, in everything a person reads: the hints after an issue view and abso issue new, the help for issue, issues, ask, answer and waiting, the 'abso:' prefix on notices from run, publish --check, the queue and serve, the 'News from abso' header, the MCP server's name and the claude mcp add example, and the view mod's status line. Only printed words changed: file and folder names (avcs.json, .avcs/, ~/.avcs/token), environment variables and wire headers are as they were, and the tests were updated to the new words (704 pass, biome ci clean).Compare467 return { text: `Asked ${of} (ask ${r.id}). They hear it; abso waiting shows what's open.`, json: { id: r.id } };
review16The client says abso, not avcs, in everything a person reads: the hints after an issue view and abso issue new, the help for issue, issues, ask, answer and waiting, the 'abso:' prefix on notices from run, publish --check, the queue and serve, the 'News from abso' header, the MCP server's name and the claude mcp add example, and the view mod's status line. Only printed words changed: file and folder names (avcs.json, .avcs/, ~/.avcs/token), environment variables and wire headers are as they were, and the tests were updated to the new words (704 pass, biome ci clean).Compare470/** abso ask --withdraw <ask> [--note "why"]: the asker takes an ask back. It closes like an answer, and the one asked hears it. */
infra-split14An asker can take back an ask: abso ask --withdraw <ask> [--note "why"]
An ask that later decisions have overtaken used to sit in the asked person's waiting list for good. Only they could answer it, and "none of these" wasn't an option. Now the one who asked can withdraw it.
- `abso ask --withdraw <ask> [--note "why"]` sends one call to the server's withdraw route. It's refused before any call when mixed with a question or the other ask flags. `--note-file` reads the note from a file or stdin, like every text flag.
- A withdrawn ask closes the way an answered one does: it leaves the waiting list, and it stops holding its issue at Blocked. The ask keeps its question. The asker's note is kept as why, and the one asked hears it.
- Ask gains `outcome?: "withdrawn"`. Older servers leave it out. The asks list and an issue's page show "withdrawn by <asker>" and the note, instead of "answered by".
- The server side of the route comes with the hosted Issues service. Until it's there, the call answers with that server's error.
Tests: the new usage mistakes, and the single POST to the asker's own route. Checked: npx biome ci . and npm run check exit 0 (704 pass, 1 skipped).Compare471async function withdrawAsk(args: Parsed, env: Env, word: string): Promise<Output> {
472 const others = ["issue", "due", "blocks", "options"].filter((f) => str(args, f) !== undefined);
473 if (args.positionals.length > 0 || others.length > 0 || bool(args, "review") || bool(args, "task"))
review16The client says abso, not avcs, in everything a person reads: the hints after an issue view and abso issue new, the help for issue, issues, ask, answer and waiting, the 'abso:' prefix on notices from run, publish --check, the queue and serve, the 'News from abso' header, the MCP server's name and the claude mcp add example, and the view mod's status line. Only printed words changed: file and folder names (avcs.json, .avcs/, ~/.avcs/token), environment variables and wire headers are as they were, and the tests were updated to the new words (704 pass, biome ci clean).Compare474 throw new UsageError('abso ask --withdraw <ask> [--note "why"] takes nothing else: it takes back an ask you made');
infra-split14An asker can take back an ask: abso ask --withdraw <ask> [--note "why"]
An ask that later decisions have overtaken used to sit in the asked person's waiting list for good. Only they could answer it, and "none of these" wasn't an option. Now the one who asked can withdraw it.
- `abso ask --withdraw <ask> [--note "why"]` sends one call to the server's withdraw route. It's refused before any call when mixed with a question or the other ask flags. `--note-file` reads the note from a file or stdin, like every text flag.
- A withdrawn ask closes the way an answered one does: it leaves the waiting list, and it stops holding its issue at Blocked. The ask keeps its question. The asker's note is kept as why, and the one asked hears it.
- Ask gains `outcome?: "withdrawn"`. Older servers leave it out. The asks list and an issue's page show "withdrawn by <asker>" and the note, instead of "answered by".
- The server side of the route comes with the hosted Issues service. Until it's there, the call answers with that server's error.
Tests: the new usage mistakes, and the single POST to the asker's own route. Checked: npx biome ci . and npm run check exit 0 (704 pass, 1 skipped).Compare475 const id = issueNumber(word, "the ask number");
476 const { api } = openIssues(env);
477 const note = str(args, "note");
478 const r = await api.withdraw(id, note !== undefined ? { note } : {});
479 return { text: `Withdrew ask ${id}. ${r.ask.of} hears it, and it no longer waits on them.`, json: { ask: r.ask } };
480}
init0Start the project482export async function runWaiting(args: Parsed, env: Env): Promise<Output> {
483 if (args.positionals.length > 0)
review16The client says abso, not avcs, in everything a person reads: the hints after an issue view and abso issue new, the help for issue, issues, ask, answer and waiting, the 'abso:' prefix on notices from run, publish --check, the queue and serve, the 'News from abso' header, the MCP server's name and the claude mcp add example, and the view mod's status line. Only printed words changed: file and folder names (avcs.json, .avcs/, ~/.avcs/token), environment variables and wire headers are as they were, and the tests were updated to the new words (704 pass, biome ci clean).Compare484 throw new UsageError("waiting takes no words: abso waiting [--of <agent or person:id>] [--mine]");
486 const mine = bool(args, "mine") || str(args, "of") === config.agent;
487 const of = mine ? config.agent : str(args, "of");
488 const { asks } = mine ? await api.waitingMine() : await api.waiting(of);
489 return {
490 text:
491 asks.length === 0
492 ? `Nothing is waiting${of ? ` on ${of}` : ""}.`
493 : [
494 `${plural(asks.length, "open ask")}${of ? ` of ${of}` : ""}, soonest due first:`,
495 ...asks.map(askLine),
review16The client says abso, not avcs, in everything a person reads: the hints after an issue view and abso issue new, the help for issue, issues, ask, answer and waiting, the 'abso:' prefix on notices from run, publish --check, the queue and serve, the 'News from abso' header, the MCP server's name and the claude mcp add example, and the view mod's status line. Only printed words changed: file and folder names (avcs.json, .avcs/, ~/.avcs/token), environment variables and wire headers are as they were, and the tests were updated to the new words (704 pass, biome ci clean).Compare496 'abso answer <ask> "..." answers one asked of you.',
498 json: { asks },
499 };
500}
502export async function runAnswer(args: Parsed, env: Env): Promise<Output> {
503 const [first, ...words] = args.positionals;
504 const id = issueNumber(first, "the ask number");
505 const option = str(args, "option");
506 const done = bool(args, "done");
507 if (words.length === 0 && option === undefined && !done)
review16The client says abso, not avcs, in everything a person reads: the hints after an issue view and abso issue new, the help for issue, issues, ask, answer and waiting, the 'abso:' prefix on notices from run, publish --check, the queue and serve, the 'News from abso' header, the MCP server's name and the claude mcp add example, and the view mod's status line. Only printed words changed: file and folder names (avcs.json, .avcs/, ~/.avcs/token), environment variables and wire headers are as they were, and the tests were updated to the new words (704 pass, biome ci clean).Compare508 throw new UsageError('abso answer <ask> "<words>" | --option <N> [--note "..."] | --done [--note "..."]');
510 const note = str(args, "note");
511 const r = await api.answer(id, {
512 ...(words.length > 0 ? { words: words.join(" ") } : {}),
513 ...(option !== undefined ? { option: /^\d+$/.test(option) ? Number(option) - 1 : option } : {}),
514 ...(done ? { done: true } : {}),
515 ...(note !== undefined ? { note } : {}),
516 });
517 return { text: `Answered ask ${id}. ${r.ask.by} hears it.`, json: { ask: r.ask } };
518}