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:
+1
-1
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* @file App.tsx
|
||||
* @description Top-level React tree for the Claude Code Agent Monitor dashboard.
|
||||
* @description Top-level React tree for the AgentHub dashboard.
|
||||
* Wires together routing, real-time WebSocket ingestion, browser notifications,
|
||||
* and the splash screen shown on cold load.
|
||||
*
|
||||
|
||||
@@ -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");
|
||||
});
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
import { useEffect } from "react";
|
||||
|
||||
const APP_SUFFIX = "Claude Code Agent Monitor";
|
||||
const APP_SUFFIX = "AgentHub";
|
||||
|
||||
/**
|
||||
* Update the browser tab title while this component is mounted.
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
import { describe, it, expect, beforeEach, vi } from "vitest";
|
||||
|
||||
const STORAGE_KEY = "ccam-data-scope";
|
||||
const STORAGE_KEY = "agenthub-data-scope";
|
||||
|
||||
// Fresh module instance (resets the module-level `current`) with localStorage
|
||||
// pre-seeded, so we can test load-from-storage behavior deterministically.
|
||||
|
||||
@@ -30,13 +30,13 @@ describe("splitViewStorage", () => {
|
||||
});
|
||||
|
||||
it("falls back to the default when stored JSON is malformed", () => {
|
||||
localStorage.setItem("ccam.workspace.splitView", "{not json");
|
||||
localStorage.setItem("agenthub.workspace.splitView", "{not json");
|
||||
expect(readSplitViewState()).toEqual(defaultSplitViewState());
|
||||
});
|
||||
|
||||
it("falls back to the default when the stored layout is not 1, 2, or 4", () => {
|
||||
localStorage.setItem(
|
||||
"ccam.workspace.splitView",
|
||||
"agenthub.workspace.splitView",
|
||||
JSON.stringify({ layout: 3, paneLaneIds: [] })
|
||||
);
|
||||
expect(readSplitViewState()).toEqual(defaultSplitViewState());
|
||||
|
||||
@@ -2290,7 +2290,7 @@ export interface CcMdItem {
|
||||
|
||||
/** One named artifact a plugin contributes — a skill, subagent, command or
|
||||
* output style. `name` is the frontmatter name Claude Code addresses it by
|
||||
* (`/ccam:ship-feature`, `subagent_type: qc-local`), falling back to the
|
||||
* (`/agenthub:ship-feature`, `subagent_type: qc-local`), falling back to the
|
||||
* filename when the file declares none. */
|
||||
export interface CcPluginItem {
|
||||
name: string;
|
||||
@@ -2646,7 +2646,7 @@ export interface RunStartArgs {
|
||||
}
|
||||
|
||||
/** A lane's tmux-backed terminal run — one per lane, id is the tmux session
|
||||
* name (`ccam-lane-<laneId>`). */
|
||||
* name (`agenthub-lane-<laneId>`). */
|
||||
export interface RunHandle {
|
||||
id: string;
|
||||
laneId: number | null;
|
||||
|
||||
@@ -105,7 +105,7 @@ export interface DataScope {
|
||||
selected: string[];
|
||||
}
|
||||
|
||||
const STORAGE_KEY = "ccam-data-scope";
|
||||
const STORAGE_KEY = "agenthub-data-scope";
|
||||
const DEFAULT_SCOPE: DataScope = { mode: "all", selected: [] };
|
||||
|
||||
function load(): DataScope {
|
||||
|
||||
@@ -14,7 +14,7 @@ export interface SplitViewState {
|
||||
paneLaneIds: (number | null)[];
|
||||
}
|
||||
|
||||
const STORAGE_KEY = "ccam.workspace.splitView";
|
||||
const STORAGE_KEY = "agenthub.workspace.splitView";
|
||||
|
||||
export function defaultSplitViewState(): SplitViewState {
|
||||
return { layout: 1, paneLaneIds: [null] };
|
||||
|
||||
@@ -1299,7 +1299,7 @@ export interface UpdateStatusPayload {
|
||||
|
||||
/** Payload for the `run_status` WebSocket message. */
|
||||
export interface RunStatusPayload {
|
||||
/** The run id (tmux session name, `ccam-lane-<laneId>`). */
|
||||
/** The run id (tmux session name, `agenthub-lane-<laneId>`). */
|
||||
id: string;
|
||||
status: "running" | "gone";
|
||||
/** Epoch-ms timestamp of this transition. */
|
||||
@@ -2257,7 +2257,7 @@ export interface LaneNode {
|
||||
icon: string;
|
||||
gate: boolean;
|
||||
/** The one command that drives this node — a slash command
|
||||
* (`/superpowers:writing-plans`) or a shell one (`ccam lanes hook ci-gate`),
|
||||
* (`/superpowers:writing-plans`) or a shell one (`agenthub lanes hook ci-gate`),
|
||||
* from the pipeline template. Empty string for a node with no single driver
|
||||
* (`done`, or a gate another agent declares). Display text only; the
|
||||
* dashboard never runs it. Optional in the type only because the archived
|
||||
@@ -2321,7 +2321,7 @@ export interface Lane {
|
||||
notes: string | null;
|
||||
pipeline_name: string;
|
||||
/** Slash command the lane's pipeline template declares as its driver, e.g.
|
||||
* `/ccam:ship-feature-lane`. The run console pre-fills its prompt with it.
|
||||
* `/agenthub:ship-feature-lane`. The run console pre-fills its prompt with it.
|
||||
* Empty when the template names no skill. */
|
||||
pipeline_skill?: string;
|
||||
pipeline_nodes: LaneNode[];
|
||||
@@ -2398,7 +2398,7 @@ export interface NamedLock {
|
||||
* What is actually running for a lane, recomputed by the server on every read
|
||||
* rather than cached — a process can die without telling anyone.
|
||||
*
|
||||
* `available: false` means the lane has no `.ccam/profile`, which is a normal
|
||||
* `available: false` means the lane has no `.agenthub/profile`, which is a normal
|
||||
* state (most lanes never run a stack), not an error.
|
||||
*/
|
||||
export type LaneRuntime =
|
||||
@@ -2517,7 +2517,7 @@ export interface PipelineStats {
|
||||
/** Skill invocation counts and the per-plugin totals derived from them. */
|
||||
export interface SkillUsage {
|
||||
skills: {
|
||||
/** Skill name as invoked, e.g. `ccam:ship-feature` or a bare `daily-report`. */
|
||||
/** Skill name as invoked, e.g. `agenthub:ship-feature` or a bare `daily-report`. */
|
||||
name: string;
|
||||
/** Owning plugin, or null for a built-in/personal skill. */
|
||||
plugin: string | null;
|
||||
|
||||
@@ -461,7 +461,7 @@ export function Workspace() {
|
||||
}
|
||||
};
|
||||
|
||||
// Mirrors `ccam lanes pipeline <template> <id>`: same PATCH, same
|
||||
// Mirrors `agenthub lanes pipeline <template> <id>`: same PATCH, same
|
||||
// stage-mismatch warning when the current declared stage matches no node
|
||||
// in the newly chosen template.
|
||||
const handlePipelineChange = async (id: number, pipeline: string) => {
|
||||
@@ -470,7 +470,7 @@ export function Workspace() {
|
||||
const { lane } = await api.lanes.update(id, { pipeline });
|
||||
await refreshLanes();
|
||||
// `stage` defaults to the DB sentinel "idle" until a driving session ever
|
||||
// calls `ccam stage` — that's the normal state for most lanes and never
|
||||
// calls `agenthub stage` — that's the normal state for most lanes and never
|
||||
// matches a real pipeline node, so it isn't a mismatch worth surfacing.
|
||||
if (lane.stage !== "idle" && !lane.pipeline_nodes.some((n) => n.state === "current")) {
|
||||
setLaneActionError(
|
||||
@@ -558,7 +558,7 @@ export function Workspace() {
|
||||
))}
|
||||
{!lanes.length && (
|
||||
<p className="text-sm text-fg-muted">
|
||||
{tLanes("emptyState")} <code>ccam lanes add --cwd $(pwd)</code>
|
||||
{tLanes("emptyState")} <code>agenthub lanes add --cwd $(pwd)</code>
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
@@ -636,7 +636,7 @@ export function Workspace() {
|
||||
))}
|
||||
</select>
|
||||
{/* `stage` defaults to the DB sentinel "idle" until the driving
|
||||
session ever calls `ccam stage` — that string collides with
|
||||
session ever calls `agenthub stage` — that string collides with
|
||||
`status`'s own "idle"/"running" vocabulary, so a lane that is
|
||||
actively running but has never declared a stage read as if it
|
||||
were sitting idle. Show a distinct label instead of the raw
|
||||
|
||||
@@ -96,7 +96,7 @@ vi.mock("../../lib/api", async (importOriginal) => {
|
||||
return { available: false };
|
||||
}),
|
||||
// Same for the lane's own application stack: nothing here asserts on it,
|
||||
// so report the "no .ccam/profile" shape, which is the common case.
|
||||
// so report the "no .agenthub/profile" shape, which is the common case.
|
||||
runtime: vi.fn().mockImplementation(async (id: number) => {
|
||||
recordCall("GET", `/api/lanes/${id}/runtime`);
|
||||
return { available: false };
|
||||
@@ -692,7 +692,7 @@ describe("split terminal view", () => {
|
||||
|
||||
it("falls back to unselected when a persisted lane id no longer exists", async () => {
|
||||
localStorage.setItem(
|
||||
"ccam.workspace.splitView",
|
||||
"agenthub.workspace.splitView",
|
||||
JSON.stringify({ layout: 2, paneLaneIds: [9999, null] })
|
||||
);
|
||||
await renderWorkspace();
|
||||
|
||||
@@ -5086,7 +5086,7 @@ exports[`screen snapshots > Run 1`] = `
|
||||
No lanes yet. Create one from a working directory:
|
||||
|
||||
<code>
|
||||
ccam lanes add --cwd $(pwd)
|
||||
agenthub lanes add --cwd $(pwd)
|
||||
</code>
|
||||
</p>
|
||||
</div>
|
||||
@@ -10368,7 +10368,7 @@ exports[`screen snapshots > Workflows 1`] = `
|
||||
No lane has recorded a stage yet. Create one with
|
||||
|
||||
<code>
|
||||
ccam lanes add --cwd $(pwd)
|
||||
agenthub lanes add --cwd $(pwd)
|
||||
</code>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -31,12 +31,12 @@ vi.mock("../../lib/api", async (importOriginal) => {
|
||||
// One installed plugin that actually contributes something, so the Claude Code
|
||||
// tab renders PluginCard's contribution chips instead of an empty list.
|
||||
const demoPlugin = {
|
||||
key: "ccam@sg",
|
||||
name: "ccam",
|
||||
key: "agenthub@sg",
|
||||
name: "agenthub",
|
||||
marketplace: "sg",
|
||||
scope: "user",
|
||||
version: "1.4.6",
|
||||
installPath: "/home/test/.claude/plugins/ccam",
|
||||
installPath: "/home/test/.claude/plugins/agenthub",
|
||||
installedAt: "2026-05-01T12:00:00.000Z",
|
||||
lastUpdated: "2026-06-01T09:30:00.000Z",
|
||||
gitCommitSha: "a1b2c3d",
|
||||
@@ -53,31 +53,31 @@ vi.mock("../../lib/api", async (importOriginal) => {
|
||||
{
|
||||
name: "ship-feature",
|
||||
description: "Implement a feature safely end-to-end.",
|
||||
file: "/home/test/.claude/plugins/ccam/skills/ship-feature/SKILL.md",
|
||||
file: "/home/test/.claude/plugins/agenthub/skills/ship-feature/SKILL.md",
|
||||
},
|
||||
{
|
||||
name: "file-headers",
|
||||
description: "Authorship header policy.",
|
||||
file: "/home/test/.claude/plugins/ccam/skills/file-headers/SKILL.md",
|
||||
file: "/home/test/.claude/plugins/agenthub/skills/file-headers/SKILL.md",
|
||||
},
|
||||
],
|
||||
agents: [
|
||||
{
|
||||
name: "qc-local",
|
||||
description: "Local browser QC.",
|
||||
file: "/home/test/.claude/plugins/ccam/agents/qc-local.md",
|
||||
file: "/home/test/.claude/plugins/agenthub/agents/qc-local.md",
|
||||
},
|
||||
],
|
||||
commands: [
|
||||
{
|
||||
name: "ccam-doctor",
|
||||
name: "agenthub-doctor",
|
||||
description: null,
|
||||
file: "/home/test/.claude/plugins/ccam/plugins/ccam/commands/ccam-doctor.md",
|
||||
file: "/home/test/.claude/plugins/agenthub/plugins/agenthub/commands/agenthub-doctor.md",
|
||||
},
|
||||
],
|
||||
outputStyles: [],
|
||||
},
|
||||
pluginJson: { name: "ccam", description: "The dashboard as a plugin.", version: "1.4.6" },
|
||||
pluginJson: { name: "agenthub", description: "The dashboard as a plugin.", version: "1.4.6" },
|
||||
},
|
||||
};
|
||||
|
||||
@@ -614,7 +614,7 @@ describe("plugin contribution chips", () => {
|
||||
it("expands a plugin's skills by name on click, and collapses again", async () => {
|
||||
await openPluginsTab();
|
||||
|
||||
const chip = screen.getByTestId("plugin-contrib-ccam@sg-skills");
|
||||
const chip = screen.getByTestId("plugin-contrib-agenthub@sg-skills");
|
||||
expect(chip).toHaveAttribute("aria-expanded", "false");
|
||||
expect(screen.queryByText("ship-feature")).toBeNull();
|
||||
|
||||
@@ -631,16 +631,16 @@ describe("plugin contribution chips", () => {
|
||||
it("shows only one surface at a time, and prefixes a command with its slash", async () => {
|
||||
await openPluginsTab();
|
||||
|
||||
fireEvent.click(screen.getByTestId("plugin-contrib-ccam@sg-skills"));
|
||||
fireEvent.click(screen.getByTestId("plugin-contrib-ccam@sg-commands"));
|
||||
fireEvent.click(screen.getByTestId("plugin-contrib-agenthub@sg-skills"));
|
||||
fireEvent.click(screen.getByTestId("plugin-contrib-agenthub@sg-commands"));
|
||||
|
||||
expect(screen.queryByText("ship-feature")).toBeNull();
|
||||
expect(screen.getByText("/ccam-doctor")).toBeInTheDocument();
|
||||
expect(screen.getByText("/agenthub-doctor")).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("leaves hooks as a plain chip - they have no per-item list to open", async () => {
|
||||
await openPluginsTab();
|
||||
|
||||
expect(screen.queryByTestId("plugin-contrib-ccam@sg-hooks")).toBeNull();
|
||||
expect(screen.queryByTestId("plugin-contrib-agenthub@sg-hooks")).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user