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

Compare

+15 −3 in 4 places
Lines 16–24 at 318 (were 16–23 at 23)
1616import { homedir } from "node:os";
1717import { dirname, isAbsolute, join, resolve } from "node:path";
1818import { Api, type News, newsLines } from "./api.ts";
19−import { findRoot, isReader, readConfig } from "./config.ts";
19+import { findRoot, isReader, isVisitor, readConfig } from "./config.ts";
2020import { editBody, newsContext, normalize, spellingText, uncomposedText } from "./core.ts";
21+import { fromEnv } from "./env-names.ts";
2122import { forgetKnown, isPaused, loadIgnore, logNews, readKnown, readText, relativeTo, writeKnown } from "./folder.ts";
2223import { tryFolderLock } from "./lock.ts";
2324import { readKnownModes } from "./modes.ts";
Lines 44–54 at 318 (were 43–48 at 23)
4344
4445/** Where install-mod.ts puts the mod: Claude Code's skills folder, which every session loads. */
4546export function modDir(env: Readonly<Record<string, string | undefined>> = process.env): string {
47+ return join(env.CLAUDE_CONFIG_DIR || join(homedir(), ".claude"), "skills", "abso-hooks");
48+}
50+/** Where the same mod lived before the rename. */
51+export function oldModDir(env: Readonly<Record<string, string | undefined>> = process.env): string {
4652 return join(env.CLAUDE_CONFIG_DIR || join(homedir(), ".claude"), "skills", "avcs");
4753}
4854
Lines 65–75 at 318 (were 59–65 at 23)
5965 }
6066 // With the abso mod installed, every Claude Code session on this machine sends
6167 // its edits in-process, so this hook stands down rather than send them twice.
62− if (env.AVCS_HOOK_FORCE !== "1" && existsSync(join(modDir(env), ".claude-plugin", "plugin.json"))) {
68+ if (
69+ fromEnv(env, "HOOK_FORCE") !== "1" &&
70+ (existsSync(join(modDir(env), ".claude-plugin", "plugin.json")) ||
71+ existsSync(join(oldModDir(env), ".claude-plugin", "plugin.json")))
72+ ) {
6373 return { stdout: "", outcome: "skipped: the abso mod sends edits" };
6474 }
6575 const tool = input.tool_name ?? "";
Lines 91–105 at 318 (were 81–93 at 23)
8191 outcome = "skipped: recording is paused (abso resume)";
8292 } else if (isReader(root)) {
8393 outcome = "skipped: this folder is a reader";
94+ } else if (isVisitor(root)) {
95+ outcome = "skipped: this folder reads signed out";
8496 } else if (rel === undefined || loadIgnore(root)(rel, false)) {
8597 outcome = "skipped: ignored path";
8698 } else if (readKnownModes(root).get(rel)?.link != null) {
8799 outcome = "skipped: a link (a file standing in for one); abso record sends links";
88100 } else {
89101 const config = readConfig(root, env);
90− const timeout = Number(env.AVCS_HOOK_TIMEOUT_MS) || DEFAULT_TIMEOUT_MS;
102+ const timeout = Number(fromEnv(env, "HOOK_TIMEOUT_MS")) || DEFAULT_TIMEOUT_MS;
91103 const api = new Api(config, timeout);
92104 const who = {
93105 ...(input.session_id ? { session: input.session_id } : {}),
MCP
compare on this site's /mcp
CLI
abso diff 23 318 client/src/hook.ts --json
JSON
/christopher/abso-core/compare/23..318?file=client%2Fsrc%2Fhook.ts&format=json