Skip to content

abso-core

Public

abso is version control for agents: the client, the engine and a server you can run on your own Cloudflare account.

Check passed

Versions 28 to 29

Compare

+10 −9 in 4 places
Lines 1–10 at 29 (were 1–8 at 28)
11// abso export <dir> [--version N]: one published version of this folder's
22// space, written to a folder of its own, for a build that doesn't move while
3−// shared does (#37, Playtester 1). The folder gets .abso-export.json (.avcs-export.json before the rename) naming
4−// the version, to stamp the build with. Exporting again replaces the folder,
5−// keeping node_modules (and what --keep names) so a build needs no new install.
3+// shared does (#37, Playtester 1). The folder gets .abso-export naming the
4+// version, to stamp the build with: JSON on one line, in a file with no
5+// extension, so the exported project's own formatter and linter pass it by.
6+// Exporting again replaces the folder, keeping node_modules (and what --keep
7+// names) so a build needs no new install.
68//
79// The version is rebuilt as `abso run --at` rebuilds it (at.ts), from the
810// known copies and one compare; the server's listing of that version (#37,
Lines 21–29 at 29 (were 19–27 at 28)
1921import { type Refused, unsafePath } from "./safety.ts";
2022
2123/** The file an export leaves in its folder: what it holds, and the sign that the folder is one export may replace. */
22−export const EXPORT_STAMP = ".abso-export.json";
23−/** The name before the rename: an export made then still counts as one. */
24−const OLD_EXPORT_STAMP = ".avcs-export.json";
24+export const EXPORT_STAMP = ".abso-export";
25+/** 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"];
2527
2628/** Where an export may go: outside the abso folder, or in a part of it abso leaves out. Empty, or an earlier export. */
2729function checkTarget(root: string, target: string): void {
Lines 40–46 at 29 (were 38–45 at 28)
3840 if (!statSync(target).isDirectory()) throw new UsageError(`${target} is a file; export to a folder`);
3941 if (
4042 readdirSync(target).length > 0 &&
41− !existsSync(join(target, EXPORT_STAMP)) &&
42− !existsSync(join(target, OLD_EXPORT_STAMP))
43+ ![EXPORT_STAMP, ...OLD_EXPORT_STAMPS].some((n) => existsSync(join(target, n)))
4344 ) {
4445 throw new UsageError(
4546 `${target} has files in it; export to an empty folder (an export replaces only a folder an earlier export made)`,
Lines 138–144 at 29 (were 137–143 at 28)
137138 files: written,
138139 exportedAt: new Date().toISOString(),
139140 };
140− writeFileSync(join(target, EXPORT_STAMP), `${JSON.stringify(stamp, null, 2)}\n`);
141+ writeFileSync(join(target, EXPORT_STAMP), `${JSON.stringify(stamp)}\n`);
141142 return {
142143 text: [
143144 `Exported version ${version} of ${space} to ${target}: ${plural(written, "file")}. ${EXPORT_STAMP} there names the version; abso export to the same folder replaces it.`,
MCP
compare on this site's /mcp
CLI
abso diff 28 29 client/src/export.ts --json
JSON
/christopher/abso-core/compare/28..29?file=client%2Fsrc%2Fexport.ts&format=json