- MCP
- blame on this site's /mcp
- CLI
- abso blame client/test/issues.test.ts --draft codex-npm-package --json
- JSON
- /christopher/abso-core/blame/client/test/issues.test.ts?draft=codex-npm-package&format=json
480 linespinch 64% · First import 28% · infra-split 3% · devops 3% · rename 2% · infra-pipeline 1% · review 1%Last change rename in version 100,
480 lines from 12 changes in 10 versions.
2// Issues Worker a folder talks to, whether the token may go there, the MCP
3// tools, and the usage mistakes refused before any call. The Issues server
4// here is a stand-in that only counts calls; the commands against the real
5// store are issues/test/client-commands.test.ts, on the platform side (abso
6// issue 141).
8import assert from "node:assert/strict";
9import { mkdtempSync, rmSync, writeFileSync } from "node:fs";
10import { createServer, type Server } from "node:http";
11import type { AddressInfo } from "node:net";
12import { tmpdir } from "node:os";
13import { join } from "node:path";
14import { after, before, describe, it } from "node:test";
pinch23abso issue <N> --copy-to <project>: copy an issue into another project, with its comments, answered asks and labels, each keeping its author and time. The Issues server reads the source issue itself; the client sends only which issue, and any cleaned texts.
- --dry-run shows what the copy would make (title, how many comments and asks, which were edited, labels) and what's left behind. It writes nothing.
- --clean <file> gives cleaned texts by source id, as JSON: {title, description, comments: [{id, text}], asks: [{id, question, answer}]}. A comment left out of a given list isn't copied.
- --copy-to goes alone, so a copy is never half an edit. Copying into the project the issue is already in is refused before any call.
- When a live server refuses the copy (copying out of a project there takes an owner of it), the message says --dry-run still works.
- The MCP issue tool's clean input is a file too, so it's confined to the server's start folder like attach.
Tests: client/test/issues.test.ts, against a stand-in Issues server. The run --parallel test that sometimes times out under a full run passed when rerun.Compare15import { readConfig, readMachineServers } from "../src/config.ts";
pinch53abso ack <ask> ["note"]: the one asked says they have an ask and will answer later. The ask stays open and keeps blocking; abso issue shows it as acknowledged with the note, and the asker hears it. The Ask wire type gains ack, the API client gains ack(), and the skill mentions the command.Compare17import { issuePage, searchLines } from "../src/issues.ts";
18import type { IssuePage } from "../src/issues-wire.ts";
20import { argvFor, mcpTools } from "../src/mcp.ts";
21import { type Fake, startFake } from "./fake-server.ts";
23const TOKEN = "test-token-not-secret";
25let fake: Fake;
26let issues: Server;
27let issuesUrl: string;
28/** Every call the stand-in Issues server took. */
29const seen: string[] = [];
pinch23abso issue <N> --copy-to <project>: copy an issue into another project, with its comments, answered asks and labels, each keeping its author and time. The Issues server reads the source issue itself; the client sends only which issue, and any cleaned texts.
- --dry-run shows what the copy would make (title, how many comments and asks, which were edited, labels) and what's left behind. It writes nothing.
- --clean <file> gives cleaned texts by source id, as JSON: {title, description, comments: [{id, text}], asks: [{id, question, answer}]}. A comment left out of a given list isn't copied.
- --copy-to goes alone, so a copy is never half an edit. Copying into the project the issue is already in is refused before any call.
- When a live server refuses the copy (copying out of a project there takes an owner of it), the message says --dry-run still works.
- The MCP issue tool's clean input is a file too, so it's confined to the server's start folder like attach.
Tests: client/test/issues.test.ts, against a stand-in Issues server. The run --parallel test that sometimes times out under a full run passed when rerun.Compare30/** The bodies of the copy requests it took. */
31const copies: Record<string, unknown>[] = [];
pinch72Asks 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.Compare32/** The bodies of the replies it took. */
33const 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. */
35const threaded = {
36 id: 7,
37 issue: 3,
rename100abso publish is now abso push, abso sync is now abso pull (abso 427)
Commands, help, flags, messages, MCP tool names and descriptions, hook text, README, SKILL.md and tests say push and pull; "shared" stays the noun ("Pushed version N"). No aliases, no notices. A queued push that was "pulled" is now "turned back", so pull means one thing.
push -f/--force/-u/--all/--tags and pull --rebase/--ff-only/--squash refuse with one plain line naming the abso way; push and pull take no remote or branch.
Kept as stored: log entry kinds (publish, sync, pulled), HTTP route paths, the pipeline trigger on: publish, the yours (unpublished) marker, npm-publish.Compare38 title: "Pull is slow",
pinch72Asks 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.Compare39 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};
60before(async () => {
61 fake = await startFake(0, TOKEN);
62 issues = createServer((req, res) => {
63 seen.push(`${req.method} ${req.url}`);
pinch23abso issue <N> --copy-to <project>: copy an issue into another project, with its comments, answered asks and labels, each keeping its author and time. The Issues server reads the source issue itself; the client sends only which issue, and any cleaned texts.
- --dry-run shows what the copy would make (title, how many comments and asks, which were edited, labels) and what's left behind. It writes nothing.
- --clean <file> gives cleaned texts by source id, as JSON: {title, description, comments: [{id, text}], asks: [{id, question, answer}]}. A comment left out of a given list isn't copied.
- --copy-to goes alone, so a copy is never half an edit. Copying into the project the issue is already in is refused before any call.
- When a live server refuses the copy (copying out of a project there takes an owner of it), the message says --dry-run still works.
- The MCP issue tool's clean input is a file too, so it's confined to the server's start folder like attach.
Tests: client/test/issues.test.ts, against a stand-in Issues server. The run --parallel test that sometimes times out under a full run passed when rerun.Compare64 const send = (status: number, body: unknown) =>
65 res.writeHead(status, { "content-type": "application/json" }).end(JSON.stringify(body));
66 if (req.method === "POST" && /\/copy$/.test(req.url ?? "")) {
67 let raw = "";
68 req.on("data", (c: Buffer) => (raw += c.toString("utf8")));
69 req.on("end", () => {
70 const body = JSON.parse(raw) as Record<string, unknown>;
71 copies.push(body);
72 // Issue 403 stands for a live server refusing an agent's copy.
73 if (body.issue === 403 && body.dryRun !== true)
74 return send(403, { error: "copying an issue out of its project takes an owner of that project" });
75 const skipped = { comments: [4], asks: [2] };
76 if (body.dryRun === true)
77 return send(200, {
78 dryRun: true,
79 plan: {
80 from: { project: body.from, issue: body.issue },
rename100abso publish is now abso push, abso sync is now abso pull (abso 427)
Commands, help, flags, messages, MCP tool names and descriptions, hook text, README, SKILL.md and tests say push and pull; "shared" stays the noun ("Pushed version N"). No aliases, no notices. A queued push that was "pulled" is now "turned back", so pull means one thing.
push -f/--force/-u/--all/--tags and pull --rebase/--ff-only/--squash refuse with one plain line naming the abso way; push and pull take no remote or branch.
Kept as stored: log entry kinds (publish, sync, pulled), HTTP route paths, the pipeline trigger on: publish, the yours (unpublished) marker, npm-publish.Compare81 title: "Pull is slow",
pinch23abso issue <N> --copy-to <project>: copy an issue into another project, with its comments, answered asks and labels, each keeping its author and time. The Issues server reads the source issue itself; the client sends only which issue, and any cleaned texts.
- --dry-run shows what the copy would make (title, how many comments and asks, which were edited, labels) and what's left behind. It writes nothing.
- --clean <file> gives cleaned texts by source id, as JSON: {title, description, comments: [{id, text}], asks: [{id, question, answer}]}. A comment left out of a given list isn't copied.
- --copy-to goes alone, so a copy is never half an edit. Copying into the project the issue is already in is refused before any call.
- When a live server refuses the copy (copying out of a project there takes an owner of it), the message says --dry-run still works.
- The MCP issue tool's clean input is a file too, so it's confined to the server's start folder like attach.
Tests: client/test/issues.test.ts, against a stand-in Issues server. The run --parallel test that sometimes times out under a full run passed when rerun.Compare82 edited: ["description"],
83 labels: ["client"],
84 closed: { how: "done" },
85 comments: [{ edited: false }, { edited: true }],
86 asks: [{ edited: false }],
87 skipped,
88 },
89 });
90 send(200, { ok: true, id: 31, from: { project: body.from, issue: body.issue }, skipped });
91 });
92 return;
93 }
pinch53abso ack <ask> ["note"]: the one asked says they have an ask and will answer later. The ask stays open and keeps blocking; abso issue shows it as acknowledged with the note, and the asker hears it. The Ask wire type gains ack, the API client gains ack(), and the skill mentions the command.Compare94 // An ack answers with the ask, acknowledged and still open.
95 const ack = /\/a\/([^/]+)\/ack\/(\d+)$/.exec(req.url ?? "");
96 if (req.method === "POST" && ack)
97 return send(200, {
98 ask: { id: Number(ack[2]), by: "desk", of: ack[1], answer: null, ack: { at: Date.now(), note: "" } },
99 });
pinch89abso reply N, abso ask N and abso asked name a server without ask threads instead of answering its bare 404.Compare100 // Ask 404 stands for a server from before ask threads: neither route is there.
101 if (/\/(ask|reply)\/404$/.test(req.url ?? "")) return send(404, { error: "no such issues route" });
pinch72Asks 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.Compare102 // A reply answers with the ask; from the one asked, a question makes it wait on the asker.
103 const reply = /\/a\/([^/]+)\/reply\/(\d+)$/.exec(req.url ?? "");
104 if (req.method === "POST" && reply) {
105 let raw = "";
106 req.on("data", (c: Buffer) => (raw += c.toString("utf8")));
107 req.on("end", () => {
108 const body = JSON.parse(raw) as { text: string; question?: boolean };
109 replies.push(body);
110 send(200, {
111 ask: {
112 id: Number(reply[2]),
113 by: "desk",
114 of: reply[1],
115 answer: null,
116 waitingOn: body.question ? "desk" : reply[1],
117 },
118 });
119 });
120 return;
121 }
122 // One ask with its thread, and the asks an agent sent.
123 const one = /\/ask\/(\d+)$/.exec(req.url ?? "");
124 if (req.method === "GET" && one) return send(200, { ask: { ...threaded, id: Number(one[1]) } });
125 if (req.method === "GET" && /\/a\/[^/]+\/asked$/.test(req.url ?? ""))
126 return send(200, {
127 asks: [
128 threaded,
129 { ...threaded, id: 8, replies: [], answer: { by: "fay", words: "yes", at: 0 }, waitingOn: null },
130 ],
131 });
pinch23abso issue <N> --copy-to <project>: copy an issue into another project, with its comments, answered asks and labels, each keeping its author and time. The Issues server reads the source issue itself; the client sends only which issue, and any cleaned texts.
- --dry-run shows what the copy would make (title, how many comments and asks, which were edited, labels) and what's left behind. It writes nothing.
- --clean <file> gives cleaned texts by source id, as JSON: {title, description, comments: [{id, text}], asks: [{id, question, answer}]}. A comment left out of a given list isn't copied.
- --copy-to goes alone, so a copy is never half an edit. Copying into the project the issue is already in is refused before any call.
- When a live server refuses the copy (copying out of a project there takes an owner of it), the message says --dry-run still works.
- The MCP issue tool's clean input is a file too, so it's confined to the server's start folder like attach.
Tests: client/test/issues.test.ts, against a stand-in Issues server. The run --parallel test that sometimes times out under a full run passed when rerun.Compare132 send(500, { error: "a stand-in" });
infra-pipeline99Test servers keep idle connections open (abso 410): issues.test.ts, attach.test.ts and client-version.test.ts set keepAliveTimeout = 0, as fake-server.ts already does. Under a full check's load, 'waiting --asked' took 6.3 s and its next call reused a kept-alive socket just as Node's default 5 s timeout closed it: ECONNRESET. Tests only.Compare134 // As fake-server.ts: never close an idle kept-alive connection, or under load the client can reuse one as it closes
135 // and fail with ECONNRESET (abso 410).
136 issues.keepAliveTimeout = 0;
138 issuesUrl = `http://127.0.0.1:${(issues.address() as AddressInfo).port}`;
139});
140after(async () => {
141 await fake.close();
142 await new Promise((ok) => issues.close(ok));
143 for (const d of dirs) rmSync(d, { recursive: true, force: true, maxRetries: 5 });
144});
146const ENV = (): Record<string, string> => ({
147 AVCS_TOKEN: TOKEN,
148 AVCS_HOOK_FORCE: "1",
149 AVCS_ISSUES_SERVER: issuesUrl,
150 AVCS_SERVERS_FILE: "no-servers.json",
151});
153async function avcs(
154 cwd: string,
155 argv: string[],
156 env: Record<string, string> = ENV(),
157): Promise<{ exit: number; out: string }> {
158 const r = await main([...argv, "--json"], { cwd, env, write: () => {} });
159 return { exit: r.exit, out: r.stdout + r.stderr };
160}
162let projects = 0;
163async function folder(agent: string): Promise<string> {
164 const dir = mkdtempSync(join(tmpdir(), "avcs-issues-"));
165 dirs.push(dir);
166 const r = await avcs(dir, ["init", "--server", fake.url, "--project", `issues${++projects}`, "--agent", agent]);
167 assert.equal(r.exit, 0, r.out);
168 return dir;
169}
171describe("issues commands, the client's part (#54)", () => {
172 it("sends the token only to an Issues Worker it trusts", async () => {
173 const dave = await folder("dave");
174 const before = seen.length;
175 const r = await avcs(dave, ["issues"], { ...ENV(), AVCS_ISSUES_SERVER: "https://issues.example.com" });
176 assert.equal(r.exit, 1, r.out);
177 assert.match(r.out, /sends your token only to its own servers and this machine/);
178 assert.equal(seen.length, before);
179 // A server with no Issues Worker beside it, and none named.
180 const { AVCS_ISSUES_SERVER: _, ...without } = ENV();
181 const none = await avcs(dave, ["waiting"], without);
182 assert.notEqual(none.exit, 0);
183 assert.match(
184 none.out,
review27Client: ABSO_ environment names (AVCS_ still read), .absoignore (.avcsignore still read), .abso-export.json, shot files; READMEs say abso (abso 224)Compare185 /has no Issues Worker beside it that abso knows; ~\/\.abso\/servers\.json or ABSO_ISSUES_SERVER names one/,
187 });
189 it("finds a server's Issues Worker in this machine's servers.json, and may send it the token", async () => {
190 const dir = mkdtempSync(join(tmpdir(), "abso-servers-"));
191 dirs.push(dir);
192 const file = join(dir, "servers.json");
193 writeFileSync(file, JSON.stringify({ servers: { [fake.url]: { issues: issuesUrl } } }));
194 const erin = await folder("erin");
195 const before = seen.length;
196 const { AVCS_ISSUES_SERVER: _, ...without } = ENV();
197 await avcs(erin, ["waiting"], { ...without, AVCS_SERVERS_FILE: file });
198 assert.ok(seen.length > before, "the call went to the Issues Worker servers.json names");
199 const machine = readMachineServers({ AVCS_SERVERS_FILE: file });
200 assert.equal(issuesServerFor(fake.url, machine), issuesUrl);
201 assert.equal(issuesServerFor("https://abso.example", machine), undefined);
202 // abso's own server and its Issues Worker are built in.
203 assert.ok(tokenGoesTo("https://api.abso.dev"));
204 assert.ok(tokenGoesTo("https://issues.abso.dev"));
205 assert.equal(issuesServerFor("https://api.abso.dev/"), "https://issues.abso.dev");
206 });
208 it("are MCP tools", () => {
209 const names = mcpTools().map((t) => t.name);
pinch72Asks 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.Compare210 for (const n of ["issues", "issue", "search", "ask", "waiting", "answer", "ack", "reply"])
211 assert.ok(names.includes(n), n);
init0Start the project212 assert.deepEqual(argvFor("ask", { args: ["alice", "Which login?"], issue: "3", review: true }), [
213 "ask",
214 "--issue=3",
215 "--review",
216 "--",
217 "alice",
218 "Which login?",
219 ]);
220 });
222 it("refuses usage mistakes before any call", async () => {
223 const erin = await folder("erin");
224 const before = seen.length;
225 for (const argv of [
226 ["issue"],
227 ["issue", "x"],
228 ["ask", "alice"],
229 ["ask", "a", "q", "--review", "--task"],
230 ["answer", "3"],
231 ["issue", "1", "--comment", "a", "--drop"],
232 ["issues", "extra"],
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).Compare233 ["ask", "--withdraw", "x"],
234 ["ask", "--withdraw", "3", "alice", "q"],
235 ["ask", "--withdraw", "3", "--issue", "2"],
236 ["ask", "--withdraw", "3", "--task"],
237 ["ask", "alice", "q", "--note", "a note without --withdraw"],
devops20Add abso search: find a project's issues by words or meaning
`abso search "<words>" [--limit <N>]` lists the project's issues that
match, best first, and is served as an MCP tool as well.
- Each hit shows the issue, then where it matched: the title, the
description, a comment, or "by meaning".
- "#N" or "N" puts issue N first.
- Where the server also searches by meaning, an issue worded unlike
the search still turns up; the hit says so.Compare238 ["search"],
239 ["search", "words", "--limit", "0"],
240 ["search", "words", "--limit", "51"],
242 const r = await avcs(erin, argv);
243 assert.equal(r.exit, 1, `${argv.join(" ")}: ${r.out}`);
244 }
245 assert.equal(seen.length, before);
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).Compare246 });
devops20Add abso search: find a project's issues by words or meaning
`abso search "<words>" [--limit <N>]` lists the project's issues that
match, best first, and is served as an MCP tool as well.
- Each hit shows the issue, then where it matched: the title, the
description, a comment, or "by meaning".
- "#N" or "N" puts issue N first.
- Where the server also searches by meaning, an issue worded unlike
the search still turns up; the hit says so.Compare248 it("shows a search hit as the issue, then where it matched, without the match markers", () => {
rename100abso publish is now abso push, abso sync is now abso pull (abso 427)
Commands, help, flags, messages, MCP tool names and descriptions, hook text, README, SKILL.md and tests say push and pull; "shared" stays the noun ("Pushed version N"). No aliases, no notices. A queued push that was "pulled" is now "turned back", so pull means one thing.
push -f/--force/-u/--all/--tags and pull --rebase/--ff-only/--squash refuse with one plain line naming the abso way; push and pull take no remote or branch.
Kept as stored: log entry kinds (publish, sync, pulled), HTTP route paths, the pipeline trigger on: publish, the yours (unpublished) marker, npm-publish.Compare249 const issue = { id: 12, title: "Pull is slow", status: "open" as const, updated: 0, labels: [] };
devops20Add abso search: find a project's issues by words or meaning
`abso search "<words>" [--limit <N>]` lists the project's issues that
match, best first, and is served as an MCP tool as well.
- Each hit shows the issue, then where it matched: the title, the
description, a comment, or "by meaning".
- "#N" or "N" puts issue N first.
- Where the server also searches by meaning, an issue worded unlike
the search still turns up; the hit says so.Compare250 assert.deepEqual(
251 searchLines({ issue, where: "comment", comment: 40, snippet: "the \u0001network\u0002 drops mid-sync" }),
rename100abso publish is now abso push, abso sync is now abso pull (abso 427)
Commands, help, flags, messages, MCP tool names and descriptions, hook text, README, SKILL.md and tests say push and pull; "shared" stays the noun ("Pushed version N"). No aliases, no notices. A queued push that was "pulled" is now "turned back", so pull means one thing.
push -f/--force/-u/--all/--tags and pull --rebase/--ff-only/--squash refuse with one plain line naming the abso way; push and pull take no remote or branch.
Kept as stored: log entry kinds (publish, sync, pulled), HTTP route paths, the pipeline trigger on: publish, the yours (unpublished) marker, npm-publish.Compare252 [' 12 open "Pull is slow"', ' in comment 40: "the network drops mid-sync"'],
devops20Add abso search: find a project's issues by words or meaning
`abso search "<words>" [--limit <N>]` lists the project's issues that
match, best first, and is served as an MCP tool as well.
- Each hit shows the issue, then where it matched: the title, the
description, a comment, or "by meaning".
- "#N" or "N" puts issue N first.
- Where the server also searches by meaning, an issue worded unlike
the search still turns up; the hit says so.Compare253 );
254 assert.deepEqual(searchLines({ issue, where: "description", snippet: "Pages load late.", meaning: true }), [
rename100abso publish is now abso push, abso sync is now abso pull (abso 427)
Commands, help, flags, messages, MCP tool names and descriptions, hook text, README, SKILL.md and tests say push and pull; "shared" stays the noun ("Pushed version N"). No aliases, no notices. A queued push that was "pulled" is now "turned back", so pull means one thing.
push -f/--force/-u/--all/--tags and pull --rebase/--ff-only/--squash refuse with one plain line naming the abso way; push and pull take no remote or branch.
Kept as stored: log entry kinds (publish, sync, pulled), HTTP route paths, the pipeline trigger on: publish, the yours (unpublished) marker, npm-publish.Compare255 ' 12 open "Pull is slow"',
devops20Add abso search: find a project's issues by words or meaning
`abso search "<words>" [--limit <N>]` lists the project's issues that
match, best first, and is served as an MCP tool as well.
- Each hit shows the issue, then where it matched: the title, the
description, a comment, or "by meaning".
- "#N" or "N" puts issue N first.
- Where the server also searches by meaning, an issue worded unlike
the search still turns up; the hit says so.Compare256 ' by meaning: "Pages load late."',
257 ]);
rename100abso publish is now abso push, abso sync is now abso pull (abso 427)
Commands, help, flags, messages, MCP tool names and descriptions, hook text, README, SKILL.md and tests say push and pull; "shared" stays the noun ("Pushed version N"). No aliases, no notices. A queued push that was "pulled" is now "turned back", so pull means one thing.
push -f/--force/-u/--all/--tags and pull --rebase/--ff-only/--squash refuse with one plain line naming the abso way; push and pull take no remote or branch.
Kept as stored: log entry kinds (publish, sync, pulled), HTTP route paths, the pipeline trigger on: publish, the yours (unpublished) marker, npm-publish.Compare258 assert.deepEqual(searchLines({ issue, where: "title", snippet: "Pull is slow" })[1], " in the title");
devops20Add abso search: find a project's issues by words or meaning
`abso search "<words>" [--limit <N>]` lists the project's issues that
match, best first, and is served as an MCP tool as well.
- Each hit shows the issue, then where it matched: the title, the
description, a comment, or "by meaning".
- "#N" or "N" puts issue N first.
- Where the server also searches by meaning, an issue worded unlike
the search still turns up; the hit says so.Compare259 });
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).Compare261 it("withdraw is one POST to the asker's own withdraw/<ask> route", async () => {
262 const erin = await folder("erin");
263 const before = seen.length;
264 await avcs(erin, ["ask", "--withdraw", "#3", "--note", "overtaken by later decisions"]);
265 const posts = seen.slice(before).filter((s) => s.startsWith("POST"));
266 assert.equal(posts.length, 1, posts.join("\n"));
267 assert.match(posts[0]!, /^POST \/p\/issues\d+\/a\/erin\/withdraw\/3$/);
pinch53abso ack <ask> ["note"]: the one asked says they have an ask and will answer later. The ask stays open and keeps blocking; abso issue shows it as acknowledged with the note, and the asker hears it. The Ask wire type gains ack, the API client gains ack(), and the skill mentions the command.Compare268 });
270 it("ack is one POST to the one asked's ack/<ask> route, and says the ask stays open", async () => {
271 const fay = await folder("fay");
272 const before = seen.length;
273 const r = await main(["ack", "7", "on it after the deploy"], { cwd: fay, env: ENV(), write: () => {} });
274 assert.equal(r.exit, 0, r.stdout + r.stderr);
pinch72Asks 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.Compare275 assert.equal(
276 r.stdout,
277 'Acknowledged ask 7. desk hears it; abso reply 7 "..." adds more as you go, and the ask stays open until abso answer 7 "...".\n',
278 );
pinch53abso ack <ask> ["note"]: the one asked says they have an ask and will answer later. The ask stays open and keeps blocking; abso issue shows it as acknowledged with the note, and the asker hears it. The Ask wire type gains ack, the API client gains ack(), and the skill mentions the command.Compare279 const posts = seen.slice(before).filter((s) => s.startsWith("POST"));
280 assert.deepEqual(posts.length, 1, posts.join("\n"));
281 assert.match(posts[0]!, /^POST \/p\/issues\d+\/a\/fay\/ack\/7$/);
282 assert.equal((await main(["ack"], { cwd: fay, env: ENV(), write: () => {} })).exit, 1);
pinch72Asks 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.Compare283 });
285 it("reply is one POST to reply/<ask> with the words, and says whose turn it is", async () => {
286 const fay = await folder("fay");
287 const before = seen.length;
288 const r = await main(["reply", "7", "staging or live?", "--question"], { cwd: fay, env: ENV(), write: () => {} });
289 assert.equal(r.exit, 0, r.stdout + r.stderr);
290 const posts = seen.slice(before).filter((s) => s.startsWith("POST"));
291 assert.equal(posts.length, 1, posts.join("\n"));
292 assert.match(posts[0]!, /^POST \/p\/issues\d+\/a\/fay\/reply\/7$/);
293 assert.deepEqual(replies.at(-1), { text: "staging or live?", question: true });
294 assert.equal(r.stdout, "Replied on ask 7. desk hears it. It waits on desk.\n");
295 assert.equal((await main(["reply", "7"], { cwd: fay, env: ENV(), write: () => {} })).exit, 1);
pinch89abso reply N, abso ask N and abso asked name a server without ask threads instead of answering its bare 404.Compare296 });
298 it("names a server from before ask threads instead of a bare 404", async () => {
299 const fay = await folder("fay");
300 for (const argv of [
301 ["reply", "404", "still there?"],
302 ["ask", "404"],
303 ]) {
304 const r = await main(argv, { cwd: fay, env: ENV(), write: () => {} });
305 assert.equal(r.exit, 1, argv.join(" "));
306 assert.match(r.stderr, /doesn't have ask threads yet/, argv.join(" "));
307 assert.doesNotMatch(r.stderr, /no such issues route/, argv.join(" "));
308 }
pinch72Asks 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.Compare309 });
311 it("ask <N> reads one ask with its whole thread, oldest first, and whose turn it is", async () => {
312 const fay = await folder("fay");
313 const before = seen.length;
314 const r = await main(["ask", "7"], { cwd: fay, env: ENV(), write: () => {} });
315 assert.equal(r.exit, 0, r.stdout + r.stderr);
316 assert.match(seen.slice(before).join("\n"), /^GET \/p\/issues\d+\/ask\/7$/m);
317 assert.match(
318 r.stdout,
rename100abso publish is now abso push, abso sync is now abso pull (abso 427)
Commands, help, flags, messages, MCP tool names and descriptions, hook text, README, SKILL.md and tests say push and pull; "shared" stays the noun ("Pushed version N"). No aliases, no notices. A queued push that was "pulled" is now "turned back", so pull means one thing.
push -f/--force/-u/--all/--tags and pull --rebase/--ff-only/--squash refuse with one plain line naming the abso way; push and pull take no remote or branch.
Kept as stored: log entry kinds (publish, sync, pulled), HTTP route paths, the pipeline trigger on: publish, the yours (unpublished) marker, npm-publish.Compare319 /^ {2}ask 7: desk, .* asks fay a question on issue 3 \("Pull is slow"\) \(2 replies; waiting on desk\): "Which way\?"$/m,
pinch72Asks 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.Compare320 );
321 const ack = r.stdout.indexOf(' fay, Jan 1 1970 00:00 UTC: "ok, let me check"');
322 const back = r.stdout.indexOf(' fay, Jan 1 1970 00:00 UTC, a question: "staging or live?\\nlive is 906"');
323 assert.ok(ack > 0 && back > ack, r.stdout);
324 assert.match(
325 r.stdout,
326 /^It waits on desk\. abso reply 7 "\.\.\." adds to it; abso answer 7 "\.\.\." answers and closes it\.$/m,
327 );
328 // The asker reads it as their turn, and can't answer it.
329 const desk = await folder("desk");
330 const d = await main(["ask", "7"], { cwd: desk, env: ENV(), write: () => {} });
331 assert.match(d.stdout, /^It waits on you\. abso reply 7 "\.\.\." adds to it\.$/m);
332 });
334 it("waiting --asked lists the asks you sent, open first, then the latest answered", async () => {
335 const fay = await folder("fay");
336 const before = seen.length;
337 const r = await main(["waiting", "--asked"], { cwd: fay, env: ENV(), write: () => {} });
338 assert.equal(r.exit, 0, r.stdout + r.stderr);
339 assert.match(seen.slice(before).join("\n"), /^GET \/p\/issues\d+\/a\/fay\/asked$/m);
340 assert.match(r.stdout, /^1 open ask you sent:$/m);
341 assert.match(r.stdout, /^ {4}last: fay, .*, a question: "staging or live\? \.\.\."$/m);
342 assert.ok(r.stdout.indexOf("ask 7:") < r.stdout.indexOf("The latest answered:"), r.stdout);
343 assert.ok(r.stdout.indexOf("The latest answered:") < r.stdout.indexOf("ask 8:"), r.stdout);
344 assert.match(r.stdout, /^ {4}answer: "yes"$/m);
pinch53abso ack <ask> ["note"]: the one asked says they have an ask and will answer later. The ask stays open and keeps blocking; abso issue shows it as acknowledged with the note, and the asker hears it. The Ask wire type gains ack, the API client gains ack(), and the skill mentions the command.Compare345 });
347 it("an acknowledged ask reads as acknowledged, not answered, with the note under it", () => {
348 const ask = {
349 id: 7,
350 issue: 3,
351 by: "desk",
352 of: "fay",
353 kind: "question",
354 question: "Which way?",
355 review: false,
356 due: null,
357 recommendation: null,
358 options: [],
359 blocks: [],
360 at: 0,
361 answer: null,
362 seen: 0,
363 ack: { at: 0, note: "on it after the deploy" },
364 };
365 const page = {
366 issue: {
367 id: 3,
368 title: "t",
369 status: "blocked",
370 parent: null,
371 opened: { by: "desk", at: 0 },
372 agent: null,
373 agents: [],
374 blockedBy: [],
375 labels: [],
376 versions: [],
377 waitingOn: ["fay"],
378 closed: null,
379 description: "",
380 lines: null,
381 watchers: [],
382 },
383 comments: [],
384 edits: [],
385 asks: [ask],
386 claims: [],
387 children: [],
388 } as unknown as IssuePage;
389 const text = issuePage(page).join("\n");
390 assert.match(
391 text,
392 /\n {2}ask 7: desk, [^\n]*asks fay a question on issue 3 \(acknowledged [^;)]+, not answered yet\): "Which way\?"\n {4}fay acknowledged: "on it after the deploy"/,
393 );
394 assert.doesNotMatch(text, /answer:/);
395 const answered = { ...ask, answer: { by: "fay", words: "This way", at: 0 } };
396 const later = issuePage({ ...page, asks: [answered] } as unknown as IssuePage).join("\n");
397 assert.doesNotMatch(later, /acknowledged/, "an answer replaces the ack");
pinch23abso issue <N> --copy-to <project>: copy an issue into another project, with its comments, answered asks and labels, each keeping its author and time. The Issues server reads the source issue itself; the client sends only which issue, and any cleaned texts.
- --dry-run shows what the copy would make (title, how many comments and asks, which were edited, labels) and what's left behind. It writes nothing.
- --clean <file> gives cleaned texts by source id, as JSON: {title, description, comments: [{id, text}], asks: [{id, question, answer}]}. A comment left out of a given list isn't copied.
- --copy-to goes alone, so a copy is never half an edit. Copying into the project the issue is already in is refused before any call.
- When a live server refuses the copy (copying out of a project there takes an owner of it), the message says --dry-run still works.
- The MCP issue tool's clean input is a file too, so it's confined to the server's start folder like attach.
Tests: client/test/issues.test.ts, against a stand-in Issues server. The run --parallel test that sometimes times out under a full run passed when rerun.Compare398 });
399});
401describe("abso issue <N> --copy-to <project>", () => {
402 const text = async (cwd: string, argv: string[]) => {
403 const r = await main(argv, { cwd, env: ENV(), write: () => {} });
404 return { exit: r.exit, out: r.stdout + r.stderr };
405 };
407 it("a dry run asks the other project's copy route for the plan, and says nothing was written", async () => {
408 const gil = await folder("gil");
409 const before = seen.length;
410 const r = await text(gil, ["issue", "12", "--copy-to", "core", "--dry-run"]);
411 assert.equal(r.exit, 0, r.out);
412 assert.deepEqual(seen.slice(before), ["POST /p/core/a/gil/copy"]);
413 const from = (copies.at(-1) as { from: string }).from;
414 assert.match(from, /^issues\d+$/);
415 assert.deepEqual(copies.at(-1), { from, issue: 12, dryRun: true });
416 assert.equal(
417 r.out.trimEnd(),
418 [
419 `A dry run: nothing was written. Copying ${from} issue 12 into core would make:`,
rename100abso publish is now abso push, abso sync is now abso pull (abso 427)
Commands, help, flags, messages, MCP tool names and descriptions, hook text, README, SKILL.md and tests say push and pull; "shared" stays the noun ("Pushed version N"). No aliases, no notices. A queued push that was "pulled" is now "turned back", so pull means one thing.
push -f/--force/-u/--all/--tags and pull --rebase/--ff-only/--squash refuse with one plain line naming the abso way; push and pull take no remote or branch.
Kept as stored: log entry kinds (publish, sync, pulled), HTTP route paths, the pipeline trigger on: publish, the yours (unpublished) marker, npm-publish.Compare420 ` "Pull is slow", done (description edited when copied)`,
pinch23abso issue <N> --copy-to <project>: copy an issue into another project, with its comments, answered asks and labels, each keeping its author and time. The Issues server reads the source issue itself; the client sends only which issue, and any cleaned texts.
- --dry-run shows what the copy would make (title, how many comments and asks, which were edited, labels) and what's left behind. It writes nothing.
- --clean <file> gives cleaned texts by source id, as JSON: {title, description, comments: [{id, text}], asks: [{id, question, answer}]}. A comment left out of a given list isn't copied.
- --copy-to goes alone, so a copy is never half an edit. Copying into the project the issue is already in is refused before any call.
- When a live server refuses the copy (copying out of a project there takes an owner of it), the message says --dry-run still works.
- The MCP issue tool's clean input is a file too, so it's confined to the server's start folder like attach.
Tests: client/test/issues.test.ts, against a stand-in Issues server. The run --parallel test that sometimes times out under a full run passed when rerun.Compare421 " 2 comments (1 edited), 1 answered ask, labelled client",
422 " not copied: comments 4; asks 2 (open asks, and what --clean left out)",
423 "Run it again without --dry-run to copy it.",
424 ].join("\n"),
425 );
426 });
428 it("copies with the cleaned texts --clean gives, by source id", async () => {
429 const gil = await folder("gil");
430 writeFileSync(
431 join(gil, "clean.json"),
432 JSON.stringify({ description: "Cleaned.", comments: [{ id: 1 }, { id: 3, text: "Cleaned too." }] }),
433 );
434 const r = await text(gil, ["issue", "12", "--copy-to", "core", "--clean", "clean.json"]);
435 assert.equal(r.exit, 0, r.out);
436 const from = (copies.at(-1) as { from: string }).from;
437 assert.deepEqual(copies.at(-1), {
438 description: "Cleaned.",
439 comments: [{ id: 1 }, { id: 3, text: "Cleaned too." }],
440 from,
441 issue: 12,
442 });
443 assert.match(
444 r.out,
445 new RegExp(`^Copied ${from} issue 12 to core issue 31\\. Its comments and asks keep their authors`),
446 );
447 });
449 it("says a dry run still works when the server refuses the copy", async () => {
450 const gil = await folder("gil");
451 const r = await text(gil, ["issue", "403", "--copy-to", "core"]);
452 assert.equal(r.exit, 1, r.out);
453 assert.match(r.out, /takes an owner of that project\. --dry-run still shows what would go\./);
454 });
456 it("refuses mistakes before any call", async () => {
457 const gil = await folder("gil");
458 writeFileSync(join(gil, "bad.json"), JSON.stringify({ from: "elsewhere" }));
459 const before = seen.length;
460 for (const [argv, why] of [
461 [["issue", "12", "--copy-to", "core", "--comment", "x"], /--copy-to goes alone .* not with --comment/],
462 [["issue", "12", "--dry-run"], /--clean and --dry-run go with --copy-to <project>/],
463 [["issue", "12", "--copy-to", "core", "--clean", "nope.json"], /--clean nope\.json: no such file/],
464 [
465 ["issue", "12", "--copy-to", "core", "--clean", "bad.json"],
466 /from isn't one of title, description, comments, asks/,
467 ],
468 ] as const) {
469 const r = await text(gil, [...argv]);
470 assert.notEqual(r.exit, 0, argv.join(" "));
471 assert.match(r.out, why);
472 }
473 const { project } = readConfig(gil);
474 assert.match(
475 (await text(gil, ["issue", "12", "--copy-to", project])).out,
476 /issue 12 is already in issues\d+; --copy-to names another project/,
477 );
478 assert.equal(seen.length, before, "nothing reached the Issues server");
480});