refactor!: rebrand CCAM to AgentHub

Clean break, no compatibility alias. Renames the product name, the CLI
binary (`ccam` -> `agenthub`), the env var prefix (`CCAM_` ->
`AGENTHUB_`), the Prometheus metric namespace (`ccam_*` ->
`agenthub_*`), the tmux session prefix (`ccam-lane-<id>` ->
`agenthub-lane-<id>`), the per-repo runtime profile directory
(`.ccam/profile` -> `.agenthub/profile`), the lanes state root
(`~/.claude/ccam-lanes` -> `~/.claude/agenthub-lanes`), the bundled
plugins (`plugins/ccam*` -> `plugins/agenthub*`) and their slash
commands (`/ccam-doctor` -> `/agenthub-doctor`, `/ccam:*` ->
`/agenthub:*`).

Because there is no alias, an existing install has to be updated by
hand: rename its `.ccam/profile` directory and any `CCAM_*` variables,
and reinstall the plugin under its new name.

Two other name families are deliberately left alone here, since they are
not just strings: the `Claude-Code-Monitor` repository/marketplace name,
and the `agent-dashboard` npm package plus its `~/.claude/agent-dashboard`
runtime directory, which holds the live database and needs a migration
rather than a rename.

Verified: server 1406/1406, client 459/459, `grep -i ccam` clean across
tracked files, `openapi.yaml` regenerated (95 paths, unchanged count).
This commit is contained in:
2026-09-07 12:09:15 +07:00
parent ae9b3dbcd5
commit 17d56d0e01
345 changed files with 2705 additions and 2727 deletions
+6 -6
View File
@@ -40,10 +40,10 @@ function listMd(dir) {
}
}
// The marketplace mixes two shapes: the root-source `ccam` plugin (the whole
// The marketplace mixes two shapes: the root-source `agenthub` plugin (the whole
// repo — hooks, server, CLI, MCP) and ten subdirectory plugins. The root
// plugin's commands live in plugins/ccam/, which is therefore NOT a plugin dir.
const ROOT_PLUGIN = "ccam";
// plugin's commands live in plugins/agenthub/, which is therefore NOT a plugin dir.
const ROOT_PLUGIN = "agenthub";
describe("plugin marketplace", () => {
const marketplace = readJson(MARKETPLACE);
@@ -181,7 +181,7 @@ describe("plugin marketplace", () => {
const manifest = readJson(path.join(REPO_ROOT, ".claude-plugin", "plugin.json"));
it("is declared with the repo root as its source", () => {
assert.ok(entry, "the root ccam entry is missing from marketplace.json");
assert.ok(entry, "the root agenthub entry is missing from marketplace.json");
assert.equal(entry.source, "./");
assert.equal(entry.path, undefined, "a root-source entry must not also carry a path");
assert.ok(Array.isArray(entry.tags) && entry.tags.length > 0);
@@ -231,8 +231,8 @@ describe("plugin marketplace", () => {
it("lists every command file that exists — an unlisted one never loads", () => {
// `commands` is an explicit array, not a directory scan: a file added to
// plugins/ccam/commands/ and forgotten here is invisible to every user.
const dir = path.join(REPO_ROOT, "plugins/ccam/commands");
// plugins/agenthub/commands/ and forgotten here is invisible to every user.
const dir = path.join(REPO_ROOT, "plugins/agenthub/commands");
const onDisk = fs.readdirSync(dir).filter((f) => f.endsWith(".md"));
const listed = new Set(manifest.commands.map((rel) => path.basename(rel)));
for (const f of onDisk) assert.ok(listed.has(f), `${f} is not in plugin.json commands`);