- MCP
- blame on this site's /mcp
- CLI
- abso blame client/src/status-commands.ts --version 280 --json
- JSON
- /christopher/abso-core/blame/client/src/status-commands.ts?version=280&format=json
401 linesFirst import 84% · speed 5% · pinch 4% · review 3% · rename 2% · engine 1% · infra-split 1%Last change pinch in version 280,
401 lines from 13 changes in 11 versions.
2// and settle.
4import { existsSync, lstatSync, mkdirSync, readFileSync, renameSync } from "node:fs";
5import { dirname, join } from "node:path";
6import { isComposed, pathKey } from "../../worker/project/pathkey.ts";
7import type { OpenCollision } from "./api.ts";
8import { bool, type Parsed, UsageError } from "./args.ts";
9import { readKnownBlobs, writeKnownBlobs } from "./blobs.ts";
10import { ciText } from "./ci.ts";
speed44status: skip reading files found unchanged before. A record in the folder's state dir (clean.json) keeps, per file, the size, time and inode of the file and its known copy, taken before reading; only status's unrecorded and line-ending checks use it, record always reads every file. Files changed too recently to trust are read; an unknown format or client version reads everything. The state dir is found once per walk. The mod-commit test no longer depends on how long it takes.Compare11import { CleanFiles } from "./clean-files.ts";
pinch68An npm install of abso says when npm has a later version: status and --version add 'abso X is out and this is Y: npm install -g @abso-cli/abso updates it.' npm is asked at most once a day, and its answer is kept in ~/.abso/npm-latest.json. A copy bundled for a server still compares commits with that server. newerCommitNote is now newerClientNote.Compare12import { newerClientNote } from "./client-version.ts";
init0Start the project13import { type Env, heard, type Output, open, plural } from "./command-env.ts";
14import {
15 LISTED,
16 leftOutText,
pinch280A pull whose answer never arrives no longer leaves the folder behind
The server moves the agent's base when it answers a pull, and later pulls send only what changed since that base. When the answer was lost (a timeout on a slow server), the files it carried were never written, and every later pull, status, restore and export agreed the folder was current.
Now the client notes a pull in .abso/pulling.json before asking, and takes the note away once the answer is written. While the note is there, abso status says a pull didn't finish, and the next pull asks for every file in the view (as pull --full does) and writes the ones that differ, keeping work done in the folder meanwhile, as every pull does. follow, draft switching and draft-pull pull the same way. A server without full pulls gets a plain pull.
Tests: client/test/lost-pull.test.ts (a fake server that carries out a pull and drops its answer), plus held-push, join-signed-out and record-batches: 19 pass. tsc and Biome clean.Compare17 pullUnfinishedText,
19 readUnwritten,
20 recordedFirst,
21 recordFolder,
22 turnedBinaryText,
23 unwrittenText,
24} from "./commands.ts";
25import { credentialLabel, type Settings, writeConfig } from "./config.ts";
26import { uncomposedText } from "./core.ts";
27import {
28 absolute,
29 forgetKnown,
30 isLocalOnly,
speed44status: skip reading files found unchanged before. A record in the folder's state dir (clean.json) keeps, per file, the size, time and inode of the file and its known copy, taken before reading; only status's unrecorded and line-ending checks use it, record always reads every file. Files changed too recently to trust are read; an unknown format or client version reads everything. The state dir is found once per walk. The mod-commit test no longer depends on how long it takes.Compare31 knownPath,
33 newFileEndings,
34 normalize,
35 readKnown,
36 readText,
37 unrecorded,
38 writeFileAtomic,
39 writeKnown,
40} from "./folder.ts";
41import { fileArg } from "./history.ts";
42import { modsBehindText } from "./install.ts";
43import { withFolderLock } from "./lock.ts";
44import { readKnownModes, writeKnownModes } from "./modes.ts";
45import { queueText } from "./queue.ts";
46import { unsafePath } from "./safety.ts";
47import { keepFrom, settleText } from "./settle.ts";
review17New folders keep their state in .abso/, and the machine's sign-in, servers and admin token are read from ~/.abso/ first, then ~/.avcs/. A folder made before, with only .avcs/, is untouched: it keeps working, is never half-moved, and no older client or mod loses it. stateDir(root) and homeFile/homeWritePath are in the new client/src/state-dir.ts and replace the old AVCS_DIR constant everywhere. abso login writes only to ~/.abso/ and leaves ~/.avcs/ alone; logout removes both copies. The edit mod and the view mod read either folder. .abso is skipped like .avcs (including its odd spellings), the git exclude names whichever folder is in use, and the messages name .abso. Not changed: avcs.json (the server reads that name, so abso.json needs the server to learn it first), .avcsignore, env var names and wire headers. Tests: 709 run, 708 pass (one is skipped), including new ones for the folder choice, the home-file order and box sign-in; biome ci has no errors.Compare48import { stateDir } from "./state-dir.ts";
50// --- status ---
52/**
53 * Files in the agent's view that the folder lacks (#37: a join that got only
54 * part of them). A file the agent deleted and hasn't recorded is in `pending`,
55 * not here.
56 */
57export function missingHere(root: string, view: readonly string[], pending: ReadonlySet<string>): string[] {
58 return view.filter((rel) => {
59 if (pending.has(rel) || isLocalOnly(rel)) return false;
60 try {
61 lstatSync(absolute(root, rel));
62 return false;
63 } catch {
64 return true;
65 }
66 });
67}
69/**
70 * Recorded text files whose copy on disk differs from the record only by CRLF
infra-split37Comments and test names give each reason in plain words, without naming who raised it
Notes like "(#37, Builder 5)" or "(AVCS - Security)" become "(#37)" or go, and a private commit hash after a name goes with it. Issue numbers and references such as git's CVE-2019-1353 stay. Only comments and test names change; no behavior changes.Compare71 * line endings (#37: Python's text mode on Windows writes CRLF).
init0Start the project72 * abso records them, and abso run sends them, with LF; a tool run here sees
73 * CRLF. Files git would check out with CRLF are left out of the list.
speed44status: skip reading files found unchanged before. A record in the folder's state dir (clean.json) keeps, per file, the size, time and inode of the file and its known copy, taken before reading; only status's unrecorded and line-ending checks use it, record always reads every file. Files changed too recently to trust are read; an unknown format or client version reads everything. The state dir is found once per walk. The mod-commit test no longer depends on how long it takes.Compare74 * With `clean` (status), a file found unchanged before is answered without reading it.
speed44status: skip reading files found unchanged before. A record in the folder's state dir (clean.json) keeps, per file, the size, time and inode of the file and its known copy, taken before reading; only status's unrecorded and line-ending checks use it, record always reads every file. Files changed too recently to trust are read; an unknown format or client version reads everything. The state dir is found once per walk. The mod-commit test no longer depends on how long it takes.Compare76export function crlfOnly(root: string, clean?: CleanFiles): string[] {
speed44status: skip reading files found unchanged before. A record in the folder's state dir (clean.json) keeps, per file, the size, time and inode of the file and its known copy, taken before reading; only status's unrecorded and line-ending checks use it, record always reads every file. Files changed too recently to trust are read; an unknown format or client version reads everything. The state dir is found once per walk. The mod-commit test no longer depends on how long it takes.Compare78 const state = stateDir(root);
speed44status: skip reading files found unchanged before. A record in the folder's state dir (clean.json) keeps, per file, the size, time and inode of the file and its known copy, taken before reading; only status's unrecorded and line-ending checks use it, record always reads every file. Files changed too recently to trust are read; an unknown format or client version reads everything. The state dir is found once per walk. The mod-commit test no longer depends on how long it takes.Compare80 const key = clean?.key(absolute(root, rel), knownPath(root, rel, state));
81 const was = key && clean!.check(rel, key);
82 if (was) {
83 if (was.cr) out.push(rel);
84 continue;
85 }
87 if (disk === undefined || !disk.includes("\r")) continue;
speed44status: skip reading files found unchanged before. A record in the folder's state dir (clean.json) keeps, per file, the size, time and inode of the file and its known copy, taken before reading; only status's unrecorded and line-ending checks use it, record always reads every file. Files changed too recently to trust are read; an unknown format or client version reads everything. The state dir is found once per walk. The mod-commit test no longer depends on how long it takes.Compare88 if (normalize(disk) === readKnown(root, rel, state)) {
89 out.push(rel);
90 if (key) clean!.mark(rel, key, true);
91 }
93 const git = newFileEndings(root, out);
94 return out.filter((rel) => git.get(rel) !== "crlf").sort();
95}
97/**
98 * Whether the last edit here came from an older edit mod than the one
99 * installed (#37, Reporter: a chat keeps the mod it started with, and an old
100 * one sent files nested ignore files leave out). The mod writes its version
101 * as the sixth field of each .avcs/hook.log line (from #33); the installed
102 * one's is in its plugin.json. Says nothing until the installed mod carries a
103 * commit, or when the last edit came from the mod as installed.
104 */
105export function staleModText(root: string, env: Readonly<Record<string, string | undefined>>): string[] {
106 let installed: string | undefined;
review40Mods: the hooks mod is abso-hooks and the view mod abso-view; an install moves the old skills/avcs and skills/avcs-view folders to ~/.abso/retired-mods (moved, not deleted); the hook stands down for either name; status checks either. Tests cover the move.Compare107 const skills = join(env.CLAUDE_CONFIG_DIR || join(env.USERPROFILE || env.HOME || "", ".claude"), "skills");
108 for (const name of ["abso-hooks", "avcs"]) {
109 try {
110 installed = String(
111 (JSON.parse(readFileSync(join(skills, name, ".claude-plugin", "plugin.json"), "utf8")) as { version?: unknown })
112 .version,
113 );
114 break;
115 } catch {}
review40Mods: the hooks mod is abso-hooks and the view mod abso-view; an install moves the old skills/avcs and skills/avcs-view folders to ~/.abso/retired-mods (moved, not deleted); the hook stands down for either name; status checks either. Tests cover the move.Compare117 if (installed === undefined) return [];
119 let last: string[] | undefined;
120 try {
review17New folders keep their state in .abso/, and the machine's sign-in, servers and admin token are read from ~/.abso/ first, then ~/.avcs/. A folder made before, with only .avcs/, is untouched: it keeps working, is never half-moved, and no older client or mod loses it. stateDir(root) and homeFile/homeWritePath are in the new client/src/state-dir.ts and replace the old AVCS_DIR constant everywhere. abso login writes only to ~/.abso/ and leaves ~/.avcs/ alone; logout removes both copies. The edit mod and the view mod read either folder. .abso is skipped like .avcs (including its odd spellings), the git exclude names whichever folder is in use, and the messages name .abso. Not changed: avcs.json (the server reads that name, so abso.json needs the server to learn it first), .avcsignore, env var names and wire headers. Tests: 709 run, 708 pass (one is skipped), including new ones for the folder choice, the home-file order and box sign-in; biome ci has no errors.Compare121 const lines = readFileSync(join(stateDir(root), "hook.log"), "utf8")
123 .filter((l) => l.includes("(in process"));
124 last = lines.at(-1)?.split("\t");
125 } catch {
126 return [];
127 }
128 if (last === undefined) return [];
129 const sent = last[5]?.replace(/^avcs-mod\//, "");
130 if (sent === installed || sent === "checkout") return [];
131 const when = last[0] ? ` (at ${last[0].slice(11, 16)} UTC)` : "";
132 return [
133 `The last edit here${when} came from edit mod ${sent ?? "from before mods carried a version"}, but ${installed} is installed. A chat keeps the mod it started with; restart the chat that edits this folder to load the installed one.`,
134 ];
135}
137/** abso reader on|off: make this folder's agent a reader, or a writer again (#37, Reporter). */
138export async function runReader(args: Parsed, env: Env): Promise<Output> {
139 const word = args.positionals[0];
140 if (args.positionals.length !== 1 || (word !== "on" && word !== "off"))
141 throw new UsageError("abso reader on, or abso reader off");
142 const { root, api } = open(env);
143 const on = word === "on";
144 // The server first: it refuses a reader with unpublished or parked work (409), and then nothing here changes.
145 await api.reader(on);
review17New folders keep their state in .abso/, and the machine's sign-in, servers and admin token are read from ~/.abso/ first, then ~/.avcs/. A folder made before, with only .avcs/, is untouched: it keeps working, is never half-moved, and no older client or mod loses it. stateDir(root) and homeFile/homeWritePath are in the new client/src/state-dir.ts and replace the old AVCS_DIR constant everywhere. abso login writes only to ~/.abso/ and leaves ~/.avcs/ alone; logout removes both copies. The edit mod and the view mod read either folder. .abso is skipped like .avcs (including its odd spellings), the git exclude names whichever folder is in use, and the messages name .abso. Not changed: avcs.json (the server reads that name, so abso.json needs the server to learn it first), .avcsignore, env var names and wire headers. Tests: 709 run, 708 pass (one is skipped), including new ones for the folder choice, the home-file order and box sign-in; biome ci has no errors.Compare146 const raw = JSON.parse(readFileSync(join(stateDir(root), "config.json"), "utf8")) as Record<string, unknown>;
148 else delete raw.reader;
149 writeConfig(root, raw as unknown as Settings);
150 return {
151 text: on
rename100abso publish is now abso push, abso sync is now abso pull (abso 427)
Commands, help, flags, messages, MCP tool names and descriptions, hook text, README, SKILL.md and tests say push and pull; "shared" stays the noun ("Pushed version N"). No aliases, no notices. A queued push that was "pulled" is now "turned back", so pull means one thing.
push -f/--force/-u/--all/--tags and pull --rebase/--ff-only/--squash refuse with one plain line naming the abso way; push and pull take no remote or branch.
Kept as stored: log entry kinds (publish, sync, pulled), HTTP route paths, the pipeline trigger on: publish, the yours (unpublished) marker, npm-publish.Compare152 ? "This folder is a reader now: status, pull, log, show, files and export work, and nothing it does is recorded or pushed. abso reader off undoes it."
153 : "This folder records and pushes again.",
155 };
156}
158/** Status's lines for marker blocks still in the draft (#11). */
159export function openCollisionsText(open: readonly OpenCollision[]): string[] {
160 if (open.length === 0) return [];
161 return [
rename100abso publish is now abso push, abso sync is now abso pull (abso 427)
Commands, help, flags, messages, MCP tool names and descriptions, hook text, README, SKILL.md and tests say push and pull; "shared" stays the noun ("Pushed version N"). No aliases, no notices. A queued push that was "pulled" is now "turned back", so pull means one thing.
push -f/--force/-u/--all/--tags and pull --rebase/--ff-only/--squash refuse with one plain line naming the abso way; push and pull take no remote or branch.
Kept as stored: log entry kinds (publish, sync, pulled), HTTP route paths, the pipeline trigger on: publish, the yours (unpublished) marker, npm-publish.Compare162 `${plural(open.length, "collision")} to settle before you push (keep yours, theirs or a mix and delete the marker lines, or abso settle <file> --yours|--theirs|--both):`,
164 (c) =>
165 ` ${c.file} lines ${c.lines[0]}-${c.lines[1]}, with ${c.theirs.agent}'s version ${c.theirs.version} ("${c.theirs.message}")`,
166 ),
167 ];
168}
infra-split37Comments and test names give each reason in plain words, without naming who raised it
Notes like "(#37, Builder 5)" or "(AVCS - Security)" become "(#37)" or go, and a private commit hash after a name goes with it. Issue numbers and references such as git's CVE-2019-1353 stay. Only comments and test names change; no behavior changes.Compare170/** abso fix-eol: rewrite the files that differ from the record only in line endings with LF, as recorded (#37). */
172 * abso mv <from> <to> (#49): move a file in the draft,
173 * its lines keeping their history, as git mv. The way to change a file's case
174 * (or its Unicode spelling), since two spellings of one name are one file.
175 */
176export async function runMv(args: Parsed, env: Env): Promise<Output> {
177 if (args.positionals.length !== 2) throw new UsageError("mv takes the file and its new name: abso mv <from> <to>");
178 const { root, config, api } = open(env);
179 if (config.reader) throw new UsageError(READER_REFUSES);
180 const from = fileArg(root, env.cwd, args.positionals[0]!);
181 const to = fileArg(root, env.cwd, args.positionals[1]!);
182 if (from === to) throw new UsageError(`${from} already has that name`);
183 const bad =
184 unsafePath(to) ??
185 (isLocalOnly(to) ? "it is under .git, .claude, .avcs or node_modules, which stay local" : undefined);
186 if (bad !== undefined) throw new UsageError(`can't move to ${to}: ${bad}`);
187 const fromPath = absolute(root, from);
188 const toPath = absolute(root, to);
189 if (!existsSync(fromPath)) throw new UsageError(`${from} isn't in this folder`);
190 // A new case (or Unicode spelling) of the same name is the same file on Windows and macOS; anything else must be free.
191 const sameFile = pathKey(from) === pathKey(to);
192 if (!sameFile && existsSync(toPath)) throw new UsageError(`${to} already exists; move or delete it first`);
193 // Edits not yet sent go first, so the move carries the file as it is.
194 await recordFolder(root, api);
195 const answer = await api.move(from, to);
196 heard(root, answer.news);
197 await withFolderLock(root, "mv", async () => {
198 mkdirSync(dirname(toPath), { recursive: true });
199 renameSync(fromPath, toPath);
200 const text = readKnown(root, from);
201 forgetKnown(root, from);
202 if (text !== undefined) writeKnown(root, to, text);
203 const modes = readKnownModes(root);
204 const mode = modes.get(from);
205 if (mode !== undefined) {
206 modes.delete(from);
207 modes.set(to, mode);
208 writeKnownModes(root, modes);
209 }
210 const blobs = readKnownBlobs(root);
211 const sha = blobs.get(from);
212 if (sha !== undefined) {
213 blobs.delete(from);
214 blobs.set(to, sha);
215 writeKnownBlobs(root, blobs);
216 }
217 });
218 return {
219 text: [
rename100abso publish is now abso push, abso sync is now abso pull (abso 427)
Commands, help, flags, messages, MCP tool names and descriptions, hook text, README, SKILL.md and tests say push and pull; "shared" stays the noun ("Pushed version N"). No aliases, no notices. A queued push that was "pulled" is now "turned back", so pull means one thing.
push -f/--force/-u/--all/--tags and pull --rebase/--ff-only/--squash refuse with one plain line naming the abso way; push and pull take no remote or branch.
Kept as stored: log entry kinds (publish, sync, pulled), HTTP route paths, the pipeline trigger on: publish, the yours (unpublished) marker, npm-publish.Compare220 `Moved ${from} to ${to} in your draft; its lines keep their history. It reaches shared with your next push.`,
222 ].join("\n"),
223 json: { from: answer.from, to: answer.to },
224 };
225}
227export async function runFixEol(_args: Parsed, env: Env): Promise<Output> {
228 const { root } = open(env);
229 const crlf = crlfOnly(root);
230 for (const rel of crlf) writeFileAtomic(absolute(root, rel), readText(absolute(root, rel))!.replace(/\r\n?/g, "\n"));
231 return {
232 text:
233 crlf.length === 0
234 ? "No file differs from the record only in line endings."
235 : `Rewrote ${plural(crlf.length, "file")} with LF line endings; their text is unchanged, so nothing is recorded.`,
236 json: { files: crlf },
237 };
238}
240/** abso settle <file...> --yours | --theirs | --both: rewrite each file's marker blocks, then record (#11). */
241export async function runSettle(args: Parsed, env: Env): Promise<Output> {
242 if (args.positionals.length === 0)
243 throw new UsageError("name the files to settle: abso settle <file...> --yours, --theirs or --both");
244 const keep = keepFrom({ yours: bool(args, "yours"), theirs: bool(args, "theirs"), both: bool(args, "both") });
245 const { root, api } = open(env);
246 const files = args.positionals.map((typed) => fileArg(root, env.cwd, typed));
247 const counts: [string, number][] = [];
248 for (const rel of files) {
249 const text = readText(absolute(root, rel));
250 if (text === undefined) throw new UsageError(`${rel} is not a text file in this folder`);
251 const settled = settleText(text, keep);
252 if (settled.blocks === 0)
253 throw new UsageError(`${rel} has no collision markers to settle (abso status lists the files that do)`);
254 counts.push([rel, settled.blocks]);
255 }
256 // Each file checked first, so a typo settles nothing.
257 for (const [rel] of counts)
258 writeFileAtomic(absolute(root, rel), settleText(readText(absolute(root, rel))!, keep).text);
259 const recorded = await recordFolder(root, api);
260 const which = keep === "both" ? "both sides" : keep;
261 return {
262 text: [
263 ...recordedFirst(recorded).filter((l) => !l.startsWith("Recorded first")),
rename100abso publish is now abso push, abso sync is now abso pull (abso 427)
Commands, help, flags, messages, MCP tool names and descriptions, hook text, README, SKILL.md and tests say push and pull; "shared" stays the noun ("Pushed version N"). No aliases, no notices. A queued push that was "pulled" is now "turned back", so pull means one thing.
push -f/--force/-u/--all/--tags and pull --rebase/--ff-only/--squash refuse with one plain line naming the abso way; push and pull take no remote or branch.
Kept as stored: log entry kinds (publish, sync, pulled), HTTP route paths, the pipeline trigger on: publish, the yours (unpublished) marker, npm-publish.Compare264 `Settled ${counts.map(([rel, n]) => `${plural(n, "block")} in ${rel}`).join(", ")}, keeping ${which}.${keep === "both" ? " Both sides stay in the file; when you push, the other author hears that you kept both." : ""}`,
266 json: { keep, files: counts.map(([file, blocks]) => ({ file, blocks })), recorded: recorded.sent },
267 };
268}
270/** The line status prints for files the folder is missing. */
271export function missingText(missing: readonly string[]): string[] {
272 if (missing.length === 0) return [];
273 const some =
274 missing.length <= LISTED
275 ? missing.join(", ")
276 : `${missing.slice(0, LISTED).join(", ")}, and ${missing.length - LISTED} more`;
277 return [
rename100abso publish is now abso push, abso sync is now abso pull (abso 427)
Commands, help, flags, messages, MCP tool names and descriptions, hook text, README, SKILL.md and tests say push and pull; "shared" stays the noun ("Pushed version N"). No aliases, no notices. A queued push that was "pulled" is now "turned back", so pull means one thing.
push -f/--force/-u/--all/--tags and pull --rebase/--ff-only/--squash refuse with one plain line naming the abso way; push and pull take no remote or branch.
Kept as stored: log entry kinds (publish, sync, pulled), HTTP route paths, the pipeline trigger on: publish, the yours (unpublished) marker, npm-publish.Compare278 `Missing from this folder though your view has ${missing.length === 1 ? "it" : "them"} (abso pull --full writes ${missing.length === 1 ? "it" : "them"}; abso files lists them all): ${some}`,
280}
282export async function runStatus(args: Parsed, env: Env): Promise<Output> {
283 const { root, config, api } = open(env);
pinch86Read a public project signed out: abso join <project> --reader with no sign-in makes a folder that reads it. The folder holds only its settings (server, project, visitor), sends no sign-in whatever the environment or the box holds, follows no redirect, and runs status, log, show, files, blame, why, where, issues, issue and search; every other command is refused before any call, from an allow-list a new command has to join. join answers a private project and a missing one alike, by the status answer's code alone. Tests in client/test/visitor.test.ts.Compare284 if (config.visitor) {
285 // A folder that reads signed out: shared's version and whether it's green. It holds no files to compare.
286 const status = await api.status();
287 return {
288 text: [
289 `Project ${config.project}: shared is at version ${status.version}. This folder reads it signed out, sending no sign-in: status, log, show, files, blame, why, where, issues, issue and search work here. To work on it: abso login, then abso join ${config.project} in a new folder.`,
290 ...ciText(status.ci ?? undefined, status.version),
291 ].join("\n"),
292 json: { project: config.project, version: status.version, visitor: true, ci: status.ci ?? null },
293 };
294 }
296 const { files: view, ...status } = short ? { ...(await api.status()), files: undefined } : await api.statusAndFiles();
speed44status: skip reading files found unchanged before. A record in the folder's state dir (clean.json) keeps, per file, the size, time and inode of the file and its known copy, taken before reading; only status's unrecorded and line-ending checks use it, record always reads every file. Files changed too recently to trust are read; an unknown format or client version reads everything. The state dir is found once per walk. The mod-commit test no longer depends on how long it takes.Compare297 const clean = CleanFiles.load(root);
298 const pending = unrecorded(root, false, new Set(), clean);
init0Start the project299 const local = new Set([...pending.files.keys(), ...pending.blobs.keys(), ...Object.keys(pending.modes)]);
300 if (short) {
speed44status: skip reading files found unchanged before. A record in the folder's state dir (clean.json) keeps, per file, the size, time and inode of the file and its known copy, taken before reading; only status's unrecorded and line-ending checks use it, record always reads every file. Files changed too recently to trust are read; an unknown format or client version reads everything. The state dir is found once per walk. The mod-commit test no longer depends on how long it takes.Compare301 clean.save();
infra-split39More comments and test names give their reason without naming who raised it
The same cleanup as version 37, for notes it missed because they were wrapped or worded differently: "(#37, Playtester 1)" becomes "(#37)", "(#39, agreed with Engine)" becomes "(#39)", and a commit hash after a name goes with the name. Issue numbers stay. No behavior changes.Compare302 // One word to stamp a build with (#37): 214, coast@3, 214+unpublished.
304 const unpublished = local.size > 0 || (me?.draftChanges ?? 0) > 0;
305 // +queued: published into the merge queue, not landed yet (#39).
rename100abso publish is now abso push, abso sync is now abso pull (abso 427)
Commands, help, flags, messages, MCP tool names and descriptions, hook text, README, SKILL.md and tests say push and pull; "shared" stays the noun ("Pushed version N"). No aliases, no notices. A queued push that was "pulled" is now "turned back", so pull means one thing.
push -f/--force/-u/--all/--tags and pull --rebase/--ff-only/--squash refuse with one plain line naming the abso way; push and pull take no remote or branch.
Kept as stored: log entry kinds (publish, sync, pulled), HTTP route paths, the pipeline trigger on: publish, the yours (unpublished) marker, npm-publish.Compare306 const word = `${me?.draft ? `${me.draft}@` : ""}${me?.base ?? "none"}${unpublished ? "+unpushed" : ""}${(me?.queued?.length ?? 0) > 0 ? "+queued" : ""}`;
init0Start the project307 return { text: word, json: { version: me?.base ?? null, draft: me?.draft ?? null, unpublished, word } };
308 }
309 const missing = view === undefined ? [] : missingHere(root, view.files, local);
310 const unwritten = readUnwritten(root);
speed44status: skip reading files found unchanged before. A record in the folder's state dir (clean.json) keeps, per file, the size, time and inode of the file and its known copy, taken before reading; only status's unrecorded and line-ending checks use it, record always reads every file. Files changed too recently to trust are read; an unknown format or client version reads everything. The state dir is found once per walk. The mod-commit test no longer depends on how long it takes.Compare311 const crlf = crlfOnly(root, clean);
312 clean.save();
infra-split37Comments and test names give each reason in plain words, without naming who raised it
Notes like "(#37, Builder 5)" or "(AVCS - Security)" become "(#37)" or go, and a private commit hash after a name goes with it. Issue numbers and references such as git's CVE-2019-1353 stay. Only comments and test names change; no behavior changes.Compare313 // Files an earlier record added to the draft and that are gone again (#37: scratch files a run
init0Start the project314 // recorded, deleted after): nothing reached shared, and the next record takes them out of the draft.
315 const deleted = [...pending.files].filter(([, text]) => text === null).map(([rel]) => rel);
316 const neverShared =
317 deleted.length === 0
318 ? []
319 : (await api.diff()).files
320 .filter((f) => f.before === null && deleted.includes(f.path))
321 .map((f) => f.path)
322 .sort();
323 for (const rel of neverShared) local.delete(rel);
324 const me = status.agents.find((a) => a.agent === config.agent);
325 const space = (draft: string | null | undefined): string => (draft ? `draft ${draft}` : "shared");
326 const parked = (me?.parked ?? []).filter((p) => p.draftChanges > 0);
327 const credential = credentialLabel(root, config.server, env.env);
pinch68An npm install of abso says when npm has a later version: status and --version add 'abso X is out and this is Y: npm install -g @abso-cli/abso updates it.' npm is asked at most once a day, and its answer is kept in ~/.abso/npm-latest.json. A copy bundled for a server still compares commits with that server. newerCommitNote is now newerClientNote.Compare328 const behind = await newerClientNote(config.server);
rename100abso publish is now abso push, abso sync is now abso pull (abso 427)
Commands, help, flags, messages, MCP tool names and descriptions, hook text, README, SKILL.md and tests say push and pull; "shared" stays the noun ("Pushed version N"). No aliases, no notices. A queued push that was "pulled" is now "turned back", so pull means one thing.
push -f/--force/-u/--all/--tags and pull --rebase/--ff-only/--squash refuse with one plain line naming the abso way; push and pull take no remote or branch.
Kept as stored: log entry kinds (publish, sync, pulled), HTTP route paths, the pipeline trigger on: publish, the yours (unpublished) marker, npm-publish.Compare330 `Project ${config.project}: shared is at version ${status.version}. This folder is ${config.agent}${config.reader || me?.reader ? ", a reader (it records and pushes nothing)" : ""}, working in ${space(me?.draft)}.${config.follow ? ` It follows label ${config.follow}: pulls take it to the newest version with that label.` : ""} Signed in with ${credential.kind}${credential.id ? ` ${credential.id}` : ""}.`,
332 // Is shared green (#39)? Right under the first line, since it decides what to do next.
333 ...ciText(status.ci, status.version),
334 ...queueText(status.queue, config.agent),
engine25Read abso.json first, then avcs.json (abso 224, ask 238): one helper (projectFileIn) for the queue, files kept whole, reviewers and init; publish, init and git intake check both files the same way; when shared has both, abso.json counts and status says avcs.json is ignored (status answer projectFile, printed by abso status). .abso/ is kept out of projects like .avcs/. Old projects with only avcs.json work as before.Compare335 ...(status.projectFile
336 ? [
337 `Shared has both ${status.projectFile.used} and ${status.projectFile.ignored}: ${status.projectFile.used} counts and ${status.projectFile.ignored} is ignored. Move anything you need into ${status.projectFile.used} and delete ${status.projectFile.ignored}.`,
338 ]
339 : []),
341 ? "Everything in this folder is recorded."
342 : `Not yet recorded (abso record sends them): ${[...local.keys()].join(", ")}`,
343 ...(neverShared.length > 0
344 ? [
rename100abso publish is now abso push, abso sync is now abso pull (abso 427)
Commands, help, flags, messages, MCP tool names and descriptions, hook text, README, SKILL.md and tests say push and pull; "shared" stays the noun ("Pushed version N"). No aliases, no notices. A queued push that was "pulled" is now "turned back", so pull means one thing.
push -f/--force/-u/--all/--tags and pull --rebase/--ff-only/--squash refuse with one plain line naming the abso way; push and pull take no remote or branch.
Kept as stored: log entry kinds (publish, sync, pulled), HTTP route paths, the pipeline trigger on: publish, the yours (unpublished) marker, npm-publish.Compare345 `Added to your draft by an earlier record and deleted since, so they never reach shared; the next record (pull, push, run) takes them out of your draft: ${neverShared.join(", ")}`,
347 : []),
348 ...openCollisionsText(me?.collisions ?? []),
349 ...staleModText(root, env.env),
350 ...modsBehindText(env.env),
351 ...missingText(missing),
352 ...unwrittenText(unwritten),
pinch280A pull whose answer never arrives no longer leaves the folder behind
The server moves the agent's base when it answers a pull, and later pulls send only what changed since that base. When the answer was lost (a timeout on a slow server), the files it carried were never written, and every later pull, status, restore and export agreed the folder was current.
Now the client notes a pull in .abso/pulling.json before asking, and takes the note away once the answer is written. While the note is there, abso status says a pull didn't finish, and the next pull asks for every file in the view (as pull --full does) and writes the ones that differ, keeping work done in the folder meanwhile, as every pull does. follow, draft switching and draft-pull pull the same way. A server without full pulls gets a plain pull.
Tests: client/test/lost-pull.test.ts (a fake server that carries out a pull and drops its answer), plus held-push, join-signed-out and record-batches: 19 pass. tsc and Biome clean.Compare353 ...pullUnfinishedText(root),
355 ? [
356 `${plural(crlf.length, "file")} differ${crlf.length === 1 ? "s" : ""} from what abso recorded only in line endings (CRLF here; abso records and abso run sends LF). Harmless; abso fix-eol rewrites ${crlf.length === 1 ? "it" : "them"} with LF.`,
357 ]
358 : []),
359 ...turnedBinaryText(pending.turnedBinary),
360 ...leftOutText(pending.leftOut),
361 ...(parked.length > 0
362 ? [
363 `You have work parked in ${parked.map((p) => `${space(p.draft)} (${plural(p.draftChanges, "change")})`).join(", ")}; abso switch brings it back.`,
364 ]
365 : []),
366 "Agents:",
367 ...status.agents.map((a) => {
368 const files = Array.isArray(a.files)
369 ? a.files.length === 0
370 ? ""
371 : `: ${a.files.join(", ")}`
372 : ` in ${plural(a.files as number, "file")}`;
373 const where = a.draft ? ` in draft ${a.draft},` : "";
374 return ` ${a.agent === config.agent ? "*" : " "} ${a.agent},${where} base ${a.base ?? "none"}, ${plural(a.draftChanges, "draft change")}${files}`;
375 }),
376 ...((status.drafts ?? []).length > 0
377 ? [
378 "Named drafts:",
379 ...(status.drafts ?? []).map(
380 (d) =>
381 ` ${d.name}: version ${d.version}, on shared version ${d.sharedBase}, ${plural(d.changes, "change")} not yet landed${d.agents.length > 0 ? `; ${d.agents.join(", ")}` : ""}`,
382 ),
383 ]
384 : []),
385 ];
386 return {
387 text: lines.join("\n"),
388 json: {
389 ...status,
390 agent: config.agent,
391 credential,
392 follow: config.follow ?? null,
393 unrecorded: [...local.keys()],
394 neverShared,
395 missing,
396 unwritten,
397 crlf,
398 leftOut: pending.leftOut,
399 },
400 };
401}