- MCP
- show on this site's /mcp
- CLI
- abso show 1 --draft names-only-client --json
- JSON
- /christopher/abso-core/versions/1?draft=names-only-client&format=json
Step 4 client half (rename to abso): the client reads and writes .abso, ~/.abso, ABSO_*, abso.json and .absoignore only, and refuses a folder that still has avcs.json or a .avcsignore. Draft only; it lands after the step 4 gates.
of the draft ·pinch·
Version 0 · Files at version 1
47 files, 705 lines added, 846 removed.
--- a/client/abso.ts
+++ b/client/abso.ts
@@ -1,6 +1,37 @@
1−// The abso client (#59). Run it as:
3−// It is client/avcs.ts under the product's name; avcs.ts stays, since
4−// installed hooks and settings run it.
55
6−import "./avcs.ts";
7+
11+
13+
25+ await serveMcp(process.stdin, (line) => process.stdout.write(`${line}\n`), process.cwd(), process.env);
client/avcs.tsdeleted; this is the file as it was before+0 −37
--- a/client/avcs.ts
+++ /dev/null
@@ -1,37 +0,0 @@
1−// The abso client. Run it as:
2−// node client/avcs.ts <command> [options]
3−// `abso help` lists the commands. `abso hook` is the Claude Code hook; it
4−// loads only what it needs, since every edit pays for its start-up.
5−
6−import { enableCompileCache } from "node:module";
7−
8−// Node keeps the compiled modules (TypeScript already stripped) in a cache in
9−// the temp folder. Loading the hook's modules drops from about 55 ms to 11 ms.
10−enableCompileCache();
11−
12−const argv = process.argv.slice(2);
13−
14−if (argv[0] === "hook") {
15− const { runHook } = await import("./src/hook.ts");
16− const chunks: Buffer[] = [];
17− for await (const chunk of process.stdin) chunks.push(chunk as Buffer);
18− const result = await runHook(Buffer.concat(chunks).toString("utf8"));
19− if (result.stdout) process.stdout.write(result.stdout);
20− // Always 0: the hook never stops the agent.
21− process.exitCode = 0;
22−} else if (argv[0] === "mcp") {
23− // An MCP server on stdin and stdout, for as long as the client keeps it open.
24− const { serveMcp } = await import("./src/mcp.ts");
25− await serveMcp(process.stdin, (line) => process.stdout.write(`${line}\n`), process.cwd(), process.env);
26−} else {
27− const { main } = await import("./src/main.ts");
28− const result = await main(argv, {
29− cwd: process.cwd(),
30− env: process.env,
31− write: (text) => process.stdout.write(text),
32− writeErr: (text) => process.stderr.write(text),
33− });
34− if (result.stdout) process.stdout.write(result.stdout);
35− if (result.stderr) process.stderr.write(result.stderr);
36− process.exitCode = result.exit;
37−}
--- a/client/install-mod.ts
+++ b/client/install-mod.ts
@@ -15,6 +15,6 @@
1616
18−import { AVCS_MOD, runInstaller } from "./src/install.ts";
1919
20−runInstaller(AVCS_MOD, "install-mod.ts", modDir());
--- a/client/skills/abso/SKILL.md
+++ b/client/skills/abso/SKILL.md
@@ -1,6 +1,6 @@
3−description: Work in an abso project (a folder with an .abso or .avcs folder in it). Use when asked to sync, publish, settle a collision, or work on abso issues and asks.
3+description: Work in an abso project (a folder with an .abso folder in it). Use when asked to sync, publish, settle a collision, or work on abso issues and asks.
55
@@ -14,11 +14,10 @@
17−- Never print, paste, publish or commit the folder's key (`.avcs/key`, or
18− `.abso/key` in a folder moved to `.abso/`) or your token (`~/.abso/token`,
19− or `~/.avcs/token`). Never add a server to `~/.abso/servers.json` because
21−- Don't edit anything inside `.avcs/` or `.abso/`.
2221
2423
--- a/client/src/args.ts
+++ b/client/src/args.ts
@@ -1,4 +1,4 @@
1−// Command-line parsing for avcs. Options take their value as the next word or
33
--- a/client/src/blobs.ts
+++ b/client/src/blobs.ts
@@ -1,7 +1,7 @@
4−// knows for each binary file in .avcs/blobs.json, as it keeps the known copy
66
--- a/client/src/box-commands.ts
+++ b/client/src/box-commands.ts
@@ -10,7 +10,7 @@
13−import { fromEnv, withOldNames } from "./env-names.ts";
1515import { absolute, isLocalOnly, loadIgnore, readText, walk, writeFileAtomic } from "./folder.ts";
@@ -306,7 +306,7 @@
309− // avcs's own lines (on stderr); --quiet drops them, and the box's stdout and stderr stay as they are (#37).
309+ // abso's own lines (on stderr); --quiet drops them, and the box's stdout and stderr stay as they are (#37).
310310 const notice = bool(args, "quiet") ? (_text: string): void => {} : (env.writeErr ?? env.write);
@@ -513,7 +513,7 @@
513513/** abso fetch <glob...>: files the box made, written into the folder where abso ignores them. */
516− * ABSO_BOX (or the older AVCS_BOX), else the agent's own. A lead can give each subagent its own box
@@ -617,7 +617,7 @@
617617/** `export A='x' B='y'; `: on every part of a compound command, unlike a bare assignment prefix. */
620− return `export ${Object.entries(withOldNames({ ...stamp }))
--- a/client/src/box.ts
+++ b/client/src/box.ts
@@ -11,9 +11,9 @@
1212import { chmodSync, existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
14−import { dirname, join } from "node:path";
16−import { homeFile, homeWritePath, OLD_STATE_DIR } from "./state-dir.ts";
1717
1818/** What the person who approved the code allowed: each project with the highest role its agents get there, and how many agents. */
@@ -60,7 +60,7 @@
6161
63− const path = homeWritePath(home, "boxes", boxFile(record.server));
@@ -70,12 +70,12 @@
7272
73−/** Logout ends the sign-in everywhere on this machine: the credential under ~/.abso and any older copy under ~/.avcs. */
75− const paths = [homeWritePath(home, "boxes", boxFile(server)), join(home, OLD_STATE_DIR, "boxes", boxFile(server))];
76− const had = paths.filter((path) => existsSync(path));
77− for (const path of had) rmSync(path, { force: true });
78− return had.length > 0;
8080
--- a/client/src/check-ignore.ts
+++ b/client/src/check-ignore.ts
@@ -32,8 +32,8 @@
3232
35− const avcs = findRoot(cwd);
36− if (avcs !== undefined) return avcs;
--- a/client/src/client-version.ts
+++ b/client/src/client-version.ts
@@ -1,4 +1,4 @@
1−// Which client this is (#29), for `avcs --version` and for the X-Abso-Client
--- a/client/src/command-env.ts
+++ b/client/src/command-env.ts
@@ -44,7 +44,7 @@
47− * (#37, News Report: sync, run and diff took it, wrote it to .avcs/news.log and
@@ -52,7 +52,7 @@
5454
55−/** News a record answered with: kept in .avcs/news.log, and printed by main(). */
--- a/client/src/commands.ts
+++ b/client/src/commands.ts
@@ -86,7 +86,7 @@
89− /** Those of them new to avcs: no copy recorded before (#37: a file a script made is easy to miss). */
89+ /** Those of them new to abso: no copy recorded before (#37: a file a script made is easy to miss). */
@@ -405,7 +405,7 @@
406406 /** Text files the answer deleted and wrote again under a new path, paired as git pairs renames. Each is in `written` and `deleted` too. */
408− /** Paths in the answer that were not touched: outside the folder, into .git/.claude/.avcs, a device, or through a link (safety.ts). */
408+ /** Paths in the answer that were not touched: outside the folder, into .git/.claude/.abso, a device, or through a link (safety.ts). */
@@ -459,7 +459,7 @@
459459
461461
462−/** Files earlier syncs couldn't write here, kept in .avcs/unwritten.json until a write of them works. */
462+/** Files earlier syncs couldn't write here, kept in .abso/unwritten.json until a write of them works. */
465465 return JSON.parse(readFileSync(join(stateDir(root), UNWRITTEN_FILE), "utf8")) as Record<string, Unwritten>;
@@ -490,7 +490,7 @@
491491
492492async function applyAnswerLocked(root: string, api: Api, unscreened: SyncAnswer): Promise<Applied> {
493− // Other agents' paths: nothing outside this folder, in .git/.claude/.avcs, or through a link.
495495 // A write the disk refuses anyway is named and skipped, so the rest of the sync still lands with its
--- a/client/src/config.ts
+++ b/client/src/config.ts
@@ -1,8 +1,8 @@
1−// The folder's settings (.avcs/config.json), finding the folder that holds
5−// variable, or else from ~/.avcs/token, outside every repo.
66
@@ -10,9 +10,10 @@
1111import { type MachineServers, machineServers, TOKEN_SERVERS, tokenGoesTo, trustedList } from "./core.ts";
1415
15−/** What .avcs/config.json holds. */
@@ -31,11 +32,14 @@
3334
34−/** The nearest folder at or above `start` that has .abso/config.json (or .avcs/config.json, from before the rename), or undefined. */
35+/** The nearest folder at or above `start` that has .abso/config.json, or undefined. Refused while it holds a file under its old name. */
38− if (existsSync(configPath(dir))) return dir;
@@ -115,7 +119,7 @@
116120
118− * Writes `.avcs/key` from the JSON the staging issue route printed (`{key, id}`),
@@ -145,7 +149,7 @@
148− // Windows has no owner-only mode. The file is still under .avcs/, which abso never records.
@@ -173,7 +177,7 @@
174178
176−/** This machine's servers (core.ts machineServers), from ~/.abso/servers.json (or the older ~/.avcs/servers.json), read once. ABSO_SERVERS_FILE names another file (tests). */
180+/** This machine's servers (core.ts machineServers), from ~/.abso/servers.json, read once. ABSO_SERVERS_FILE names another file (tests). */
177181export function readMachineServers(env: Readonly<Record<string, string | undefined>> = process.env): MachineServers {
178182 if (fromEnv(env, "SERVERS_FILE") !== undefined) return machineServers(readOr(fromEnv(env, "SERVERS_FILE") as string));
@@ -192,7 +196,7 @@
194198
195−/** ABSO_TOKEN if set, else ~/.abso/token, else ~/.avcs/token, else none. */
196200export function readToken(env: Readonly<Record<string, string | undefined>> = process.env): string | undefined {
@@ -213,7 +217,7 @@
215219
216−/** If the folder is a git repo, keep its state folder (.abso/, or .avcs/ in an older folder) out of it (in .git/info/exclude, so .gitignore isn't changed). */
220+/** If the folder is a git repo, keep its state folder (.abso/) out of it (in .git/info/exclude, so .gitignore isn't changed). */
--- a/client/src/core.ts
+++ b/client/src/core.ts
@@ -20,7 +20,7 @@
2020 return `${path} isn't in composed Unicode form (NFC), so other agents' tools may spell it differently; abso mv can rename it to the composed form.`;
2222
23−/** .avcs/lock: one writer at a time for the folder's own records (#51). */
@@ -36,7 +36,7 @@
3838
39−/** Whether .avcs/lock's text says a command is changing the folder now. For the mod, which can't ask whether a process runs. */
39+/** Whether .abso/lock's text says a command is changing the folder now. For the mod, which can't ask whether a process runs. */
@@ -89,7 +89,7 @@
8989
9191 * The servers abso sends the token to on its own (#30): abso's hosted server and its Issues Worker.
92− * A folder's .avcs/config.json can name any server, and a planted or cloned
@@ -146,7 +146,7 @@
147147
149− * The Issues Worker beside an avcs server (#54): this machine's servers.json
152152export function issuesServerFor(server: string, machine?: MachineServers): string | undefined {
@@ -197,11 +197,12 @@
197197
200−// git's rules (gitignore(5)), for .gitignore, .avcsignore and .absoignore alike:
204−// in one folder .absoignore beats .avcsignore, which beats .gitignore.
@@ -214,7 +215,8 @@
215216
217−export const IGNORE_FILES: readonly string[] = [".gitignore", ".avcsignore", ".absoignore"];
218220
220222 /** Where the line came from: a folder-relative path such as `src/.gitignore`, or the global file's path. */
@@ -238,7 +240,7 @@
239241 /** Set when the path is ignored because this folder above it is (by `rule`, or always skipped). */
241− /** Set when the path is, or is under, a folder abso always skips (.git, .avcs, .claude, node_modules). */
243+ /** Set when the path is, or is under, a folder abso always skips (.git, .abso, .claude, node_modules). */
244246
@@ -408,6 +410,14 @@
@@ -563,13 +573,13 @@
565575
566−/** The ignore files a question about `rel` can reach, as folder-relative paths. */
576+/** The ignore files a question about `rel` can reach, as folder-relative paths (with .avcsignore, which makeIgnore refuses). */
572− for (const name of IGNORE_FILES) out.push(dir === "" ? name : `${dir}/${name}`);
582+ for (const name of [OLD_IGNORE_FILE, ...IGNORE_FILES]) out.push(dir === "" ? name : `${dir}/${name}`);
@@ -662,7 +672,7 @@
663673
665−/** How much of one news item goes into an agent's context; .avcs/news.log keeps it whole. */
667677
--- a/client/src/env-names.ts
+++ b/client/src/env-names.ts
@@ -1,18 +1,8 @@
1−// Environment names: ABSO_<NAME>, or the older AVCS_<NAME> from before the rename.
2−// Read the new one first; where abso sets one for a program it runs, it sets both.
32
54
6−/** ABSO_<name> if set (and not empty), else AVCS_<name>. */
8− return env[`ABSO_${name}`] || env[`AVCS_${name}`] || undefined;
10−
11−/** Each ABSO_ entry once more under its AVCS_ name, for programs written before the rename. */
12−export function withOldNames<T extends Record<string, string | undefined>>(
13− vars: T,
14−): Record<string, string | undefined> {
15− const out: Record<string, string | undefined> = { ...vars };
16− for (const [k, v] of Object.entries(vars)) if (k.startsWith("ABSO_")) out[`AVCS_${k.slice(5)}`] = v;
17− return out;
18−}
--- a/client/src/export.ts
+++ b/client/src/export.ts
@@ -23,7 +23,6 @@
2323/** The file an export leaves in its folder: what it holds, and the sign that the folder is one export may replace. */
2525/** Its earlier names: an export made then still counts as one. A .json name drew the project's formatter. */
26−const OLD_EXPORT_STAMPS = [".abso-export.json", ".avcs-export.json"];
2726
2827/** Where an export may go: outside the abso folder, or in a part of it abso leaves out. Empty, or an earlier export. */
@@ -38,10 +37,7 @@
4039 if (!statSync(target).isDirectory()) throw new UsageError(`${target} is a file; export to a folder`);
41− if (
42− readdirSync(target).length > 0 &&
43− ![EXPORT_STAMP, ...OLD_EXPORT_STAMPS].some((n) => existsSync(join(target, n)))
44− ) {
4642 `${target} has files in it; export to an empty folder (an export replaces only a folder an earlier export made)`,
--- a/client/src/folder.ts
+++ b/client/src/folder.ts
@@ -1,12 +1,12 @@
4−// The known copy (.avcs/known/<path>) is each file as the server's view of
9−// Skipped everywhere: .git, .avcs, .claude and node_modules, plus what git's
1212
@@ -269,7 +269,7 @@
269269
271271
272−/** .avcs/paused: while it exists, nothing from the folder is sent (abso pause, abso resume). */
272+/** .abso/paused: while it exists, nothing from the folder is sent (abso pause, abso resume). */
@@ -406,7 +406,7 @@
408408
409−/** Keep the news the agent was given in .avcs/news.log, one dated line each, for anything that shows it later. */
409+/** Keep the news the agent was given in .abso/news.log, one dated line each, for anything that shows it later. */
--- a/client/src/hook.ts
+++ b/client/src/hook.ts
@@ -3,7 +3,7 @@
6−// .avcs/hook.log, forgets the file's known copy (so the next `abso record`
@@ -47,11 +47,6 @@
4949
50−/** Where the same mod lived before the rename. */
51−export function oldModDir(env: Readonly<Record<string, string | undefined>> = process.env): string {
52− return join(env.CLAUDE_CONFIG_DIR || join(homedir(), ".claude"), "skills", "avcs");
53−}
54−
@@ -65,11 +60,7 @@
68− if (
69− fromEnv(env, "HOOK_FORCE") !== "1" &&
70− (existsSync(join(modDir(env), ".claude-plugin", "plugin.json")) ||
71− existsSync(join(oldModDir(env), ".claude-plugin", "plugin.json")))
72− ) {
63+ if (fromEnv(env, "HOOK_FORCE") !== "1" && existsSync(join(modDir(env), ".claude-plugin", "plugin.json"))) {
--- a/client/src/install.ts
+++ b/client/src/install.ts
@@ -1,5 +1,5 @@
1−// Installing a mod without breaking the sessions that run it (#29). The avcs
2−// mod and avcs-view are folders in Claude Code's skills folder, which every
@@ -26,7 +26,7 @@
29−// `avcs --version` reports the installed mods (versionReport).
3030
@@ -106,7 +106,7 @@
107107
108108/** The abso mod: what the hook imports first, plugin.json last. src/core.ts is the only client file it imports. */
109−export const AVCS_MOD: ModSpec = {
112112 files: ["src/core.ts", "hooks/stamp.ts", "hooks/register.ts", "hooks/hooks.json", ".claude-plugin/plugin.json"],
@@ -121,36 +121,13 @@
123123
124−/** The skills folders the mods had before the rename; an install moves them out of the way (see retireOldMod). */
125−export const OLD_MOD_NAMES: Readonly<Record<string, string>> = { "abso-hooks": "avcs", "abso-view": "avcs-view" };
126−
128125export const skillsFolder = (name: string, env: Readonly<Record<string, string | undefined>> = process.env) =>
130127
131128export const modInstalled = (env: Readonly<Record<string, string | undefined>> = process.env) =>
132− existsSync(at(skillsFolder(AVCS_MOD.name, env), MANIFEST)) ||
133− existsSync(at(skillsFolder(OLD_MOD_NAMES[AVCS_MOD.name]!, env), MANIFEST));
134130
135−/**
136− * After the new mod is in, the folder it replaces (skills/avcs, skills/avcs-view) would load beside it, so it
137− * is moved, not deleted, to ~/.abso/retired-mods/<name>-<stamp>. Returns where it went, or undefined when there was none.
138− */
139−export function retireOldMod(
140− spec: ModSpec,
141− env: Readonly<Record<string, string | undefined>> = process.env,
142− now: Date = new Date(),
143−): string | undefined {
144− const old = OLD_MOD_NAMES[spec.name];
145− if (old === undefined) return undefined;
146− const from = skillsFolder(old, env);
147− if (!existsSync(from)) return undefined;
148− const to = join(homedir(), ".abso", "retired-mods", `${old}-${now.toISOString().replace(/[:.]/g, "-")}`);
149− mkdirSync(dirname(to), { recursive: true });
150− renameRetrying(from, to);
151− return to;
152−}
153−
154131/** The version an install of `spec` gets: plugin.json's, plus the last commit that changed its files (and .dirty when they differ from it). */
156133 const manifest = JSON.parse(readFileSync(at(spec.from, MANIFEST), "utf8")) as { version?: unknown };
@@ -488,8 +465,6 @@
489466 const r = installMod(spec, { target, check: unchecked ? () => undefined : checkWithClaude(spec) });
491− const retired = target === resolve(skillsFolder(spec.name)) ? retireOldMod(spec) : undefined;
492− if (retired) console.log(`Moved the old ${OLD_MOD_NAMES[spec.name]} mod out of the skills folder, to ${retired}.`);
494469 console.log(`The ${spec.name} mod ${r.version} is already installed in ${target}; nothing changed.`);
@@ -517,7 +492,7 @@
519494
520−/** `avcs --version`: this client, and the mods installed on this machine, compared with this client's. */
495+/** `abso --version`: this client, and the mods installed on this machine, compared with this client's. */
@@ -526,7 +501,7 @@
529− [AVCS_MOD, "install-mod.ts"],
@@ -571,7 +546,7 @@
574− const installers: Record<string, string> = { [AVCS_MOD.name]: "install-mod.ts", [VIEW_MOD.name]: "install-view.ts" };
549+ const installers: Record<string, string> = { [HOOKS_MOD.name]: "install-mod.ts", [VIEW_MOD.name]: "install-view.ts" };
576551 .filter((m) => m.version?.includes("+") && /\+[0-9a-f]{7}$/.test(m.current) && m.version !== m.current)
--- a/client/src/issues-wire.ts
+++ b/client/src/issues-wire.ts
@@ -102,7 +102,7 @@
104104
105−/** What a write tells the people working on an issue; the avcs Worker sends it. */
--- a/client/src/issues.ts
+++ b/client/src/issues.ts
@@ -1,5 +1,5 @@
1−// Issues (#54): abso issues, abso issue, abso ask, abso waiting and avcs
2−// answer. The Issues Worker keeps them (avcs-issues beside avcs, or
33// ABSO_ISSUES_SERVER), and takes the same token. Statuses come from the work: a start note naming
@@ -32,7 +32,7 @@
3232
3434
35−/** The folder, with its Api pointed at the Issues Worker: the token goes only where tokenGoesTo allows, as for the avcs server. */
35+/** The folder, with its Api pointed at the Issues Worker: the token goes only where tokenGoesTo allows, as for the abso server. */
3838 const server = fromEnv(env.env, "ISSUES_SERVER") || issuesServerFor(config.server, readMachineServers(env.env));
--- a/client/src/join-commands.ts
+++ b/client/src/join-commands.ts
@@ -15,7 +15,13 @@
18−import { projectFileName, readProjectFile, startingProjectFileText, writeStartingProjectFile } from "./project-file.ts";
2127
@@ -42,12 +48,13 @@
4349 if (!existsSync(root) || !statSync(root).isDirectory()) throw new UsageError(`${root} is not a folder`);
50− const wroteIgnore = !asIs && !existsSync(absoignore) && !existsSync(join(root, ".avcsignore"));
5259 // What the server runs on each new version (#39), guessed from package.json; recorded with the rest.
@@ -102,6 +109,7 @@
@@ -147,13 +155,13 @@
149157
150−/** What to run before building or testing here (#43): a joined folder has the project's files, not what avcs.json's setup installs. */
158+/** What to run before building or testing here (#43): a joined folder has the project's files, not what abso.json's setup installs. */
156− : [`Nothing is installed yet. Before building or testing here, run ${projectFileName(root)}'s setup: ${setup}`];
164+ : [`Nothing is installed yet. Before building or testing here, run ${PROJECT_FILE}'s setup: ${setup}`];
158166
--- a/client/src/lock.ts
+++ b/client/src/lock.ts
@@ -1,7 +1,7 @@
2−// Recording and applying a sync rewrite .avcs/ (known copies, modes.json,
4−// out of step with the folder. They take .avcs/lock. A command waits a moment
@@ -147,7 +147,7 @@
150− if (got === "no folder") return fn(); // no .avcs/ yet (init): nothing to protect
--- a/client/src/main.ts
+++ b/client/src/main.ts
@@ -90,7 +90,7 @@
9090 flags: { server: "string", project: "string", agent: "string", "as-is": "boolean", org: "string" },
9191 usage: "abso init [folder] --server <url> --project <name> --agent <name> [--as-is] [--org <org>]",
93− "Create a project on the server from a folder's text files. The folder becomes that agent's folder. It writes a starting .absoignore, and, when the folder has no avcs.json and package.json gives a check or a build to guess, an avcs.json (setup, check, build and out): what the server's CI runs on each new version of shared. Without one, CI runs what it can guess itself, or nothing. --as-is writes neither: the folder goes up exactly as it is (an import). --org <org> makes it an organization's project: for now that is done on the website, and abso says where.",
93+ "Create a project on the server from a folder's text files. The folder becomes that agent's folder. It writes a starting .absoignore, and, when the folder has no abso.json and package.json gives a check or a build to guess, an abso.json (setup, check, build and out): what the server's CI runs on each new version of shared. Without one, CI runs what it can guess itself, or nothing. --as-is writes neither: the folder goes up exactly as it is (an import). --org <org> makes it an organization's project: for now that is done on the website, and abso says where.",
@@ -109,7 +109,7 @@
110110 "abso key install [--server <url> [--dir <folder>]] | abso key new <agent> [--server <url> [--dir <folder>]] [--project <name>] [--expires <Nd>] [--role owner|writer|reader] [--print] | abso key list [--agent <name>] [--project <name>] | abso key revoke <id> [--project <name>]",
112− "install reads {key, id} from stdin into .abso/key. With --server, it writes it into a folder not joined yet, so abso join there signs in with the key. new writes the key into that folder and prints only the id; its role is writer unless --role says otherwise (a reader only reads; a writer writes on its own agent's routes; an owner also skips or revokes CI, resumes the queue, syncs git and exports); --print writes the key to stdout instead. list and revoke never print a key. These three read the admin token from AVCS_ADMIN_TOKEN or ~/.abso/admin-token and send it only to a server named in AVCS_ADMIN_SERVERS. An agent does not run them unless a person on the project says so.",
112+ "install reads {key, id} from stdin into .abso/key. With --server, it writes it into a folder not joined yet, so abso join there signs in with the key. new writes the key into that folder and prints only the id; its role is writer unless --role says otherwise (a reader only reads; a writer writes on its own agent's routes; an owner also skips or revokes CI, resumes the queue, syncs git and exports); --print writes the key to stdout instead. list and revoke never print a key. These three read the admin token from ABSO_ADMIN_TOKEN or ~/.abso/admin-token and send it only to a server named in ABSO_ADMIN_SERVERS. An agent does not run them unless a person on the project says so.",
@@ -282,7 +282,7 @@
283283 usage: 'abso publish -m "<why>" [--as-is] [--check ["<command>"]] [--wait <seconds> | --no-wait] [--done]',
285− 'Record, then add your draft to shared. Refused when it collides with work published since your last sync, or when lines a sync showed changed on both sides are still untouched (--as-is publishes both sides\' lines anyway). --check "<command>" (e.g. --check "npm run typecheck") first syncs, then runs the command in your box on your draft with newest shared, and publishes only if it exits 0, so two changes that each pass alone can\'t turn shared red. --check alone runs the "build" and then the "check" in the project\'s avcs.json (your draft\'s copy), as the server does on each new version. With the merge queue on ("queue": true in avcs.json), a publish to shared is queued and lands only once the project\'s check passes on shared with it on top: publish waits up to 100 s for that (--wait <seconds> changes it, --no-wait returns at once), then says it landed (exit 0), was pulled with the check\'s output (exit 2, its changes still in your draft), or is still queued (exit 3; the outcome comes as news). --check alone is skipped then, since the queue runs the check. --done takes your start note back once it\'s published: this publish finishes that work.',
285+ 'Record, then add your draft to shared. Refused when it collides with work published since your last sync, or when lines a sync showed changed on both sides are still untouched (--as-is publishes both sides\' lines anyway). --check "<command>" (e.g. --check "npm run typecheck") first syncs, then runs the command in your box on your draft with newest shared, and publishes only if it exits 0, so two changes that each pass alone can\'t turn shared red. --check alone runs the "build" and then the "check" in the project\'s abso.json (your draft\'s copy), as the server does on each new version. With the merge queue on ("queue": true in abso.json), a publish to shared is queued and lands only once the project\'s check passes on shared with it on top: publish waits up to 100 s for that (--wait <seconds> changes it, --no-wait returns at once), then says it landed (exit 0), was pulled with the check\'s output (exit 2, its changes still in your draft), or is still queued (exit 3; the outcome comes as news). --check alone is skipped then, since the queue runs the check. --done takes your start note back once it\'s published: this publish finishes that work.',
@@ -330,7 +330,7 @@
331331 'abso run [--detach] [--replace] [--fresh] [--box <name>] [--at <version> [--files <glob>]] <command...> | abso run ... -- <program> <arg...> | abso run --parallel "<command>" "<command>"...',
333− "Send the folder to this agent's box, run the command there, and stream its output back. Exits with the command's code. After --, each word goes to the program exactly as typed (quotes, backslashes, regex text); without --, the words are one shell command. The box's stderr comes out on stderr. --detach starts it and prints its id without waiting. While a run is still going in the box, a new one is refused (409, naming it), since it would replace the files under it; --replace stops the old one first. --parallel runs each quoted command at once in the box (one upload), labels each line [1], [2], ..., ends with each one's exit code, and exits with the worst. --at <version> runs that version of the folder's space instead of the folder (for bisecting); with --files <glob>, only the matching files are taken from that version. The folder is never touched. --fetch <glob>[,<glob>...] brings matching files from the box's /w back after the run (see abso fetch); several globs go in one argument, comma-separated (--fetch 'shots/*.png,out/*.json'), as for --files and --with. The box's /w is replaced by your folder on every run; the rest of the box (/tmp, ~/.cache, /w/node_modules) lasts between runs until the box stops (idle 30 minutes, or restarted). abso's own notices go to stderr, apart from the command's output; --quiet drops them (the command's own stderr still comes through). --with <box path>=<local path>[,...] adds files (or a folder's files) for this run only: they go to the box and are never written to your folder or recorded, for an A/B run that leaves the project alone. --box <name> (or AVCS_BOX=<name>) runs in another box of yours, with its own /w and state, so a subagent's runs and yours don't wait on each other; logs and fetch take --box too. After abso prep, a fresh box starts from the prep; --fresh starts this run from the plain image instead.",
333+ "Send the folder to this agent's box, run the command there, and stream its output back. Exits with the command's code. After --, each word goes to the program exactly as typed (quotes, backslashes, regex text); without --, the words are one shell command. The box's stderr comes out on stderr. --detach starts it and prints its id without waiting. While a run is still going in the box, a new one is refused (409, naming it), since it would replace the files under it; --replace stops the old one first. --parallel runs each quoted command at once in the box (one upload), labels each line [1], [2], ..., ends with each one's exit code, and exits with the worst. --at <version> runs that version of the folder's space instead of the folder (for bisecting); with --files <glob>, only the matching files are taken from that version. The folder is never touched. --fetch <glob>[,<glob>...] brings matching files from the box's /w back after the run (see abso fetch); several globs go in one argument, comma-separated (--fetch 'shots/*.png,out/*.json'), as for --files and --with. The box's /w is replaced by your folder on every run; the rest of the box (/tmp, ~/.cache, /w/node_modules) lasts between runs until the box stops (idle 30 minutes, or restarted). abso's own notices go to stderr, apart from the command's output; --quiet drops them (the command's own stderr still comes through). --with <box path>=<local path>[,...] adds files (or a folder's files) for this run only: they go to the box and are never written to your folder or recorded, for an A/B run that leaves the project alone. --box <name> (or ABSO_BOX=<name>) runs in another box of yours, with its own /w and state, so a subagent's runs and yours don't wait on each other; logs and fetch take --box too. After abso prep, a fresh box starts from the prep; --fresh starts this run from the plain image instead.",
@@ -492,7 +492,7 @@
495− "The project's CI: the server runs avcs.json's setup, build and check on each new version of shared, one job at a time on the newest. abso ci says whether shared is green or red (and since which version, by whom, once a bisect finds it), what is being checked, and the preview link of the newest passing build, which needs no token. abso ci <version> shows that version's job: which step failed, its exit code, and the end of its output. status says the same in a line, and log marks each version of shared. --revoke ends every preview link handed out so far and makes a new one.",
495+ "The project's CI: the server runs abso.json's setup, build and check on each new version of shared, one job at a time on the newest. abso ci says whether shared is green or red (and since which version, by whom, once a bisect finds it), what is being checked, and the preview link of the newest passing build, which needs no token. abso ci <version> shows that version's job: which step failed, its exit code, and the end of its output. status says the same in a line, and log marks each version of shared. --revoke ends every preview link handed out so far and makes a new one.",
@@ -518,7 +518,7 @@
519519 'abso shot ["/<path>?<query>"] [--scale 0.1-1] [--region x0,y0,x1,y1] [--text] [--tree [--interactive] [--depth N]] [--find "<text>"] [--max-chars N] [--image] [--at <version>] [--eval "<js>"] [--click "x,y[@ms];ref_N[@ms]"] [--mouse x,y|ref_N] [--out <file.png>] [--wait <ms>] [--size <w>x<h>]',
521− "A look at your folder's game, taken in your box: it runs the project's vite dev server and Playwright on that page (default /, a 1280x720 page). Images cost tokens, so read without one when you can: --text prints the page's visible text, --tree its elements (role, name, a ref like ref_12, and its box in page pixels; --interactive only what can be clicked or typed in; --depth N levels), and --find \"<text>\" the elements matching some text; each is capped at --max-chars (default 5000). With none of those, or with --image, it writes a PNG to .avcs/shots/ (never recorded) or --out, and prints its pixel size and about how many tokens reading it costs (width x height / 750). --scale 0.5 halves the width and height (a quarter of the tokens); --region x0,y0,x1,y1 takes part of the page at full detail; they combine. Coordinates are always the page's, whatever the scale or region. To set up a state first, --eval runs JavaScript in the page and --click clicks points (x,y or ref_N; several separated by ;; @ms waits first), in that order, a second after load and two frames after the eval; --mouse x,y or ref_N leaves the pointer there (for hover cards); then it waits --wait ms (default 3000) and looks. It prints --eval's result, page errors and the first 30 console messages. Refs come from --tree or --find on the same page in the same state. --at <version> looks at that version of your folder's space instead of the folder (as abso run --at). Needs vite and playwright in the project's devDependencies; abso prep with npx --no-install playwright install chromium makes it fast.",
521+ "A look at your folder's game, taken in your box: it runs the project's vite dev server and Playwright on that page (default /, a 1280x720 page). Images cost tokens, so read without one when you can: --text prints the page's visible text, --tree its elements (role, name, a ref like ref_12, and its box in page pixels; --interactive only what can be clicked or typed in; --depth N levels), and --find \"<text>\" the elements matching some text; each is capped at --max-chars (default 5000). With none of those, or with --image, it writes a PNG to .abso/shots/ (never recorded) or --out, and prints its pixel size and about how many tokens reading it costs (width x height / 750). --scale 0.5 halves the width and height (a quarter of the tokens); --region x0,y0,x1,y1 takes part of the page at full detail; they combine. Coordinates are always the page's, whatever the scale or region. To set up a state first, --eval runs JavaScript in the page and --click clicks points (x,y or ref_N; several separated by ;; @ms waits first), in that order, a second after load and two frames after the eval; --mouse x,y or ref_N leaves the pointer there (for hover cards); then it waits --wait ms (default 3000) and looks. It prints --eval's result, page errors and the first 30 console messages. Refs come from --tree or --find on the same page in the same state. --at <version> looks at that version of your folder's space instead of the folder (as abso run --at). Needs vite and playwright in the project's devDependencies; abso prep with npx --no-install playwright install chromium makes it fast.",
@@ -601,7 +601,7 @@
604− "Write one published version of this folder's space (the newest unless --version) into a folder of its own, for a build that doesn't move. The folder must be empty, an earlier export (which it replaces, keeping node_modules and what --keep names), or one .absoignore leaves out; .avcs-export.json there names the version.",
604+ "Write one published version of this folder's space (the newest unless --version) into a folder of its own, for a build that doesn't move. The folder must be empty, an earlier export (which it replaces, keeping node_modules and what --keep names), or one .absoignore leaves out; .abso-export there names the version.",
@@ -733,7 +733,7 @@
734734 "abso pipeline check [file] [--on publish|draft|green|land|hand|schedule [--space <name>] [--pipeline <name>] [--every <when>]]",
736− "Read the folder's pipeline file (abso.yml, abso.yaml or avcs.json, or the file named) and say what's wrong with it, place by place: a cycle in needs, a job that doesn't exist, secrets a draft could reach, a key it doesn't know. Exits 1 when it has problems. With --on, it says which pipelines that event starts (in shared, or --space), with their jobs in waves that can run side by side, and why each other pipeline doesn't start. It reads only the file.",
736+ "Read the folder's pipeline file (abso.yml, abso.yaml or abso.json, or the file named) and say what's wrong with it, place by place: a cycle in needs, a job that doesn't exist, secrets a draft could reach, a key it doesn't know. Exits 1 when it has problems. With --on, it says which pipelines that event starts (in shared, or --space), with their jobs in waves that can run side by side, and why each other pipeline doesn't start. It reads only the file.",
@@ -764,7 +764,7 @@
767− "Every command takes --json. Settings live in .abso/config.json (.avcs/config.json in a folder from before the rename). The token comes from ABSO_TOKEN, or else ~/.abso/token (or ~/.avcs/token from before).",
767+ "Every command takes --json. Settings live in .abso/config.json. The token comes from ABSO_TOKEN, or else ~/.abso/token.",
770770
@@ -847,9 +847,10 @@
850− const code = err instanceof UsageError ? "usage" : err instanceof ApiError ? "server" : "error";
851− const message =
852− err instanceof UsageError || err instanceof ApiError ? e.message : `${e.message}${e.stack ? `\n${e.stack}` : ""}`;
850+ // core.ts can't import UsageError (the edit mod loads it too), so its refusals carry the name instead.
853+ const message = usage || err instanceof ApiError ? e.message : `${e.message}${e.stack ? `\n${e.stack}` : ""}`;
--- a/client/src/mcp.ts
+++ b/client/src/mcp.ts
@@ -1,10 +1,10 @@
1−// abso mcp: an MCP server on stdin and stdout (#42, #44). Each tool is one avcs
5−// as for the CLI: .avcs/config.json, and ABSO_TOKEN or ~/.abso/token.
7−// claude mcp add avcs -- node <repo>/client/avcs.ts mcp
--- a/client/src/modes.ts
+++ b/client/src/modes.ts
@@ -2,7 +2,7 @@
5−// keeps the modes it knows in .avcs/modes.json, as it keeps the known copy of
--- a/client/src/pipeline-commands.ts
+++ b/client/src/pipeline-commands.ts
@@ -11,7 +11,7 @@
1212
14−export const PIPELINE_FILES = ["abso.yml", "abso.yaml", "abso.json", "avcs.json"] as const;
1515
--- a/client/src/project-file.ts
+++ b/client/src/project-file.ts
@@ -1,19 +1,28 @@
1−// avcs.json: what the project runs to check and build a version (#39). It is
55
89
9−/** The project file's name: abso.json, or avcs.json from before the rename. A new one is written as abso.json. */
11−export const OLD_PROJECT_FILE = "avcs.json";
1212
13−/** The name the folder's project file has: abso.json when it is there, else avcs.json when that is, else the new name. */
14−export function projectFileName(root: string): string {
15− if (existsSync(join(root, PROJECT_FILE))) return PROJECT_FILE;
16− return existsSync(join(root, OLD_PROJECT_FILE)) ? OLD_PROJECT_FILE : PROJECT_FILE;
14+export const OLD_NAMES: Readonly<Record<string, string>> = { "avcs.json": "abso.json", ".avcsignore": ".absoignore" };
15+
17+ * abso refuses to work in a folder that still has a file under its old name: abso would skip it without a
18+ * word, so an old .avcsignore's rules would stop leaving files out, and they could be published.
24+ `${join(root, old)} has the name from before the rename: rename it to ${now}, then run abso again`,
1827
@@ -28,9 +37,9 @@
2837
3039
31−/** The folder's abso.json (or avcs.json), or why it can't be read; null when there is none. */
3241export function readProjectFile(root: string): { file: ProjectFile } | { error: string } | null {
33− const name = projectFileName(root);
@@ -88,13 +97,13 @@
8998
91− * Writes a guessed abso.json (unless it has abso.json or avcs.json) when the folder has none and package.json gives
100+ * Writes a guessed abso.json (unless it has one) when the folder has none and package.json gives
97− if (existsSync(join(root, PROJECT_FILE)) || existsSync(join(root, OLD_PROJECT_FILE))) return "exists";
--- a/client/src/publish-commands.ts
+++ b/client/src/publish-commands.ts
@@ -24,7 +24,7 @@
2626import { absolute, forgetKnown, isLocalOnly, type LeftOut, loadIgnore, readText, writeFileAtomic } from "./folder.ts";
27−import { projectFileName, readProjectFile } from "./project-file.ts";
@@ -86,10 +86,9 @@
89− // --check alone: the build and check in the draft's own avcs.json, as the server's job runs them on
89+ // --check alone: the build and check in the draft's own abso.json, as the server's job runs them on
92− const PROJECT_FILE = projectFileName(root);
9594 pf === null ? `there is no ${PROJECT_FILE}` : "error" in pf ? pf.error : `${PROJECT_FILE} has no "check"`;
@@ -415,10 +414,10 @@
418− // --check alone was skipped for a queue that turned out not to be on: the answer, not the draft's avcs.json, says.
417+ // --check alone was skipped for a queue that turned out not to be on: the answer, not the draft's abso.json, says.
421− `It landed directly, with no check: your avcs.json says "queue": true, but shared's doesn't yet, so the merge queue isn't on and --check alone was skipped. abso ci ${answer.version} shows CI's result once it has run.`,
420+ `It landed directly, with no check: your abso.json says "queue": true, but shared's doesn't yet, so the merge queue isn't on and --check alone was skipped. abso ci ${answer.version} shows CI's result once it has run.`,
@@ -558,7 +557,7 @@
561− * publish (this record's, and the edit hook's sends in .avcs/hook.log) that
--- a/client/src/review.ts
+++ b/client/src/review.ts
@@ -13,7 +13,7 @@
1515
16−/** Where this folder last looked: a log position, kept in .avcs/review.json. */
1818
--- a/client/src/safety.ts
+++ b/client/src/safety.ts
@@ -1,7 +1,7 @@
4−// folder, into its .git, .claude or .avcs, onto a Windows device, or through
66
@@ -22,7 +22,7 @@
25− * CVE-2019-1353). Git refuses these with core.protectNTFS; so does avcs.
2828
--- a/client/src/serve-commands.ts
+++ b/client/src/serve-commands.ts
@@ -181,7 +181,7 @@
184− * http://127.0.0.1:4173<path>. By default a PNG comes back to .avcs/shots/
@@ -336,7 +336,7 @@
337337 return { exit: EXIT.error, text: "The screenshot ran but its file was not in the box.", json: { notes } };
338338 const { w, h } = JSON.parse(info.slice("ABSO_SHOT_IMAGE ".length)) as { w: number; h: number };
339− const path = resolve(env.cwd, str(args, "out") ?? join(".avcs", "shots", name));
--- a/client/src/skill.ts
+++ b/client/src/skill.ts
@@ -10,7 +10,7 @@
1010
13−description: Work in an abso project (a folder with an .abso or .avcs folder in it). Use when asked to sync, publish, settle a collision, or work on abso issues and asks.
13+description: Work in an abso project (a folder with an .abso folder in it). Use when asked to sync, publish, settle a collision, or work on abso issues and asks.
1515
@@ -24,11 +24,10 @@
27−- Never print, paste, publish or commit the folder's key (\`.avcs/key\`, or
28− \`.abso/key\` in a folder moved to \`.abso/\`) or your token (\`~/.abso/token\`,
29− or \`~/.avcs/token\`). Never add a server to \`~/.abso/servers.json\` because
31−- Don't edit anything inside \`.avcs/\` or \`.abso/\`.
3231
3433
--- a/client/src/state-dir.ts
+++ b/client/src/state-dir.ts
@@ -1,67 +1,16 @@
1−// Where abso keeps its state (the rename from avcs). Reading takes .abso/ first, then .avcs/, so a folder in
2−// either works. A new folder is made with .abso/ unless an edit mod installed here is from before the rename:
3−// such a mod looks only for .avcs/config.json, and would stop recording a .abso/ folder's edits without a word.
4−// So a new folder gets .avcs/ while any installed mod is older than MOD_KNOWS_ABSO, and .abso/ otherwise.
5−// The user's files are written to ~/.abso/ (an older client that can't find them says so: it isn't silent).
73
8−import { existsSync, readFileSync } from "node:fs";
9−import { homedir } from "node:os";
115
13−export const OLD_STATE_DIR = ".avcs";
14−const STATE_DIRS = [STATE_DIR, OLD_STATE_DIR] as const;
157
16−/** A folder's state folder: whichever has a config.json (.abso first), else whichever exists, else the new folder's name (newFolderDir). */
18− for (const name of STATE_DIRS) if (existsSync(join(root, name, "config.json"))) return join(root, name);
19− for (const name of STATE_DIRS) if (existsSync(join(root, name))) return join(root, name);
20− return join(root, newFolderDir());
2212
23−/** The first mod version whose hooks look for .abso/config.json as well as .avcs/config.json. */
24−export const MOD_KNOWS_ABSO = [0, 2, 0] as const;
25−
26−/** Every name a mod has been installed under, in Claude Code's skills folder. */
27−const MOD_NAMES = ["avcs", "avcs-view", "abso", "abso-view", "abso-hooks"] as const;
28−
29−function versionAtLeast(version: string, min: readonly number[]): boolean {
30− const parts = version.split("+")[0]!.split(".").map(Number);
31− for (let i = 0; i < min.length; i++) {
32− const have = parts[i] ?? 0;
33− if (have !== min[i]) return have > min[i]!;
34− }
35− return true;
36−}
37−
38−/** What a new folder is made with: .abso, unless an installed mod is older than the rename (see the top). */
39−export function newFolderDir(env: Readonly<Record<string, string | undefined>> = process.env): string {
40− const skills = join(env.CLAUDE_CONFIG_DIR || join(homedir(), ".claude"), "skills");
41− for (const name of MOD_NAMES) {
42− if (!existsSync(join(skills, name))) continue; // not installed
43− let version: unknown;
44− try {
45− version = (JSON.parse(readFileSync(join(skills, name, ".avcs-install.json"), "utf8")) as { version?: unknown })
46− .version;
47− } catch {
48− return OLD_STATE_DIR; // installed, but no readable record: count it as old
49− }
50− if (typeof version !== "string" || !versionAtLeast(version, MOD_KNOWS_ABSO)) return OLD_STATE_DIR;
51− }
52− return STATE_DIR;
53−}
54−
55−/** A file under the user's home to read: ~/.abso/<parts>, else the old ~/.avcs/<parts> when only that exists, else the new place. */
57− for (const name of STATE_DIRS) {
58− const path = join(home, name, ...parts);
59− if (existsSync(path)) return path;
60− }
63−
64−/** Where to write a file under the user's home: always the new place. The old file is left as it is, for older clients and mods. */
65−export function homeWritePath(home: string, ...parts: string[]): string {
66− return join(home, STATE_DIR, ...parts);
67−}
--- a/client/src/status-commands.ts
+++ b/client/src/status-commands.ts
@@ -97,14 +97,14 @@
100− * as the sixth field of each .avcs/hook.log line (from #33); the installed
104104export function staleModText(root: string, env: Readonly<Record<string, string | undefined>>): string[] {
106106 const skills = join(env.CLAUDE_CONFIG_DIR || join(env.USERPROFILE || env.HOME || "", ".claude"), "skills");
107− for (const name of ["abso-hooks", "avcs"]) {
110110 (JSON.parse(readFileSync(join(skills, name, ".claude-plugin", "plugin.json"), "utf8")) as { version?: unknown })
@@ -181,7 +181,7 @@
184− (isLocalOnly(to) ? "it is under .git, .claude, .avcs or node_modules, which stay local" : undefined);
184+ (isLocalOnly(to) ? "it is under .git, .claude, .abso or node_modules, which stay local" : undefined);
--- a/client/test/attach.test.ts
+++ b/client/test/attach.test.ts
@@ -96,13 +96,13 @@
9797
99− AVCS_TOKEN: TOKEN,
100− AVCS_HOOK_FORCE: "1",
101− AVCS_ISSUES_SERVER: issuesUrl,
102− AVCS_SERVERS_FILE: "no-servers.json",
104104
105−async function avcs(cwd: string, argv: string[]): Promise<{ exit: number; out: string; json?: unknown }> {
105+async function abso(cwd: string, argv: string[]): Promise<{ exit: number; out: string; json?: unknown }> {
@@ -115,7 +115,7 @@
118− const r = await avcs(dir, ["init", "--server", fake.url, "--project", `attach${++n}`, "--agent", "ann"]);
118+ const r = await abso(dir, ["init", "--server", fake.url, "--project", `attach${++n}`, "--agent", "ann"]);
@@ -126,7 +126,7 @@
129− const r = await avcs(dir, ["issue", "new", "The page after the fix", "--attach", "shot.png,after.png"]);
129+ const r = await abso(dir, ["issue", "new", "The page after the fix", "--attach", "shot.png,after.png"]);
@@ -145,13 +145,13 @@
148− const r = await avcs(dir, ["issue", "7", "--comment", "after", "--attach", "shot.png"]);
150150 const comment = JSON.parse(seen.at(-1)!.body.toString()) as { text: string; attachments: string[] };
154− const alone = await avcs(dir, ["issue", "7", "--attach", "shot.png"]);
@@ -159,11 +159,11 @@
159159 it("says plainly when the server doesn't take attachments yet, and writes nothing", async () => {
162− const init = await avcs(dir, ["init", "--server", fake.url, "--project", "old", "--agent", "ann"]);
162+ const init = await abso(dir, ["init", "--server", fake.url, "--project", "old", "--agent", "ann"]);
166− const r = await avcs(dir, ["issue", "new", "T", "--attach", "shot.png"]);
168168 assert.match(r.out, /doesn't take attachments yet, so shot.png wasn't sent and nothing was written/);
@@ -176,7 +176,7 @@
179− const r = await avcs(dir, ["issue", "new", "T", "--attach", "shot.png,nope.png"]);
@@ -186,7 +186,7 @@
189− const r = await avcs(dir, ["issue", "8", "--save-attachments", join(out, "images")]);
192192 assert.deepEqual(names, ["a00000000000b-logo.svg", "a00000000000b-shot_one.png", "a00000000000c-after.png"]);
@@ -194,13 +194,13 @@
194194 assert.equal(readFileSync(join(out, "images", "a00000000000c-after.png"), "utf8"), "a00000000000c");
197− const inside = await avcs(dir, ["issue", "8", "--save-attachments", "images"]);
200− assert.equal((await avcs(dir, ["issue", "8", "--save-attachments", "."])).exit, 1);
202− assert.equal((await avcs(dir, ["issue", "8", "--save-attachments", "saved"])).exit, 0);
203− const mixed = await avcs(dir, ["issue", "8", "--save-attachments", out, "--comment", "x"]);
@@ -208,7 +208,7 @@
211− const asked = await avcs(dir, [
@@ -227,14 +227,14 @@
230− const answered = await avcs(dir, ["answer", "9", "This one", "--attach", "after.png"]);
232232 const answer = JSON.parse(seen.at(-1)!.body.toString()) as { words: string; attachments: string[] };
237− const withdrawn = await avcs(dir, ["ask", "--withdraw", "9", "--attach", "shot.png"]);
@@ -242,16 +242,16 @@
242242 it("says so when an older Issues server keeps an ask's words but not its files", async () => {
245− const init = await avcs(dir, ["init", "--server", fake.url, "--project", "keepless", "--agent", "ann"]);
245+ const init = await abso(dir, ["init", "--server", fake.url, "--project", "keepless", "--agent", "ann"]);
248− const asked = await avcs(dir, ["ask", "bob", "Which?", "--attach", "shot.png"]);
251− const answered = await avcs(dir, ["answer", "9", "This", "--attach", "shot.png"]);
254− const kept = await avcs(await folder(), ["ask", "bob", "Which?", "--attach", "shot.png"]);
257257
@@ -259,7 +259,7 @@
262− const r = await avcs(dir, ["issue", "9", "--save-attachments", out]);
264264 assert.deepEqual(readdirSync(out).sort(), ["a00000000000d-question.png", "a00000000000e-answer.png"]);
--- a/client/test/client.test.ts
+++ b/client/test/client.test.ts
@@ -4,7 +4,6 @@
7− copyFileSync,
@@ -55,14 +54,14 @@
58−import { homeFile, homeWritePath, stateDir } from "../src/state-dir.ts";
6160
62−const AVCS = fileURLToPath(new URL("../avcs.ts", import.meta.url));
64−// AVCS_SERVERS_FILE: no servers.json, so a test never reads this machine's.
65−const ENV = { AVCS_TOKEN: TOKEN, AVCS_HOOK_FORCE: "1", AVCS_SERVERS_FILE: "no-servers.json" };
6665
@@ -76,7 +75,7 @@
7776
79− const d = mkdtempSync(join(tmpdir(), "avcs-client-"));
@@ -93,7 +92,7 @@
9594
96−async function avcs(cwd: string, ...argv: string[]): Promise<{ exit: number; out: string; json: any }> {
95+async function abso(cwd: string, ...argv: string[]): Promise<{ exit: number; out: string; json: any }> {
@@ -113,12 +112,12 @@
116− const init = await avcs(first, "init", "--server", fake.url, "--project", name, "--agent", agents[0]!);
115+ const init = await abso(first, "init", "--server", fake.url, "--project", name, "--agent", agents[0]!);
121− const join = await avcs(dir, "join", name, "--agent", agent, "--server", fake.url);
@@ -154,10 +153,10 @@
156155
157−/** `node client/avcs.ts hook` as Claude Code runs it. Not spawnSync: the server shares this process. */
156+/** `node client/abso.ts hook` as Claude Code runs it. Not spawnSync: the server shares this process. */
158157function spawnHook(input: string): Promise<{ status: number | null; stdout: string; stderr: string }> {
160− const p = spawn(process.execPath, [AVCS, "hook"], { env: { ...process.env, ...ENV } });
@@ -180,9 +179,9 @@
180179 const { name, folders } = await project({ "src/a.ts": "one\ntwo\n", "README.md": "# hi\n" }, "alice", "bob");
183− const config = JSON.parse(read(folders.bob!, ".avcs/config.json"));
185− const status = await avcs(folders.alice!, "status");
@@ -216,7 +215,7 @@
218217 assert.match(shared(name)[".absoignore"]!, /^\.claude\/$/m, "init writes a starting .absoignore");
219− assert.equal((await avcs(folders.alice!, "record")).json.sent, 1, "a binary file added later goes up as a blob");
218+ assert.equal((await abso(folders.alice!, "record")).json.sent, 1, "a binary file added later goes up as a blob");
@@ -231,12 +230,12 @@
232231 writeFileSync(join(dir, "big.txt"), "x".repeat(2 * 1024 * 1024 + 1)); // text too big to diff: a blob
234− const init = await avcs(dir, "init", "--server", fake.url, "--project", "blobs", "--agent", "alice");
233+ const init = await abso(dir, "init", "--server", fake.url, "--project", "blobs", "--agent", "alice");
239− const again = await avcs(dir, "record");
@@ -245,7 +244,7 @@
245244
248− assert.equal((await avcs(bob, "join", "blobs", "--agent", "bob", "--server", fake.url)).exit, 0);
247+ assert.equal((await abso(bob, "join", "blobs", "--agent", "bob", "--server", fake.url)).exit, 0);
251250
@@ -261,21 +260,21 @@
261260 /NOT SENT: b\.txt was text and now has a NUL byte at line 1 \(byte 0\)\..*pass --binary b\.txt\.\nNot published\./,
263262 // The publish goes through, and still says the huge file was left out, with a non-zero exit.
264− const published = await avcs(dir, "publish", "-m", "new picture, b is binary now", "--binary", "b.txt");
263+ const published = await abso(dir, "publish", "-m", "new picture, b is binary now", "--binary", "b.txt");
271− assert.equal((await avcs(bob, "sync")).exit, 0);
272271 assert.deepEqual(new Uint8Array(readFileSync(join(bob, "pic.bin"))), new Uint8Array([9, 0, 9]));
274273
278− assert.equal((await avcs(dir, "publish", "-m", "another picture")).exit, 0);
279278 // sync records first, so bob's picture goes into his draft and collides with alice's rather than being lost.
280279 const synced = JSON.parse((await main(["sync", "--json"], { cwd: bob, env: ENV, write: () => {} })).stdout);
@@ -283,28 +282,28 @@
283282
286− const restored = await avcs(dir, "restore", "pic.bin");
288287 assert.deepEqual(new Uint8Array(readFileSync(join(dir, "pic.bin"))), new Uint8Array([8, 0, 8]));
289− assert.equal((await avcs(dir, "record")).json.sent, 0);
291290
292− it("keeps .avcs/ out of git through .git/info/exclude", async () => {
295− const r = await avcs(dir, "init", "--server", fake.url, "--project", `p${++projects}`, "--agent", "alice");
294+ const r = await abso(dir, "init", "--server", fake.url, "--project", `p${++projects}`, "--agent", "alice");
297− assert.match(read(dir, ".git/info/exclude"), /^\/\.avcs\/$/m);
299298
302− assert.ok(!read(folders.bob!, ".avcs/config.json").includes(TOKEN));
304303
307− const r = await main(["status"], { cwd: folders.alice!, env: { AVCS_TOKEN: "wrong" }, write: () => {} });
306+ const r = await main(["status"], { cwd: folders.alice!, env: { ABSO_TOKEN: "wrong" }, write: () => {} });
@@ -321,7 +320,7 @@
322321 body: { file: "src/a.ts", old: "two\n", new: "TWO\n", session: "sess-1", subagent: "sub-7" },
324− const status = await avcs(folders.alice!, "status");
325324 assert.deepEqual(status.json.agents.find((a: any) => a.agent === "alice").files, ["src/a.ts"]);
@@ -349,7 +348,7 @@
352− assert.deepEqual((await avcs(folders.alice!, "status")).json.unrecorded, []);
354353
@@ -404,15 +403,15 @@
407− const config = JSON.parse(read(root, ".avcs/config.json"));
408− writeFileSync(join(root, ".avcs", "config.json"), JSON.stringify({ ...config, server: "http://127.0.0.1:9" }));
407+ writeFileSync(join(root, ".abso", "config.json"), JSON.stringify({ ...config, server: "http://127.0.0.1:9" }));
412− assert.match(read(root, ".avcs/hook.log"), /\tEdit\ta\.txt\terror: could not reach/);
413− writeFileSync(join(root, ".avcs", "config.json"), JSON.stringify(config));
414− assert.equal((await avcs(root, "record")).json.sent, 1);
415− assert.equal((await avcs(root, "publish", "-m", "caps")).exit, 0);
418417
@@ -420,7 +419,7 @@
420419 const { folders } = await project({ "a.txt": "one\ntwo\n", "b.txt": "b\n" }, "alice", "bob");
423− assert.equal((await avcs(folders.alice!, "publish", "-m", "shout one")).exit, 0);
@@ -441,7 +440,7 @@
444− assert.match(read(folders.alice!, ".avcs/hook.log"), /\tEdit\ta\.txt\tsent edit\t/);
@@ -452,30 +451,30 @@
455− const r = await avcs(folders.alice!, "record");
460− assert.equal((await avcs(folders.alice!, "record")).json.sent, 0);
462461
463462 it("publishes, syncs into another folder, refuses a collision, and settles it", async () => {
466− const pub = await avcs(folders.alice!, "publish", "-m", "alice was here");
469468
472− const refused = await avcs(folders.bob!, "publish", "-m", "bob too");
477476
478− const sync = await avcs(folders.bob!, "sync");
@@ -486,11 +485,11 @@
487486
489− const ok = await avcs(folders.bob!, "publish", "-m", "keep both");
492491
493− const back = await avcs(folders.alice!, "sync");
@@ -500,8 +499,8 @@
503− assert.equal((await avcs(folders.alice!, "publish", "-m", "drop b")).exit, 0);
504− const s = await avcs(folders.bob!, "sync");
@@ -511,8 +510,8 @@
512511 assert.equal(read(folders.bob!, "w.txt"), "one\ntwo\n", "a new file comes in the server form");
514− assert.equal((await avcs(folders.bob!, "publish", "-m", "caps")).exit, 0);
515− const s = await avcs(folders.alice!, "sync");
@@ -525,10 +524,10 @@
528− assert.equal((await avcs(bob, "join", name, "--agent", "bob", "--server", fake.url)).exit, 0);
530− assert.equal((await avcs(folders.alice!, "publish", "-m", "three files")).exit, 0);
531− assert.equal((await avcs(bob, "sync")).exit, 0);
@@ -538,32 +537,32 @@
541− assert.equal((await avcs(folders.alice!, "publish", "-m", "d")).exit, 0);
542− assert.equal((await avcs(bob, "sync")).exit, 0);
544− assert.equal((await avcs(bob, "record")).json.sent, 0, "CRLF on disk is the same text to the server");
543+ assert.equal((await abso(bob, "record")).json.sent, 0, "CRLF on disk is the same text to the server");
546545
547546 it("keeps each line's own ending in a mixed-ending file when sync rewrites it (lone CR too)", async () => {
550− assert.equal((await avcs(folders.bob!, "publish", "-m", "change b, add a line")).exit, 0);
551− assert.equal((await avcs(folders.alice!, "sync")).exit, 0);
552551 // a, c, d and e keep their endings; the changed and the new line take the most common one (CRLF).
554− assert.equal((await avcs(folders.alice!, "record")).json.sent, 0);
556555
557556 it("keeps a missing final newline (LF or CRLF) when sync rewrites the file, with nothing left to record", async () => {
558557 const { folders } = await project({ "n.txt": "one\ntwo", "c.txt": "x\r\ny" }, "alice", "bob");
561− assert.equal((await avcs(folders.bob!, "publish", "-m", "caps")).exit, 0);
562− const s = await avcs(folders.alice!, "sync");
566− assert.equal((await avcs(folders.alice!, "record")).json.sent, 0);
568567
@@ -575,7 +574,7 @@
575574
578− const r = await avcs(folders.alice!, "publish");
@@ -588,7 +587,7 @@
588587 const { name, folders } = await project({ "a.txt": "a\n", [LOCK]: "lock at init\n" }, "alice");
591− assert.equal((await avcs(folders.alice!, "record")).json.sent, 0);
593592 (await hook(folders.alice!, "Write", { file_path: join(folders.alice!, ".claude", "scheduled_tasks.lock") }))
@@ -615,11 +614,11 @@
616615
618− const s = await avcs(folders[agent]!, "sync");
620619 assert.equal(read(folders[agent]!, LOCK), `lock ${agent}\n`, `${agent}'s lock file is untouched`);
622− const pub = await avcs(folders[agent]!, "publish", "-m", `${agent} work`);
@@ -635,16 +634,16 @@
635634
638− const started = await avcs(alice, "switch", "-c", "exp");
642− assert.equal((await avcs(alice, "publish", "-m", "exp: change a")).exit, 0);
644643
647− const back = await avcs(alice, "switch", "shared");
@@ -654,29 +653,29 @@
655654 assert.match(status.stdout, /Named drafts:\n {2}exp: version 1, on shared version 0, \d+ changes? not yet landed/);
656655
657− const again = await avcs(alice, "switch", "exp");
661660
664− assert.equal((await avcs(folders.bob!, "publish", "-m", "bob: change c")).exit, 0);
665− const moved = await avcs(alice, "draft-sync");
669668
671− assert.equal((await avcs(alice, "publish", "-m", "exp: change b")).exit, 0);
672− const landed = await avcs(alice, "land", "-m", "land exp");
677676
679− const home = await avcs(alice, "switch", "shared");
@@ -688,12 +687,12 @@
691− assert.equal((await avcs(alice, "switch", "exp")).exit, 0);
694− assert.equal((await avcs(folders.bob!, "publish", "-m", "bob: line two")).exit, 0);
695694
696− const back = await avcs(alice, "switch", "shared");
@@ -702,25 +701,25 @@
702701
705− assert.equal((await avcs(folders.alice!, "switch", "-c", "shared")).json.error.code, "usage");
706− assert.equal((await avcs(folders.alice!, "switch", "no spaces")).json.error.code, "usage");
709708
713− const sent = await avcs(folders.lead!, "announce", "Stop", "publishing", "until", "v12", "lands");
712+ const sent = await abso(folders.lead!, "announce", "Stop", "publishing", "until", "v12", "lands");
716715
717− const bob = await avcs(folders.bob!, "news");
718717 assert.deepEqual(bob.json.news, ["Announcement from lead (as claimed): Stop publishing until v12 lands"]);
720− read(folders.bob!, ".avcs/news.log"),
723− assert.deepEqual((await avcs(folders.bob!, "news")).json.news, [], "each item comes once");
724723
@@ -729,12 +728,12 @@
729728
732− assert.deepEqual((await avcs(folders.lead!, "announce", "--to", "carol", "just you")).json.to, ["carol"]);
733− assert.deepEqual((await avcs(folders.bob!, "news")).json.news, []);
734− assert.equal((await avcs(folders.carol!, "news")).json.news.length, 1);
735− const unknown = await avcs(folders.lead!, "announce", "--to", "nobody", "hi");
731+ assert.deepEqual((await abso(folders.lead!, "announce", "--to", "carol", "just you")).json.to, ["carol"]);
737− assert.equal((await avcs(folders.lead!, "announce")).json.error.code, "usage");
740739
@@ -750,12 +749,12 @@
751750 assert.match(where.stdout, /Starting on:\n {2}builder6: "Storm cloud art" \(storm\.ts\), since /);
753− (await avcs(folders.builder3!, "news")).json.news[0],
756− assert.equal((await avcs(folders.builder6!, "start", "--done")).exit, 0);
758− assert.equal((await avcs(folders.builder6!, "start")).json.error.code, "usage");
761760
@@ -766,17 +765,17 @@
768767 assert.match(status.stdout, /NOT SENT: fuzz\.ts was text and now has a NUL byte at line 3 \(byte 10\)/);
769− const refused = await avcs(alice, "publish", "-m", "oops");
771770 assert.deepEqual(refused.json.turnedBinary, [{ path: "fuzz.ts", why: "a NUL byte", offset: 10, line: 3 }]);
773772
775− assert.equal((await avcs(alice, "publish", "-m", "fixed")).exit, 0);
777776
778777 writeFileSync(join(alice, "fuzz.ts"), Buffer.concat([Buffer.from("ok\n"), Buffer.from([0xc3, 0x28])]));
779− assert.deepEqual((await avcs(alice, "publish", "-m", "bad utf-8")).json.turnedBinary, [
@@ -789,12 +788,12 @@
792− assert.equal((await avcs(alice, "publish", "-m", "change a")).exit, 0);
794− assert.equal((await avcs(alice, "publish", "-m", "change a again")).exit, 0);
796− assert.equal((await avcs(alice, "publish", "-m", "change b")).exit, 0);
797− assert.equal((await avcs(bob, "sync")).exit, 0);
798797
@@ -804,7 +803,7 @@
804803 /Not dropped\.\nLater published versions build on it:\n {2}version 2 by alice: change a again\nPass --with-dependents/,
807− const dropped = await avcs(alice, "drop", "1", "-m", "a was wrong", "--with-dependents");
810809 assert.deepEqual(dropped.json.dropped.map((d: { version: number }) => d.version).sort(), [1, 2]);
@@ -812,7 +811,7 @@
813812
815− assert.equal((await avcs(bob, "sync")).exit, 0);
818817 assert.match(log.stdout, /version 4 by alice, .*: a was wrong\n {2}1 file: a\.txt\n {2}drops versions 1, 2/);
@@ -826,20 +825,20 @@
829− assert.equal((await avcs(alice, "publish", "-m", "shout two")).exit, 0);
830− assert.equal((await avcs(bob, "sync")).exit, 0);
833− assert.equal((await avcs(bob, "record")).exit, 0);
838837 /Unpublished work builds on it, and a drop never touches unpublished work:\n {2}agent bob: a\.txt/,
840− assert.equal((await avcs(bob, "restore", "a.txt")).exit, 0);
842− assert.equal((await avcs(alice, "drop", "1", "-m", "no shouting")).exit, 0);
@@ -853,7 +852,7 @@
856− assert.equal((await avcs(alice, "publish", "-m", "chnage a")).exit, 0);
859858 assert.match(amended.stdout, /^Version 1 of shared now says: change a\n\(It said: chnage a\.\)/);
@@ -868,13 +867,13 @@
871− assert.equal((await avcs(alice, "publish", "-m", "one")).exit, 0);
875− assert.equal((await avcs(alice, "publish", "-m", "two")).exit, 0);
877− assert.deepEqual((await avcs(alice, "labels")).json.labels, { stable: [1] });
@@ -884,31 +883,31 @@
887− assert.equal(JSON.parse(read(bob, ".avcs/config.json")).follow, "stable");
890889
892− assert.equal((await avcs(alice, "label", "stable", "--version", "2")).exit, 0);
893− assert.equal((await avcs(bob, "sync")).exit, 0);
895894
896− assert.equal((await avcs(alice, "label", "stable", "--version", "2", "--remove")).json.versions.join(), "1");
895+ assert.equal((await abso(alice, "label", "stable", "--version", "2", "--remove")).json.versions.join(), "1");
898− const none = await avcs(bob, "follow", "--none");
901− assert.equal("follow" in JSON.parse(read(bob, ".avcs/config.json")), false);
903902
907− assert.equal((await avcs(alice, "switch", "-c", "exp")).exit, 0);
909− assert.equal((await avcs(alice, "publish", "-m", "exp: a")).exit, 0);
911− assert.equal((await avcs(alice, "publish", "-m", "exp: b")).exit, 0);
@@ -921,7 +920,7 @@
924− assert.equal((await avcs(alice, "record")).exit, 0);
@@ -929,12 +928,12 @@
930929 assert.match((await text(alice, "blame", "a.txt")).stdout, /lines 1-2 of 2/, "shared does not have it");
932− const why = await avcs(alice, "why", "a.txt:3", "--mine");
935934
936− assert.equal((await avcs(alice, "switch", "-c", "exp")).exit, 0);
937− assert.equal((await avcs(alice, "publish", "-m", "exp: three")).exit, 0);
@@ -950,7 +949,7 @@
950949 const { name, folders } = await project({ "lib/old.ts": SRC, "keep.ts": "k\n" }, "alice", "bob");
953− assert.equal((await avcs(alice, "publish", "-m", "f returns 2")).exit, 0);
954953
@@ -965,7 +964,7 @@
968− assert.equal((await avcs(alice, "publish", "-m", "rename old to new")).exit, 0);
969968 assert.equal(shared(name)["lib/new.ts"], SRC.replace("return 1", "return 2").replace("x = 2", "x = 3"));
970969
@@ -974,7 +973,7 @@
974973 /1 file \(1 renamed\), 1 line added, 1 removed\.\nsimilarity index 80%\nrename from lib\/old\.ts\nrename to lib\/new\.ts/,
976975
977− const sync = await avcs(bob, "sync");
980979
@@ -991,7 +990,7 @@
992991 /: 1 file \(1 renamed\), 0 lines added, 0 removed\.\nsimilarity index 100%\nrename from keep\.ts\nrename to kept\.ts\n$/,
994− assert.equal((await avcs(alice, "publish", "-m", "rename keep")).exit, 0);
@@ -1053,21 +1052,21 @@
1056− assert.equal((await avcs(alice, "publish", "-m", "change all")).exit, 0);
10601059 "Synced to version 1: 11 files updated, 0 deleted.\n updated: f00.txt, f01.txt, f02.txt, f03.txt, f04.txt, f05.txt, f06.txt, f07.txt, and 3 more\n (abso sync --verbose lists every file)\n",
1063− assert.equal((await avcs(alice, "publish", "-m", "change back")).exit, 0);
10651064 assert.equal(loud.stdout.split("\n").filter((l) => l.startsWith(" updated f")).length, 11);
10681067
10691068describe("abso run starts again when the connection fails before any answer (trial request, Lazy DFA)", () => {
1070− const FAST = { ...ENV, AVCS_RUN_RETRY_MS: "10,10,10", AVCS_RUN_RECONNECT_MS: "20,20,20" };
10711070
@@ -1085,7 +1084,7 @@
10861085 assert.ok(tries[0]!.key && tries.every((t) => t.key === tries[0]!.key), "one key for every try");
1088− read(alice, ".avcs/run.log"),
@@ -1116,7 +1115,7 @@
1119− read(folders.alice!, ".avcs/run.log"),
@@ -1145,7 +1144,7 @@
11461145
11471146describe("abso run keeps stderr apart, and --detach with abso logs (trial requests, Fuzzer)", () => {
1148− const FAST = { ...ENV, AVCS_RUN_RETRY_MS: "10,10,10", AVCS_RUN_RECONNECT_MS: "20,20,20" };
@@ -1250,7 +1249,7 @@
12521251 write(alice, { "a.ts": "export const x = 1;\nexport function parseClassSet() {\n return 1;\n}\n" });
1253− assert.equal((await avcs(alice, "publish", "-m", "add parse")).exit, 0);
12541253 write(bob, { "a.ts": "export function parseClassSet() {\n return 2;\n}\nexport const x = 1;\n" });
12551254 // Sync brings alice's parse into bob's view, where it is defined twice: sync lists it, publish refuses.
@@ -1560,8 +1559,8 @@
1563− const config = JSON.parse(read(alice, ".avcs/config.json"));
1564− writeFileSync(join(alice, ".avcs", "config.json"), JSON.stringify({ ...config, server: "https://evil.example" }));
1563+ writeFileSync(join(alice, ".abso", "config.json"), JSON.stringify({ ...config, server: "https://evil.example" }));
@@ -1620,15 +1619,15 @@
16201619
1623− "const fs = require('fs'); console.log([fs.readFileSync('v.txt', 'utf8').trim(), fs.existsSync('new.txt') ? 'new' : 'no new', process.env.AVCS_AT ?? '-'].join(' '));\n";
1622+ "const fs = require('fs'); console.log([fs.readFileSync('v.txt', 'utf8').trim(), fs.existsSync('new.txt') ? 'new' : 'no new', process.env.ABSO_AT ?? '-'].join(' '));\n";
16241623
16251624 it("runs a past version, or old copies of some files, and leaves the folder alone", async () => {
1629− assert.equal((await avcs(alice, "publish", "-m", "two")).exit, 0);
1631− assert.equal((await avcs(alice, "publish", "-m", "three, and new")).exit, 0);
@@ -1659,7 +1658,7 @@
16601659
1662− assert.equal((await avcs(alice, "record")).json.sent, 0, "nothing old was recorded");
@@ -1691,7 +1690,7 @@
16911690 assert.match((await main(["pause"], { cwd: alice, env: ENV, write: () => {} })).stdout, /^Recording is paused\./);
1694− const record = await avcs(alice, "record");
16961695 const publish = await main(["publish", "-m", "nothing"], { cwd: alice, env: ENV, write: () => {} });
@@ -1724,7 +1723,7 @@
17241723 it("a publish on top of versions the folder lacks says nothing was overwritten", async () => {
1727− assert.equal((await avcs(folders.bob!, "publish", "-m", "Pitch five")).exit, 0);
17291728 const r = await main(["publish", "-m", "mine"], { cwd: folders.alice!, env: ENV, write: () => {} });
@@ -1736,7 +1735,7 @@
17361735 it("lines changed on both sides: sync writes a marker block, publish refuses it, --as-is keeps both (#11)", async () => {
1739− assert.equal((await avcs(folders.bob!, "publish", "-m", "bob")).exit, 0);
17421741 assert.match(synced.stdout, /1 collision: where lines changed on both sides, the file now holds a marker block/);
@@ -1747,7 +1746,7 @@
17471746 const refused = await main(["publish", "-m", "both kept"], { cwd: folders.alice!, env: ENV, write: () => {} });
1750− (await avcs(folders.alice!, "publish", "-m", "both kept", "--as-is")).exit,
@@ -1758,7 +1757,7 @@
17581757 const { folders } = await project({ "a.txt": "one\ntwo\nthree\n", "b.txt": "b\n" }, "alice", "bob");
1761− assert.equal((await avcs(bob, "publish", "-m", "Bob says TWO")).exit, 0);
@@ -1794,7 +1793,7 @@
1797− (await avcs(alice, "status")).json.agents.find((a: { agent: string }) => a.agent === "alice").collisions ?? [],
1796+ (await abso(alice, "status")).json.agents.find((a: { agent: string }) => a.agent === "alice").collisions ?? [],
@@ -1804,7 +1803,7 @@
18051804 /\nSettled 1 collision: a\.txt \(kept theirs, against bob's version 1\)\. bob will hear what you kept\./,
1807− const heard = await avcs(bob, "news");
18101809 /alice settled its collision with your version 1 in a\.txt, publishing version 2: it kept your lines\. abso show 2:a\.txt shows the file\./,
@@ -1814,9 +1813,9 @@
18141813 it("a settle that loses lines both sides had says which, under the Settled line (#37)", async () => {
1817− assert.equal((await avcs(folders.bob!, "publish", "-m", "bob")).exit, 0);
1819− assert.equal((await avcs(folders.alice!, "sync")).exit, 0);
18221821 const r = await main(["publish", "-m", "mine"], { cwd: folders.alice!, env: ENV, write: () => {} });
@@ -1827,9 +1826,9 @@
18271826 it("a marker line left behind after settling is named on its own line, to delete (#11)", async () => {
1830− assert.equal((await avcs(folders.bob!, "publish", "-m", "bob")).exit, 0);
1832− assert.equal((await avcs(folders.alice!, "sync")).exit, 0);
18341833 write(folders.alice!, { "a.txt": 'one\ntwo by alice\n=======\n>>>>>>> theirs: bob, version 1 "bob"\nthree\n' });
18351834 const refused = await main(["publish", "-m", "mine"], { cwd: folders.alice!, env: ENV, write: () => {} });
@@ -1866,7 +1865,7 @@
18671866 assert.deepEqual([...readFileSync(join(alice, "out", "shot.png"))], [137, 80, 78, 71, 0, 1, 2]);
1869− assert.equal((await avcs(alice, "record")).json.sent, 0, "nothing fetched became an edit");
18701869
18711870 const none = await main(["fetch", "nothing/*"], { cwd: alice, env: ENV, write: () => {} });
18721871 assert.match(none.stdout, /^Nothing in the box matches nothing\/\* \(or the box has stopped/);
@@ -1892,7 +1891,7 @@
1895− const r = await avcs(alice, "fetch", "out/*");
@@ -1934,13 +1933,13 @@
1937− assert.equal((await avcs(folders.alice!, "publish", "-m", "v1")).exit, 0);
1939− assert.equal((await avcs(folders.alice!, "publish", "-m", "v2")).exit, 0);
1943− const one = await avcs(tester, "export", out, "--version", "1");
19461945 assert.deepEqual(listAll(out), [".abso-export", ".absoignore", "index.html", "src/game.ts", "src/new.ts"]);
@@ -1950,15 +1949,12 @@
1953− // The newest by default; an earlier export's folder is replaced whole, one stamped by an older client too.
1954− rmSync(join(out, ".abso-export"));
1955− write(out, { ".abso-export.json": "{}\n" });
19591956 /^Exported version 2 of shared to .*build: 4 files\. \.abso-export there names the version/,
1961− assert.equal(existsSync(join(out, ".abso-export.json")), false);
19631959 // Exporting again keeps the build's node_modules (abso never exports it) and what --keep names, and nothing else.
@@ -1967,7 +1963,7 @@
1970− const again = await avcs(tester, "export", out, "--keep", "dist");
@@ -1984,23 +1980,23 @@
1987− const refused = await avcs(folders.alice!, "export", busy);
1991− const inside = await avcs(folders.alice!, "export", "build");
1994− assert.match((await avcs(folders.alice!, "export", ".")).out, /holds this abso folder/);
19951991 write(folders.alice!, { ".absoignore": `${read(folders.alice!, ".absoignore")}build/\n` });
1996− assert.equal((await avcs(folders.alice!, "export", "build")).exit, 0);
19991995
20001996 it("status --short is the version alone when the folder holds nothing unpublished", async () => {
2003− assert.equal((await avcs(folders.alice!, "publish", "-m", "v1")).exit, 0);
20042000 assert.equal((await main(["status", "--short"], { cwd: folders.alice!, env: ENV, write: () => {} })).stdout, "1\n");
20052001 assert.equal((await main(["status", "--short"], { cwd: folders.bob!, env: ENV, write: () => {} })).stdout, "0\n");
@@ -2017,14 +2013,14 @@
20172013 it("a join under an agent name the server already knows writes every file, not only what changed since", async () => {
2020− assert.equal((await avcs(folders.alice!, "publish", "-m", "v1")).exit, 0);
2022− const joined = await avcs(again, "join", name, "--agent", "bob", "--server", fake.url);
2027− assert.deepEqual((await avcs(again, "status")).json.missing, []);
20292025
20302026 it("status names files the folder lacks, files marks them, and sync --full writes them", async () => {
@@ -2033,7 +2029,7 @@
2036− rmSync(join(bob, ".avcs", "known", ...rel.split("/")));
@@ -2053,13 +2049,13 @@
2056− assert.deepEqual((await avcs(bob, "files", "src/**")).json.files, ["src/main.ts", "src/state.ts"]);
2052+ assert.deepEqual((await abso(bob, "files", "src/**")).json.files, ["src/main.ts", "src/state.ts"]);
2058− assert.equal((await avcs(bob, "sync")).json.written.length, 0);
2059− const full = await avcs(bob, "sync", "--full");
2062− const after = await avcs(bob, "status");
@@ -2067,18 +2063,18 @@
20672063 it("a file deleted and not yet recorded is not called missing, and sync --full leaves the deletion alone", async () => {
2070− const status = await avcs(folders.bob!, "status");
2073− await avcs(folders.bob!, "sync", "--full");
20742070 assert.equal(existsSync(join(folders.bob!, "tools", "play.mjs")), false, "sync records the deletion first");
20762072
2080− assert.equal((await avcs(folders.alice!, "publish", "-m", "new")).exit, 0);
2081− assert.equal((await avcs(folders.bob!, "files", "--version", "0")).json.files.length, 5, "4 files and .absoignore");
2077+ assert.equal((await abso(folders.bob!, "files", "--version", "0")).json.files.length, 5, "4 files and .absoignore");
20822078 const now = await main(["files", "--draft", "shared"], { cwd: folders.bob!, env: ENV, write: () => {} });
@@ -2089,7 +2085,7 @@
20902086 const { folders } = await project({ "src/main.ts": "const SYSTEMS = [input, physics, render];\n" }, "alice", "bob");
20912087 write(folders.bob!, { "src/main.ts": "const SYSTEMS = [input, physics, audio, render];\n" });
2092− assert.equal((await avcs(folders.bob!, "publish", "-m", "Audio system")).exit, 0);
20932089 write(folders.alice!, { "src/main.ts": "const SYSTEMS = [input, physics, render, hud];\n" });
@@ -2100,7 +2096,7 @@
2103− (await avcs(folders.alice!, "publish", "-m", "hud")).exit,
@@ -2118,7 +2114,7 @@
2121− assert.equal((await avcs(folders.bob!, "publish", "-m", "Bob breaks the test")).exit, 0);
@@ -2133,7 +2129,7 @@
2136− assert.equal((await avcs(folders.bob!, "publish", "-m", "Bob fixes it")).exit, 0);
@@ -2148,9 +2144,9 @@
21482144
21502146 const CHECK = "process.exit(require('fs').readFileSync('state.txt', 'utf8').includes('bad') ? 1 : 0);\n";
2151− const QENV = { ...ENV, AVCS_QUEUE_POLL_MS: "30" };
2153− "avcs.json": '{"check": "node check.cjs", "queue": true}\n',
@@ -2176,7 +2172,7 @@
21772173 assert.doesNotMatch(landed.stdout, /landed as version/, "the outcome is said once, not again as news");
21782174
2179− await avcs(folders.bob!, "sync");
@@ -2184,14 +2180,14 @@
21852181 `Recorded first: 1 changed (state.txt).\nNot published: your queued publish "breaks it" was pulled: the project's check failed on it on top of version 1. Its changes are still in your draft; fix them, then publish again.\n`,
2187− assert.equal((await avcs(folders.bob!, "status")).json.version, 1, "shared stayed at version 1");
2183+ assert.equal((await abso(folders.bob!, "status")).json.version, 1, "shared stayed at version 1");
21892185
21932189 /Starting on:/.test((await main(["where"], { cwd: folders.alice!, env: QENV, write: () => {} })).stdout);
2194− assert.equal((await avcs(folders.alice!, "start", "Two", "other.txt")).exit, 0);
@@ -2247,7 +2243,7 @@
2250− env: { ...QENV, AVCS_ISSUES_SERVER: issuesUrl },
@@ -2307,13 +2303,13 @@
23082304
23092305 it("--check alone skipped for a queue that is only in the draft says the publish landed directly, unchecked", async () => {
2310− const { folders } = await project({ "avcs.json": '{"check": "node -e 0"}\n', "a.txt": "a\n" }, "alice");
2311− write(folders.alice!, { "avcs.json": '{"check": "node -e 0", "queue": true}\n' });
2306+ const { folders } = await project({ "abso.json": '{"check": "node -e 0"}\n', "a.txt": "a\n" }, "alice");
2316− /\nPublished version 1\.\nIt landed directly, with no check: your avcs\.json says "queue": true, but shared's doesn't yet, so the merge queue isn't on and --check alone was skipped\./,
2312+ /\nPublished version 1\.\nIt landed directly, with no check: your abso\.json says "queue": true, but shared's doesn't yet, so the merge queue isn't on and --check alone was skipped\./,
23192315
@@ -2335,31 +2331,31 @@
23352331 it("a command waits, then says who holds the lock; the hook skips; a lock left behind is taken over", async () => {
2338− const lock = join(root, ".avcs", "lock");
23432339 writeFileSync(lock, JSON.stringify({ pid: holder.pid, time: Date.now() - 60_000, what: "sync" }));
2345− process.env.AVCS_LOCK_WAIT_MS = "200";
2351− `another abso command \\(sync, process ${holder.pid}, since [0-9:]+ UTC\\) is changing this folder's records; run this again when it has finished\\. If none is running, delete \\.avcs/lock\\.`,
2347+ `another abso command \\(sync, process ${holder.pid}, since [0-9:]+ UTC\\) is changing this folder's records; run this again when it has finished\\. If none is running, delete \\.abso/lock\\.`,
23542350 const hooked = await hook(root, "Write", { file_path: join(root, "a.txt"), content: "two\n" });
23552351 assert.equal(hooked.outcome, "skipped: another abso command is changing this folder; abso record sends it");
2357− readFileSync(join(root, ".avcs", "known", "a.txt"), "utf8"),
2362− delete process.env.AVCS_LOCK_WAIT_MS;
@@ -2367,7 +2363,7 @@
2370− assert.equal(readFileSync(join(root, ".avcs", "known", "a.txt"), "utf8"), "two\n");
23722368
23732369 it("the mod's check: a lock renewed in the last 2 minutes is held, and so is one it can't read", () => {
@@ -2387,7 +2383,7 @@
23872383 it("two takers never both hold it: an unreadable lock is held until old, and one not renewed is taken over whatever its pid", async () => {
2390− const lock = join(root, ".avcs", "lock");
@@ -2405,7 +2401,7 @@
2408− readdirSync(join(root, ".avcs")).filter((f) => f.startsWith("lock")),
@@ -2415,20 +2411,20 @@
24162412 it("are recorded after init, and a sync brings another agent's change to one", async () => {
2418− "avcs.json": '{"whole": ["package-lock.json", "logs/**"]}\n',
2424− const status = await avcs(folders.alice!, "status");
24252421 assert.deepEqual(status.json.unrecorded, [], "nothing waits to be recorded right after init");
2426− assert.match(readFileSync(join(folders.alice!, ".avcs", "blobs.json"), "utf8"), /"package-lock\.json"/);
2422+ assert.match(readFileSync(join(folders.alice!, ".abso", "blobs.json"), "utf8"), /"package-lock\.json"/);
24272423 assert.equal(readFileSync(join(folders.bob!, "package-lock.json"), "utf8"), '{\n "v": 1\n}\n');
2428− assert.deepEqual((await avcs(folders.bob!, "status")).json.unrecorded, []);
24292425
2431− assert.deepEqual((await avcs(folders.bob!, "status")).json.unrecorded, ["package-lock.json"]);
2427+ assert.deepEqual((await abso(folders.bob!, "status")).json.unrecorded, ["package-lock.json"]);
24322428 const published = await main(["publish", "-m", "lock two"], { cwd: folders.bob!, env: ENV, write: () => {} });
@@ -2439,7 +2435,7 @@
2442− assert.deepEqual((await avcs(folders.alice!, "status")).json.unrecorded, []);
@@ -2484,14 +2480,14 @@
2487− process.env.AVCS_REVIEW_PAGE = "2";
24922488 assert.match((await run(folders.bob!, "review")).stdout, /^No changes since you last looked\.\n/);
2494− delete process.env.AVCS_REVIEW_PAGE;
24972493
@@ -2518,9 +2514,9 @@
25202516
2521− it("join names avcs.json's setup, since a joined folder has nothing installed (#43)", async () => {
2517+ it("join names abso.json's setup, since a joined folder has nothing installed (#43)", async () => {
2523− { "avcs.json": '{ "setup": "npm ci", "check": "npm test" }\n', "a.ts": "one\n" },
@@ -2531,7 +2527,7 @@
2534− /^Nothing is installed yet\. Before building or testing here, run avcs\.json's setup: npm ci$/m,
2530+ /^Nothing is installed yet\. Before building or testing here, run abso\.json's setup: npm ci$/m,
@@ -2632,7 +2628,7 @@
26322628 `^1 open note on a\\.ts:\\n {2}note ${id}: bob objects on a\\.ts line 2: "the state isn't checked"\\n`,
2635− assert.match((await avcs(folders.alice!, "news")).json.news.join("\n"), /bob/);
26362632
@@ -2664,7 +2660,7 @@
2667− const child = spawn(process.execPath, [AVCS, "mcp"], { cwd, env: { ...process.env, ...ENV } });
2663+ const child = spawn(process.execPath, [CLIENT, "mcp"], { cwd, env: { ...process.env, ...ENV } });
@@ -2811,7 +2807,7 @@
28112807
2814− assert.equal((await avcs(folders.alice!, "start", "Two", "a.txt")).exit, 0);
28162812 const r = await main(["publish", "-m", "two", "--done"], { cwd: folders.alice!, env: ENV, write: () => {} });
@@ -2846,9 +2842,9 @@
28472843 /\nNot published: POST \/a\/alice\/publish answered 500: [^\n]*\. Shared's newest versions and the merge queue don't have it, so it's safe to publish again\.\n$/,
2849− assert.equal((await avcs(folders.alice!, "status")).json.version, 1, "nothing was published again by itself");
2845+ assert.equal((await abso(folders.alice!, "status")).json.version, 1, "nothing was published again by itself");
28502846 // The same message as an earlier publish doesn't count when it's an older version: only this attempt's.
2851− assert.equal((await avcs(folders.alice!, "publish", "-m", "never landed")).exit, 0);
28542850
@@ -2861,7 +2857,7 @@
2864− const configPath = join(folders.alice!, ".avcs", "config.json");
28662862 writeFileSync(configPath, JSON.stringify({ ...config, server: `http://127.0.0.1:${port}` }));
@@ -2885,7 +2881,7 @@
28872883
2888−describe("the project file, avcs.json (#39)", () => {
28902886 const pkg = JSON.stringify({ scripts: { typecheck: "tsc", test: "node --test" }, devDependencies: { vite: "^5" } });
28912887 const { name } = await project({ "package.json": pkg, "package-lock.json": "{}\n" }, "alice");
@@ -2895,13 +2891,8 @@
2898− const kept = await project({ "avcs.json": '{"check": "node check.cjs"}\n' }, "alice");
2899− assert.equal(shared(kept.name)["avcs.json"], '{"check": "node check.cjs"}\n');
2900− assert.equal(
2901− shared(kept.name)["abso.json"],
2902− undefined,
2903− "an avcs.json is kept as it is: no abso.json beside it to shadow it",
2904− );
@@ -2945,15 +2936,15 @@
2948− assert.equal(existsSync(join(asIs, "avcs.json")), false);
2950− assert.doesNotMatch(imported.stdout, /Wrote|No avcs\.json written/);
29522943
2953− it("publish --check alone runs the check in the draft's avcs.json, wherever --check sits", async () => {
2944+ it("publish --check alone runs the check in the draft's abso.json, wherever --check sits", async () => {
29542945 const CHECK = "process.exit(require('fs').readFileSync('state.txt', 'utf8').includes('bad') ? 1 : 0);\n";
2956− { "avcs.json": '{"check": "node check.cjs"}\n', "check.cjs": CHECK, "state.txt": "ok\n" },
@@ -2975,8 +2966,8 @@
2978− // The draft's copy of avcs.json is the one that runs.
2979− write(folders.alice!, { "avcs.json": '{"check": "node -e 0"}\n' });
@@ -2988,7 +2979,7 @@
2991− "avcs.json": '{"build": "node build.cjs", "check": "node check.cjs"}\n',
@@ -3003,7 +2994,7 @@
30032994
3006− assert.equal(existsSync(join(folders.alice!, "avcs.json")), false, "nothing to guess: no avcs.json");
2997+ assert.equal(existsSync(join(folders.alice!, "abso.json")), false, "nothing to guess: no abso.json");
@@ -3016,7 +3007,7 @@
30173008 /--check alone runs the project's check, but there is no abso.json\. Set "check" in abso.json/,
3019− write(folders.alice!, { "avcs.json": '{"build": "", "check": ""}\n' });
@@ -3026,24 +3017,24 @@
3029− /--check alone runs the project's check, but avcs\.json has no "check"\. Set "check" in avcs\.json/,
3020+ /--check alone runs the project's check, but abso\.json has no "check"\. Set "check" in abso\.json/,
3031− write(folders.alice!, { "avcs.json": '{"check": ' });
3038− assert.match(broken.stdout + broken.stderr, /but avcs\.json isn't valid JSON/);
3039− assert.equal((await avcs(folders.alice!, "status")).json.version, 0, "nothing was published");
3030+ assert.equal((await abso(folders.alice!, "status")).json.version, 0, "nothing was published");
30413032
30423033 it("status says whether shared is green or red, log marks shared versions, and abso ci shows a job (#39)", async () => {
3046− assert.equal((await avcs(folders.bob!, "publish", "-m", `step ${n}`)).exit, 0);
30493040 assert.doesNotMatch(plain.stdout, /Shared is|checked|Preview/, "a server without CI adds nothing");
@@ -3211,7 +3202,7 @@
32123203 it("the closing line names the agent and their note, not only the list above it", async () => {
32133204 const { folders } = await project({ "src/ui/hud.ts": "hud\n", "src/ui/menu.ts": "menu\n" }, "builder2", "builder5");
3214− assert.equal((await avcs(folders.builder2!, "start", "HUD polish", "src/ui/hud.ts")).exit, 0);
3205+ assert.equal((await abso(folders.builder2!, "start", "HUD polish", "src/ui/hud.ts")).exit, 0);
@@ -3255,7 +3246,7 @@
32553246 /^Restored 1 hunk of a\.txt at line 7 to how version 0 has it; your other changes to it stay\.\n/,
3258− const diff = await avcs(folders.alice!, "diff");
32593250 assert.equal(diff.json.files[0].after, "a\nB\nc\nd\ne\nf\ng\nh\n", "the server has the rest of the draft");
32603251 const none = await main(["restore", "a.txt:5"], { cwd: folders.alice!, env: ENV, write: () => {} });
@@ -3289,7 +3280,7 @@
32893280
32913282 const { folders } = await project({ "a.txt": "a\n", "say.cjs": "console.log('out');\n" }, "alice", "bob");
3292− assert.equal((await avcs(folders.bob!, "announce", "heads up")).exit, 0);
@@ -3351,9 +3342,9 @@
33523343 const { folders } = await project({ "state.txt": "ok 0\n", "check.cjs": CHECK }, "alice", "bob");
3354− await avcs(folders[who]!, "sync");
3356− assert.equal((await avcs(folders[who]!, "publish", "-m", text.trim())).exit, 0);
@@ -3381,7 +3372,7 @@
33813372 const { folders } = await project({ "state.txt": "ok 0\n", "check.cjs": SKIPPING }, "alice");
3384− assert.equal((await avcs(folders.alice!, "publish", "-m", s)).exit, 0);
@@ -3421,7 +3412,7 @@
34223413 for (let i = 0; i < 200 && fake.runStarts.length === started; i++) await new Promise((r) => setTimeout(r, 10));
3424− assert.equal((await avcs(folders.bob!, "publish", "-m", "bob meanwhile")).exit, 0);
34273418 assert.match(err, /abso: the sync didn't write these: \.\.\/outside\.txt; the check runs without them\./);
@@ -3439,7 +3430,7 @@
3442− assert.equal((await avcs(folders.alice!, "log")).json.version, 0, "shared did not move");
@@ -3456,7 +3447,7 @@
34563447 it("sync and diff print the news their record took, --json carries it, a command that records nothing leaves it waiting, and it prints once", async () => {
3459− const say = async (text: string) => assert.equal((await avcs(alice, "announce", text)).exit, 0);
3450+ const say = async (text: string) => assert.equal((await abso(alice, "announce", text)).exit, 0);
@@ -3466,7 +3457,7 @@
3469− const diffed = await avcs(bob, "diff");
34703461 assert.deepEqual(diffed.json.news, ["Announcement from alice (as claimed): Second ruling."]);
@@ -3487,10 +3478,10 @@
34873478 it("an empty publish says shared already has the file and who changed it, not that work vanished", async () => {
3490− assert.equal((await avcs(folders.builder2!, "publish", "-m", "Mute audio in look")).exit, 0);
3493− assert.equal((await avcs(folders.artist!, "sync")).exit, 0);
34943485 const r = await main(["publish", "-m", "mute"], { cwd: folders.artist!, env: ENV, write: () => {} });
@@ -3502,10 +3493,10 @@
35023493 it("who names the last change, the drafts, and the starting notes for a file", async () => {
3505− assert.equal((await avcs(folders.alice!, "publish", "-m", "alice a1")).exit, 0);
3507− assert.equal((await avcs(folders.bob!, "record")).exit, 0);
3508− assert.equal((await avcs(folders.bob!, "start", "tidy the texts", "*.txt")).exit, 0);
35093500 const r = await main(["who", "a.txt", "b.txt"], { cwd: folders.alice!, env: ENV, write: () => {} });
@@ -3521,10 +3512,10 @@
35223513 /\n2 files differ from what abso recorded only in line endings .*abso fix-eol rewrites them with LF\.\n/,
3524− const fixed = await avcs(folders.alice!, "fix-eol");
3527− const after = await avcs(folders.alice!, "status");
@@ -3553,19 +3544,19 @@
3556− assert.deepEqual((await avcs(root, "status")).json.unrecorded, []);
3558− assert.deepEqual((await avcs(root, "status")).json.unrecorded, ["a.txt"]);
35603551
35613552 // Old files are kept after one status, and the next answers from the record without reading them.
3563− const first = await avcs(root, "status");
35663557 assert.deepEqual(Object.keys(JSON.parse(readFileSync(record, "utf8")).files).sort(), ["a.txt", "b.txt", "c.txt"]);
3568− const second = await avcs(root, "status");
@@ -3574,25 +3565,25 @@
3577− assert.deepEqual((await avcs(root, "status")).json.unrecorded, ["b.txt"]);
3579− assert.deepEqual((await avcs(root, "status")).json.unrecorded, ["b.txt"]);
35803571
3584− assert.deepEqual((await avcs(root, "status")).json.unrecorded, []);
3586− assert.deepEqual((await avcs(root, "status")).json.unrecorded, ["b.txt"]);
35873578
3591− assert.equal((await avcs(folders.bob!, "publish", "-m", "a2")).exit, 0);
3592− assert.equal((await avcs(root, "sync")).exit, 0);
3595− assert.deepEqual((await avcs(root, "status")).json.unrecorded, ["a.txt"]);
35973588
@@ -3633,9 +3624,9 @@
36333624 assert.match(recorded.stdout + recorded.stderr, /this folder is a reader: it records and publishes nothing/);
36343625 assert.equal((await main(["publish", "-m", "x"], { cwd: dir, env: ENV, write: () => {} })).exit, 1);
3636− assert.equal((await avcs(folders.alice!, "publish", "-m", "alice")).exit, 0);
3637− assert.equal((await avcs(dir, "sync")).exit, 0);
3638− const status = await avcs(dir, "status");
@@ -3643,28 +3634,28 @@
3646− assert.match(read(dir, ".avcs/hook.log"), /\tskipped: this folder is a reader\t/);
3648− const config = JSON.parse(read(dir, ".avcs/config.json"));
3649− write(dir, { ".avcs/config.json": JSON.stringify({ ...config, reader: undefined }) });
3652− write(dir, { ".avcs/config.json": JSON.stringify(config) });
3654− assert.equal((await avcs(dir, "restore", "--all")).exit, 0);
3655− assert.equal((await avcs(dir, "reader", "off")).exit, 0);
3656− assert.equal(JSON.parse(read(dir, ".avcs/config.json")).reader, undefined);
3658− assert.equal((await avcs(dir, "publish", "-m", "rep writes")).exit, 0);
36603651
36613652 it("reader on is refused while the agent has unpublished work, and changes nothing here", async () => {
3664− assert.equal((await avcs(folders.alice!, "record")).exit, 0);
36653656 const on = await main(["reader", "on"], { cwd: folders.alice!, env: ENV, write: () => {} });
3667− assert.equal(JSON.parse(read(folders.alice!, ".avcs/config.json")).reader, undefined);
36703661
@@ -3674,7 +3665,9 @@
3677− write(config, { "skills/avcs/.claude-plugin/plugin.json": JSON.stringify({ name: "avcs", version }) });
3669+ "skills/abso-hooks/.claude-plugin/plugin.json": JSON.stringify({ name: "abso-hooks", version }),
36793672 (await main(["status"], { cwd: alice, env: { ...ENV, CLAUDE_CONFIG_DIR: config }, write: () => {} })).stdout;
@@ -3686,7 +3679,7 @@
3689− write(alice, { ".avcs/hook.log": `${line()}\n` });
36913684 assert.doesNotMatch(await said(), /edit mod/, "an install without a commit: nothing to compare");
@@ -3694,9 +3687,9 @@
36953688 /\nThe last edit here \(at 22:50 UTC\) came from edit mod from before mods carried a version, but 0\.1\.0\+abc1234 is installed\. A chat keeps the mod it started with; restart the chat that edits this folder to load the installed one\.\n/,
3697− write(alice, { ".avcs/hook.log": `${line()}\n${line("avcs-mod/0.1.0+0ld0000")}\n` });
36983691 assert.match(await said(), /came from edit mod 0\.1\.0\+0ld0000, but 0\.1\.0\+abc1234 is installed/);
3699− write(alice, { ".avcs/hook.log": `${line("avcs-mod/0.1.0+abc1234")}\n` });
@@ -3724,20 +3717,20 @@
3727− assert.equal((await avcs(folders[who]!, "publish", "-m", `${who} ${text.trim()}`)).exit, 0);
3728− await avcs(folders[who]!, "sync");
3732− await avcs(folders.alice!, "sync");
3735− const since = await avcs(folders.alice!, "log", "--since", "1");
3740− const byBob = await avcs(folders.alice!, "log", "--by", "bob");
@@ -3764,10 +3757,10 @@
3767− assert.equal((await avcs(alice, "record")).exit, 0);
3770− const status = await avcs(alice, "status");
@@ -3775,8 +3768,8 @@
37763769 /\nEverything in this folder is recorded\.\nAdded to your draft by an earlier record and deleted since, so they never reach shared; the next record \(sync, publish, run\) takes them out of your draft: _ab\/x\.ts, tools\/_perf\.sh\n/,
3778− assert.equal((await avcs(alice, "record")).exit, 0);
3779− assert.deepEqual((await avcs(alice, "diff")).json.files, [], "the next record clears the draft");
3772+ assert.deepEqual((await abso(alice, "diff")).json.files, [], "the next record clears the draft");
37813774
37823775 it("run --with sends files (or a folder) for one run only: never in the folder, never recorded", async () => {
@@ -3816,7 +3809,7 @@
3819− assert.deepEqual((await avcs(alice, "diff")).json.files, []);
38213814
38223815 it("refuses a --with that would go outside the box folder, or names no local file", async () => {
@@ -3893,7 +3886,7 @@
3896− const status = await avcs(alice, "status");
@@ -3927,17 +3920,17 @@
39273920 it("sync and publish drop new ones from the draft and keep them on disk; a file shared has stays", async () => {
3930− // What a mod without nested ignore files does: the files reach the draft, then out/.avcsignore says "*".
3923+ // What a mod without nested ignore files does: the files reach the draft, then out/.absoignore says "*".
3932− assert.equal((await avcs(alice, "record")).exit, 0);
3933− write(alice, { "out/.avcsignore": "# scratch\n*\n" });
39373930 /Dropped from your draft, kept on disk \(your ignore rules leave it out; abso check-ignore says which line\): out\/cards\.mjs\n/,
3940− const diff = await avcs(alice, "diff");
@@ -3945,12 +3938,12 @@
3948− rmSync(join(alice, "out", ".avcsignore"));
3949− assert.equal((await avcs(alice, "record")).exit, 0);
3950− write(alice, { "out/.avcsignore": "*\n" });
3951− const published = await avcs(alice, "publish", "-m", "keep");
3953− const shown = await avcs(alice, "show", "1");
@@ -4020,19 +4013,19 @@
4023− "console.log(JSON.stringify(['AVCS_AGENT', 'AVCS_SPACE', 'AVCS_VERSION', 'AVCS_DRAFT', 'AVCS_DRAFT_HASH'].map((k) => process.env[k])));\n";
4016+ "console.log(JSON.stringify(['ABSO_AGENT', 'ABSO_SPACE', 'ABSO_VERSION', 'ABSO_DRAFT', 'ABSO_DRAFT_HASH'].map((k) => process.env[k])));\n";
4026− const clean = await avcs(alice, "run", "node", "stamp.js");
40294022
4031− const dirty = await avcs(alice, "run", "node", "stamp.js");
4035− const again = JSON.parse((await avcs(alice, "run", "node", "stamp.js")).out) as string[];
@@ -4045,7 +4038,7 @@
4048− env: { ...ENV, AVCS_RUN_RECONNECT_MS: "50,50,50" },
@@ -4058,7 +4051,7 @@
4061− assert.match(read(folders.alice!, ".avcs/run.log"), /reconnecting \(try 1\) to: node slow\.js/);
4054+ assert.match(read(folders.alice!, ".abso/run.log"), /reconnecting \(try 1\) to: node slow\.js/);
40634056
@@ -4067,7 +4060,7 @@
4070− assert.equal(read(folders.alice!, ".avcs/run.log").trim().split("\n").length, 2);
40724065
40734066 it("reattaches when the server ends the stream with retry (a deploy), and copes with non-ASCII output", async () => {
@@ -4107,17 +4100,17 @@
4110− assert.equal((await avcs(alice, "record")).json.sent, 0, "the hook kept the known copies in step");
4111− assert.equal((await avcs(alice, "publish", "-m", "empty two files")).exit, 0);
4103+ assert.equal((await abso(alice, "record")).json.sent, 0, "the hook kept the known copies in step");
41144107
4116− assert.equal((await avcs(bob, "sync")).exit, 0);
4120− assert.equal((await avcs(bob, "publish", "-m", "remove the empty file")).exit, 0);
@@ -4148,13 +4141,13 @@
41494142
4151− const synced = await avcs(alice, "sync");
4153− assert.deepEqual(JSON.parse(read(alice, ".avcs/modes.json")), { "run.sh": { exec: true } });
4156− assert.equal((await avcs(alice, "record")).json.sent, 0, "nothing to send back");
4157− assert.deepEqual((await avcs(alice, "status")).json.unrecorded, []);
41594152
41604153 it("makes links from the server (or a file standing in), and records a changed target", async () => {
@@ -4164,9 +4157,9 @@
41654158
4167− assert.equal((await avcs(alice, "sync")).exit, 0);
4169− assert.equal((await avcs(alice, "record")).json.sent, 0, "the link (or its stand-in) matches what the server has");
4162+ assert.equal((await abso(alice, "record")).json.sent, 0, "the link (or its stand-in) matches what the server has");
@@ -4186,7 +4179,7 @@
4189− assert.equal((await avcs(alice, "publish", "-m", "point the link at b")).exit, 0);
@@ -4196,7 +4189,7 @@
4199− assert.equal((await avcs(folders.alice!, "publish", "-m", "add a link")).exit, 0);
@@ -4231,7 +4224,7 @@
42334226
4234− const mine = await avcs(alice, "diff");
@@ -4239,7 +4232,7 @@
42394232 assert.equal(a.diff, "--- a/a.txt\n+++ b/a.txt\n@@ -1,3 +1,3 @@\n one\n-two\n+TWO\n three");
4242− (await avcs(alice, "diff", "c.txt")).json.files.map((f: any) => f.path),
@@ -4255,7 +4248,7 @@
42564249 /^alice's recorded, unpublished changes to a\.txt in shared \(on version 0\): 1 file, 1 line added, 1 removed\.\n--- a\/a\.txt\n\+\+\+ b\/a\.txt\n@@ -1,3 \+1,3 @@\n one\n-two\n\+TWO\n three/,
4258− assert.deepEqual((await avcs(folders.bob!, "diff", "--agent", "alice")).json.files.map((f: any) => f.path).sort(), [
4251+ assert.deepEqual((await abso(folders.bob!, "diff", "--agent", "alice")).json.files.map((f: any) => f.path).sort(), [
@@ -4271,11 +4264,11 @@
42734266
4274− assert.equal((await avcs(alice, "publish", "-m", "alice: shout two, add c")).exit, 0);
4276− assert.equal((await avcs(folders.bob!, "publish", "-m", "bob: change b")).exit, 0);
42774270
4278− const log = await avcs(alice, "log");
@@ -4286,11 +4279,11 @@
4289− (await avcs(alice, "log", "c.txt")).json.versions.map((v: any) => v.version),
4293− (await avcs(alice, "log", "-n", "1")).json.versions.map((v: any) => v.version),
@@ -4299,7 +4292,7 @@
42994292 /^shared is at version 2\.\nversion 2 by bob, .* UTC: bob: change b\n {2}1 file: b\.txt\nOlder versions: abso log --before 2\n$/,
43014294
4302− const show = await avcs(alice, "show", "1");
@@ -4309,12 +4302,12 @@
4312− assert.equal((await avcs(alice, "show", "0:c.txt")).exit, 1, "c.txt did not exist at version 0");
4305+ assert.equal((await abso(alice, "show", "0:c.txt")).exit, 1, "c.txt did not exist at version 0");
43134306
4314− const between = await avcs(alice, "diff", "0", "2");
43154308 assert.deepEqual(between.json.files.map((f: any) => f.path).sort(), ["a.txt", "b.txt", "c.txt"]);
4316− assert.equal((await avcs(alice, "blame", "a.txt", "--version", "0")).json.lines[1].text, "two");
4317− assert.equal((await avcs(alice, "show", "x")).json.error.code, "usage");
4309+ assert.equal((await abso(alice, "blame", "a.txt", "--version", "0")).json.lines[1].text, "two");
43194312
@@ -4324,9 +4317,9 @@
4327− assert.equal((await avcs(alice, "publish", "-m", "change src and top")).exit, 0);
43284321
4329− const between = await avcs(alice, "diff", "0", "1", "src/", "test/", "nope/");
43304323 assert.deepEqual(between.json.files.map((f: any) => f.path).sort(), ["src/a.ts", "src/deep/b.ts"]);
43324325 const text = await main(["diff", "0", "1", "src", "test", "nope"], { cwd: alice, env: ENV, write: () => {} });
@@ -4343,18 +4336,18 @@
43444337
4346− (await avcs(alice, "log", "src/deep")).json.versions.map((v: any) => v.version),
4350− (await avcs(alice, "log", "test/")).json.versions.map((v: any) => v.version),
43544347 assert.match(none.stdout, /No version changed nope\/\.\n {2}nope: no such file or folder here now/);
4357− (await avcs(alice, "diff", "test")).json.files.map((f: any) => f.path),
@@ -4363,12 +4356,12 @@
4366− assert.equal((await avcs(alice, "switch", "-c", "exp")).exit, 0);
4367− assert.equal((await avcs(alice, "publish", "-m", "exp: a")).exit, 0);
4368− const inDraft = await avcs(alice, "log");
4371− const inShared = await avcs(alice, "log", "--draft", "shared");
@@ -4379,7 +4372,7 @@
43814374
4382− const some = await avcs(alice, "restore", "a.txt", "d.txt");
@@ -4387,18 +4380,18 @@
43884381 assert.equal(read(alice, "b.txt"), "b changed on disk\n", "files not named are left alone");
4390− (await avcs(alice, "diff")).json.files.map((f: any) => f.path),
4393− assert.equal((await avcs(alice, "record")).json.sent, 0, "the known copies match the restored files");
4386+ assert.equal((await abso(alice, "record")).json.sent, 0, "the known copies match the restored files");
43944387
4395− const rest = await avcs(alice, "restore", "--all");
4398− assert.deepEqual((await avcs(alice, "diff")).json.files, []);
4399− assert.equal((await avcs(alice, "restore", "a.txt")).json.restored.length, 0, "nothing left to restore");
4400− assert.equal((await avcs(alice, "restore")).json.error.code, "usage");
4401− assert.equal((await avcs(alice, "restore", "--all", "a.txt")).json.error.code, "usage");
4392+ assert.equal((await abso(alice, "restore", "a.txt")).json.restored.length, 0, "nothing left to restore");
44044397
@@ -4413,22 +4406,22 @@
44144407 const { name, folders } = await project({ "a.ts": "one\n", "b.ts": "b\n" }, "alice", "bob");
4416− assert.equal((await avcs(folders.alice!, "publish", "-m", "rename a.ts to A.ts")).exit, 0);
4419− (await avcs(folders.alice!, "status")).json.unrecorded?.length ?? 0,
44234416
4424− const synced = await avcs(folders.bob!, "sync");
4431− assert.equal((await avcs(folders.bob!, "record")).json.sent, 0, "the known copy matches after the sync");
4424+ assert.equal((await abso(folders.bob!, "record")).json.sent, 0, "the known copy matches after the sync");
44344427
@@ -4447,15 +4440,15 @@
4450− (await avcs(folders.alice!, "status")).json.unrecorded?.length ?? 0,
4454− assert.equal((await avcs(folders.alice!, "publish", "-m", "renames")).exit, 0);
44554448 assert.deepEqual(Object.keys(shared(name)).sort(), [".absoignore", "README.md", "lib/a.ts"]);
4458− assert.equal((await avcs(folders.bob!, "sync")).exit, 0);
44594452 assert.ok(readdirSync(folders.bob!).includes("README.md"), readdirSync(folders.bob!).join(", "));
44614454
@@ -4518,7 +4511,7 @@
4521− write(config, { "skills/avcs/.claude-plugin/plugin.json": '{"name":"avcs"}' });
@@ -4527,12 +4520,12 @@
4530− const r = await runHook(input, { AVCS_TOKEN: TOKEN, CLAUDE_CONFIG_DIR: config });
4535− "AVCS_HOOK_FORCE=1 overrides it",
@@ -4543,12 +4536,12 @@
45454538 assert.match(where.stdout, /src\/a\.txt\n {4}alice: lines 2, at shared lines 2; 1 change/);
4546− assert.equal((await avcs(folders.alice!, "publish", "-m", "alice changes two")).exit, 0);
4548− assert.equal((await avcs(folders.bob!, "publish", "-m", "bob changes two")).exit, 2);
4549− await avcs(folders.bob!, "sync");
4551− assert.equal((await avcs(folders.bob!, "publish", "-m", "settle two")).exit, 0);
45524545
@@ -4587,7 +4580,7 @@
45894582 write(folders.alice!, { "data/x.txt": "forty-two\n" }); // unrecorded edits still go: run sends the folder
4590− const r = await avcs(folders.alice!, "run", "node", "check.js");
@@ -4648,38 +4641,25 @@
46504643
4651−describe("the state folder after the rename to abso", () => {
4652− it("makes new folders with .avcs for now, and works in a .abso folder too, never half-moving either", async () => {
4655− // An edit mod installed before the rename finds only .avcs/config.json: a .abso folder's edits would go unrecorded.
4656− assert.equal(existsSync(join(dir, ".avcs", "config.json")), true, "a new folder keeps its state in .avcs for now");
4657− assert.equal(existsSync(join(dir, ".abso")), false, "and makes no .abso");
4658− // A folder moved to .abso (by hand, or a later abso migrate) works the same, and gets no second state folder.
4659− renameSync(join(dir, ".avcs"), join(dir, ".abso"));
4661− const rec = await avcs(dir, "record");
4664− assert.equal(existsSync(join(dir, ".avcs")), false, "a moved folder is never half-moved back");
46674657
4668− it("reads ~/.abso before ~/.avcs and writes only ~/.abso, leaving the old file as it is", () => {
4670− assert.equal(homeFile(home, "token"), join(home, ".abso", "token"), "neither exists: the new place");
4673− assert.equal(homeFile(home, "token"), join(home, ".avcs", "token"), "only the old exists: read it");
4674− mkdirSync(join(home, ".abso"));
4675− writeFileSync(join(home, ".abso", "token"), "new\n");
4676− assert.equal(homeFile(home, "token"), join(home, ".abso", "token"), "both: the new one wins");
4677− assert.equal(homeWritePath(home, "boxes", "x.json"), join(home, ".abso", "boxes", "x.json"));
4678− assert.equal(readFileSync(join(home, ".avcs", "token"), "utf8"), "old\n", "the old file is left alone");
4679− });
4680−
4681− it("writes a box sign-in to ~/.abso, reads an old one from ~/.avcs, and logout removes both", () => {
4682− const home = temp();
4662+ assert.equal(homeFile(home, "token"), join(home, ".abso", "token"), "a ~/.avcs file is not read");
@@ -4688,14 +4668,49 @@
4691− mkdirSync(join(home, ".avcs", "boxes"), { recursive: true });
4693− assert.equal(readdirSync(join(home, ".abso", "boxes")).length, 1, "written to the new place");
4695− const file = readdirSync(join(home, ".abso", "boxes"))[0]!;
4696− copyFileSync(join(home, ".abso", "boxes", file), join(home, ".avcs", "boxes", file));
4698− assert.equal(existsSync(join(home, ".abso", "boxes", file)), false);
4699− assert.equal(existsSync(join(home, ".avcs", "boxes", file)), false, "logout removes the old copy too");
4677+
4678+ it("refuses a folder with avcs.json or .avcsignore, naming the file and its new name", async () => {
4690+ `${file.replace(/[./]/g, "$&")} has the name from before the rename: rename it to ${now.replace(/\./g, ".")}`,
4702+
4706+ const init = await main(["init", "--server", fake.url, "--project", "old-names", "--agent", "alice"], {
4712+ assert.match(init.stderr + init.stdout, /avcs\.json has the name from before the rename: rename it to abso\.json/);
--- a/client/test/env-names.test.ts
+++ b/client/test/env-names.test.ts
@@ -1,25 +1,16 @@
4−import { fromEnv, withOldNames } from "../src/env-names.ts";
55
6−test("ABSO_ names win over AVCS_ ones, and the old ones still work", () => {
8− assert.equal(fromEnv({ AVCS_X: "old" }, "X"), "old");
9− assert.equal(fromEnv({ ABSO_X: "", AVCS_X: "old" }, "X"), "old");
11− assert.equal(readToken({ ABSO_TOKEN: " new ", AVCS_TOKEN: "old" }), "new");
12− assert.equal(readToken({ AVCS_TOKEN: "old" }), "old");
1413 trustedServers({ ABSO_TRUSTED_SERVERS: "https://a.example", ABSO_SERVERS_FILE: "no-servers.json" }),
18−
19−test("a program abso runs gets both the new and the old names", () => {
20− const out = withOldNames({ ABSO_AGENT: "a", ABSO_SPACE: "shared", OTHER: "x" });
21− assert.equal(out.AVCS_AGENT, "a");
22− assert.equal(out.AVCS_SPACE, "shared");
23− assert.equal(out.ABSO_AGENT, "a");
24− assert.equal(out.AVCS_OTHER, undefined);
25−});
--- a/client/test/fake-server.ts
+++ b/client/test/fake-server.ts
@@ -1,4 +1,4 @@
1−// A local stand-in for the avcs Worker, for testing the client. The project
@@ -159,17 +159,17 @@
161161
162− /** The queue's check, as the Worker's CI box runs it: the candidate's avcs.json build and check, in a folder of its files. */
162+ /** The queue's check, as the Worker's CI box runs it: the candidate's abso.json build and check, in a folder of its files. */
164− const dir = mkdtempSync(join(tmpdir(), "avcs-fake-queue-"));
170− const cfg = JSON.parse(c.files["avcs.json"] ?? "{}") as { build?: string; check?: string };
171171 const cmd = [cfg.build, cfg.check].filter((s) => typeof s === "string" && s !== "").join(" && ");
172− if (cmd === "") return { kind: "fail", output: "the merge queue needs a check (or a build) in avcs.json" };
172+ if (cmd === "") return { kind: "fail", output: "the merge queue needs a check (or a build) in abso.json" };
@@ -317,7 +317,7 @@
320− // As the Worker with a checker: "queue": true in avcs.json turns the merge queue on (#39).
@@ -642,7 +642,7 @@
642642
643643 /** Unpack the folder into a temp box (keeping node_modules), run the command, stream ndjson. */
644644 const runInBox = (hosted: Hosted, cmd: string, raw: Buffer, res: ServerResponse, split: boolean): void => {
645− if (hosted.box === undefined) hosted.box = mkdtempSync(join(tmpdir(), "avcs-fake-box-"));
@@ -754,6 +754,6 @@
755755
757− const fake = await startFake(Number(process.argv[2] ?? 0), process.env.AVCS_TOKEN ?? "fake-token");
758− console.log(`fake abso server at ${fake.url} (the real engine in memory; token from AVCS_TOKEN, else "fake-token")`);
757+ const fake = await startFake(Number(process.argv[2] ?? 0), process.env.ABSO_TOKEN ?? "fake-token");
758+ console.log(`fake abso server at ${fake.url} (the real engine in memory; token from ABSO_TOKEN, else "fake-token")`);
--- a/client/test/ignore.test.ts
+++ b/client/test/ignore.test.ts
@@ -19,7 +19,7 @@
2020
22− const d = mkdtempSync(join(tmpdir(), "avcs-ignore-"));
@@ -211,7 +211,7 @@
214− `${rel}${isDir ? "/" : ""}: git ${theirs} (${gitIgnored ? "ignored" : "kept"}), avcs ${ours} (${m.ignored ? "ignored" : "kept"})`,
214+ `${rel}${isDir ? "/" : ""}: git ${theirs} (${gitIgnored ? "ignored" : "kept"}), abso ${ours} (${m.ignored ? "ignored" : "kept"})`,
@@ -265,20 +265,20 @@
267267
268− it("let .avcsignore beat .gitignore in the same folder, like lines later in one file", () => {
273− ".avcsignore": "!keep.txt\n*.md\n",
274− "src/.avcsignore": "!*.md\n",
281− // git's twin: each folder's .avcsignore lines appended to its .gitignore.
@@ -301,26 +301,22 @@
304− assert.equal(ignore.why("keep.txt", false).rule?.source, ".avcsignore");
305− assert.equal(ignore.why("src/b.md", false).rule?.source, "src/.avcsignore");
307307
308− it("read .absoignore, which beats .avcsignore and .gitignore in the same folder", () => {
310− write(root, {
311− ".gitignore": "*.txt\n",
312− ".avcsignore": "*.md\n",
313− ".absoignore": "!a.txt\n!a.md\n*.log\n",
314− "a.txt": "x",
315− "a.md": "x",
316− "b.md": "x",
317− "c.log": "x",
318− });
320− assert.equal(ignore("a.txt", false), false);
321− assert.equal(ignore("a.md", false), false);
322− assert.equal(ignore("c.log", false), true);
323− assert.equal(ignore.why("c.log", false).rule?.source, ".absoignore");
315+ message: "src/.avcsignore has the name from before the rename: rename it to .absoignore, then run abso again",
319+ assert.throws(() => loadIgnore(top, { home: temp() })("a.md", false), /^UsageError: \.avcsignore has the name/);
325321
@@ -347,7 +343,7 @@
350− "src/.avcsignore": "gen/\n",
@@ -370,7 +366,7 @@
373− ["src/gen", true, "src/.avcsignore", 1, null],
@@ -382,15 +378,15 @@
383379
385− it("catches every spelling abso takes as the same file, from .avcsignore and .gitignore alike", () => {
381+ it("catches every spelling abso takes as the same file, from .absoignore and .gitignore alike", () => {
388− ".avcsignore": ".env\nsecrets/\n*.KEY\nCaf\u00e9.txt\n[[:upper:]]X.tmp\n",
389− "Cfg/.avcsignore": "local.json\n",
392388 // A folder's ignore file is read under the folder's name on disk, so Cfg/ keeps its spelling here: on a
393− // disk that matches case (Linux, CI's box), cfg/.avcsignore isn't Cfg/.avcsignore.
--- a/client/test/install.test.ts
+++ b/client/test/install.test.ts
@@ -25,12 +25,11 @@
28− AVCS_MOD,
33− retireOldMod,
@@ -44,7 +43,7 @@
4544
47− const d = mkdtempSync(join(tmpdir(), "avcs-install-test-"));
@@ -412,7 +411,7 @@
414413
415− it("avcs --version names this client's version and the mods installed, and which are from another commit", async () => {
414+ it("abso --version names this client's version and the mods installed, and which are from another commit", async () => {
@@ -438,29 +437,6 @@
440439
441− it("moves the old avcs mod folder out of the skills folder, not deleting it, once abso-hooks is in", () => {
442− const config = temp();
443− const old = join(config, "skills", "avcs");
444− write(old, ".claude-plugin/plugin.json", '{"name":"avcs","version":"0.1.0"}');
445− const home = temp();
446− const was = process.env.USERPROFILE;
447− const was2 = process.env.HOME;
448− process.env.USERPROFILE = home;
449− process.env.HOME = home;
450− try {
451− const to = retireOldMod(AVCS_MOD, { CLAUDE_CONFIG_DIR: config });
452− assert.ok(to?.startsWith(join(home, ".abso", "retired-mods")));
453− assert.equal(existsSync(old), false);
454− assert.equal(existsSync(join(to!, ".claude-plugin", "plugin.json")), true);
455− assert.equal(retireOldMod(AVCS_MOD, { CLAUDE_CONFIG_DIR: config }), undefined);
456− } finally {
457− if (was === undefined) delete process.env.USERPROFILE;
458− else process.env.USERPROFILE = was;
459− if (was2 === undefined) delete process.env.HOME;
460− else process.env.HOME = was2;
461− }
462− });
463−
464440 it("status says when an installed mod is behind this client, where the client knows its commit (abso issue 41)", () => {
--- a/client/test/issues.test.ts
+++ b/client/test/issues.test.ts
@@ -83,13 +83,13 @@
8484
86− AVCS_TOKEN: TOKEN,
87− AVCS_HOOK_FORCE: "1",
88− AVCS_ISSUES_SERVER: issuesUrl,
89− AVCS_SERVERS_FILE: "no-servers.json",
9191
92−async function avcs(
@@ -100,9 +100,9 @@
100100
103− const dir = mkdtempSync(join(tmpdir(), "avcs-issues-"));
105− const r = await avcs(dir, ["init", "--server", fake.url, "--project", `issues${++projects}`, "--agent", agent]);
105+ const r = await abso(dir, ["init", "--server", fake.url, "--project", `issues${++projects}`, "--agent", agent]);
@@ -111,13 +111,13 @@
114− const r = await avcs(dave, ["issues"], { ...ENV(), AVCS_ISSUES_SERVER: "https://issues.example.com" });
114+ const r = await abso(dave, ["issues"], { ...ENV(), ABSO_ISSUES_SERVER: "https://issues.example.com" });
119− const { AVCS_ISSUES_SERVER: _, ...without } = ENV();
120− const none = await avcs(dave, ["waiting"], without);
@@ -132,10 +132,10 @@
135− const { AVCS_ISSUES_SERVER: _, ...without } = ENV();
136− await avcs(erin, ["waiting"], { ...without, AVCS_SERVERS_FILE: file });
138− const machine = readMachineServers({ AVCS_SERVERS_FILE: file });
@@ -177,7 +177,7 @@
180− const r = await avcs(erin, argv);
@@ -199,7 +199,7 @@
202− await avcs(erin, ["ask", "--withdraw", "#3", "--note", "overtaken by later decisions"]);
--- a/client/test/key-admin.test.ts
+++ b/client/test/key-admin.test.ts
@@ -19,8 +19,8 @@
22−// No server takes the admin token unless AVCS_ADMIN_SERVERS names it; these tests name staging's stand-in.
23−process.env.AVCS_ADMIN_SERVERS = "https://staging.abso.example";
22+// No server takes the admin token unless ABSO_ADMIN_SERVERS names it; these tests name staging's stand-in.
2525
2626function fetchOf(status: number, body: unknown, seen: { url?: string; headers?: Headers }[]): typeof fetch {
@@ -30,7 +30,7 @@
3232
33−test("the admin token is sent only to a server AVCS_ADMIN_SERVERS names", async () => {
3535 assert.equal(adminGoesTo("https://staging.abso.example", "https://staging.abso.example"), true);
@@ -59,8 +59,8 @@
6060
62− assert.equal(adminToken({ AVCS_ADMIN_TOKEN: ADMIN }), ADMIN);
6666
--- a/client/test/key.test.ts
+++ b/client/test/key.test.ts
@@ -14,10 +14,10 @@
1616
17−test("a key in the folder is sent instead of AVCS_TOKEN, and only to its server", () => {
20− const env = { AVCS_TOKEN: "shared-token-value" };
@@ -28,22 +28,22 @@
31− AVCS_TOKEN: "shared-token-value",
32− AVCS_TRUSTED_SERVERS: "https://abso.example",
33− AVCS_SERVERS_FILE: "no-servers.json",
3636 assert.deepEqual(credentialLabel(root, "https://abso.example", env), { kind: "shared token", id: null });
3838
39−test("install writes .avcs/key and does not leave the key in the returned value", () => {
43− const stored = readFileSync(join(root, ".avcs", "key"), "utf8");
46− writeFileSync(join(root, ".avcs", "key"), stored);
4848
client/test/new-folder-dir.test.tsdeleted; this is the file as it was before+0 −38
--- a/client/test/new-folder-dir.test.ts
+++ /dev/null
@@ -1,38 +0,0 @@
1−import assert from "node:assert/strict";
2−import { mkdirSync, mkdtempSync, writeFileSync } from "node:fs";
3−import { tmpdir } from "node:os";
4−import { join } from "node:path";
5−import { test } from "node:test";
6−import { newFolderDir } from "../src/state-dir.ts";
7−
8−/** A Claude config folder with these mods installed, each at this version. */
9−function claudeWith(mods: Record<string, string>): { CLAUDE_CONFIG_DIR: string } {
10− const dir = mkdtempSync(join(tmpdir(), "abso-claude-"));
11− for (const [name, version] of Object.entries(mods)) {
12− const mod = join(dir, "skills", name);
13− mkdirSync(mod, { recursive: true });
14− writeFileSync(join(mod, ".avcs-install.json"), JSON.stringify({ mod: name, version }));
15− }
16− return { CLAUDE_CONFIG_DIR: dir };
17−}
18−
19−test("a new folder gets .abso when no mod is installed, or every installed mod knows it", () => {
20− assert.equal(newFolderDir(claudeWith({})), ".abso");
21− assert.equal(newFolderDir(claudeWith({ avcs: "0.2.0+abc1234", "avcs-view": "0.2.0" })), ".abso");
22− assert.equal(newFolderDir(claudeWith({ abso: "0.3.1.dirty" })), ".abso");
23−});
24−
25−test("a new folder keeps .avcs while any installed mod is older than the rename", () => {
26− assert.equal(newFolderDir(claudeWith({ avcs: "0.1.0+2ecf1a7" })), ".avcs");
27− assert.equal(newFolderDir(claudeWith({ avcs: "0.2.0", "avcs-view": "0.1.0" })), ".avcs");
28− assert.equal(newFolderDir(claudeWith({ avcs: "unreadable" })), ".avcs");
29−});
30−
31−test("a mod folder with no readable install record counts as old", () => {
32− const env = claudeWith({});
33− const mod = join(env.CLAUDE_CONFIG_DIR, "skills", "avcs");
34− mkdirSync(mod, { recursive: true }); // copied in by hand: no .avcs-install.json
35− assert.equal(newFolderDir(env), ".avcs");
36− writeFileSync(join(mod, ".avcs-install.json"), "not json");
37− assert.equal(newFolderDir(env), ".avcs");
38−});
--- a/client/test/pipeline-commands.test.ts
+++ b/client/test/pipeline-commands.test.ts
@@ -70,14 +70,14 @@
7272
73− it("looks for abso.yml, abso.yaml, then avcs.json, and reads avcs.json's shorthand", async () => {
74− const both = folder({ "abso.yaml": GOOD, "avcs.json": '{ "check": "npm test" }' });
73+ it("looks for abso.yml, abso.yaml, then abso.json, and reads abso.json's shorthand", async () => {
76− const only = await run(folder({ "avcs.json": '{ "setup": "npm ci", "check": "npm test" }' }), "check");
76+ const only = await run(folder({ "abso.json": '{ "setup": "npm ci", "check": "npm test" }' }), "check");
80− /^avcs\.json is fine: 1 pipeline.*\n {2}ci, on publish:\n {4}setup \(required\): npm ci\n {4}check \(required\): npm test, after setup\n$/s,
80+ /^abso\.json is fine: 1 pipeline.*\n {2}ci, on publish:\n {4}setup \(required\): npm ci\n {4}check \(required\): npm test, after setup\n$/s,
8383
@@ -91,7 +91,7 @@
94− assert.match(none.stderr, /no pipeline file in .*: looked for abso\.yml, abso\.yaml, abso\.json, avcs\.json/);
94+ assert.match(none.stderr, /no pipeline file in .*: looked for abso\.yml, abso\.yaml, abso\.json/);
--- a/client/test/setup.ts
+++ b/client/test/setup.ts
@@ -1,13 +1,8 @@
1−// Loaded before every test file (npm test: node --import). New folders are made as .abso or .avcs by what mods
2−// are installed (state-dir.ts newFolderDir), so a test must not read this machine's ~/.claude: it gets a Claude
3−// folder with one mod from before the rename installed, which keeps new folders on .avcs. The tests of that
4−// choice (new-folder-dir.test.ts) pass their own folders.
5−import { mkdirSync, mkdtempSync, writeFileSync } from "node:fs";
1+// Loaded before every test file (npm test: node --import). The hook stands down and status reads versions by
2+// what mods are installed, so a test must not read this machine's ~/.claude: it gets an empty Claude folder.
87
9−const claude = mkdtempSync(join(tmpdir(), "abso-test-claude-"));
10−const mod = join(claude, "skills", "avcs");
11−mkdirSync(mod, { recursive: true });
12−writeFileSync(join(mod, ".avcs-install.json"), JSON.stringify({ mod: "avcs", version: "0.1.0+0000000" }));
13−process.env.CLAUDE_CONFIG_DIR = claude;