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 211 --json
JSON
/christopher/abso-core/versions/211?format=json

Settled automatically, on the record and in the other agent's news (abso-core 23)

of shared·autosettle··Not checked

The client's re-push after settling by itself now ends its message with a fixed trailer, one line per file: 'Settled automatically (abso 19):' then '- <file>: kept <side>, confidence 0.81. <reason>' (or 'by a check in code'). autoTrailer writes it and autoSettledOf reads it back, both in worker/project/autosettle.ts. Publish and the merge queue put it on each settle record as settled[].auto {pick, by, confidence, reason}, so the website can mark the version. The other agent's news says 'X settled its collision with your version N in <file> automatically, as abso's model advised (confidence 0.81), pushing version V: ...' and still outlasts a sync.

Tests: autosettle.test.ts 9 (trailer round trip, news words), the client's settle/held tests 21, held-push, markers, project, same-line. Typecheck and server typecheck clean. Local open server under act: the trailer is written as above.

Version 210 · Files at version 211

8 files, 173 lines added, 4 removed.

--- a/client/src/publish-commands.ts
+++ b/client/src/publish-commands.ts
@@ -2,6 +2,7 @@
22
33import { existsSync, readFileSync } from "node:fs";
44import { join } from "node:path";
5+import { autoTrailer } from "../../worker/project/autosettle.ts";
56import { type Advice, type Api, ApiError, type Collision, type Settled } from "./api.ts";
67import { bool, type Parsed, str, UsageError } from "./args.ts";
78import { boxOf, knownPrep, runRun, shellWord } from "./box-commands.ts";
@@ -501,14 +502,13 @@
501502 ].join("\n"),
502503 json: { collisions, advice, autosettle: { pulled: true, settled: done, left } },
503504 };
504− const why = [...plan].map(([file, a]) => `${file}: kept ${a.pick} (${a.reason})`).join("; ");
505505 const again = await publishSteps(
506506 args,
507507 env,
508508 root,
509509 config,
510510 api,
511− `${message}\n\nSettled automatically (abso 19): ${why}`,
511+ `${message}\n\n${autoTrailer(plan)}`,
512512 checked,
513513 waitSeconds,
514514 skippedCheck,
--- /dev/null
+++ b/scripts/autosettle/STORIES.md
@@ -0,0 +1,51 @@
1+# Auto-settle: stories
2+
3+Christopher, 2026-10-14: "we give it to everyone for free but we have a gate on it. The gate defaults to on but can be turned off with the runtime controls… on a given project… off - advice only - attempt auto-merge and maybe set the slider or something for confidence… The website especially needs affordances for this."
4+
5+What exists (abso-core 204, issue 19):
6+- On a held push, the server asks Clef which settle fits each collision: keep yours, keep theirs, keep both, or leave it to an agent. Code checks run before and after the model.
7+- Under advice, the held push's answer carries that advice, and the agent still settles.
8+- Under settle, the client pulls, settles the collisions advised a side, and pushes again, with "Settled automatically" in the message.
9+- Today one server-wide variable, `AUTOSETTLE`, picks off, `on` (advice) or `act` (settle).
11+Words: hold (a push refused for colliding), settle, advice, confidence, auto-settle.
13+## Gate (environment-wide)
14+- **G1** · Operator · Auto-settle is a runtime control beside CI and sign-ins. It is open unless stopped. Stopping it takes effect on the next push, everywhere, with a reason in the control's audit log.
15+- **G2** · Anyone · While the gate is stopped, held pushes look exactly as they do without auto-settle. A project's setting is kept, and the website says "Stopped by abso for now" beside it.
16+- **G3** · Operator · If the control can't be read, or the model fails or is slow, the push gets no advice rather than an error. A hold never gets worse because of auto-settle.
18+## Project setting
19+- **P1** · Owner · Project Settings has an Auto-settle section with three choices: **Off**, **Advise**, **Settle**. New projects start on Advise. *(Pitch: Advise is free and changes nothing an agent does. Settle is opt-in per project.)*
20+- **P2** · Owner · Under Settle, a confidence slider sets how sure the model must be before abso settles (default 0.5). Below it, the hold stays with the agent, carrying the advice.
21+- **P3** · Owner · Beside the slider: "At this setting, the last N holds would have gone: X settled, Y to an agent". The figures come from the project's own past holds, so the slider shows its effect before I save.
22+- **P4** · Owner · The CLI matches: `abso autosettle [off|advise|settle] [--at 0.6]`. With no argument it shows the setting and who changed it last.
23+- **P5** · Writer, Reader · I see the setting read-only, and who set it.
24+- **P6** · Owner · A change to the setting is a line on the project's Now: "Christopher set auto-settle to Settle at 0.6".
26+## Agent
27+- **A1** · Agent · When my push is held under Advise, the hold's text gives each collision's advice in one line: the pick, the confidence, and the reason.
28+- **A2** · Agent · Under Settle, a held push that abso can settle goes through as one push. The output says which files abso settled and how, and how to see or undo it.
29+- **A3** · Agent · If any collision in my push is left to an agent, nothing is settled for me, not even the rest. I get the hold as today, with advice on every collision.
30+- **A4** · Agent · `ABSO_AUTOSETTLE=off` on my machine means I always settle by hand, whatever the project says.
31+- **A5** · Other agent · When abso settles a hold against my work, my news says so, like any settle: "abso settled X's collision with your version N in file: kept theirs (confidence 0.81: reason)".
33+## Record and undo
34+- **R1** · Anyone · A version abso settled is marked on Activity and on the version page: "Settled automatically", with each file's pick, confidence and reason. `abso why file:line` names it too.
35+- **R2** · Writer · On that version there's an **Undo** button: it drops the version (as `abso drop`) and gives the hold back to the agent who pushed it. If later versions build on it, it says so first.
36+- **R3** · Owner · Project Settings shows the last 30 days: holds advised, settled automatically, left to agents, and undone. Undos are the sign the slider is too low.
38+## Cost
39+- **C1** · Anyone · Auto-settle is free on every project, public or private. It runs on abso's Workers AI.
40+- **C2** · Operator · Each project has a ceiling on model calls per hour. Past it, holds get no advice until the hour turns, and Settings says so. This keeps one busy project from spending everyone's share.
42+## Tonight
43+In order, cut-first:
44+1. Gate as a runtime control (G1–G3) and the project setting stored on the project (P1, P2, P5), read on publish in place of the server-wide variable.
45+2. Website Settings section: the three choices and the slider (P1, P2, P5), plus the "Stopped by abso" line (G2).
46+3. "Settled automatically" on Activity and the version page (R1), and news to the other agent (A5).
47+4. Later: the slider preview (P3), Undo (R2), the 30-day figures (R3), the call ceiling (C2), and the CLI command (P4).
49+## Open
50+- Does the server settle, or the client? Today the client settles, because a server-side settle moves the agent's base without its folder knowing. The client way works on every client at 204 or newer. Older clients only see advice.
51+- Default for new projects: Advise (pitched above), or Settle?
--- a/worker/project/autosettle.ts
+++ b/worker/project/autosettle.ts
@@ -3,6 +3,8 @@
33// Off unless AUTOSETTLE is "on" (advice) or "act" (the client settles) and the Worker has an AI binding. The model
44// picks one of four words; it never writes code.
55
6+import type { AutoSettled } from "./project-types.ts";
7+
68/** abso's settle choices, plus a hand edit by an agent. */
79export type Pick = "yours" | "theirs" | "both" | "agent";
810export const PICKS: readonly Pick[] = ["yours", "theirs", "both", "agent"];
@@ -40,6 +42,47 @@
4042 readonly ms: number;
4143}
4244
45+/**
46+ * The heading a client puts over what it settled by itself, in the message of the push that follows (abso-core 19,
47+ * 23). One line per file under it: `- <file>: kept <side>, confidence 0.81. <reason>` or `…, by a check in code. …`.
48+ */
49+export const AUTO_HEADING = "Settled automatically (abso 19):";
51+/** The lines a client adds to its message for the files it settled by itself. */
52+export function autoTrailer(
53+ plan: Iterable<
54+ readonly [
55+ string,
56+ { readonly pick: string; readonly by: string; readonly confidence: number; readonly reason: string },
57+ ]
58+ >,
59+): string {
60+ const lines = [...plan].map(([file, a]) => {
61+ const how = a.by === "rule" ? "by a check in code" : `confidence ${a.confidence.toFixed(2)}`;
62+ return `- ${file}: kept ${a.pick}, ${how}. ${a.reason.replace(/\s+/g, " ").trim()}`;
63+ });
64+ return [AUTO_HEADING, ...lines].join("\n");
65+}
67+/** What a push's message says its abso settled by itself, by file; empty for a push that settled by hand. */
68+export function autoSettledOf(message: string): Map<string, AutoSettled> {
69+ const found = new Map<string, AutoSettled>();
70+ const lines = message.split(/\r?\n/);
71+ const at = lines.lastIndexOf(AUTO_HEADING);
72+ if (at < 0) return found;
73+ for (const line of lines.slice(at + 1)) {
74+ const m = /^- (.+): kept (yours|theirs|both), (?:by a check in code|confidence ([01]\.\d\d))\. ?(.*)$/.exec(line);
75+ if (!m) break;
76+ found.set(m[1]!, {
77+ pick: m[2] as AutoSettled["pick"],
78+ by: m[3] === undefined ? "rule" : "model",
79+ confidence: m[3] === undefined ? 1 : Number(m[3]),
80+ reason: m[4] ?? "",
81+ });
82+ }
83+ return found;
84+}
4386export interface Ai {
4487 run(model: string, input: unknown): Promise<unknown>;
4588}
--- a/worker/project/news.ts
+++ b/worker/project/news.ts
@@ -170,11 +170,19 @@
170170};
171171
172172/** The other author of a marked collision a publish settled (#11): what was kept, any lines lost, and the settler's held reason. */
173+/** " automatically, as abso's model advised (confidence 0.81)" for a settle the settler's abso made by itself (abso-core 23). */
174+function autoWords(s: Settled): string {
175+ if (!s.auto) return "";
176+ return s.auto.by === "rule"
177+ ? " automatically, by a check in code"
178+ : ` automatically, as abso's model advised (confidence ${s.auto.confidence.toFixed(2)})`;
179+}
173181export function settledItem(by: string, version: number, s: Settled): NewsItem {
174182 return {
175183 key: `settled ${by} ${version} ${s.file} ${s.theirs.version}`,
176184 text:
177− `${by} settled its collision with your version ${s.theirs.version} in ${s.file}, pushing version ${version}: ${SETTLED_WHAT[s.kept]}.` +
185+ `${by} settled its collision with your version ${s.theirs.version} in ${s.file}${autoWords(s)}, pushing version ${version}: ${SETTLED_WHAT[s.kept]}.` +
178186 (s.lost
179187 ? ` It also lost ${s.lost.length === 1 ? "a line" : `${s.lost.length} lines`} you both still had: ${s.lost.map((l) => `"${clip(l)}"`).join(", ")}.`
180188 : "") +
--- a/worker/project/project-types.ts
+++ b/worker/project/project-types.ts
@@ -452,7 +452,18 @@
452452 lost?: string[];
453453 /** The message of the settler's push that was held for this collision: its side's reason. */
454454 held?: string;
455+ /** The settler's abso settled it by itself, as the server advised (abso-core 19, 23): from the push's message. */
456+ auto?: AutoSettled;
455457}
459+/** One file a client settled by itself (abso-core 23): the side kept, and the advice it followed. */
460+export interface AutoSettled {
461+ readonly pick: "yours" | "theirs" | "both";
462+ /** rule: a check in code decided; model: the model, this sure. */
463+ readonly by: "rule" | "model";
464+ readonly confidence: number;
465+ readonly reason: string;
466+}
456467/** A line both sides changed that a sync merged word by word (#37): check it. */
457468export interface MergedLine {
458469 file: string;
--- a/worker/project/publish.ts
+++ b/worker/project/publish.ts
@@ -3,6 +3,7 @@
33
44import { type AtomId, buildAtom, type Hunk, joinLines, type ReadView } from "../../src/engine/index.ts";
55import { differenceSet, unionOverlay } from "../../src/engine/state-source.ts";
6+import { autoSettledOf } from "./autosettle.ts";
67import type { Pair } from "./collisions.ts";
78import type { DefinitionCollision } from "./definition-rule.ts";
89import { heldMessage, keptOf, lostLines, settleLines } from "./markers.ts";
@@ -169,18 +170,21 @@
169170 .map((p) => ({ version: p.version, agent: p.agent, message: p.message }));
170171 // What each marked collision kept, judged from the file as published (#11).
171172 const view = host.agentView(agent);
173+ const auto = autoSettledOf(message);
172174 const settled: Settled[] = agent.marked
173175 .filter((r) => r.space === space.name)
174176 .map((r) => {
175177 const lines = view.hasFile(r.file) ? view.lines(r.file).map((l) => l.text) : [];
176178 const lost = lostLines(lines, r);
177179 const held = heldMessage(agent, r.file);
180+ const by = auto.get(r.file);
178181 return {
179182 file: r.file,
180183 kept: keptOf(lines, r),
181184 theirs: { agent: r.agent, version: r.version },
182185 ...(lost.length > 0 ? { lost } : {}),
183186 ...(held ? { held } : {}),
187+ ...(by ? { auto: by } : {}),
184188 };
185189 });
186190 entries.push({
--- a/worker/project/queue.ts
+++ b/worker/project/queue.ts
@@ -3,6 +3,7 @@
33
44import { type AtomId, buildAtom, type Graph, type ReadView } from "../../src/engine/index.ts";
55import { unionOverlay } from "../../src/engine/state-source.ts";
6+import { autoSettledOf } from "./autosettle.ts";
67import type { Pair } from "./collisions.ts";
78import { definedTwice } from "./definitions.ts";
89import { heldMessage, keptOf, lostLines } from "./markers.ts";
@@ -158,18 +159,21 @@
158159 if (collisions.length > 0) return host.refuse(agent, space, "publish", time, collisions, entries, message);
159160 }
160161 const view = host.agentView(agent);
162+ const auto = autoSettledOf(message);
161163 const settled: Settled[] = agent.marked
162164 .filter((r) => r.space === SHARED)
163165 .map((r) => {
164166 const lines = view.hasFile(r.file) ? view.lines(r.file).map((l) => l.text) : [];
165167 const lost = lostLines(lines, r);
166168 const held = heldMessage(agent, r.file);
169+ const by = auto.get(r.file);
167170 return {
168171 file: r.file,
169172 kept: keptOf(lines, r),
170173 theirs: { agent: r.agent, version: r.version },
171174 ...(lost.length > 0 ? { lost } : {}),
172175 ...(held ? { held } : {}),
176+ ...(by ? { auto: by } : {}),
173177 };
174178 });
175179 const id = host.queuedId() + 1;
--- a/worker/project/test/autosettle.test.ts
+++ b/worker/project/test/autosettle.test.ts
@@ -1,6 +1,7 @@
11import assert from "node:assert/strict";
22import { test } from "node:test";
3−import { type Ai, adviseHeld, refused, ruled, withAdvice } from "../autosettle.ts";
3+import { type Ai, adviseHeld, autoSettledOf, autoTrailer, refused, ruled, withAdvice } from "../autosettle.ts";
4+import { outlastsSync, settledItem } from "../news.ts";
45
56/**
67 * A stand-in for Workers AI that always leans to `pick`: a System One answer for Clef (`top` on `pick`, the rest
@@ -112,3 +113,50 @@
112113 const ok = { ok: true, version: 4 };
113114 assert.equal(await withAdvice({ AUTOSETTLE: "act", AI: fakeAi("both") }, "publish", "me", request, ok), ok);
114115});
117+test("the message trailer: the client writes what it settled by itself, and the server reads it back by file", () => {
118+ const trailer = autoTrailer([
119+ [
120+ "docs/start.md",
121+ { pick: "yours", by: "model", confidence: 0.8125, reason: "Both fixed the typo;\nyours adds a line." },
122+ ],
123+ [
124+ "src/network.ts",
125+ { pick: "theirs", by: "rule", confidence: 1, reason: "every line of yours is already in theirs" },
126+ ],
127+ ]);
128+ assert.equal(
129+ trailer,
130+ [
131+ "Settled automatically (abso 19):",
132+ "- docs/start.md: kept yours, confidence 0.81. Both fixed the typo; yours adds a line.",
133+ "- src/network.ts: kept theirs, by a check in code. every line of yours is already in theirs",
134+ ].join("\n"),
135+ );
136+ const read = autoSettledOf(`Fix the jion typo\n\n${trailer}`);
137+ assert.deepEqual(read.get("docs/start.md"), {
138+ pick: "yours",
139+ by: "model",
140+ confidence: 0.81,
141+ reason: "Both fixed the typo; yours adds a line.",
142+ });
143+ assert.equal(read.get("src/network.ts")?.by, "rule");
144+ assert.equal(autoSettledOf("Settled the typo by hand").size, 0);
145+});
147+test("the other agent's news says the settle was automatic, and still outlasts a sync", () => {
148+ const s = {
149+ file: "docs/start.md",
150+ kept: "yours" as const,
151+ theirs: { agent: "client", version: 2 },
152+ auto: { pick: "yours" as const, by: "model" as const, confidence: 0.81, reason: "r" },
153+ };
154+ const item = settledItem("docs", 3, s);
155+ assert.equal(outlastsSync(item.text), true);
156+ assert.match(
157+ item.text,
158+ /^docs settled its collision with your version 2 in docs\/start\.md automatically, as abso's model advised \(confidence 0\.81\), pushing version 3:/,
159+ );
160+ const byHand = settledItem("docs", 3, { ...s, auto: undefined });
161+ assert.match(byHand.text, /in docs\/start\.md, pushing version 3:/);
162+});