fix(plugins): make the 10 focused plugins installable, finish the AgentHub rename

The ten `agenthub-*` plugins were listed by the marketplace but could never be
installed — two schema mistakes present since the entries were first authored
(57dc915), both invisible until you actually run `claude plugin install`:

- marketplace entries used `"path": "plugins/<name>"`; the CLI only accepts
  `"source"`, so every one failed with
  `This plugin's marketplace entry is invalid: source: Invalid input`
- each `plugin.json` carried npm's `"repository": { "type", "url" }` object;
  the schema wants a plain string, so the next attempt failed with
  `Validation errors: repository: Invalid input`

Verified by installing all 11 entries into a throwaway CLAUDE_CONFIG_DIR:
1/11 before, 11/11 after. `plugins-marketplace.test.js` was asserting the
broken shape, which is why CI stayed green — it now asserts `source` and
rejects `path`.

Marketplace renamed `claude-code-agent-monitor-plugins` -> `agenthub`, so the
install line is `agenthub@agenthub`. ARCHITECTURE.md documented a marketplace
name (`smartgift-claude-code-monitor`) that never existed in any revision.

The documented `/plugin marketplace add Smartgift-AI/Claude-Code-Monitor` also
never worked: the `owner/repo` shorthand resolves to github.com only, and this
repo is self-hosted on Gitea. Confirmed the CLI rejects `host/owner/repo` and
ignores GH_HOST / GITHUB_HOST / CLAUDE_CODE_MARKETPLACE_URL, so the full
https:// clone URL is the only supported form. Same GitHub-habit class fixed
elsewhere: raw.githubusercontent.com icon URLs (404, and the repo ships
favicon.svg not favicon.ico — the client had the same dead /favicon.ico),
a smartgift.github.io docs link (404), and Gitea `/blob/<ref>/` paths that
must be `/src/branch/<ref>/`.

Repository renamed to Smartgift-AI/AgentHub throughout. Gitea 301-redirects
the old name, so these were stale rather than broken; `docs/superpowers/`
keeps the old name because those are dated decision records.

