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 171 to 172

Compare

+12 −23 in 4 places
Lines 2–16 at 172 (were 2–18 at 171)
22// as one plain-JS file for Node 20 or later. Node 20 can't run the .ts files themselves (it has no type
33// stripping), so this file is how a checkout runs on it:
44//
5+// npm ci && npm run build
56// node client/bin/abso.mjs help
67//
7−// npm run build:client rebuilds it; run it after changing the client and push the result.
8−// npm run check:client-bundle fails when the file isn't what a build of this folder gives (the check runs it).
8+// The file isn't committed (.gitignore leaves client/bin/ out); build it again after pulling. It sits one
9+// folder under client/, so the client's own folder (client-version.ts) is still client/. scripts/pack-npm.mjs
10+// puts the same build in the npm package.
911//
10−// The file is committed, so a fresh clone runs it with no install and no build. It sits one folder under
11−// client/, so the client's own folder (client-version.ts) is still client/. The build is deterministic:
12−// paths in it are relative to the repo, so it comes out the same on every machine.
13−//
1412// Plain JS on purpose: it runs before anything is built.
15−import { readFileSync, writeFileSync } from "node:fs";
13+import { mkdirSync, writeFileSync } from "node:fs";
1614import { createRequire } from "node:module";
1715import { dirname, join, resolve } from "node:path";
1816import { fileURLToPath } from "node:url";
Lines 18–25 at 172 (were 20–27 at 171)
2018const root = resolve(dirname(fileURLToPath(import.meta.url)), "..");
2119const OUT = "client/bin/abso.mjs";
2220
23−/** The bundle's text, built in memory. */
24−export function buildClient() {
21+/** The bundle's text, built in memory. `banner` adds lines at its top (the npm package stamps its version). */
22+export function buildClient(banner = []) {
2523 const esbuild = createRequire(import.meta.url)("esbuild");
2624 const result = esbuild.buildSync({
2725 absWorkingDir: root,
Lines 35–44 at 172 (were 37–45 at 171)
3735 // can't do without a real require.
3836 banner: {
3937 js: [
40− "// Built from client/abso.ts by scripts/build-client.mjs (npm run build:client). Don't edit it by hand.",
38+ "// Built from client/abso.ts by scripts/build-client.mjs (npm run build). Don't edit it by hand.",
4139 'import { createRequire as __absoCreateRequire } from "node:module";',
4240 "const require = __absoCreateRequire(import.meta.url);",
41+ ...banner,
4342 ].join("\n"),
4443 },
4544 });
Lines 52–58 at 172 (were 53–69 at 171)
5352
5453if (process.argv[1] && resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
5554 const path = join(root, OUT);
56− const text = buildClient();
57− if (process.argv.includes("--check")) {
58− let have = "";
59− try {
60− have = readFileSync(path, "utf8").replace(/\r\n/g, "\n");
61− } catch {}
62− if (have !== text) {
63− process.stderr.write(
64− `${OUT} is not a build of this folder's client: run npm run build:client and push the file it writes.\n`,
65− );
66− process.exit(1);
67− }
68− } else writeFileSync(path, text);
55+ mkdirSync(dirname(path), { recursive: true });
56+ writeFileSync(path, buildClient());
57+ process.stdout.write(`Built ${OUT}: node ${OUT} help\n`);
6958}
MCP
compare on this site's /mcp
CLI
abso diff 171 172 scripts/build-client.mjs --json
JSON
/christopher/abso-core/compare/171..172?file=scripts%2Fbuild-client.mjs&format=json