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 34 to 318

Compare

+13 −6 in 6 places
Lines 1–7 at 318 (were 1–7 at 34)
11// Review (#44): review is reading what
22// landed. abso review lists the changes since you last looked, or shows one;
33// abso note leaves a note on lines, which follows them as the file changes;
4−// abso notes lists them. The server holds changes and notes (Engine, 15a3035).
4+// abso notes lists them. The server holds changes and notes.
55
66import { readFileSync } from "node:fs";
77import { join } from "node:path";
Lines 62–68 at 318 (were 62–68 at 34)
6262
6363/** One change in a list. */
6464/**
65− * A change's title as a list shows it (#43, Git Lessons): the first line, cut
65+ * A change's title as a list shows it (#43): the first line, cut
6666 * to 100 characters, as git log --oneline does, with an imported commit's
6767 * trailer (`git <sha12>, <author>, <time>`) as a short hash beside it. The
6868 * change page keeps the whole message.
Lines 83–95 at 318 (were 83–88 at 34)
8383 return ` ${c.id} ${c.agent}, ${titleLine(c.title)}${c.open ? " (still going)" : ""}: ${versionsText(c)}${files}${open > 0 ? `; ${plural(open, "open objection")}` : ""}`;
8484}
8585
86+/** What a settle kept, read from outside: whose lines, not "yours" or "theirs". */
87+function keptText(s: ChangeAnswer["settled"][number], settler: string): string {
88+ if (s.kept === "yours") return `kept ${settler}'s`;
89+ if (s.kept === "theirs") return `kept ${s.theirs.agent}'s`;
90+ return s.kept === "both" ? "kept both" : "rewrote both sides";
91+}
8693/** The change page, as text. */
8794export function changePage(c: ChangeAnswer): string[] {
8895 const out = [
Lines 106–117 at 318 (were 99–110 at 34)
99106 ),
100107 ...(c.settled.length > 0
101108 ? [
102− `Settled: ${c.settled.map((s) => `${s.file} (kept ${s.kept}, against ${s.theirs.agent}'s version ${s.theirs.version})`).join("; ")}.`,
109+ `Settled: ${c.settled.map((s) => `${s.file} (${keptText(s, c.agent)}, against ${s.theirs.agent}'s version ${s.theirs.version})`).join("; ")}.`,
103110 ]
104111 : []),
105112 ...(c.refusals.length > 0
106113 ? [
107− `Refused ${plural(c.refusals.length, "time")} on the way: ${c.refusals.map((r) => `${r.kinds.join(", ")} (${r.files.join(", ")})`).join("; ")}.`,
114+ `Refused ${plural(c.refusals.length, "time")} on the way: ${c.refusals.map((r) => `${r.kinds.join(", ")} (${r.files.join(", ")})${r.message ? `: ${JSON.stringify(r.message)}` : ""}`).join("; ")}.`,
108115 ]
109116 : []),
110117 ...((c.reviewers ?? []).length > 0
Lines 129–135 at 318 (were 122–128 at 34)
122129async function findChange(api: ReturnType<typeof open>["api"], word: string): Promise<ChangeAnswer> {
123130 if (/^\d+$/.test(word)) return api.change(Number(word));
124131 const v = /^v(\d+)$/i.exec(word);
125− // show names a version's change (Engine, 6a2911b); older servers don't, and the recent changes are searched.
132+ // show names a version's change; older servers don't, and the recent changes are searched.
126133 if (v) {
127134 const shown = await api.show(Number(v[1]), { draft: null }).catch(() => undefined);
128135 if (shown?.change !== undefined) return api.change(shown.change);
Lines 176–182 at 318 (were 169–175 at 34)
169176 const cutoff = back === undefined ? 0 : Date.now() - back;
170177 const lastActive = (c: ChangeAnswer): number => Math.max(c.time, ...c.versions.map((v) => v.time));
171178 // A first look shows the newest 20. Otherwise every change since the mark (or the span) is listed, page by
172− // page, before the mark moves past them (AVCS - Git Lessons' review): one page would drop the older ones.
179+ // page, before the mark moves past them: one page would drop the older ones.
173180 const firstLook = mark === undefined && raw === undefined;
174181 // ABSO_REVIEW_PAGE shortens the page in tests.
175182 const pageSize = Number(fromEnv(process.env, "REVIEW_PAGE")) || 200;
MCP
compare on this site's /mcp
CLI
abso diff 34 318 client/src/review.ts --json
JSON
/christopher/abso-core/compare/34..318?file=client%2Fsrc%2Freview.ts&format=json