feat(agenthub): bring the dashboard back into sg as agenthub
Reverses the ccam removal in ee8748c: the team wants one marketplace to install from, so the dashboard belongs here.
Two things are fixed while restoring it. The entry is named `agenthub`, matching the `name` in the AgentHub repo's own .claude-plugin/plugin.json (the old entry called itself `ccam`, which matched nothing). And its url points at Smartgift-AI/AgentHub.git directly rather than the retired Claude-Code-Monitor.git — that old URL still works, but only through a Gitea rename redirect that stops the day someone turns it off.
README documents the one real hazard: the AgentHub repo also publishes its own marketplace, and installing the dashboard from both runs two hook-ingestion sets in parallel, double-counting every event's tokens and cost. It also states plainly that the 10 focused sub-plugins are not here — only in AgentHub's own marketplace — and gives the ccam@sg -> agenthub@sg migration commands.
This commit is contained in:
@@ -24,6 +24,16 @@
|
||||
"source": "./plugins/common",
|
||||
"description": "All staff — sg-prompt-sharpening skill for disambiguating requests before acting.",
|
||||
"category": "productivity"
|
||||
},
|
||||
{
|
||||
"name": "agenthub",
|
||||
"source": {
|
||||
"source": "url",
|
||||
"url": "https://git.smartgift.io.vn/Smartgift-AI/AgentHub.git",
|
||||
"ref": "main"
|
||||
},
|
||||
"description": "AgentHub — dashboard local-first theo dõi session Claude Code. Cài event hook, khởi động server, đưa CLI `agenthub` lên PATH, nối MCP tools. Không cần checkout, không cần `npm run setup`. Source lấy trực tiếp từ repo AgentHub (nhánh `main`), không phải code trong repo này.",
|
||||
"category": "monitoring"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -9,8 +9,9 @@ Marketplace nội bộ chứa các skill Claude Code của Smartgift. Đăng ký
|
||||
| `sg-all` | **Mặc định — ai muốn tất cả** | `sg-md-writing` + `sg-prompt-sharpening` | Gói cả hai skill. Cài một cái là có tất cả. |
|
||||
| `sg-dev` | Team dev | `sg-md-writing` | Soạn & bảo trì file `CLAUDE.md` / `AGENTS.md` ràng buộc hành vi AI: routing map, reuse inventory, an toàn với model yếu, tự đề xuất cập nhật khi code đổi (hỏi confirm trước khi ghi). |
|
||||
| `sg-common` | Chung | `sg-prompt-sharpening` | Trước khi hành động với yêu cầu ngắn/mơ hồ, mở rộng thành các cách hiểu rõ ràng, nêu giả định, định nghĩa tiêu chí "xong". |
|
||||
| `agenthub` | Ai muốn theo dõi session Claude Code | hooks + server + CLI + MCP | Dashboard local-first [AgentHub](https://git.smartgift.io.vn/Smartgift-AI/AgentHub). Source lấy trực tiếp từ repo đó (nhánh `main`), không phải code trong repo này. |
|
||||
|
||||
**Khuyến nghị: cài `sg-all`.** Đã cài `sg-all` thì **KHÔNG cần** cài thêm `sg-dev` hay `sg-common` — cài trùng sẽ nạp lặp skill. Chỉ cài `sg-dev`/`sg-common` riêng nếu có lý do muốn giới hạn phạm vi.
|
||||
**Khuyến nghị: cài `sg-all`.** Đã cài `sg-all` thì **KHÔNG cần** cài thêm `sg-dev` hay `sg-common` — cài trùng sẽ nạp lặp skill. Chỉ cài `sg-dev`/`sg-common` riêng nếu có lý do muốn giới hạn phạm vi. `agenthub` là plugin độc lập (không phải skill), cài kèm `sg-all`/`sg-dev`/`sg-common` không xung đột.
|
||||
|
||||
## Cài đặt
|
||||
|
||||
@@ -29,16 +30,12 @@ claude plugin install sg-dev@sg # chỉ sg-md-writing
|
||||
claude plugin install sg-common@sg # chỉ sg-prompt-sharpening
|
||||
```
|
||||
|
||||
Xem: `claude plugin list`. Gỡ: `claude plugin uninstall sg-all@sg` (hoặc `sg-dev@sg` / `sg-common@sg` tùy plugin đã cài).
|
||||
Xem: `claude plugin list`. Gỡ: `claude plugin uninstall sg-all@sg` (hoặc `sg-dev@sg` / `sg-common@sg` / `agenthub@sg` tùy plugin đã cài).
|
||||
|
||||
## Dashboard AgentHub — marketplace riêng
|
||||
|
||||
Marketplace này chỉ chứa skill. Dashboard AgentHub tự phát hành marketplace của
|
||||
nó, cài trực tiếp từ đó:
|
||||
## Dashboard AgentHub
|
||||
|
||||
```bash
|
||||
claude plugin marketplace add https://git.smartgift.io.vn/Smartgift-AI/AgentHub.git
|
||||
claude plugin install agenthub@agenthub
|
||||
claude plugin install agenthub@sg
|
||||
```
|
||||
|
||||
Cần Node **>= 22.5** trên máy cài (server dùng `node:sqlite`, không có
|
||||
@@ -46,17 +43,27 @@ Cần Node **>= 22.5** trên máy cài (server dùng `node:sqlite`, không có
|
||||
`/agenthub-update` `/agenthub-open`, và cách gỡ sạch: xem
|
||||
[docs/PLUGINS.md của AgentHub](https://git.smartgift.io.vn/Smartgift-AI/AgentHub/src/branch/main/docs/PLUGINS.md).
|
||||
|
||||
> Plugin này trước đây phát hành kèm ở marketplace `sg` dưới tên `ccam`. Entry đó
|
||||
> đã bị bỏ để AgentHub chỉ có một nguồn cài duy nhất — hai đường cài cùng một
|
||||
> plugin nghĩa là cài trùng sẽ chạy hai bộ hook ingestion song song.
|
||||
> [!IMPORTANT]
|
||||
> **Chỉ cài AgentHub từ MỘT marketplace.** Repo AgentHub cũng tự phát hành
|
||||
> marketplace riêng của nó. Cài dashboard từ cả hai nơi sẽ chạy **hai bộ hook
|
||||
> ingestion song song** — mỗi event vào database hai lần, token và cost bị đếm đôi.
|
||||
> Chọn một đường.
|
||||
>
|
||||
> `sg` chỉ có bản dashboard đầy đủ (entry `agenthub` ở trên). 10 plugin con
|
||||
> (`agenthub-analytics`, `agenthub-sessions`, `agenthub-workflows`, …) chỉ có ở
|
||||
> marketplace riêng của AgentHub — cần thì add marketplace đó thay vì cài ở đây.
|
||||
|
||||
> Plugin này trước đây ở `sg` dưới tên `ccam`, trỏ vào repo cũ `Claude-Code-Monitor`.
|
||||
> Entry đã đổi tên thành `agenthub` cho khớp `plugin.json` của nó, và URL trỏ thẳng
|
||||
> vào tên repo mới (không còn dựa vào redirect của Gitea).
|
||||
>
|
||||
> **Nếu đang cài bản cũ:** lần `claude plugin marketplace update sg` tới, `ccam@sg`
|
||||
> sẽ chuyển sang `✘ failed to load` trong `claude plugin list` (đúng như dự kiến —
|
||||
> entry nguồn không còn tồn tại), và **dashboard ngừng nhận event** cho tới khi bạn
|
||||
> chuyển sang marketplace mới:
|
||||
> entry tên `ccam` không còn tồn tại), và **dashboard ngừng nhận event** cho tới khi
|
||||
> bạn chuyển sang tên mới:
|
||||
>
|
||||
> ```bash
|
||||
> claude plugin uninstall ccam@sg
|
||||
> claude plugin marketplace add https://git.smartgift.io.vn/Smartgift-AI/AgentHub.git
|
||||
> claude plugin install agenthub@agenthub
|
||||
> claude plugin marketplace update sg
|
||||
> claude plugin install agenthub@sg
|
||||
> ```
|
||||
|
||||
Reference in New Issue
Block a user