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 3 to 318

Compare

+25 −0 in 1 place
new file, 25 lines
1+import assert from "node:assert/strict";
2+import { test } from "node:test";
3+import { readToken, trustedServers } from "../src/config.ts";
4+import { fromEnv, withOldNames } from "../src/env-names.ts";
5+
6+test("ABSO_ names win over AVCS_ ones, and the old ones still work", () => {
7+ assert.equal(fromEnv({ ABSO_X: "new", AVCS_X: "old" }, "X"), "new");
8+ assert.equal(fromEnv({ AVCS_X: "old" }, "X"), "old");
9+ assert.equal(fromEnv({ ABSO_X: "", AVCS_X: "old" }, "X"), "old");
10+ assert.equal(fromEnv({}, "X"), undefined);
11+ assert.equal(readToken({ ABSO_TOKEN: " new ", AVCS_TOKEN: "old" }), "new");
12+ assert.equal(readToken({ AVCS_TOKEN: "old" }), "old");
13+ assert.match(
14+ trustedServers({ ABSO_TRUSTED_SERVERS: "https://a.example", ABSO_SERVERS_FILE: "no-servers.json" }),
15+ /a\.example/,
16+ );
17+});
19+test("a program abso runs gets both the new and the old names", () => {
20+ const out = withOldNames({ ABSO_AGENT: "a", ABSO_SPACE: "shared", OTHER: "x" });
21+ assert.equal(out.AVCS_AGENT, "a");
22+ assert.equal(out.AVCS_SPACE, "shared");
23+ assert.equal(out.ABSO_AGENT, "a");
24+ assert.equal(out.AVCS_OTHER, undefined);
25+});
MCP
compare on this site's /mcp
CLI
abso diff 3 318 client/test/env-names.test.ts --json
JSON
/christopher/abso-core/compare/3..318?file=client%2Ftest%2Fenv-names.test.ts&format=json