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
MCP
show on this site's /mcp
CLI
abso show 13 --json
JSON
/christopher/abso-core/versions/13?format=json

The client names an imported version's original author (abso issue 23). The hosted Worker's admin route for imported history lays an author beside agent on every publish of a shared version (version 647 in abso). abso log, show, blame's Publishes, why and where now say who first wrote a version when there's an author, and the agent who published it otherwise (byWhom in history-answers.ts), the way git names a commit's author beside its committer. Code that matches agents (publish's checks, settle, news) keeps using agent. No change for projects without imported history. Tests: client/test/imported-history.test.ts; check passes (703).

of shared·engine··Not checked

The client names an imported version's original author (abso issue 23 · not public). The hosted Worker's admin route for imported history lays an author beside agent on every publish of a shared version (version 647 in abso). abso log, show, blame's Publishes, why and where now say who first wrote a version when there's an author, and the agent who published it otherwise (byWhom in history-answers.ts), the way git names a commit's author beside its committer.

Code that matches agents (publish's checks, settle, news) keeps using agent. No change for projects without imported history. Tests: client/test/imported-history.test.ts; check passes (703).

Version 12 · Files at version 13

4 files, 35 lines added, 5 removed.

--- a/client/src/changes.ts
+++ b/client/src/changes.ts
@@ -25,6 +25,7 @@
2525 writeKnown,
2626} from "./folder.ts";
2727import { fileArg, when } from "./history.ts";
28+import { byWhom } from "./history-answers.ts";
2829import { applyMode, PLAIN, readKnownModes, writeKnownModes } from "./modes.ts";
2930import { refusedText, screenAnswer } from "./safety.ts";
3031
@@ -385,7 +386,7 @@
385386 `${spaceName(answer.draft)} is at version ${answer.version}.${path === undefined ? "" : answer.versions.length === 0 ? ` No version changed ${named}.` : ` The versions that changed ${named}, newest first:`}`,
386387 ...(path !== undefined && answer.versions.length === 0 && !existsHere(root, path) ? [nothingAt(root, path)] : []),
387388 ...answer.versions.flatMap((v) => [
388− `version ${v.version} by ${v.agent}, ${when(v.time)}${answer.draft === null ? ciMarkText(v.ci) : ""}: ${v.message}`,
389+ `version ${v.version} by ${byWhom(v)}, ${when(v.time)}${answer.draft === null ? ciMarkText(v.ci) : ""}: ${v.message}`,
389390 ` ${plural(v.files.length, "file")}: ${v.files.slice(0, LOG_FILES).join(", ")}${v.files.length > LOG_FILES ? `, and ${v.files.length - LOG_FILES} more` : ""}`,
390391 ...notes(v),
391392 ]),
@@ -422,7 +423,7 @@
422423 const changed = pairRenames(answer.diff);
423424 const d = diffs(changed);
424425 const lines = [
425− `version ${answer.version} of ${spaceName(answer.draft)} by ${answer.agent}, ${when(answer.time)}: ${answer.message}`,
426+ `version ${answer.version} of ${spaceName(answer.draft)} by ${byWhom(answer)}, ${when(answer.time)}: ${answer.message}`,
426427 ...notes(answer),
427428 changed.length === 0 ? "It changed no files." : `${totals(changed)}.`,
428429 ...d.text,
--- a/client/src/history-answers.ts
+++ b/client/src/history-answers.ts
@@ -27,9 +27,20 @@
2727 readonly from?: string;
2828 readonly similarity?: number;
2929}
30+/**
31+ * Who to name for a version: its original author when the project's history
32+ * was imported (abso issue 23, like git's author beside its committer), else
33+ * the agent who published it. Code that matches agents keeps using agent.
34+ */
35+export function byWhom(p: { readonly agent: string; readonly author?: string }): string {
36+ return p.author ?? p.agent;
37+}
3039export interface LogEntry {
3140 readonly version: number;
3241 readonly agent: string;
42+ /** Who first wrote it, when the project's history was imported (abso issue 23); agent is who published it here. */
43+ readonly author?: string;
3344 readonly message: string;
3445 readonly time: number;
3546 readonly changes: number;
@@ -92,6 +103,8 @@
92103export interface Publish {
93104 readonly version: number;
94105 readonly agent: string;
106+ /** Who first wrote it, when the project's history was imported (abso issue 23). */
107+ readonly author?: string;
95108 readonly message: string;
96109 readonly time: number;
97110}
--- a/client/src/history.ts
+++ b/client/src/history.ts
@@ -8,6 +8,7 @@
88import type { Env, Output } from "./commands.ts";
99import { findRoot, readConfig } from "./config.ts";
1010import { relativeTo } from "./folder.ts";
11+import { byWhom } from "./history-answers.ts";
1112
1213function open(env: Env): { root: string; api: Api; agent: string } {
1314 const root = findRoot(env.cwd);
@@ -46,7 +47,7 @@
4647}
4748
4849function published(p: Publish | null): string {
49− return p === null ? "not published" : `version ${p.version} by ${p.agent} (${when(p.time)}): "${p.message}"`;
50+ return p === null ? "not published" : `version ${p.version} by ${byWhom(p)} (${when(p.time)}): "${p.message}"`;
5051}
5152
5253export async function runBlame(args: Parsed, env: Env): Promise<Output> {
@@ -71,7 +72,7 @@
7172 for (const a of b.atoms) {
7273 if (a.publish === null) continue;
7374 const own = a.message && a.message !== a.publish.message ? ` (the change itself: "${a.message}")` : "";
74− const line = ` v${a.publish.version} by ${a.publish.agent}, ${when(a.publish.time)}: ${a.publish.message}${own}`;
75+ const line = ` v${a.publish.version} by ${byWhom(a.publish)}, ${when(a.publish.time)}: ${a.publish.message}${own}`;
7576 if (!versions.has(a.publish.version) || own) versions.set(a.publish.version, line);
7677 }
7778 const whose =
@@ -172,7 +173,7 @@
172173 lines.push(
173174 `${file}:`,
174175 last
175− ? ` last changed in version ${last.version} by ${last.agent}, ${when(last.time)}: ${last.message}`
176+ ? ` last changed in version ${last.version} by ${byWhom(last)}, ${when(last.time)}: ${last.message}`
176177 : " in no published version yet",
177178 ...(drafts.length > 0
178179 ? drafts.map(
--- /dev/null
+++ b/client/test/imported-history.test.ts
@@ -0,0 +1,15 @@
1+// Imported history (abso issue 23): a version whose history was imported names
2+// its original author, the way git names a commit's author beside its
3+// committer. Every other version names the agent who published it.
4+
5+import assert from "node:assert/strict";
6+import { test } from "node:test";
7+import { byWhom } from "../src/history-answers.ts";
8+
9+test("a version names its original author when it has one, else its agent", () => {
10+ assert.equal(
11+ byWhom({ agent: "replay-a1", author: "Ada Lovelace <ada@example.com>" }),
12+ "Ada Lovelace <ada@example.com>",
13+ );
14+ assert.equal(byWhom({ agent: "ann" }), "ann");
15+});