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

abso autosettle: see or change what the server does with a held push (abso-core 23)

of shared·autosettle··Not checked

abso autosettle says the project's choice: Off, Advise, or Settle at a confidence. It also says when the gate is stopped and who changed it last. abso autosettle off|advise|settle [--at 0.3-0.95] changes it, which takes the owner's key (on staging, the shared token too); without --at the server keeps its own. On a server with no choice per project (the open server), it says the operator's AUTOSETTLE decides. A visitor folder refuses it.

Tried on project abso's Worker run locally (read, settle --at 0.7, advise, a bad word, --at 2) and on the open server. Tests: autosettle-command (words), visitor (the allow-list), typecheck clean.

Version 219 · Files at version 220

5 files, 105 lines added, 0 removed.

--- a/client/src/api.ts
+++ b/client/src/api.ts
@@ -19,6 +19,7 @@
1919 SyncAnswer,
2020} from "./api-answers.ts";
2121import { ApiError, errorSentence, neverSent } from "./api-error.ts";
22+import type { AutosettleAnswer, AutosettleMode } from "./autosettle-commands.ts";
2223import {
2324 boxQuery,
2425 consumeRun,
@@ -717,6 +718,16 @@
717718 return this.json("POST", `/visibility?visibility=${v}`, {});
718719 }
719720
721+ /** The project's auto-settle choice (abso-core 23): off, advise or settle, and how sure before abso settles. */
722+ autosettle(): Promise<AutosettleAnswer> {
723+ return this.json("GET", "/autosettle");
724+ }
726+ /** Change it (abso-core 23): an owner's key, or the shared token on staging. Without `at`, the server keeps its own. */
727+ setAutosettle(mode: AutosettleMode, at?: number): Promise<AutosettleAnswer> {
728+ return this.json("POST", `/autosettle?mode=${mode}${at === undefined ? "" : `&at=${at}`}`, {});
729+ }
720731 /** Take back this agent's queued publishes (#39); refused while one is being checked. */
721732 unqueue(): Promise<{ pulled: readonly number[] }> {
722733 return this.json("POST", this.agentPath("unqueue"), {});
--- /dev/null
+++ b/client/src/autosettle-commands.ts
@@ -0,0 +1,62 @@
1+// abso autosettle (abso-core 23): see or change what the project's server does with a held push: Off, Advise or Settle.
2+// The model only picks a side; under Settle, the held agent's own abso settles and pushes again.
3+import { ApiError } from "./api-error.ts";
4+import { type Parsed, str, UsageError } from "./args.ts";
5+import { type Env, type Output, open } from "./commands.ts";
6+
7+export type AutosettleMode = "off" | "advise" | "settle";
8+const MODES: readonly AutosettleMode[] = ["off", "advise", "settle"];
9+
10+/** The project's choice, as the server answers it. */
11+export interface AutosettleAnswer {
12+ readonly project: string;
13+ readonly mode: AutosettleMode;
14+ readonly at: number;
15+ readonly changedBy?: string;
16+ readonly changedAt?: string;
17+ readonly gate?: "open" | "stopped";
18+}
20+/** A server with no choice per project (the open server): its operator's AUTOSETTLE decides. */
21+const NO_CHOICE_HERE =
22+ "This server keeps no auto-settle choice per project: whoever runs it sets AUTOSETTLE (off, on for advice, act to settle).";
24+export function autosettleWords(a: AutosettleAnswer): string {
25+ const what =
26+ a.mode === "off"
27+ ? "Off: held pushes come back as they always have."
28+ : a.mode === "advise"
29+ ? "Advise: each collision in a held push comes back with the model's pick, how sure it is, and why. The agent still settles."
30+ : `Settle at ${a.at.toFixed(2)}: when the model is at least that sure about every collision in a held push, the agent's abso settles it and pushes again. Anything less sure is left to the agent, with the advice.`;
31+ return [
32+ `${a.project} is on ${what}`,
33+ ...(a.gate === "stopped" ? ["Stopped by abso for now: no held push gets advice until it starts again."] : []),
34+ ...(a.changedBy ? [`Last changed by ${a.changedBy}${a.changedAt ? `, ${a.changedAt}` : ""}.`] : []),
35+ ].join("\n");
36+}
38+export async function runAutosettle(args: Parsed, env: Env): Promise<Output> {
39+ if (args.positionals.length > 1) throw new UsageError("autosettle takes at most one word: off, advise or settle");
40+ const want = args.positionals[0];
41+ const atRaw = str(args, "at");
42+ const { api } = open(env);
43+ try {
44+ if (want === undefined) {
45+ if (atRaw !== undefined)
46+ throw new UsageError("--at goes with a choice, for example: abso autosettle settle --at 0.6");
47+ const now = await api.autosettle();
48+ return { text: autosettleWords(now), json: { ...now } };
49+ }
50+ if (!MODES.includes(want as AutosettleMode))
51+ throw new UsageError("autosettle is off, advise or settle, for example: abso autosettle settle --at 0.6");
52+ const at = atRaw === undefined ? undefined : Number(atRaw);
53+ if (at !== undefined && !(at >= 0.3 && at <= 0.95))
54+ throw new UsageError("--at is how sure the model must be before abso settles: a number from 0.3 to 0.95");
55+ const set = await api.setAutosettle(want as AutosettleMode, at);
56+ return { text: autosettleWords(set), json: { ...set } };
57+ } catch (e) {
58+ if (e instanceof ApiError && e.status === 404 && /no such route/.test(e.message))
59+ return { text: NO_CHOICE_HERE, json: { error: NO_CHOICE_HERE } };
60+ throw e;
61+ }
62+}
--- a/client/src/main.ts
+++ b/client/src/main.ts
@@ -6,6 +6,7 @@
66import { runAnnounce, runNews, runStart } from "./announce.ts";
77import { ApiError } from "./api.ts";
88import { bool, type FlagSpec, type Parsed, parseArgs, str, UsageError } from "./args.ts";
9+import { runAutosettle } from "./autosettle-commands.ts";
910import { bodyFilesHelp, readBodyFiles, withBodyFiles } from "./body-files.ts";
1011import { boxPublic, boxText, login, loginRequest, logout, readBox } from "./box.ts";
1112import { runDiff, runFiles, runLog, runRestore, runShow } from "./changes.ts";
@@ -545,6 +546,13 @@
545546 "Whether the project is public. With no word, says which. public, with --yes, lets anyone read it, signed in or not: files, versions, drafts, notes, Issues, people's names, CI as pass or fail; never keys, CI logs, preview links or boxes. private makes it members-only again. Switching takes the project owner's key (on staging, the shared token works too).",
546547 run: runVisibility,
547548 },
549+ autosettle: {
550+ flags: { at: "string" },
551+ usage: "abso autosettle [off|advise|settle] [--at 0.3-0.95]",
552+ about:
553+ "What the server does with a held push (abso-core 23). With no word, says which. advise: each collision comes back with a model's pick (keep yours, keep theirs, keep both, or leave it to an agent), how sure it is, and why; the agent still settles. settle: when the model is at least --at sure about every collision, your abso settles it and pushes again by itself, saying so in the message; anything less sure stays held, with the advice. off: held pushes come back as they always have. New projects start on advise. Changing it takes the project owner's key (on staging, the shared token works too). ABSO_AUTOSETTLE=off on a machine makes its abso settle nothing by itself.",
554+ run: runAutosettle,
555+ },
548556 ci: {
549557 flags: { version: "string", revoke: "boolean" },
550558 usage: "abso ci [<version>] | abso ci --revoke",
--- /dev/null
+++ b/client/test/autosettle-command.test.ts
@@ -0,0 +1,23 @@
1+// abso autosettle's words (abso-core 23): each choice said plainly, the gate when stopped, and who changed it.
2+import assert from "node:assert/strict";
3+import { test } from "node:test";
4+import { autosettleWords } from "../src/autosettle-commands.ts";
5+
6+test("each choice is said plainly, with the gate when it's stopped and who changed it last", () => {
7+ assert.match(
8+ autosettleWords({ project: "p", mode: "off", at: 0.5 }),
9+ /^p is on Off: held pushes come back as they always have\.$/,
10+ );
11+ assert.match(autosettleWords({ project: "p", mode: "advise", at: 0.5 }), /The agent still settles\./);
12+ const settle = autosettleWords({
13+ project: "p",
14+ mode: "settle",
15+ at: 0.6,
16+ gate: "stopped",
17+ changedBy: "christopher",
18+ changedAt: "2026-10-15T07:00:00.000Z",
19+ });
20+ assert.match(settle, /^p is on Settle at 0\.60: /);
21+ assert.match(settle, /Stopped by abso for now/);
22+ assert.match(settle, /Last changed by christopher, 2026-10-15T07:00:00\.000Z\.$/);
23+});
--- a/client/test/visitor.test.ts
+++ b/client/test/visitor.test.ts
@@ -58,6 +58,7 @@
5858 "reply",
5959 "unqueue",
6060 "visibility",
61+ "autosettle",
6162 "ci",
6263 "shot",
6364 "prep",