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:
@@ -71,7 +71,7 @@ function useLaneGitFacts(laneId: number): LaneGitFacts | null {
|
||||
|
||||
/**
|
||||
* The lane's own application stack. Same shape and same silence as the git
|
||||
* facts above: a lane without a `.ccam/profile` simply has no runtime row, which
|
||||
* facts above: a lane without a `.agenthub/profile` simply has no runtime row, which
|
||||
* is the common case and not an error worth a banner.
|
||||
*
|
||||
* `bump` lets an up/down action re-read immediately instead of waiting out the
|
||||
|
||||
@@ -265,7 +265,7 @@ describe("LaneCard — the lane's own application stack", () => {
|
||||
slot: 3,
|
||||
kind: "managed" as const,
|
||||
hooks: ["boot", "health"],
|
||||
profileDir: "/work/demo/.ccam/profile",
|
||||
profileDir: "/work/demo/.agenthub/profile",
|
||||
services: [{ name: "web", pid: 4242, alive: true }],
|
||||
ports: { api: { port: 8003, expected: 8003, listening: true } },
|
||||
steppedAside: false,
|
||||
@@ -350,7 +350,7 @@ describe("LaneCard — integration badges", () => {
|
||||
provisioned: true as const,
|
||||
up: false,
|
||||
slot: 1,
|
||||
profileDir: "/work/demo/.ccam/profile",
|
||||
profileDir: "/work/demo/.agenthub/profile",
|
||||
ports: {},
|
||||
} as unknown as LaneRuntime);
|
||||
vi.mocked(api.lanes.integration).mockImplementation((_id, name) =>
|
||||
@@ -381,7 +381,7 @@ describe("LaneToolsMenu", () => {
|
||||
provisioned: true as const,
|
||||
up: false,
|
||||
slot: 1,
|
||||
profileDir: "/work/demo/.ccam/profile",
|
||||
profileDir: "/work/demo/.agenthub/profile",
|
||||
ports: {},
|
||||
} as unknown as LaneRuntime);
|
||||
});
|
||||
|
||||
@@ -155,7 +155,7 @@ export function LaneConsolePane({
|
||||
const promptPrefill =
|
||||
laneTool === "codex"
|
||||
? currentLane?.pipeline_nodes?.length
|
||||
? `Declare progress as you go: run \`ccam stage <stage> --tool codex --evidence "..."\` immediately at each real transition through this pipeline — ${currentLane.pipeline_nodes.map((n) => n.id).join(" -> ")}. Then, your task:\n\n`
|
||||
? `Declare progress as you go: run \`agenthub stage <stage> --tool codex --evidence "..."\` immediately at each real transition through this pipeline — ${currentLane.pipeline_nodes.map((n) => n.id).join(" -> ")}. Then, your task:\n\n`
|
||||
: ""
|
||||
: currentLane?.pipeline_skill || "";
|
||||
useEffect(() => {
|
||||
|
||||
@@ -148,17 +148,17 @@ describe("LaneConsolePane", () => {
|
||||
const props = {
|
||||
...baseProps(),
|
||||
lanes: [LANE, LANE2],
|
||||
activeRuns: { items: [run("ccam-lane-1", 1), run("ccam-lane-2", 2)] },
|
||||
activeRuns: { items: [run("agenthub-lane-1", 1), run("agenthub-lane-2", 2)] },
|
||||
};
|
||||
|
||||
const { rerender } = render(<LaneConsolePane {...props} />);
|
||||
await waitFor(() =>
|
||||
expect(screen.getByTestId("terminal-view")).toHaveAttribute("data-run-id", "ccam-lane-1")
|
||||
expect(screen.getByTestId("terminal-view")).toHaveAttribute("data-run-id", "agenthub-lane-1")
|
||||
);
|
||||
|
||||
rerender(<LaneConsolePane {...props} laneId={2} />);
|
||||
await waitFor(() =>
|
||||
expect(screen.getByTestId("terminal-view")).toHaveAttribute("data-run-id", "ccam-lane-2")
|
||||
expect(screen.getByTestId("terminal-view")).toHaveAttribute("data-run-id", "agenthub-lane-2")
|
||||
);
|
||||
|
||||
// A lane with no live run falls back to its setup form, not the previous
|
||||
@@ -195,21 +195,21 @@ describe("LaneConsolePane", () => {
|
||||
});
|
||||
|
||||
it("pre-fills the prompt with the pipeline's driving skill, and keeps a typed prompt when the template changes", async () => {
|
||||
const lane = { ...LANE, pipeline_skill: "/ccam:ship-feature" };
|
||||
const lane = { ...LANE, pipeline_skill: "/agenthub:ship-feature" };
|
||||
const props = { ...baseProps(), lanes: [lane] };
|
||||
const { rerender } = render(<LaneConsolePane {...props} />);
|
||||
const prompt = screen.getByPlaceholderText(/ask claude/i) as HTMLTextAreaElement;
|
||||
await waitFor(() => expect(prompt.value).toBe("/ccam:ship-feature "));
|
||||
await waitFor(() => expect(prompt.value).toBe("/agenthub:ship-feature "));
|
||||
|
||||
// Untouched prefill follows the template switch.
|
||||
const laneShip = { ...lane, pipeline_skill: "/ccam:ship-feature-lane" };
|
||||
const laneShip = { ...lane, pipeline_skill: "/agenthub:ship-feature-lane" };
|
||||
rerender(<LaneConsolePane {...props} lanes={[laneShip]} />);
|
||||
await waitFor(() => expect(prompt.value).toBe("/ccam:ship-feature-lane "));
|
||||
await waitFor(() => expect(prompt.value).toBe("/agenthub:ship-feature-lane "));
|
||||
|
||||
// A typed requirement is never eaten by a later template switch.
|
||||
fireEvent.change(prompt, { target: { value: "/ccam:ship-feature-lane add a button" } });
|
||||
fireEvent.change(prompt, { target: { value: "/agenthub:ship-feature-lane add a button" } });
|
||||
rerender(<LaneConsolePane {...props} lanes={[lane]} />);
|
||||
await waitFor(() => expect(prompt.value).toBe("/ccam:ship-feature-lane add a button"));
|
||||
await waitFor(() => expect(prompt.value).toBe("/agenthub:ship-feature-lane add a button"));
|
||||
});
|
||||
|
||||
it("never pre-fills a claude slash command into a codex pane", async () => {
|
||||
@@ -217,7 +217,7 @@ describe("LaneConsolePane", () => {
|
||||
// literal prose and run nothing, which is how a codex lane sits for half an
|
||||
// hour with an untouched pipeline map. No pipeline_nodes here either, so
|
||||
// there's nothing to build a stage checklist from — the box stays empty.
|
||||
const lane = { ...LANE, tool: "codex" as const, pipeline_skill: "/ccam:ship-feature-lane" };
|
||||
const lane = { ...LANE, tool: "codex" as const, pipeline_skill: "/agenthub:ship-feature-lane" };
|
||||
render(<LaneConsolePane {...baseProps()} lanes={[lane]} />);
|
||||
const prompt = screen.getByPlaceholderText(/ask claude/i) as HTMLTextAreaElement;
|
||||
await waitFor(() => expect(prompt.value).toBe(""));
|
||||
@@ -230,7 +230,7 @@ describe("LaneConsolePane", () => {
|
||||
const lane = {
|
||||
...LANE,
|
||||
tool: "codex" as const,
|
||||
pipeline_skill: "/ccam:ship-feature-lane",
|
||||
pipeline_skill: "/agenthub:ship-feature-lane",
|
||||
pipeline_nodes: [
|
||||
{
|
||||
id: "implement",
|
||||
@@ -244,9 +244,9 @@ describe("LaneConsolePane", () => {
|
||||
};
|
||||
render(<LaneConsolePane {...baseProps()} lanes={[lane]} />);
|
||||
const prompt = screen.getByPlaceholderText(/ask claude/i) as HTMLTextAreaElement;
|
||||
await waitFor(() => expect(prompt.value).toContain("ccam stage <stage> --tool codex"));
|
||||
await waitFor(() => expect(prompt.value).toContain("agenthub stage <stage> --tool codex"));
|
||||
expect(prompt.value).toContain("implement -> tests");
|
||||
expect(prompt.value).not.toContain("/ccam:ship-feature-lane");
|
||||
expect(prompt.value).not.toContain("/agenthub:ship-feature-lane");
|
||||
});
|
||||
|
||||
it("renders an empty placeholder with selector when laneId is null but showLaneSelector is true (split-view)", () => {
|
||||
|
||||
@@ -105,13 +105,13 @@ describe("TerminalView", () => {
|
||||
afterEach(cleanup);
|
||||
|
||||
it("opens a WS connection to the run's ws-pty path", () => {
|
||||
render(<TerminalView runId="ccam-lane-1" wsBaseUrl="ws://localhost:4820" />);
|
||||
render(<TerminalView runId="agenthub-lane-1" wsBaseUrl="ws://localhost:4820" />);
|
||||
expect(MockWebSocket.instances).toHaveLength(1);
|
||||
expect(MockWebSocket.instances[0]!.url).toBe("ws://localhost:4820/ws-pty/ccam-lane-1");
|
||||
expect(MockWebSocket.instances[0]!.url).toBe("ws://localhost:4820/ws-pty/agenthub-lane-1");
|
||||
});
|
||||
|
||||
it("writes incoming WS data to the terminal", () => {
|
||||
render(<TerminalView runId="ccam-lane-1" wsBaseUrl="ws://localhost:4820" />);
|
||||
render(<TerminalView runId="agenthub-lane-1" wsBaseUrl="ws://localhost:4820" />);
|
||||
const ws = MockWebSocket.instances[0]!;
|
||||
ws.onopen?.();
|
||||
ws.onmessage?.({ data: "hello" });
|
||||
@@ -119,7 +119,7 @@ describe("TerminalView", () => {
|
||||
});
|
||||
|
||||
it("decodes binary ArrayBuffer frames (server sends PTY output as binary)", () => {
|
||||
render(<TerminalView runId="ccam-lane-1" wsBaseUrl="ws://localhost:4820" />);
|
||||
render(<TerminalView runId="agenthub-lane-1" wsBaseUrl="ws://localhost:4820" />);
|
||||
const ws = MockWebSocket.instances[0]!;
|
||||
ws.onopen?.();
|
||||
const bytes = new TextEncoder().encode("hello-binary").buffer;
|
||||
@@ -128,7 +128,7 @@ describe("TerminalView", () => {
|
||||
});
|
||||
|
||||
it("forwards terminal keystrokes as outgoing WS sends", () => {
|
||||
render(<TerminalView runId="ccam-lane-1" wsBaseUrl="ws://localhost:4820" />);
|
||||
render(<TerminalView runId="agenthub-lane-1" wsBaseUrl="ws://localhost:4820" />);
|
||||
const ws = MockWebSocket.instances[0]!;
|
||||
onDataHandlers[0]!("ls -la\r");
|
||||
expect(ws.sent).toEqual(["ls -la\r"]);
|
||||
@@ -137,7 +137,7 @@ describe("TerminalView", () => {
|
||||
it("swallows wheel events xterm would otherwise turn into arrow keys", () => {
|
||||
termState.modes.mouseTrackingMode = "none";
|
||||
termState.buffer.active.type = "alternate";
|
||||
render(<TerminalView runId="ccam-lane-1" wsBaseUrl="ws://localhost:4820" />);
|
||||
render(<TerminalView runId="agenthub-lane-1" wsBaseUrl="ws://localhost:4820" />);
|
||||
expect(wheelHandlerMock).toHaveBeenCalledTimes(1);
|
||||
// false = xterm skips its alt-screen wheel→cursor-key emulation, which in a
|
||||
// claude pane would walk the prompt history instead of scrolling.
|
||||
@@ -149,26 +149,26 @@ describe("TerminalView", () => {
|
||||
// report, so returning false here would kill scrolling entirely.
|
||||
termState.modes.mouseTrackingMode = "any";
|
||||
termState.buffer.active.type = "alternate";
|
||||
render(<TerminalView runId="ccam-lane-1" wsBaseUrl="ws://localhost:4820" />);
|
||||
render(<TerminalView runId="agenthub-lane-1" wsBaseUrl="ws://localhost:4820" />);
|
||||
expect(wheelHandlerMock.mock.calls[0]![0]!(new Event("wheel"))).toBe(true);
|
||||
});
|
||||
|
||||
it("lets the wheel through on a normal buffer, where xterm scrolls scrollback", () => {
|
||||
termState.modes.mouseTrackingMode = "none";
|
||||
termState.buffer.active.type = "normal";
|
||||
render(<TerminalView runId="ccam-lane-1" wsBaseUrl="ws://localhost:4820" />);
|
||||
render(<TerminalView runId="agenthub-lane-1" wsBaseUrl="ws://localhost:4820" />);
|
||||
expect(wheelHandlerMock.mock.calls[0]![0]!(new Event("wheel"))).toBe(true);
|
||||
});
|
||||
|
||||
it("treats x10 tracking as no wheel tracking (x10 never reports the wheel)", () => {
|
||||
termState.modes.mouseTrackingMode = "x10";
|
||||
termState.buffer.active.type = "alternate";
|
||||
render(<TerminalView runId="ccam-lane-1" wsBaseUrl="ws://localhost:4820" />);
|
||||
render(<TerminalView runId="agenthub-lane-1" wsBaseUrl="ws://localhost:4820" />);
|
||||
expect(wheelHandlerMock.mock.calls[0]![0]!(new Event("wheel"))).toBe(false);
|
||||
});
|
||||
|
||||
it("keeps Shift+Tab in the terminal instead of letting focus escape", () => {
|
||||
render(<TerminalView runId="ccam-lane-1" wsBaseUrl="ws://localhost:4820" />);
|
||||
render(<TerminalView runId="agenthub-lane-1" wsBaseUrl="ws://localhost:4820" />);
|
||||
const handler = keyHandlerMock.mock.calls[0]![0]! as (e: KeyboardEvent) => boolean;
|
||||
|
||||
const shiftTab = new KeyboardEvent("keydown", { key: "Tab", shiftKey: true });
|
||||
@@ -190,7 +190,7 @@ describe("TerminalView", () => {
|
||||
// fallback face with a different advance, so glyphs shove their neighbours
|
||||
// and the row's tail spills onto the row below — buffer clean, painting
|
||||
// wrong. The canvas renderer draws each cell at a fixed position instead.
|
||||
render(<TerminalView runId="ccam-lane-1" wsBaseUrl="ws://localhost:4820" />);
|
||||
render(<TerminalView runId="agenthub-lane-1" wsBaseUrl="ws://localhost:4820" />);
|
||||
expect(loadAddonMock.mock.calls.some(([a]) => (a as { __canvas?: boolean }).__canvas)).toBe(
|
||||
true
|
||||
);
|
||||
@@ -201,7 +201,7 @@ describe("TerminalView", () => {
|
||||
// next row's left margin, and tmux never repaints a row it believes
|
||||
// unchanged — the stray characters glued to the left edge after scrolling.
|
||||
it("reports its size when the socket opens", () => {
|
||||
render(<TerminalView runId="ccam-lane-1" wsBaseUrl="ws://localhost:4820" />);
|
||||
render(<TerminalView runId="agenthub-lane-1" wsBaseUrl="ws://localhost:4820" />);
|
||||
const ws = MockWebSocket.instances[0]!;
|
||||
ws.onopen?.();
|
||||
expect(ws.sent).toContain(JSON.stringify({ type: "resize", cols: 131, rows: 28 }));
|
||||
@@ -210,7 +210,7 @@ describe("TerminalView", () => {
|
||||
it("reports a size change xterm made on its own, with no container resize", () => {
|
||||
// Webfont load and page zoom both move cols without resizing the element
|
||||
// ResizeObserver watches, which is why onResize is the hook.
|
||||
render(<TerminalView runId="ccam-lane-1" wsBaseUrl="ws://localhost:4820" />);
|
||||
render(<TerminalView runId="agenthub-lane-1" wsBaseUrl="ws://localhost:4820" />);
|
||||
const ws = MockWebSocket.instances[0]!;
|
||||
ws.onopen?.();
|
||||
ws.sent.length = 0;
|
||||
@@ -222,7 +222,7 @@ describe("TerminalView", () => {
|
||||
it("never reports a collapsed console's zero size", () => {
|
||||
// The Workspace console collapses with CSS, so the container can be 0×0
|
||||
// while mounted; resizing the real tmux pane to that would wreck it.
|
||||
render(<TerminalView runId="ccam-lane-1" wsBaseUrl="ws://localhost:4820" />);
|
||||
render(<TerminalView runId="agenthub-lane-1" wsBaseUrl="ws://localhost:4820" />);
|
||||
const ws = MockWebSocket.instances[0]!;
|
||||
ws.sent.length = 0;
|
||||
termState.cols = 0;
|
||||
@@ -235,7 +235,7 @@ describe("TerminalView", () => {
|
||||
|
||||
it("re-attaches after the socket drops (a server restart must not freeze the pane)", () => {
|
||||
vi.useFakeTimers();
|
||||
render(<TerminalView runId="ccam-lane-1" wsBaseUrl="ws://localhost:4820" />);
|
||||
render(<TerminalView runId="agenthub-lane-1" wsBaseUrl="ws://localhost:4820" />);
|
||||
MockWebSocket.instances[0]!.close();
|
||||
vi.advanceTimersByTime(1600);
|
||||
expect(MockWebSocket.instances).toHaveLength(2);
|
||||
@@ -244,7 +244,7 @@ describe("TerminalView", () => {
|
||||
|
||||
it("does not re-attach once the server reported the pane exited", () => {
|
||||
vi.useFakeTimers();
|
||||
render(<TerminalView runId="ccam-lane-1" wsBaseUrl="ws://localhost:4820" />);
|
||||
render(<TerminalView runId="agenthub-lane-1" wsBaseUrl="ws://localhost:4820" />);
|
||||
const ws = MockWebSocket.instances[0]!;
|
||||
ws.onmessage?.({ data: '{"type":"exit","code":0}' });
|
||||
ws.close();
|
||||
|
||||
@@ -93,7 +93,7 @@ export function LanePipelinePanel() {
|
||||
t("lanes.emptyLane")
|
||||
) : (
|
||||
<>
|
||||
{t("lanes.empty")} <code>ccam lanes add --cwd $(pwd)</code>
|
||||
{t("lanes.empty")} <code>agenthub lanes add --cwd $(pwd)</code>
|
||||
</>
|
||||
)}
|
||||
</p>
|
||||
|
||||
@@ -132,7 +132,7 @@ describe("LanePipelinePanel", () => {
|
||||
statsMock.mockResolvedValue({ pipelines: [], lanes: [] });
|
||||
render(<LanePipelinePanel />);
|
||||
|
||||
expect(await screen.findByText(/ccam lanes add/)).toBeInTheDocument();
|
||||
expect(await screen.findByText(/agenthub lanes add/)).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("refetches narrowed to the lane picked, and falls back to a cwd for an untitled one", async () => {
|
||||
@@ -162,7 +162,7 @@ describe("LanePipelinePanel", () => {
|
||||
// the whole subtree, so a handle grabbed before it is already detached.
|
||||
await waitFor(() => expect(screen.queryByTestId("pipeline-stat-plan")).not.toBeInTheDocument());
|
||||
expect(screen.getByTestId("pipeline-stats-lane-picker")).toBeInTheDocument();
|
||||
expect(screen.queryByText(/ccam lanes add/)).not.toBeInTheDocument();
|
||||
expect(screen.queryByText(/agenthub lanes add/)).not.toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("surfaces a failed fetch", async () => {
|
||||
|
||||
@@ -18,10 +18,10 @@ vi.mock("../../../lib/api", async (importOriginal) => {
|
||||
|
||||
const USAGE = {
|
||||
skills: [
|
||||
{ name: "ccam:ship-feature", plugin: "ccam", count: 12, sessions: 5 },
|
||||
{ name: "agenthub:ship-feature", plugin: "agenthub", count: 12, sessions: 5 },
|
||||
{ name: "daily-report", plugin: null, count: 3, sessions: 3 },
|
||||
],
|
||||
plugins: [{ name: "ccam", skills: 1, skillCalls: 12, mcpCalls: 4 }],
|
||||
plugins: [{ name: "agenthub", skills: 1, skillCalls: 12, mcpCalls: 4 }],
|
||||
};
|
||||
|
||||
describe("SkillUsagePanel", () => {
|
||||
@@ -29,14 +29,14 @@ describe("SkillUsagePanel", () => {
|
||||
usageMock.mockResolvedValue(USAGE);
|
||||
render(<SkillUsagePanel statusFilter="all" />);
|
||||
|
||||
expect(await screen.findByTestId("plugin-usage-ccam")).toHaveTextContent("16");
|
||||
expect(await screen.findByTestId("plugin-usage-agenthub")).toHaveTextContent("16");
|
||||
});
|
||||
|
||||
it("lists each skill with its call and session counts", async () => {
|
||||
usageMock.mockResolvedValue(USAGE);
|
||||
render(<SkillUsagePanel statusFilter="all" />);
|
||||
|
||||
const row = await screen.findByTestId("skill-usage-ccam:ship-feature");
|
||||
const row = await screen.findByTestId("skill-usage-agenthub:ship-feature");
|
||||
expect(row).toHaveTextContent("12");
|
||||
expect(row).toHaveTextContent("5");
|
||||
});
|
||||
@@ -45,7 +45,7 @@ describe("SkillUsagePanel", () => {
|
||||
usageMock.mockResolvedValue(USAGE);
|
||||
render(<SkillUsagePanel statusFilter="active" />);
|
||||
|
||||
await screen.findByTestId("plugin-usage-ccam");
|
||||
await screen.findByTestId("plugin-usage-agenthub");
|
||||
expect(usageMock).toHaveBeenCalledWith("active");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user