{"version":172,"agent":"node20","message":"Build the client for Node 20 instead of committing the build: npm run build writes client/bin/abso.mjs from client/abso.ts, and npm run pack:npm -- <version> packs that same build as the npm package @abso-cli/abso (it never publishes). The committed bundle and the check that kept it current are gone, so client changes need no rebuild. The READMEs give the build steps.","time":1791965182282,"timeIso":"2026-10-14T08:06:22.282Z","changes":9,"change":2638,"files":["README.md","abso.json","client/README.md","client/bin/abso.mjs","package.json","scripts/build-client.mjs","scripts/pack-npm.mjs","server/README.md"],"draft":null,"diff":[{"path":"README.md","added":7,"removed":8,"diff":"--- a/README.md\n+++ b/README.md\n@@ -39,15 +39,18 @@\n file, [abso.mjs](https://api.abso.dev/client/abso.mjs), with its sha256 beside\n it at `abso.mjs.sha256`.\n \n-From this repository, with nothing to install or build, on Node 20 or later:\n+From this repository, on Node 20 or later, build it first:\n \n ```bash\n+npm ci\n+npm run build\n node client/bin/abso.mjs help\n ```\n \n-`client/bin/abso.mjs` is the whole client as one plain-JS file, built from\n-`client/abso.ts` and committed. On Node 24, `node client/abso.ts` runs the\n-TypeScript itself.\n+`npm run build` writes the whole client as one plain-JS file,\n+`client/bin/abso.mjs`, from `client/abso.ts`; build again after pulling. On\n+Node 24, `node client/abso.ts` runs the TypeScript itself, with no build.\n+`npm run pack:npm -- <version>` packs the same build as the npm package.\n \n ## Where to go next\n \n@@ -167,10 +170,6 @@\n npm run check\n ```\n \n-After changing anything the client imports, run `npm run build:client` and push\n-the `client/bin/abso.mjs` it writes: the check fails while that file isn't a\n-build of the client as it is.\n-\n Before a push, `npm run check:changed` is enough: it runs the tests that\n import what you changed, the typecheck when it reaches it, and biome on your\n files (`--list` shows the plan; name files after `--` to pick them yourself)."},{"path":"abso.json","added":1,"removed":1,"diff":"--- a/abso.json\n+++ b/abso.json\n@@ -1,5 +1,5 @@\n {\n \t\"setup\": \"npm ci --no-audit --no-fund\",\n \t\"check\": \"npx biome ci . && npm run check\",\n-\t\"whole\": [\"package-lock.json\", \"client/bin/abso.mjs\"]\n+\t\"whole\": [\"package-lock.json\"]\n }"},{"path":"client/README.md","added":6,"removed":6,"diff":"--- a/client/README.md\n+++ b/client/README.md\n@@ -11,17 +11,17 @@\n node client/abso.ts help\n ```\n \n-On Node 20 or later, run `client/bin/abso.mjs` instead: the same client built\n-into one plain-JS file, committed, so a fresh clone needs no install or build.\n+Node 20 can't run the `.ts` files (it has no type stripping). On Node 20 or\n+later, build the client into one plain-JS file and run that:\n \n ```bash\n+npm ci\n+npm run build\n node client/bin/abso.mjs help\n ```\n \n-Node 20 can't run the `.ts` files (it has no type stripping). After changing\n-anything the client imports, `npm run build:client` rebuilds `bin/abso.mjs`;\n-push it with the change. The project's check (`npm run check:client-bundle`)\n-fails while the file isn't a build of the client as it is.\n+`client/bin/` isn't committed; build again after pulling. The npm package\n+(`npm run pack:npm -- <version>`) ships the same build.\n \n ### Running it from a git checkout\n "},{"path":"client/bin/abso.mjs","blob":{"before":"601e61926ab4e739eca6c63024a1440c595df6a411b0d882aa4ecd943066aef1","after":null},"added":0,"removed":0,"diff":"Binary file client/bin/abso.mjs changed: 601e61926ab4 -> none"},{"path":"package.json","added":3,"removed":3,"diff":"--- a/package.json\n+++ b/package.json\n@@ -11,9 +11,9 @@\n \t\"scripts\": {\n \t\t\"test\": \"node --import ./client/test/setup.ts --test \\\"src/**/*.test.ts\\\" \\\"worker/project/**/*.test.ts\\\" \\\"client/test/**/*.test.ts\\\" \\\"scripts/**/*.test.ts\\\" \\\"server/test/**/*.test.ts\\\"\",\n \t\t\"typecheck\": \"tsc --noEmit -p tsconfig.json\",\n-\t\t\"check\": \"npm run typecheck && npm run typecheck:server && npm run check:client-bundle && npm test\",\n-\t\t\"build:client\": \"node scripts/build-client.mjs\",\n-\t\t\"check:client-bundle\": \"node scripts/build-client.mjs --check\",\n+\t\t\"check\": \"npm run typecheck && npm run typecheck:server && npm test\",\n+\t\t\"build\": \"node scripts/build-client.mjs\",\n+\t\t\"pack:npm\": \"node scripts/pack-npm.mjs\",\n \t\t\"check:changed\": \"node scripts/check-changed.mjs\",\n \t\t\"format\": \"biome check --write .\",\n \t\t\"lint\": \"biome ci .\","},{"path":"scripts/build-client.mjs","added":12,"removed":23,"diff":"--- a/scripts/build-client.mjs\n+++ b/scripts/build-client.mjs\n@@ -2,17 +2,15 @@\n // as one plain-JS file for Node 20 or later. Node 20 can't run the .ts files themselves (it has no type\n // stripping), so this file is how a checkout runs on it:\n //\n+//   npm ci && npm run build\n //   node client/bin/abso.mjs help\n //\n-//   npm run build:client           rebuilds it; run it after changing the client and push the result.\n-//   npm run check:client-bundle    fails when the file isn't what a build of this folder gives (the check runs it).\n+// The file isn't committed (.gitignore leaves client/bin/ out); build it again after pulling. It sits one\n+// folder under client/, so the client's own folder (client-version.ts) is still client/. scripts/pack-npm.mjs\n+// puts the same build in the npm package.\n //\n-// The file is committed, so a fresh clone runs it with no install and no build. It sits one folder under\n-// client/, so the client's own folder (client-version.ts) is still client/. The build is deterministic:\n-// paths in it are relative to the repo, so it comes out the same on every machine.\n-//\n // Plain JS on purpose: it runs before anything is built.\n-import { readFileSync, writeFileSync } from \"node:fs\";\n+import { mkdirSync, writeFileSync } from \"node:fs\";\n import { createRequire } from \"node:module\";\n import { dirname, join, resolve } from \"node:path\";\n import { fileURLToPath } from \"node:url\";\n@@ -20,8 +18,8 @@\n const root = resolve(dirname(fileURLToPath(import.meta.url)), \"..\");\n const OUT = \"client/bin/abso.mjs\";\n \n-/** The bundle's text, built in memory. */\n-export function buildClient() {\n+/** The bundle's text, built in memory. `banner` adds lines at its top (the npm package stamps its version). */\n+export function buildClient(banner = []) {\n \tconst esbuild = createRequire(import.meta.url)(\"esbuild\");\n \tconst result = esbuild.buildSync({\n \t\tabsWorkingDir: root,\n@@ -37,9 +35,10 @@\n \t\t// can't do without a real require.\n \t\tbanner: {\n \t\t\tjs: [\n-\t\t\t\t\"// Built from client/abso.ts by scripts/build-client.mjs (npm run build:client). Don't edit it by hand.\",\n+\t\t\t\t\"// Built from client/abso.ts by scripts/build-client.mjs (npm run build). Don't edit it by hand.\",\n \t\t\t\t'import { createRequire as __absoCreateRequire } from \"node:module\";',\n \t\t\t\t\"const require = __absoCreateRequire(import.meta.url);\",\n+\t\t\t\t...banner,\n \t\t\t].join(\"\\n\"),\n \t\t},\n \t});\n@@ -53,17 +52,7 @@\n \n if (process.argv[1] && resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {\n \tconst path = join(root, OUT);\n-\tconst text = buildClient();\n-\tif (process.argv.includes(\"--check\")) {\n-\t\tlet have = \"\";\n-\t\ttry {\n-\t\t\thave = readFileSync(path, \"utf8\").replace(/\\r\\n/g, \"\\n\");\n-\t\t} catch {}\n-\t\tif (have !== text) {\n-\t\t\tprocess.stderr.write(\n-\t\t\t\t`${OUT} is not a build of this folder's client: run npm run build:client and push the file it writes.\\n`,\n-\t\t\t);\n-\t\t\tprocess.exit(1);\n-\t\t}\n-\t} else writeFileSync(path, text);\n+\tmkdirSync(dirname(path), { recursive: true });\n+\twriteFileSync(path, buildClient());\n+\tprocess.stdout.write(`Built ${OUT}: node ${OUT} help\\n`);\n }"},{"path":"scripts/pack-npm.mjs","added":73,"removed":0,"diff":"--- /dev/null\n+++ b/scripts/pack-npm.mjs\n@@ -0,0 +1,73 @@\n+// Packs the npm package @abso-cli/abso from this checkout: the client as scripts/build-client.mjs builds it,\n+// for Node 20 or later. It never publishes and never reads npm's sign-in.\n+//\n+//   npm ci && npm run pack:npm -- <version>      (e.g. 0.171.0)\n+//\n+// It writes the package to dist/npm/package/ and its tarball, as npm pack names it, to dist/npm/.\n+// The package's layout: bin/abso.mjs checks Node's version and loads dist/abso.mjs, the bundle, stamped\n+// with the version so the client knows it is an installed package.\n+import { execFileSync } from \"node:child_process\";\n+import { mkdirSync, readFileSync, rmSync, writeFileSync } from \"node:fs\";\n+import { dirname, join, resolve } from \"node:path\";\n+import { fileURLToPath } from \"node:url\";\n+import { buildClient } from \"./build-client.mjs\";\n+\n+const root = resolve(dirname(fileURLToPath(import.meta.url)), \"..\");\n+const version = process.argv[2];\n+if (!version || !/^\\d+\\.\\d+\\.\\d+$/.test(version)) {\n+\tprocess.stderr.write(\"Use: npm run pack:npm -- <version>, such as 0.171.0\\n\");\n+\tprocess.exit(2);\n+}\n+const node = 20;\n+\n+const files = {\n+\t\"package.json\": `${JSON.stringify(\n+\t\t{\n+\t\t\tname: \"@abso-cli/abso\",\n+\t\t\tversion,\n+\t\t\tdescription: \"abso: version control built for AI agents first. The command line client.\",\n+\t\t\tlicense: \"MIT\",\n+\t\t\thomepage: \"https://abso.dev\",\n+\t\t\tkeywords: [\"version control\", \"vcs\", \"agents\", \"ai\", \"abso\"],\n+\t\t\ttype: \"module\",\n+\t\t\tengines: { node: `>=${node}` },\n+\t\t\tbin: { abso: \"bin/abso.mjs\" },\n+\t\t\tfiles: [\"bin\", \"dist\"],\n+\t\t\tpublishConfig: { access: \"public\" },\n+\t\t},\n+\t\tnull,\n+\t\t2,\n+\t)}\\n`,\n+\t// A dynamic import, so an older Node reaches the version check before it reads the bundle.\n+\t\"bin/abso.mjs\": `#!/usr/bin/env node\n+const major = Number(process.versions.node.split(\".\")[0]);\n+if (major < ${node}) {\n+\tprocess.stderr.write(\"abso needs Node ${node} or later, and this is Node \" + process.versions.node + \". Install a newer Node from https://nodejs.org and run abso again.\\\\n\");\n+\tprocess.exit(1);\n+}\n+await import(\"../dist/abso.mjs\");\n+`,\n+\t\"dist/abso.mjs\": buildClient([`globalThis.__ABSO_PACKAGE_VERSION__ = ${JSON.stringify(version)};`]),\n+\t\"README.md\": `# abso\\n\\nabso is version control for agents. This package is the abso command line.\\n\\nIt needs Node ${node} or later. Install it with \\`npm install -g @abso-cli/abso\\`, or run \\`npx @abso-cli/abso help\\`.\\n\\n[abso.dev](https://abso.dev)\\n`,\n+\tLICENSE: readFileSync(join(root, \"LICENSE\"), \"utf8\"),\n+};\n+\n+const out = join(root, \"dist\", \"npm\");\n+const pkg = join(out, \"package\");\n+rmSync(pkg, { recursive: true, force: true });\n+for (const [path, text] of Object.entries(files)) {\n+\tmkdirSync(dirname(join(pkg, path)), { recursive: true });\n+\twriteFileSync(join(pkg, path), text);\n+}\n+// Under npm run, npm_execpath is npm's own script, which runs without a shell on every platform.\n+const npm = process.env.npm_execpath;\n+const pack = [\"pack\", pkg, \"--pack-destination\", out, \"--ignore-scripts\"];\n+const tarball = (\n+\tnpm\n+\t\t? execFileSync(process.execPath, [npm, ...pack], { cwd: root, encoding: \"utf8\" })\n+\t\t: execFileSync(\"npm\", pack, { cwd: root, encoding: \"utf8\", shell: process.platform === \"win32\" })\n+)\n+\t.trim()\n+\t.split(\"\\n\")\n+\t.pop();\n+process.stdout.write(`Packed @abso-cli/abso ${version}: dist/npm/${tarball}\\n`);"},{"path":"server/README.md","added":6,"removed":3,"diff":"--- a/server/README.md\n+++ b/server/README.md\n@@ -40,16 +40,19 @@\n \n ## Point the client at it\n \n-The client is in this repository, built into one plain-JS file that runs on Node 20 or later with nothing to install\n-(`client/bin/abso.mjs`, built from `client/abso.ts`). From the repository's root:\n+The client is in this repository. `npm run build` builds it from `client/abso.ts` into one plain-JS file that runs on\n+Node 20 or later, `client/bin/abso.mjs`. From the repository's root:\n \n ```bash\n+npm ci\n+npm run build\n export ABSO_TOKEN=<the token you set>\n export ABSO_TRUSTED_SERVERS=https://abso.<your-subdomain>.workers.dev\n alias abso=\"node $PWD/client/bin/abso.mjs\"\n ```\n \n-On Node 24, `alias abso=\"node $PWD/client/abso.ts\"` runs the TypeScript itself (after `npm ci`).\n+On Node 24, `alias abso=\"node $PWD/client/abso.ts\"` runs the TypeScript itself, with no build. `npm i -g @abso-cli/abso`\n+installs the same client from npm, on Node 20 or later.\n \n The client sends its token only to servers you trust, so `ABSO_TRUSTED_SERVERS` (or an entry in\n `~/.abso/servers.json`) is needed. Issues go to `<server>/issues` on their own."}],"ci":null}