{"version":220,"agent":"autosettle","message":"abso autosettle: see or change what the server does with a held push (abso-core 23)\n\nabso 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.\n\nTried 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.","time":1792048146388,"timeIso":"2026-10-15T07:09:06.388Z","changes":6,"change":3587,"files":["client/src/api.ts","client/src/autosettle-commands.ts","client/src/main.ts","client/test/autosettle-command.test.ts","client/test/visitor.test.ts"],"draft":null,"diff":[{"path":"client/src/api.ts","added":11,"removed":0,"diff":"--- a/client/src/api.ts\n+++ b/client/src/api.ts\n@@ -19,6 +19,7 @@\n \tSyncAnswer,\n } from \"./api-answers.ts\";\n import { ApiError, errorSentence, neverSent } from \"./api-error.ts\";\n+import type { AutosettleAnswer, AutosettleMode } from \"./autosettle-commands.ts\";\n import {\n \tboxQuery,\n \tconsumeRun,\n@@ -717,6 +718,16 @@\n \t\treturn this.json(\"POST\", `/visibility?visibility=${v}`, {});\n \t}\n \n+\t/** The project's auto-settle choice (abso-core 23): off, advise or settle, and how sure before abso settles. */\n+\tautosettle(): Promise<AutosettleAnswer> {\n+\t\treturn this.json(\"GET\", \"/autosettle\");\n+\t}\n+\n+\t/** Change it (abso-core 23): an owner's key, or the shared token on staging. Without `at`, the server keeps its own. */\n+\tsetAutosettle(mode: AutosettleMode, at?: number): Promise<AutosettleAnswer> {\n+\t\treturn this.json(\"POST\", `/autosettle?mode=${mode}${at === undefined ? \"\" : `&at=${at}`}`, {});\n+\t}\n+\n \t/** Take back this agent's queued publishes (#39); refused while one is being checked. */\n \tunqueue(): Promise<{ pulled: readonly number[] }> {\n \t\treturn this.json(\"POST\", this.agentPath(\"unqueue\"), {});"},{"path":"client/src/autosettle-commands.ts","added":62,"removed":0,"diff":"--- /dev/null\n+++ b/client/src/autosettle-commands.ts\n@@ -0,0 +1,62 @@\n+// abso autosettle (abso-core 23): see or change what the project's server does with a held push: Off, Advise or Settle.\n+// The model only picks a side; under Settle, the held agent's own abso settles and pushes again.\n+import { ApiError } from \"./api-error.ts\";\n+import { type Parsed, str, UsageError } from \"./args.ts\";\n+import { type Env, type Output, open } from \"./commands.ts\";\n+\n+export type AutosettleMode = \"off\" | \"advise\" | \"settle\";\n+const MODES: readonly AutosettleMode[] = [\"off\", \"advise\", \"settle\"];\n+\n+/** The project's choice, as the server answers it. */\n+export interface AutosettleAnswer {\n+\treadonly project: string;\n+\treadonly mode: AutosettleMode;\n+\treadonly at: number;\n+\treadonly changedBy?: string;\n+\treadonly changedAt?: string;\n+\treadonly gate?: \"open\" | \"stopped\";\n+}\n+\n+/** A server with no choice per project (the open server): its operator's AUTOSETTLE decides. */\n+const NO_CHOICE_HERE =\n+\t\"This server keeps no auto-settle choice per project: whoever runs it sets AUTOSETTLE (off, on for advice, act to settle).\";\n+\n+export function autosettleWords(a: AutosettleAnswer): string {\n+\tconst what =\n+\t\ta.mode === \"off\"\n+\t\t\t? \"Off: held pushes come back as they always have.\"\n+\t\t\t: a.mode === \"advise\"\n+\t\t\t\t? \"Advise: each collision in a held push comes back with the model's pick, how sure it is, and why. The agent still settles.\"\n+\t\t\t\t: `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.`;\n+\treturn [\n+\t\t`${a.project} is on ${what}`,\n+\t\t...(a.gate === \"stopped\" ? [\"Stopped by abso for now: no held push gets advice until it starts again.\"] : []),\n+\t\t...(a.changedBy ? [`Last changed by ${a.changedBy}${a.changedAt ? `, ${a.changedAt}` : \"\"}.`] : []),\n+\t].join(\"\\n\");\n+}\n+\n+export async function runAutosettle(args: Parsed, env: Env): Promise<Output> {\n+\tif (args.positionals.length > 1) throw new UsageError(\"autosettle takes at most one word: off, advise or settle\");\n+\tconst want = args.positionals[0];\n+\tconst atRaw = str(args, \"at\");\n+\tconst { api } = open(env);\n+\ttry {\n+\t\tif (want === undefined) {\n+\t\t\tif (atRaw !== undefined)\n+\t\t\t\tthrow new UsageError(\"--at goes with a choice, for example: abso autosettle settle --at 0.6\");\n+\t\t\tconst now = await api.autosettle();\n+\t\t\treturn { text: autosettleWords(now), json: { ...now } };\n+\t\t}\n+\t\tif (!MODES.includes(want as AutosettleMode))\n+\t\t\tthrow new UsageError(\"autosettle is off, advise or settle, for example: abso autosettle settle --at 0.6\");\n+\t\tconst at = atRaw === undefined ? undefined : Number(atRaw);\n+\t\tif (at !== undefined && !(at >= 0.3 && at <= 0.95))\n+\t\t\tthrow new UsageError(\"--at is how sure the model must be before abso settles: a number from 0.3 to 0.95\");\n+\t\tconst set = await api.setAutosettle(want as AutosettleMode, at);\n+\t\treturn { text: autosettleWords(set), json: { ...set } };\n+\t} catch (e) {\n+\t\tif (e instanceof ApiError && e.status === 404 && /no such route/.test(e.message))\n+\t\t\treturn { text: NO_CHOICE_HERE, json: { error: NO_CHOICE_HERE } };\n+\t\tthrow e;\n+\t}\n+}"},{"path":"client/src/main.ts","added":8,"removed":0,"diff":"--- a/client/src/main.ts\n+++ b/client/src/main.ts\n@@ -6,6 +6,7 @@\n import { runAnnounce, runNews, runStart } from \"./announce.ts\";\n import { ApiError } from \"./api.ts\";\n import { bool, type FlagSpec, type Parsed, parseArgs, str, UsageError } from \"./args.ts\";\n+import { runAutosettle } from \"./autosettle-commands.ts\";\n import { bodyFilesHelp, readBodyFiles, withBodyFiles } from \"./body-files.ts\";\n import { boxPublic, boxText, login, loginRequest, logout, readBox } from \"./box.ts\";\n import { runDiff, runFiles, runLog, runRestore, runShow } from \"./changes.ts\";\n@@ -545,6 +546,13 @@\n \t\t\t\"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).\",\n \t\trun: runVisibility,\n \t},\n+\tautosettle: {\n+\t\tflags: { at: \"string\" },\n+\t\tusage: \"abso autosettle [off|advise|settle] [--at 0.3-0.95]\",\n+\t\tabout:\n+\t\t\t\"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.\",\n+\t\trun: runAutosettle,\n+\t},\n \tci: {\n \t\tflags: { version: \"string\", revoke: \"boolean\" },\n \t\tusage: \"abso ci [<version>] | abso ci --revoke\","},{"path":"client/test/autosettle-command.test.ts","added":23,"removed":0,"diff":"--- /dev/null\n+++ b/client/test/autosettle-command.test.ts\n@@ -0,0 +1,23 @@\n+// abso autosettle's words (abso-core 23): each choice said plainly, the gate when stopped, and who changed it.\n+import assert from \"node:assert/strict\";\n+import { test } from \"node:test\";\n+import { autosettleWords } from \"../src/autosettle-commands.ts\";\n+\n+test(\"each choice is said plainly, with the gate when it's stopped and who changed it last\", () => {\n+\tassert.match(\n+\t\tautosettleWords({ project: \"p\", mode: \"off\", at: 0.5 }),\n+\t\t/^p is on Off: held pushes come back as they always have\\.$/,\n+\t);\n+\tassert.match(autosettleWords({ project: \"p\", mode: \"advise\", at: 0.5 }), /The agent still settles\\./);\n+\tconst settle = autosettleWords({\n+\t\tproject: \"p\",\n+\t\tmode: \"settle\",\n+\t\tat: 0.6,\n+\t\tgate: \"stopped\",\n+\t\tchangedBy: \"christopher\",\n+\t\tchangedAt: \"2026-10-15T07:00:00.000Z\",\n+\t});\n+\tassert.match(settle, /^p is on Settle at 0\\.60: /);\n+\tassert.match(settle, /Stopped by abso for now/);\n+\tassert.match(settle, /Last changed by christopher, 2026-10-15T07:00:00\\.000Z\\.$/);\n+});"},{"path":"client/test/visitor.test.ts","added":1,"removed":0,"diff":"--- a/client/test/visitor.test.ts\n+++ b/client/test/visitor.test.ts\n@@ -58,6 +58,7 @@\n \t\"reply\",\n \t\"unqueue\",\n \t\"visibility\",\n+\t\"autosettle\",\n \t\"ci\",\n \t\"shot\",\n \t\"prep\","}],"ci":null}