Versions 2 to 318
Lines 10–21 at 318 (were 10–19 at 2)
1415import { absolute, isLocalOnly, loadIgnore, readText, walk, writeFileAtomic } from "./folder.ts";
1820
Lines 72–78 at 318 (were 70–76 at 2)
7072
73− * Builder 6's A/B runs), sent with the folder and never written to it or
Lines 89–95 at 318 (were 87–93 at 2)
90− const why = unsafePath(box) ?? (isLocalOnly(box) ? "it is under .git, .claude, .avcs or node_modules" : undefined);
92+ const why = unsafePath(box) ?? (isLocalOnly(box) ? "it is under .git, .claude, .abso or node_modules" : undefined);
9193 if (why !== undefined) throw new UsageError(`--with can't put a file at ${JSON.stringify(box)}: ${why}`);
Lines 106–112 at 318 (were 104–111 at 2)
107− const data =
108− text !== undefined && text.includes("\r") ? Buffer.from(text.replace(/\r\n?/g, "\n")) : readFileSync(from);
109+ const data = text?.includes("\r") ? Buffer.from(text.replace(/\r\n?/g, "\n")) : readFileSync(from);
Lines 176–182 at 318 (were 175–181 at 2)
175176
178− * space where the check fails (#37, Builders 1 and 6). Each step is an abso run
Lines 290–296 at 318 (were 289–295 at 2)
289290export async function runRun(args: Parsed, env: Env, as: "run" | "prep" = "run"): Promise<Output> {
291292 throw new UsageError("give the command to run: abso run <command>, or abso run -- <program> <arg...>");
292− // A glob before -- next to a list flag is a second value given the wrong way (#37, Builder 5: --fetch 'a' 'b' -- cmd ran "b"
293+ // A glob before -- next to a list flag is a second value given the wrong way (#37: --fetch 'a' 'b' -- cmd ran "b"
294295 // Once a plain word comes, run keeps the rest as typed, -- included; so the words before a literal -- are the suspects.
Lines 305–319 at 318 (were 304–318 at 2)
307− // avcs's own lines (on stderr); --quiet drops them, and the box's stdout and stderr stay as they are (#37, Builder 3).
308+ // avcs's own lines (on stderr); --quiet drops them, and the box's stdout and stderr stay as they are (#37).
308309 const notice = bool(args, "quiet") ? (_text: string): void => {} : (env.writeErr ?? env.write);
309− // What the box said about its prep (X-Avcs-Prep): null when it has none.
315− `avcs: Git Bash rewrote ${posix.undone.map((u) => `${u.to} as ${u.from}`).join(", ")}; sending ${posix.undone.map((u) => u.to).join(", ")} to the box. (MSYS_NO_PATHCONV=1 stops Git Bash rewriting.)\n`,
316+ `abso: Git Bash rewrote ${posix.undone.map((u) => `${u.to} as ${u.from}`).join(", ")}; sending ${posix.undone.map((u) => u.to).join(", ")} to the box. (MSYS_NO_PATHCONV=1 stops Git Bash rewriting.)\n`,
Lines 324–330 at 318 (were 323–329 at 2)
326− "avcs: the box's sh reads this command again; if a \\, $ or quote comes out wrong, use abso run -- <program> <args...>, which passes each word as typed.\n",
327+ "abso: the box's sh reads this command again; if a \\, $ or quote comes out wrong, use abso run -- <program> <args...>, which passes each word as typed.\n",
Lines 362–369 at 318 (were 361–368 at 2)
364− // Text goes as abso records it, with LF line endings: a CRLF script fails in the box's sh (#37, Builder 2).
365− const lf = d.text !== undefined && d.text.includes("\r") ? Buffer.from(d.text.replace(/\r\n?/g, "\n")) : undefined;
365+ // Text goes as abso records it, with LF line endings: a CRLF script fails in the box's sh (#37).
368369 // The bit from the disk, or (on Windows) from the server; a script with "#!" runs either way.
Lines 374–403 at 318 (were 373–402 at 2)
374375 toLf.length <= LISTED ? toLf.join(", ") : `${toLf.slice(0, LISTED).join(", ")}, and ${toLf.length - LISTED} more`;
376− `avcs: sent ${plural(toLf.length, "file")} with LF line endings, as abso records them; your folder has CRLF: ${named}.\n`,
377+ `abso: sent ${plural(toLf.length, "file")} with LF line endings, as abso records them; your folder has CRLF: ${named}.\n`,
382− const space = stamp.AVCS_SPACE === "shared" ? "shared" : `draft ${stamp.AVCS_SPACE}`;
385− stamp = { ...stamp, AVCS_VERSION: String(at), AVCS_DRAFT: "0", AVCS_DRAFT_HASH: "", AVCS_AT: String(at) };
386+ stamp = { ...stamp, ABSO_VERSION: String(at), ABSO_DRAFT: "0", ABSO_DRAFT_HASH: "", ABSO_AT: String(at) };
387− `avcs: running version ${at} of ${space} in the box (${plural(entries.length, "file")}); your folder is untouched.\n`,
388+ `abso: running version ${at} of ${space} in the box (${plural(entries.length, "file")}); your folder is untouched.\n`,
392393 const gone = entries.filter((e) => pick(e.path) && !old.some((o) => o.path === e.path)).map((e) => e.path);
393394 entries = [...entries.filter((e) => !pick(e.path)), ...old].sort((a, b) => a.path.localeCompare(b.path));
394− stamp = { ...stamp, AVCS_AT: `${at} files ${filesGlob}` };
398399 : `${plural(old.length, "file")} as at version ${at}: ${old.map((e) => e.path).join(", ")}${gone.length > 0 ? `; left out, not there at version ${at}: ${gone.join(", ")}` : ""}`;
399− notice(`avcs: running your folder with ${said}. Your folder is untouched.\n`);
Lines 413–425 at 318 (were 412–424 at 2)
415− `avcs: adding ${plural(extra.length, "file")} for this run only: ${named}. They are not in your folder and are not recorded.\n`,
416+ `abso: adding ${plural(extra.length, "file")} for this run only: ${named}. They are not in your folder and are not recorded.\n`,
419420 // The box keeps what the command leaves (node_modules, ~/.cache, /tmp) as what it starts from (#37).
421− "avcs: preparing the box from a fresh image: this takes as long as the command, then a few seconds to save.\n",
422+ "abso: preparing the box from a fresh image: this takes as long as the command, then a few seconds to save.\n",
Lines 444–458 at 318 (were 443–457 at 2)
446− // A broken stream reconnects to the run quietly; .avcs/run.log says when and why.
449− env.env[name]
453− const reconnect = delays("AVCS_RUN_RECONNECT_MS");
454− const retry = delays("AVCS_RUN_RETRY_MS");
457458 ? new Api(api.config, api.timeoutMs, reconnect?.length ? reconnect : undefined, retry?.length ? retry : undefined)
Lines 461–467 at 318 (were 460–466 at 2)
463− appendFileSync(join(root, ".avcs", "run.log"), `${new Date().toISOString()}\t${what}: ${named}\t${why}\n`);
464+ appendFileSync(join(stateDir(root), "run.log"), `${new Date().toISOString()}\t${what}: ${named}\t${why}\n`);
Lines 491–503 at 318 (were 490–502 at 2)
493− "avcs: fresh box, started from your prep (abso prep): node_modules, ~/.cache and /tmp are as the prep left them.\n",
494+ "abso: fresh box, started from your prep (abso prep): node_modules, ~/.cache and /tmp are as the prep left them.\n",
497− "avcs: fresh box: it started for this run (first run, a deploy, a new image, or 30 idle minutes), so nothing earlier runs left outside the folder (/tmp, ~/.cache, node_modules) is in it. abso prep keeps them for every fresh box.\n",
498+ "abso: fresh box: it started for this run (first run, a deploy, a new image, or 30 idle minutes), so nothing earlier runs left outside the folder (/tmp, ~/.cache, node_modules) is in it. abso prep keeps them for every fresh box.\n",
499− if (prep !== undefined && prep !== "used") say(`avcs: prep ${prep}.\n`);
Lines 512–528 at 318 (were 511–527 at 2)
511512/** abso fetch <glob...>: files the box made, written into the folder where abso ignores them. */
514− * AVCS_BOX, else the agent's own. A lead can give each subagent its own box
515− * (AVCS_BOX=2 in its environment), so their runs don't wait on each other.
515+ * ABSO_BOX (or the older AVCS_BOX), else the agent's own. A lead can give each subagent its own box
518− * What this folder last heard about a box's prep: a run's X-Avcs-Prep, or
521− * (#37, Artist 1: a 40 s suite ran, then was refused).
524− return join(root, ".avcs", "box-prep.json");
Lines 549–555 at 318 (were 548–554 at 2)
549550
551− const box = str(args, "box") ?? (env.env.AVCS_BOX || undefined);
553554 throw new UsageError(`a box name is 1-24 letters, digits, - or _ (got ${JSON.stringify(box)})`);
Lines 568–574 at 318 (were 567–573 at 2)
570− join(root, ".avcs", "run.log"),
Lines 581–597 at 318 (were 580–596 at 2)
580581
583− readonly AVCS_AGENT: string;
585− readonly AVCS_SPACE: string;
587− readonly AVCS_VERSION: string;
589− readonly AVCS_DRAFT: string;
591− readonly AVCS_DRAFT_HASH: string;
592593 /** With abso run --at: the version run ("12"), or the files taken from it ("12 files src/*.ts"). */
593− readonly AVCS_AT?: string;
595596
Lines 605–623 at 318 (were 604–621 at 2)
607− AVCS_AGENT: agent,
608− AVCS_SPACE: me?.draft ?? "shared",
609− AVCS_VERSION: String(me?.base ?? status.version),
610− AVCS_DRAFT: String(me?.draftChanges ?? 0),
611− AVCS_DRAFT_HASH: hash,
614615
615616/** `export A='x' B='y'; `: on every part of a compound command, unlike a bare assignment prefix. */
618− return `export ${Object.entries(stamp)
- MCP
- compare on this site's /mcp
- CLI
- abso diff 2 318 client/src/box-commands.ts --json
- JSON
- /christopher/abso-core/compare/2..318?file=client%2Fsrc%2Fbox-commands.ts&format=json