Skip to content

abso-core

Public

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

Check passed

Versions 14 to 15

Compare

+20 −0 in 2 places
Lines 31–39 at 15 (were 31–36 at 14)
3131 const body = Buffer.concat(parts);
3232 seen.push({ method: req.method!, url: req.url!, headers: req.headers, body });
3333 const json = (o: unknown) => res.writeHead(200, { "content-type": "application/json" }).end(JSON.stringify(o));
34+ // A server from before attachments: it reads every POST body as JSON.
35+ if (req.url!.includes("/p/old") && req.url!.endsWith("/attachments"))
36+ return res.writeHead(400, { "content-type": "application/json" }).end('{"error":"the body is JSON"}');
3437 if (req.url!.endsWith("/attachments"))
3538 return json({
3639 id: `a${String(seen.length).padStart(12, "0")}`,
Lines 116–138 at 15 (were 113–118 at 14)
113116 assert.match(alone.out, /--attach goes with avcs issue new or --comment/);
114117 });
115118
119+ it("says plainly when the server doesn't take attachments yet, and writes nothing", async () => {
120+ const dir = mkdtempSync(join(tmpdir(), "abso-attach-"));
121+ dirs.push(dir);
122+ const init = await avcs(dir, ["init", "--server", fake.url, "--project", "old", "--agent", "ann"]);
123+ assert.equal(init.exit, 0, init.out);
124+ writeFileSync(join(dir, "shot.png"), Buffer.from([0x89, 0x50, 0x4e, 0x47, 1]));
125+ const from = seen.length;
126+ const r = await avcs(dir, ["issue", "new", "T", "--attach", "shot.png"]);
127+ assert.equal(r.exit, 1);
128+ assert.match(r.out, /doesn't take attachments yet, so shot.png wasn't sent and nothing was written/);
129+ assert.deepEqual(
130+ seen.slice(from).map((c) => c.url.replace(/^\/p\/[^/]+/, "")),
131+ ["/a/ann/attachments"],
132+ "no issue was opened",
133+ );
134+ });
116136 it("sends nothing when a file is missing", async () => {
117137 const dir = await folder();
118138 const from = seen.length;
MCP
compare on this site's /mcp
CLI
abso diff 14 15 client/test/attach.test.ts --json
JSON
/christopher/abso-core/compare/14..15?file=client%2Ftest%2Fattach.test.ts&format=json