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 26 to 27

Compare

+7 −6 in 4 places
Lines 6–12 at 27 (were 6–11 at 26)
66import { join } from "node:path";
77import { UsageError } from "./args.ts";
88import type { Config } from "./config.ts";
9+import { fromEnv } from "./env-names.ts";
910import { homeFile } from "./state-dir.ts";
1011
1112function originOf(server: string): string {
Lines 17–23 at 27 (were 16–22 at 26)
1617 }
1718}
1819
19−/** The admin token goes only to a server named in AVCS_ADMIN_SERVERS (comma-separated): none is built in. */
20+/** The admin token goes only to a server named in ABSO_ADMIN_SERVERS (comma-separated): none is built in. */
2021export function adminGoesTo(server: string, extra = ""): boolean {
2122 const allowed = [
2223 ...extra
Lines 30–42 at 27 (were 29–41 at 26)
2930}
3031
3132export function adminToken(env: Readonly<Record<string, string | undefined>> = process.env): string {
32− const fromEnv = env.AVCS_ADMIN_TOKEN?.trim();
33− if (fromEnv) return fromEnv;
33+ const fromVar = fromEnv(env, "ADMIN_TOKEN")?.trim();
34+ if (fromVar) return fromVar;
3435 try {
3536 const fromFile = readFileSync(homeFile(homedir(), "admin-token"), "utf8").trim();
3637 if (fromFile) return fromFile;
3738 } catch {}
38− throw new UsageError("abso key needs the admin token in AVCS_ADMIN_TOKEN or ~/.abso/admin-token");
39+ throw new UsageError("abso key needs the admin token in ABSO_ADMIN_TOKEN or ~/.abso/admin-token");
3940}
4041
4142function scrub(text: string, secrets: readonly string[]): string {
Lines 46–54 at 27 (were 45–53 at 26)
4546}
4647
4748async function call(config: Config, admin: string, method: "GET" | "POST", path: string): Promise<unknown> {
48− if (!adminGoesTo(config.server, process.env.AVCS_ADMIN_SERVERS))
49+ if (!adminGoesTo(config.server, fromEnv(process.env, "ADMIN_SERVERS")))
4950 throw new UsageError(
50− `abso key will not send the admin token to ${config.server}; AVCS_ADMIN_SERVERS names the servers it may go to`,
51+ `abso key will not send the admin token to ${config.server}; ABSO_ADMIN_SERVERS names the servers it may go to`,
5152 );
5253 const secrets = [admin, config.token ?? ""].filter((s) => s.length > 0);
5354 let response: Response;
MCP
compare on this site's /mcp
CLI
abso diff 26 27 client/src/key-admin.ts --json
JSON
/christopher/abso-core/compare/26..27?file=client%2Fsrc%2Fkey-admin.ts&format=json