Adds `repo-links.test.js` to guard both classes (it runs under the existing
pre-commit gate) plus an openapi.yaml drift check — the committed spec had
silently fallen a minor version behind package.json. `generate-openapi-yaml.js`
now exports `render()` so the test compares against one definition of the dump
options instead of a second copy.
This commit is contained in:
2026-09-10 11:03:14 +07:00
parent 876c6de6d2
commit e972267a42
40 changed files with 290 additions and 170 deletions
+20 -20
View File
@@ -3,15 +3,15 @@
openapi: 3.0.3
info:
title: Agent Dashboard for Claude Code API
version: 1.4.6
version: 1.5.0
description: HTTP API for real-time Claude Code session monitoring, agent lifecycle tracking, analytics, pricing, hooks ingestion, and workflow intelligence.
contact:
name: Nguyễn Ngọc Trí Vĩ
email: vinnt@smartgift.vn
url: https://git.smartgift.io.vn/Smartgift-AI/Claude-Code-Monitor
url: https://git.smartgift.io.vn/Smartgift-AI/AgentHub
externalDocs:
description: Project documentation
url: https://git.smartgift.io.vn/Smartgift-AI/Claude-Code-Monitor#readme
url: https://git.smartgift.io.vn/Smartgift-AI/AgentHub#readme
servers:
- url: http://localhost:4820
description: Local dashboard server (default)
@@ -363,7 +363,7 @@ components:
version:
type: string
description: Dashboard release version from package.json
example: 1.4.6
example: 1.5.0
timestamp:
type: string
format: date-time
@@ -4051,7 +4051,7 @@ components:
items:
type: string
example:
- /Users/son/WebstormProjects/Claude-Code-Agent-Monitor
- /Users/dev/AgentHub
- /Users/son/code/another-project
sources:
type: array
@@ -4540,7 +4540,7 @@ paths:
- id: b7f3a2c1-4e5d-4a8b-9c2f-1d6e8a0b3c4d
name: Refactor pricing route + add cost endpoint
status: active
cwd: /Users/son/WebstormProjects/Claude-Code-Agent-Monitor
cwd: /Users/dev/AgentHub
model: claude-opus-4-20250514
started_at: '2026-06-25T14:02:11.004Z'
ended_at: null
@@ -4554,7 +4554,7 @@ paths:
- id: 1a2b3c4d-5e6f-4071-8293-a4b5c6d7e8f9
name: Fix flaky transcript pagination test
status: completed
cwd: /Users/son/WebstormProjects/Claude-Code-Agent-Monitor
cwd: /Users/dev/AgentHub
model: claude-sonnet-4-20250514
started_at: '2026-06-24T09:12:00.000Z'
ended_at: '2026-06-24T09:48:32.501Z'
@@ -4583,7 +4583,7 @@ paths:
example:
id: b7f3a2c1-4e5d-4a8b-9c2f-1d6e8a0b3c4d
name: Refactor pricing route + add cost endpoint
cwd: /Users/son/WebstormProjects/Claude-Code-Agent-Monitor
cwd: /Users/dev/AgentHub
model: claude-opus-4-20250514
metadata:
source: hook
@@ -4600,7 +4600,7 @@ paths:
id: b7f3a2c1-4e5d-4a8b-9c2f-1d6e8a0b3c4d
name: Refactor pricing route + add cost endpoint
status: active
cwd: /Users/son/WebstormProjects/Claude-Code-Agent-Monitor
cwd: /Users/dev/AgentHub
model: claude-opus-4-20250514
started_at: '2026-06-25T14:02:11.004Z'
ended_at: null
@@ -4623,7 +4623,7 @@ paths:
id: b7f3a2c1-4e5d-4a8b-9c2f-1d6e8a0b3c4d
name: Refactor pricing route + add cost endpoint
status: active
cwd: /Users/son/WebstormProjects/Claude-Code-Agent-Monitor
cwd: /Users/dev/AgentHub
model: claude-opus-4-20250514
started_at: '2026-06-25T14:02:11.004Z'
ended_at: null
@@ -4667,7 +4667,7 @@ paths:
id: b7f3a2c1-4e5d-4a8b-9c2f-1d6e8a0b3c4d
name: Refactor pricing route + add cost endpoint
status: active
cwd: /Users/son/WebstormProjects/Claude-Code-Agent-Monitor
cwd: /Users/dev/AgentHub
model: claude-opus-4-20250514
started_at: '2026-06-25T14:02:11.004Z'
ended_at: null
@@ -4762,7 +4762,7 @@ paths:
id: b7f3a2c1-4e5d-4a8b-9c2f-1d6e8a0b3c4d
name: Refactor pricing route + add cost endpoint
status: completed
cwd: /Users/son/WebstormProjects/Claude-Code-Agent-Monitor
cwd: /Users/dev/AgentHub
model: claude-opus-4-20250514
started_at: '2026-06-25T14:02:11.004Z'
ended_at: '2026-06-25T15:07:44.220Z'
@@ -6119,7 +6119,7 @@ paths:
$ref: '#/components/schemas/SettingsInfoResponse'
example:
db:
path: /Users/son/WebstormProjects/Claude-Code-Agent-Monitor/server/data/agent-monitor.db
path: /Users/dev/AgentHub/server/data/agent-monitor.db
size: 48922624
counts:
sessions: 412
@@ -6697,7 +6697,7 @@ paths:
summary: Behind origin — update available
value:
git_repo: true
repo_root: /Users/son/WebstormProjects/Claude-Code-Agent-Monitor
repo_root: /Users/dev/AgentHub
update_available: true
commits_behind: 4
remote_ref: origin/master
@@ -6709,7 +6709,7 @@ paths:
summary: Up to date with origin
value:
git_repo: true
repo_root: /Users/son/WebstormProjects/Claude-Code-Agent-Monitor
repo_root: /Users/dev/AgentHub
update_available: false
commits_behind: 0
remote_ref: origin/master
@@ -6754,7 +6754,7 @@ paths:
summary: Behind origin — update available
value:
git_repo: true
repo_root: /Users/son/WebstormProjects/Claude-Code-Agent-Monitor
repo_root: /Users/dev/AgentHub
update_available: true
commits_behind: 4
remote_ref: origin/master
@@ -6766,7 +6766,7 @@ paths:
summary: Up to date with origin
value:
git_repo: true
repo_root: /Users/son/WebstormProjects/Claude-Code-Agent-Monitor
repo_root: /Users/dev/AgentHub
update_available: false
commits_behind: 0
remote_ref: origin/master
@@ -10114,7 +10114,7 @@ paths:
example:
items:
- kind: dashboard
path: /Users/dev/Claude-Code-Agent-Monitor
path: /Users/dev/AgentHub
label: Dashboard server
- kind: home
path: /Users/dev
@@ -10965,7 +10965,7 @@ paths:
$ref: '#/components/schemas/SessionsFacetsResponse'
example:
cwds:
- /Users/son/WebstormProjects/Claude-Code-Agent-Monitor
- /Users/dev/AgentHub
- /Users/son/code/another-project
sources:
- local
@@ -11633,4 +11633,4 @@ paths:
errors: 0
'400':
description: Missing file, invalid JSON, or unrecognized export format
x-issues-url: https://git.smartgift.io.vn/Smartgift-AI/Claude-Code-Monitor/issues
x-issues-url: https://git.smartgift.io.vn/Smartgift-AI/AgentHub/issues