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

Compare

+8 −7 in 2 places
Lines 25–44 at 318 (were 25–43 at 175)
2525 readonly modes: Map<string, FullMode>;
2626}
2727
28−/** Each file as it is on one side of a change (`before`), applied to the snapshot. */
29−function applyBefore(s: Snapshot, changes: readonly FileChange[]): void {
28+/** Each file as it is on one side of a change (`before` unless said), applied to the snapshot. */
29+export function applySide(s: Snapshot, changes: readonly FileChange[], side: "before" | "after" = "before"): void {
3030 for (const f of changes) {
3131 if (isLocalOnly(f.path)) continue;
32− const blob = f.blob?.before ?? null;
32+ const blob = f.blob?.[side] ?? null;
33+ const text = f[side];
3334 if (blob !== null) s.files.set(f.path, { blob });
34− else if (f.before !== null) s.files.set(f.path, { text: f.before });
35+ else if (text !== null) s.files.set(f.path, { text });
3536 else {
3637 s.files.delete(f.path);
3738 s.modes.delete(f.path);
3839 continue;
3940 }
40− if (f.mode) s.modes.set(f.path, { exec: f.mode.before.exec === true, link: f.mode.before.link ?? null });
41+ if (f.mode) s.modes.set(f.path, { exec: f.mode[side].exec === true, link: f.mode[side].link ?? null });
4142 }
4243}
4344
Lines 57–65 at 318 (were 56–64 at 175)
5657 for (const [rel, sha] of readKnownBlobs(root)) s.files.set(rel, { blob: sha });
5758 for (const [rel, mode] of readKnownModes(root)) if (s.files.has(rel)) s.modes.set(rel, mode);
5859 // Its base: the draft's changes taken back out.
59− applyBefore(s, diff.files);
60+ applySide(s, diff.files);
6061 // Version N: what differs from the base, as it was at N.
61− if (version !== diff.base) applyBefore(s, (await api.compare(version, diff.base, where)).files);
62+ if (version !== diff.base) applySide(s, (await api.compare(version, diff.base, where)).files);
6263 return s;
6364}
6465
MCP
compare on this site's /mcp
CLI
abso diff 175 318 client/src/at.ts --json
JSON
/christopher/abso-core/compare/175..318?file=client%2Fsrc%2Fat.ts&format=json