{"version":40,"agent":"review","message":"Mods: the hooks mod is abso-hooks and the view mod abso-view; an install moves the old skills/avcs and skills/avcs-view folders to ~/.abso/retired-mods (moved, not deleted); the hook stands down for either name; status checks either. Tests cover the move.","time":1791549457128,"timeIso":"2026-10-09T12:37:37.128Z","changes":10,"change":529,"files":["client/.claude-plugin/plugin.json","client/src/hook.ts","client/src/install.ts","client/src/state-dir.ts","client/src/status-commands.ts","client/test/install.test.ts","client/view/.claude-plugin/plugin.json","client/view/hooks/register.test.ts","client/view/hooks/register.tsx","client/view/types/index.d.ts"],"draft":null,"diff":[{"path":"client/.claude-plugin/plugin.json","added":1,"removed":1,"diff":"--- a/client/.claude-plugin/plugin.json\n+++ b/client/.claude-plugin/plugin.json\n@@ -1,5 +1,5 @@\n {\n-\t\"name\": \"avcs\",\n+\t\"name\": \"abso-hooks\",\n \t\"version\": \"0.2.0\",\n \t\"description\": \"Records each Claude Code edit into the agent's draft on the avcs server, and hands news about others' published work back to the agent.\",\n \t\"license\": \"MIT\""},{"path":"client/src/hook.ts","added":8,"removed":1,"diff":"--- a/client/src/hook.ts\n+++ b/client/src/hook.ts\n@@ -44,6 +44,11 @@\n \n /** Where install-mod.ts puts the mod: Claude Code's skills folder, which every session loads. */\n export function modDir(env: Readonly<Record<string, string | undefined>> = process.env): string {\n+\treturn join(env.CLAUDE_CONFIG_DIR || join(homedir(), \".claude\"), \"skills\", \"abso-hooks\");\n+}\n+\n+/** Where the same mod lived before the rename. */\n+export function oldModDir(env: Readonly<Record<string, string | undefined>> = process.env): string {\n \treturn join(env.CLAUDE_CONFIG_DIR || join(homedir(), \".claude\"), \"skills\", \"avcs\");\n }\n \n@@ -60,7 +65,9 @@\n \t}\n \t// With the abso mod installed, every Claude Code session on this machine sends\n \t// its edits in-process, so this hook stands down rather than send them twice.\n-\tif (fromEnv(env, \"HOOK_FORCE\") !== \"1\" && existsSync(join(modDir(env), \".claude-plugin\", \"plugin.json\"))) {\n+\tif (fromEnv(env, \"HOOK_FORCE\") !== \"1\" && (existsSync(join(modDir(env), \".claude-plugin\", \"plugin.json\")) ||\n+\t\t\texistsSync(join(oldModDir(env), \".claude-plugin\", \"plugin.json\"))))\n+\t{\n \t\treturn { stdout: \"\", outcome: \"skipped: the abso mod sends edits\" };\n \t}\n \tconst tool = input.tool_name ?? \"\";"},{"path":"client/src/install.ts","added":30,"removed":4,"diff":"--- a/client/src/install.ts\n+++ b/client/src/install.ts\n@@ -107,27 +107,50 @@\n \n /** The abso mod: what the hook imports first, plugin.json last. src/core.ts is the only client file it imports. */\n export const AVCS_MOD: ModSpec = {\n-\tname: \"avcs\",\n+\tname: \"abso-hooks\",\n \tfrom: CLIENT_DIR,\n \tfiles: [\"src/core.ts\", \"hooks/stamp.ts\", \"hooks/register.ts\", \"hooks/hooks.json\", \".claude-plugin/plugin.json\"],\n \ttest: \"hooks/register.test.ts\",\n };\n \n-/** The avcs-view mod (#12), from client/view. */\n+/** The abso-view mod (#12), from client/view. */\n export const VIEW_MOD: ModSpec = {\n-\tname: \"avcs-view\",\n+\tname: \"abso-view\",\n \tfrom: join(CLIENT_DIR, \"view\"),\n \tfiles: [\"types/index.d.ts\", \"hooks/stamp.ts\", \"hooks/register.tsx\", \"hooks/hooks.json\", \".claude-plugin/plugin.json\"],\n \ttest: \"hooks/register.test.ts\",\n };\n \n+/** The skills folders the mods had before the rename; an install moves them out of the way (see retireOldMod). */\n+export const OLD_MOD_NAMES: Readonly<Record<string, string>> = { \"abso-hooks\": \"avcs\", \"abso-view\": \"avcs-view\" };\n+\n /** Where Claude Code's skills folder keeps a mod. */\n export const skillsFolder = (name: string, env: Readonly<Record<string, string | undefined>> = process.env) =>\n \tjoin(env.CLAUDE_CONFIG_DIR || join(homedir(), \".claude\"), \"skills\", name);\n \n export const modInstalled = (env: Readonly<Record<string, string | undefined>> = process.env) =>\n-\texistsSync(at(skillsFolder(AVCS_MOD.name, env), MANIFEST));\n+\texistsSync(at(skillsFolder(AVCS_MOD.name, env), MANIFEST)) ||\n+\texistsSync(at(skillsFolder(OLD_MOD_NAMES[AVCS_MOD.name]!, env), MANIFEST));\n \n+/**\n+ * After the new mod is in, the folder it replaces (skills/avcs, skills/avcs-view) would load beside it, so it\n+ * is moved, not deleted, to ~/.abso/retired-mods/<name>-<stamp>. Returns where it went, or undefined when there was none.\n+ */\n+export function retireOldMod(\n+\tspec: ModSpec,\n+\tenv: Readonly<Record<string, string | undefined>> = process.env,\n+\tnow: Date = new Date(),\n+): string | undefined {\n+\tconst old = OLD_MOD_NAMES[spec.name];\n+\tif (old === undefined) return undefined;\n+\tconst from = skillsFolder(old, env);\n+\tif (!existsSync(from)) return undefined;\n+\tconst to = join(homedir(), \".abso\", \"retired-mods\", `${old}-${now.toISOString().replace(/[:.]/g, \"-\")}`);\n+\tmkdirSync(dirname(to), { recursive: true });\n+\trenameRetrying(from, to);\n+\treturn to;\n+}\n+\n /** The version an install of `spec` gets: plugin.json's, plus the last commit that changed its files (and .dirty when they differ from it). */\n export function versionFor(spec: ModSpec, commit?: string | null): string {\n \tconst manifest = JSON.parse(readFileSync(at(spec.from, MANIFEST), \"utf8\")) as { version?: unknown };\n@@ -405,6 +428,9 @@\n \t\t}\n \t\tconst unchecked = options.includes(\"--unchecked\");\n \t\tconst r = installMod(spec, { target, check: unchecked ? () => undefined : checkWithClaude(spec) });\n+\t\t// Only for the real skills folder: an install to another folder leaves the old mod alone.\n+\t\tconst retired = target === resolve(skillsFolder(spec.name)) ? retireOldMod(spec) : undefined;\n+\t\tif (retired) console.log(`Moved the old ${OLD_MOD_NAMES[spec.name]} mod out of the skills folder, to ${retired}.`);\n \t\tif (!r.changed) {\n \t\t\tconsole.log(`The ${spec.name} mod ${r.version} is already installed in ${target}; nothing changed.`);\n \t\t\treturn;"},{"path":"client/src/state-dir.ts","added":1,"removed":1,"diff":"--- a/client/src/state-dir.ts\n+++ b/client/src/state-dir.ts\n@@ -24,7 +24,7 @@\n export const MOD_KNOWS_ABSO = [0, 2, 0] as const;\n \n /** Every name a mod has been installed under, in Claude Code's skills folder. */\n-const MOD_NAMES = [\"avcs\", \"avcs-view\", \"abso\", \"abso-view\"] as const;\n+const MOD_NAMES = [\"avcs\", \"avcs-view\", \"abso\", \"abso-view\", \"abso-hooks\"] as const;\n \n function versionAtLeast(version: string, min: readonly number[]): boolean {\n \tconst parts = version.split(\"+\")[0]!.split(\".\").map(Number);"},{"path":"client/src/status-commands.ts","added":10,"removed":7,"diff":"--- a/client/src/status-commands.ts\n+++ b/client/src/status-commands.ts\n@@ -90,14 +90,17 @@\n  */\n export function staleModText(root: string, env: Readonly<Record<string, string | undefined>>): string[] {\n \tlet installed: string | undefined;\n-\ttry {\n-\t\tconst dir = join(env.CLAUDE_CONFIG_DIR || join(env.USERPROFILE || env.HOME || \"\", \".claude\"), \"skills\", \"avcs\");\n-\t\tinstalled = String(\n-\t\t\t(JSON.parse(readFileSync(join(dir, \".claude-plugin\", \"plugin.json\"), \"utf8\")) as { version?: unknown }).version,\n-\t\t);\n-\t} catch {\n-\t\treturn [];\n+\tconst skills = join(env.CLAUDE_CONFIG_DIR || join(env.USERPROFILE || env.HOME || \"\", \".claude\"), \"skills\");\n+\tfor (const name of [\"abso-hooks\", \"avcs\"]) {\n+\t\ttry {\n+\t\t\tinstalled = String(\n+\t\t\t\t(JSON.parse(readFileSync(join(skills, name, \".claude-plugin\", \"plugin.json\"), \"utf8\")) as { version?: unknown })\n+\t\t\t\t\t.version,\n+\t\t\t);\n+\t\t\tbreak;\n+\t\t} catch {}\n \t}\n+\tif (installed === undefined) return [];\n \tif (!installed.includes(\"+\")) return [];\n \tlet last: string[] | undefined;\n \ttry {"},{"path":"client/test/install.test.ts","added":37,"removed":5,"diff":"--- a/client/test/install.test.ts\n+++ b/client/test/install.test.ts\n@@ -24,7 +24,16 @@\n import { after, describe, it } from \"node:test\";\n import { Api } from \"../src/api.ts\";\n import { clientVersion, headCommit } from \"../src/client-version.ts\";\n-import { installMod, type ModSpec, modsBehindText, rollbackMod, versionFor, versionReport } from \"../src/install.ts\";\n+import {\n+\tAVCS_MOD,\n+\tinstallMod,\n+\ttype ModSpec,\n+\tmodsBehindText,\n+\tretireOldMod,\n+\trollbackMod,\n+\tversionFor,\n+\tversionReport,\n+} from \"../src/install.ts\";\n import { main } from \"../src/main.ts\";\n \n const hasGit = spawnSync(\"git\", [\"--version\"]).status === 0;\n@@ -335,7 +344,7 @@\n \t\tconst config = temp();\n \t\tconst spec = source();\n \t\tinstallMod(spec, {\n-\t\t\ttarget: join(config, \"skills\", \"avcs\"),\n+\t\t\ttarget: join(config, \"skills\", \"abso-hooks\"),\n \t\t\tcheck: pass,\n \t\t\tcommit: \"aaaaaaa\",\n \t\t\tnow: new Date(\"2026-10-05T04:30:00Z\"),\n@@ -346,9 +355,9 @@\n \t\tassert.equal(client, `abso ${clientVersion()} (${dirname(import.meta.dirname)})`);\n \t\tassert.match(\n \t\t\tmod!,\n-\t\t\t/^the avcs mod: 0\\.1\\.0\\+aaaaaaa in .*skills[\\\\/]avcs, installed 2026-10-05 04:30 UTC; this client has 0.2.0(\\+[0-9a-f]{7}(\\.dirty)?)?: node client\\/install-mod\\.ts installs it$/,\n+\t\t\t/^the abso-hooks mod: 0\\.1\\.0\\+aaaaaaa in .*skills[\\\\/]abso-hooks, installed 2026-10-05 04:30 UTC; this client has 0.2.0(\\+[0-9a-f]{7}(\\.dirty)?)?: node client\\/install-mod\\.ts installs it$/,\n \t\t);\n-\t\tassert.equal(view, \"the avcs-view mod: not installed (node client/install-view.ts)\");\n+\t\tassert.equal(view, \"the abso-view mod: not installed (node client/install-view.ts)\");\n \t\tconst json = JSON.parse(\n \t\t\t(await main([\"--version\", \"--json\"], { cwd: config, env: { CLAUDE_CONFIG_DIR: config }, write: () => {} }))\n \t\t\t\t.stdout,\n@@ -357,12 +366,35 @@\n \t\tassert.equal(json.mods[0].version, \"0.1.0+aaaaaaa\");\n \t});\n \n+\tit(\"moves the old avcs mod folder out of the skills folder, not deleting it, once abso-hooks is in\", () => {\n+\t\tconst config = temp();\n+\t\tconst old = join(config, \"skills\", \"avcs\");\n+\t\twrite(old, \".claude-plugin/plugin.json\", '{\"name\":\"avcs\",\"version\":\"0.1.0\"}');\n+\t\tconst home = temp();\n+\t\tconst was = process.env.USERPROFILE;\n+\t\tconst was2 = process.env.HOME;\n+\t\tprocess.env.USERPROFILE = home;\n+\t\tprocess.env.HOME = home;\n+\t\ttry {\n+\t\t\tconst to = retireOldMod(AVCS_MOD, { CLAUDE_CONFIG_DIR: config });\n+\t\t\tassert.ok(to?.startsWith(join(home, \".abso\", \"retired-mods\")));\n+\t\t\tassert.equal(existsSync(old), false);\n+\t\t\tassert.equal(existsSync(join(to!, \".claude-plugin\", \"plugin.json\")), true);\n+\t\t\tassert.equal(retireOldMod(AVCS_MOD, { CLAUDE_CONFIG_DIR: config }), undefined);\n+\t\t} finally {\n+\t\t\tif (was === undefined) delete process.env.USERPROFILE;\n+\t\t\telse process.env.USERPROFILE = was;\n+\t\t\tif (was2 === undefined) delete process.env.HOME;\n+\t\t\telse process.env.HOME = was2;\n+\t\t}\n+\t});\n+\n \tit(\"status says when an installed mod is behind this client, where the client knows its commit (abso issue 41)\", () => {\n \t\tconst config = temp();\n \t\tconst env = { CLAUDE_CONFIG_DIR: config };\n \t\tassert.deepEqual(modsBehindText(env), [], \"nothing installed, nothing to say\");\n \t\tinstallMod(source(), {\n-\t\t\ttarget: join(config, \"skills\", \"avcs\"),\n+\t\t\ttarget: join(config, \"skills\", \"abso-hooks\"),\n \t\t\tcheck: pass,\n \t\t\tcommit: \"aaaaaaa\",\n \t\t\tnow: new Date(\"2026-10-05T04:30:00Z\"),"},{"path":"client/view/.claude-plugin/plugin.json","added":1,"removed":1,"diff":"--- a/client/view/.claude-plugin/plugin.json\n+++ b/client/view/.claude-plugin/plugin.json\n@@ -1,5 +1,5 @@\n {\n-\t\"name\": \"avcs-view\",\n+\t\"name\": \"abso-view\",\n \t\"version\": \"0.2.0\",\n \t\"description\": \"Shows this chat's abso state: its space, its draft, who else is on the same files, and recent news\",\n \t\"types\": \"./types/index.d.ts\""},{"path":"client/view/hooks/register.test.ts","added":8,"removed":8,"diff":"--- a/client/view/hooks/register.test.ts\n+++ b/client/view/hooks/register.test.ts\n@@ -1,4 +1,4 @@\n-// avcs-view against the engine: the server and the folder are answered here.\n+// abso-view against the engine: the server and the folder are answered here.\n \n import type { On } from \"claude-code\";\n import { expect, mock, test } from \"claude-code/testing\";\n@@ -80,7 +80,7 @@\n \tawait w.clock.advance(1);\n \texpect(w.fetched).toEqual([\"https://avcs.test/p/p/status\", \"https://avcs.test/p/p/where\"]);\n \texpect(w.statuses.at(-1)).toBe(\n-\t\t\"abso: shared · 2 files unpublished · shared is 2 ahead (abso sync) · bob also on your files · 1 news item (/avcs-view)\",\n+\t\t\"abso: shared · 2 files unpublished · shared is 2 ahead (abso sync) · bob also on your files · 1 news item (/abso-view)\",\n \t);\n \tawait w.clock.advance(31_000);\n \texpect(w.fetched.length).toBe(4);\n@@ -92,10 +92,10 @@\n \tawait w.clock.advance(1);\n \tfor (const surface of [\"terminal\", \"desktop\"] as const) {\n \t\tconst ui = await $.ui.mount({\n-\t\t\tplugin: \"avcs-view\",\n+\t\t\tplugin: \"abso-view\",\n \t\t\tsurface,\n \t\t\tcomponent: \"Pane\",\n-\t\t\trequestId: \"avcs-view\",\n+\t\t\trequestId: \"abso-view\",\n \t\t\tprops: { title: \"avcs\", isFocused: false, bodyColumns: 80, placement: \"dock\" } as never,\n \t\t});\n \t\texpect(await ui.find({ text: /Working in shared, at version 7/ })).toBeDefined();\n@@ -106,14 +106,14 @@\n \t}\n });\n \n-test(\"/avcs-view opens the pane, and the status line stops counting the news it showed\", async ($, on) => {\n+test(\"/abso-view opens the pane, and the status line stops counting the news it showed\", async ($, on) => {\n \tconst w = world(on, true);\n \tawait $.session.start({ cwd: \"/w/proj/src\" });\n \tawait w.clock.advance(1);\n \texpect(w.statuses.at(-1)).toContain(\"1 news item\");\n-\tconst answer = await $.command.run({ command: \"avcs-view\", args: \"\" } as never);\n-\texpect(answer).toMatchObject({ text: \"Opened the avcs view.\" });\n-\texpect(w.opened).toEqual([\"avcs-view\"]);\n+\tconst answer = await $.command.run({ command: \"abso-view\", args: \"\" } as never);\n+\texpect(answer).toMatchObject({ text: \"Opened the abso view.\" });\n+\texpect(w.opened).toEqual([\"abso-view\"]);\n \texpect(w.statuses.at(-1)).not.toContain(\"news\");\n });\n "},{"path":"client/view/hooks/register.tsx","added":9,"removed":9,"diff":"--- a/client/view/hooks/register.tsx\n+++ b/client/view/hooks/register.tsx\n@@ -1,9 +1,9 @@\n-// avcs-view: what abso knows about this chat's folder, at a glance (#12).\n+// abso-view: what abso knows about this chat's folder, at a glance (#12).\n //\n // A status line entry, kept current: the space the folder is in, how many\n // files the draft changes, how far shared has moved on, who else has\n // unpublished changes in the same files, and news not yet looked at.\n-// `/avcs-view` opens a pane with the whole picture.\n+// `/abso-view` opens a pane with the whole picture.\n //\n // Outside an abso folder it costs one folder lookup at session start and\n // nothing after. Inside one, it asks the server for /status and /where at\n@@ -15,18 +15,18 @@\n import type { AvcsView } from \"../types\";\n import { STAMP } from \"./stamp.ts\";\n \n-const PANE = \"avcs-view\";\n-const COMMAND = \"avcs-view\";\n+const PANE = \"abso-view\";\n+const COMMAND = \"abso-view\";\n const TICK_MS = 3_000;\n const REFRESH_MS = 30_000;\n const AFTER_EDIT_MS = 2_000;\n const NEWS_SHOWN = 12;\n const EDIT_TOOLS = [\"Edit\", \"MultiEdit\", \"Write\", \"NotebookEdit\", \"Bash\"];\n /** Sent with each call, so the server can tell which mod, from which commit, made it (#29). */\n-const CLIENT = `avcs-view/${STAMP ?? \"checkout\"}`;\n+const CLIENT = `abso-view/${STAMP ?? \"checkout\"}`;\n \n-const view = atom({ plugin: \"avcs-view\", key: \"view\" } as const, null);\n-const seenNewsAt = atom({ plugin: \"avcs-view\", key: \"seenNewsAt\" } as const, \"\");\n+const view = atom({ plugin: \"abso-view\", key: \"view\" } as const, null);\n+const seenNewsAt = atom({ plugin: \"abso-view\", key: \"seenNewsAt\" } as const, \"\");\n \n // The engine interface, passed along (the validator refuses keeping it).\n type Engine = any;\n@@ -204,7 +204,7 @@\n \t\tparts.push(`${v.space === \"shared\" ? \"shared\" : \"the draft\"} is ${v.version - v.base} ahead (abso sync)`);\n \tif (v.overlap.length > 0) parts.push(`${v.overlap.map((o) => o.agent).join(\", \")} also on your files`);\n \tconst fresh = unread(v, seen);\n-\tif (fresh > 0) parts.push(`${plural(fresh, \"news item\")} (/avcs-view)`);\n+\tif (fresh > 0) parts.push(`${plural(fresh, \"news item\")} (/abso-view)`);\n \treturn parts.join(\" · \");\n }\n \n@@ -244,7 +244,7 @@\n \t\t\tawait update($, seenNewsAt, () => newest);\n \t\t\t$.ui.status(statusLine(v, newest));\n \t\t}\n-\t\treturn { text: \"Opened the avcs view.\" };\n+\t\treturn { text: \"Opened the abso view.\" };\n \t});\n \n \ton(\"ui.render\", { component: \"Pane\", requestId: PANE }, async ($, e) => {"},{"path":"client/view/types/index.d.ts","added":1,"removed":1,"diff":"--- a/client/view/types/index.d.ts\n+++ b/client/view/types/index.d.ts\n@@ -23,6 +23,6 @@\n \n declare module \"claude-code\" {\n \tinterface PluginState {\n-\t\t\"avcs-view\": { view: AvcsView | null; seenNewsAt: string };\n+\t\t\"abso-view\": { view: AvcsView | null; seenNewsAt: string };\n \t}\n }"}],"ci":null}