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 288 to 289

Compare

+32 −0 in 2 places
Lines 3–14 at 289 (were 3–12 at 288)
33// call that would leave the machine fails the test.
44
55import assert from "node:assert/strict";
6+import { spawnSync } from "node:child_process";
67import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
78import { tmpdir } from "node:os";
89import { join } from "node:path";
910import { after, before, describe, it } from "node:test";
11+import { fileURLToPath } from "node:url";
1012import { main } from "../src/main.ts";
1113import { stateDir } from "../src/state-dir.ts";
1214
Lines 140–172 at 289 (were 138–140 at 288)
138140 assert.equal(existsSync(join(dir, ".abso")) || existsSync(join(dir, ".avcs")), false);
139141 });
140142});
144+describe("local commands as their own processes", () => {
145+ // The way people and agents run them: client/abso.ts, a process per command, Node's compile cache as it is.
146+ const entry = fileURLToPath(new URL("../abso.ts", import.meta.url));
147+ const cli = (cwd: string, processStore: string, ...argv: string[]) =>
148+ spawnSync(process.execPath, [entry, ...argv], {
149+ cwd,
150+ env: { ...process.env, ABSO_STORE: processStore, ABSO_SERVERS_FILE: "no-servers.json" },
151+ encoding: "utf8",
152+ });
154+ it("init, push, status and log each exit cleanly", () => {
155+ const processStore = temp("process-store");
156+ const dir = temp("process");
157+ writeFileSync(join(dir, "a.txt"), "one\n");
158+ const steps: [string, string[]][] = [
159+ ["init", ["init", "--local", "--project", "proc", "--agent", "p"]],
160+ ["push", ["push", "-m", "Two"]],
161+ ["status", ["status"]],
162+ ["log", ["log"]],
163+ ];
164+ for (const [name, argv] of steps) {
165+ if (name === "push") writeFileSync(join(dir, "a.txt"), "one\ntwo\n");
166+ const r = cli(dir, processStore, ...argv);
167+ assert.equal(r.status, 0, `${name}: exit ${r.status} ${r.signal ?? ""}\n${r.stdout}${r.stderr}`);
168+ if (name === "status") assert.match(r.stdout, /It's a local project, in /);
169+ if (name === "log") assert.match(r.stdout, /Two/);
170+ }
171+ });
172+});
MCP
compare on this site's /mcp
CLI
abso diff 288 289 client/test/local.test.ts --json
JSON
/christopher/abso-core/compare/288..289?file=client%2Ftest%2Flocal.test.ts&format=json