Versions 16 to 318
Lines 10–21 at 318 (were 10–19 at 16)
1415import { absolute, isLocalOnly, loadIgnore, readText, walk, writeFileAtomic } from "./folder.ts";
1820
Lines 72–78 at 318 (were 70–76 at 16)
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 16)
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 16)
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 16)
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 16)
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–313 at 318 (were 304–312 at 16)
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.
Lines 362–369 at 318 (were 361–368 at 16)
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 380–389 at 318 (were 379–388 at 16)
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) };
387388 `abso: running version ${at} of ${space} in the box (${plural(entries.length, "file")}); your folder is untouched.\n`,
Lines 392–398 at 318 (were 391–397 at 16)
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}` };
Lines 444–458 at 318 (were 443–457 at 16)
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 16)
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 512–528 at 318 (were 511–527 at 16)
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 16)
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 16)
570− join(root, ".avcs", "run.log"),
Lines 581–597 at 318 (were 580–596 at 16)
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 16)
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 16 318 client/src/box-commands.ts --json
- JSON
- /christopher/abso-core/compare/16..318?file=client%2Fsrc%2Fbox-commands.ts&format=json