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 270 to 271

Compare

+10 −4 in 5 places
Lines 51–57 at 271 (were 51–57 at 270)
5151export function readConfig(
5252 root: string,
5353 env: Readonly<Record<string, string | undefined>> = process.env,
54− tokenFileOk = true,
54+ tokenFileOk = false,
5555): Config {
5656 const raw = JSON.parse(readFileSync(configPath(root), "utf8")) as Partial<Settings>;
5757 if (raw.visitor === true) {
Lines 102–108 at 271 (were 102–107 at 270)
102102 root: string,
103103 server: string,
104104 env: Readonly<Record<string, string | undefined>> = process.env,
105+ tokenFileOk = false,
105106): { kind: "agent key" | "shared token" | "pipeline run key" | "none"; id: string | null } {
106107 const key = readKeyFile(root);
107108 if (key) {
Lines 111–117 at 271 (were 110–116 at 270)
110111 }
111112 if (fromEnv(env, "TOKEN")) return { kind: "shared token", id: null };
112113 if (fromEnv(env, "KEY_FILE")) return { kind: "pipeline run key", id: null };
113− return { kind: readToken(env) ? "shared token" : "none", id: null };
114+ return { kind: tokenFileOk && tokenFile() ? "shared token" : "none", id: null };
114115}
115116
116117interface StoredKey {
Lines 183–197 at 271 (were 182–191 at 270)
182183 server: string,
183184 env: Readonly<Record<string, string | undefined>> = process.env,
184185 root?: string,
185− tokenFileOk = true,
186+ tokenFileOk = false,
186187): string | undefined {
187188 if (root) {
188189 const key = readKeyFile(root);
190+ // A folder with a key signs in with that key and nothing else, even when the server refuses it.
191+ if (!key && existsSync(keyPath(root)))
192+ throw new UsageError(
193+ `this folder's key file (${keyPath(root)}) can't be read, so abso sends nothing; abso key install puts a key back`,
194+ );
189195 if (key) {
190196 if (originOf(key.server) !== originOf(server))
191197 throw new UsageError("this folder's key was issued for a different server, so abso will not send it");
Lines 257–263 at 271 (were 251–257 at 270)
251257 return key;
252258}
253259
254−/** This machine's token file (~/.abso/token, else ~/.avcs/token), or none. abso init and join read it only with --token-file. */
260+/** This machine's token file (~/.abso/token, else ~/.avcs/token), or none. Read only for a command given --token-file. */
255261export function tokenFile(): string | undefined {
256262 return readToken({});
257263}
MCP
compare on this site's /mcp
CLI
abso diff 270 271 client/src/config.ts --json
JSON
/christopher/abso-core/compare/270..271?file=client%2Fsrc%2Fconfig.ts&format=json