agent-teams-dashboard 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 pingshian0131
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,80 @@
1
+ # Agent Teams Dashboard
2
+
3
+ Real-time monitoring dashboard for [Claude Code](https://claude.ai/code) agent teams. Streams file system changes via WebSocket to track team collaboration, task progress, and agent activity.
4
+
5
+ [繁體中文](./README.zh-TW.md)
6
+
7
+ ## Features
8
+
9
+ - **Team Overview** — Live status cards for all active agent teams
10
+ - **Kanban Task Board** — Pending / In Progress / Completed columns
11
+ - **Agent Activity Monitor** — Real-time messages and tool usage per agent
12
+ - **WebSocket Streaming** — File system changes pushed to browser instantly
13
+
14
+ ## Quick Start
15
+
16
+ ```bash
17
+ npx agent-teams-dashboard
18
+ ```
19
+
20
+ Open `http://localhost:3001` in your browser.
21
+
22
+ Use the `PORT` environment variable to change the port:
23
+
24
+ ```bash
25
+ PORT=8080 npx agent-teams-dashboard
26
+ ```
27
+
28
+ ## Development
29
+
30
+ ### Docker (Recommended)
31
+
32
+ ```bash
33
+ docker compose up
34
+ ```
35
+
36
+ Visit `http://localhost:5173`. Code changes hot reload automatically.
37
+
38
+ ### Manual
39
+
40
+ ```bash
41
+ npm install
42
+
43
+ # Terminal 1 — backend
44
+ npm run server
45
+
46
+ # Terminal 2 — frontend dev server
47
+ npm run dev
48
+ ```
49
+
50
+ Visit `http://localhost:5173`.
51
+
52
+ ## Commands
53
+
54
+ | Command | Description |
55
+ |---------|-------------|
56
+ | `npm run dev` | Frontend dev server (Vite, port 5173) |
57
+ | `npm run server` | Backend server (port 3001) |
58
+ | `npm run build` | Build frontend to `dist/` |
59
+ | `npm run build:server` | Compile backend to `server-dist/` |
60
+ | `npm run preview` | Preview production build |
61
+ | `docker compose up` | Start both frontend & backend via Docker |
62
+
63
+ ## Tech Stack
64
+
65
+ - **Frontend:** React 19 + TypeScript + Vite 6
66
+ - **Backend:** Node.js + native HTTP + ws (WebSocket)
67
+ - **Data Source:** Watches `~/.claude/teams/`, `~/.claude/tasks/`, `~/.claude/projects/`
68
+
69
+ ## Production
70
+
71
+ ```bash
72
+ npm run build
73
+ npm run server
74
+ ```
75
+
76
+ The server serves static files from `dist/` and provides API/WebSocket endpoints on the same port (default 3001).
77
+
78
+ ## License
79
+
80
+ MIT
@@ -0,0 +1,72 @@
1
+ # Agent Teams Dashboard
2
+
3
+ 即時監控 Claude Code agent teams 的 Web 儀表板。透過 WebSocket 串流更新,追蹤團隊協作、任務進度與 agent 活動狀態。
4
+
5
+ ## 功能
6
+
7
+ - 團隊總覽 — 所有活躍 agent teams 的即時狀態卡片
8
+ - 看板式任務面板 — Pending / In Progress / Completed 三欄式任務追蹤
9
+ - Agent 活動監控 — 即時顯示每個 agent 的訊息與工具使用紀錄
10
+ - WebSocket 即時更新 — 檔案系統變更自動推送至瀏覽器
11
+
12
+ ## 安裝
13
+
14
+ ```bash
15
+ npx agent-teams-dashboard
16
+ ```
17
+
18
+ 開啟瀏覽器前往 `http://localhost:3001`。
19
+
20
+ ## 從原始碼開發
21
+
22
+ ### Docker(推薦)
23
+
24
+ ```bash
25
+ docker compose up
26
+ ```
27
+
28
+ 開啟瀏覽器前往 `http://localhost:5173`。修改程式碼會自動 hot reload。
29
+
30
+ ### 手動啟動
31
+
32
+ ```bash
33
+ npm install
34
+
35
+ # 終端機 1 — 啟動後端
36
+ npm run server
37
+
38
+ # 終端機 2 — 啟動前端開發伺服器
39
+ npm run dev
40
+ ```
41
+
42
+ 開啟瀏覽器前往 `http://localhost:5173`。
43
+
44
+ ## 指令
45
+
46
+ | 指令 | 說明 |
47
+ |------|------|
48
+ | `npm run dev` | 前端開發伺服器(Vite,port 5173) |
49
+ | `npm run server` | 後端伺服器(port 3001) |
50
+ | `npm run build` | 建置前端至 `dist/` |
51
+ | `npm run build:server` | 編譯後端至 `server-dist/` |
52
+ | `npm run preview` | 預覽正式建置結果 |
53
+ | `docker compose up` | Docker 一鍵啟動前後端 |
54
+
55
+ ## 技術棧
56
+
57
+ - **前端:** React 19 + TypeScript + Vite 6
58
+ - **後端:** Node.js + native HTTP + ws(WebSocket)
59
+ - **資料來源:** 監視 `~/.claude/teams/`、`~/.claude/tasks/`、`~/.claude/projects/` 目錄
60
+
61
+ ## 正式環境部署
62
+
63
+ ```bash
64
+ npm run build
65
+ npm run server
66
+ ```
67
+
68
+ 伺服器會從 `dist/` 提供靜態檔案,API 與 WebSocket 在同一個 port(預設 3001,可用 `PORT` 環境變數覆蓋)。
69
+
70
+ ## 授權
71
+
72
+ MIT
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ import { fileURLToPath } from 'node:url';
3
+ import { dirname, join } from 'node:path';
4
+
5
+ const __dirname = dirname(fileURLToPath(import.meta.url));
6
+ process.env.DIST_DIR = process.env.DIST_DIR ?? join(__dirname, '..', 'dist');
7
+
8
+ await import('../server-dist/server/index.js');
@@ -0,0 +1 @@
1
+ :root{--bg-primary: #1a1a2e;--bg-secondary: #16213e;--bg-sidebar: #0f0f1a;--bg-card: #16213e;--bg-hover: #1f2b47;--bg-active: #253350;--border-primary: #2a2a3e;--border-subtle: #222236;--text-primary: #e0e0e0;--text-secondary: #888;--text-muted: #555;--accent-blue: #58a6ff;--accent-green: #00ff88;--accent-yellow: #ffd700;--accent-red: #ff4444;--accent-purple: #bc8cff;--accent-cyan: #00d4ff;--font-mono: "JetBrains Mono", "Fira Code", Consolas, monospace;--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;--radius-sm: 4px;--radius-md: 6px;--radius-lg: 8px;--transition-fast: .15s ease}*,*:before,*:after{margin:0;padding:0;box-sizing:border-box}body{font-family:var(--font-mono);font-size:13px;line-height:1.5;color:var(--text-primary);background:var(--bg-primary);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.app-container{display:flex;height:100vh;overflow:hidden}.sidebar{width:250px;min-width:250px;background:var(--bg-sidebar);border-right:1px solid var(--border-primary);overflow-y:auto;display:flex;flex-direction:column}.sidebar-header{padding:16px;border-bottom:1px solid var(--border-primary)}.sidebar-title{font-size:14px;font-weight:600;color:var(--text-primary);letter-spacing:.02em}.sidebar-nav{flex:1;padding:8px}.main-panel{flex:1;overflow-y:auto;padding:16px}.placeholder{display:flex;align-items:center;justify-content:center;height:100%;color:var(--text-muted);font-size:14px}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--border-primary);border-radius:4px}::-webkit-scrollbar-thumb:hover{background:var(--text-muted)}*{scrollbar-width:thin;scrollbar-color:var(--border-primary) transparent}.text-primary{color:var(--text-primary)}.text-secondary{color:var(--text-secondary)}.text-muted{color:var(--text-muted)}.text-blue{color:var(--accent-blue)}.text-green{color:var(--accent-green)}.text-yellow{color:var(--accent-yellow)}.text-red{color:var(--accent-red)}.text-purple{color:var(--accent-purple)}.text-cyan{color:var(--accent-cyan)}.bg-card{background:var(--bg-card)}.bg-hover{background:var(--bg-hover)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-md{border-radius:var(--radius-md)}.rounded-lg{border-radius:var(--radius-lg)}.flex{display:flex}.flex-col{flex-direction:column}.flex-1{flex:1}.items-center{align-items:center}.justify-between{justify-content:space-between}.gap-1{gap:4px}.gap-2{gap:8px}.gap-3{gap:12px}.gap-4{gap:16px}.p-1{padding:4px}.p-2{padding:8px}.p-3{padding:12px}.p-4{padding:16px}.px-2{padding-left:8px;padding-right:8px}.px-3{padding-left:12px;padding-right:12px}.py-1{padding-top:4px;padding-bottom:4px}.py-2{padding-top:8px;padding-bottom:8px}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.font-bold{font-weight:600}.text-sm{font-size:12px}.text-xs{font-size:11px}.border{border:1px solid var(--border-primary)}.border-b{border-bottom:1px solid var(--border-primary)}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;user-select:none}.transition{transition:all var(--transition-fast)}.sidebar-nav-item{display:flex;align-items:center;width:100%;padding:8px 12px;border:none;background:transparent;color:var(--text-secondary);font-family:var(--font-mono);font-size:13px;cursor:pointer;border-radius:var(--radius-sm);transition:all var(--transition-fast);text-align:left}.sidebar-nav-item:hover{background:var(--bg-hover);color:var(--text-primary)}.sidebar-nav-item--active{background:var(--bg-active);color:var(--accent-cyan)}.sidebar-team{margin-bottom:2px}.sidebar-team-header{display:flex;align-items:center;gap:6px;width:100%;padding:8px 12px;border:none;background:transparent;color:var(--text-primary);font-family:var(--font-mono);font-size:13px;cursor:pointer;border-radius:var(--radius-sm);transition:all var(--transition-fast);text-align:left}.sidebar-team-header:hover{background:var(--bg-hover)}.sidebar-team-arrow{font-size:10px;color:var(--text-muted);width:12px}.sidebar-footer{padding:12px 16px;border-top:1px solid var(--border-primary)}.sidebar-stats{display:flex;gap:12px}.agent-item{display:flex;align-items:center;gap:6px;width:100%;padding:6px 12px 6px 28px;border:none;background:transparent;color:var(--text-secondary);font-family:var(--font-mono);font-size:12px;cursor:pointer;border-radius:var(--radius-sm);transition:all var(--transition-fast);text-align:left}.agent-item:hover{background:var(--bg-hover);color:var(--text-primary)}.agent-item--selected{background:var(--bg-active);color:var(--accent-cyan)}.agent-item__dot{font-size:8px;flex-shrink:0}.agent-item__name{flex:1;min-width:0}.agent-item__type{flex-shrink:0}.panel-title{font-size:16px;font-weight:600;color:var(--text-primary);margin-bottom:16px}.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;gap:12px;text-align:center}.empty-state__icon{font-size:48px}.empty-state__title{font-size:16px;font-weight:600;color:var(--text-secondary)}.empty-state__text{max-width:400px;line-height:1.6}.overview-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:12px}.overview-card{background:var(--bg-card);border:1px solid var(--border-primary);border-left:3px solid var(--text-muted);border-radius:var(--radius-md);padding:16px;transition:all var(--transition-fast)}.overview-card:hover{border-color:var(--accent-cyan);border-left-color:inherit;background:var(--bg-hover)}.overview-card--active{border-left-color:var(--accent-green)}.overview-card--idle{border-left-color:var(--accent-yellow)}.overview-card--done{border-left-color:var(--accent-cyan)}.overview-card--inactive{border-left-color:var(--text-muted)}.overview-card__header{display:flex;justify-content:space-between;align-items:center;margin-bottom:4px}.overview-card__meta{margin-bottom:12px}.overview-card__progress{display:flex;align-items:center;gap:8px;margin-bottom:8px}.progress-bar{flex:1;height:4px;background:var(--border-primary);border-radius:2px;overflow:hidden}.progress-bar__fill{height:100%;background:var(--accent-green);border-radius:2px;transition:width .3s ease}.overview-card__footer{text-align:right}.pulse-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--accent-green);animation:pulse 2s ease-in-out infinite;flex-shrink:0}@keyframes pulse{0%,to{opacity:1;box-shadow:0 0 #0f86}50%{opacity:.7;box-shadow:0 0 0 6px #0f80}}.task-board__columns{display:flex;gap:12px}.task-board__column{flex:1;min-width:0}.task-board__column-header{display:flex;justify-content:space-between;align-items:center;padding:8px 12px;margin-bottom:8px;border-bottom:2px solid var(--border-primary);font-weight:600;font-size:12px;color:var(--text-secondary)}.task-card{background:var(--bg-card);border:1px solid var(--border-primary);border-radius:var(--radius-md);padding:12px;margin-bottom:8px;border-left:3px solid var(--text-muted)}.task-card--in-progress{border-left-color:var(--accent-yellow)}.task-card--completed{border-left-color:var(--accent-green)}.task-card--pending{border-left-color:var(--text-muted)}.task-card__subject{font-size:12px;margin-bottom:4px;color:var(--text-primary)}.task-card__desc{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin-bottom:8px;line-height:1.4}.task-card__meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.task-card__owner{display:inline-block;padding:2px 6px;background:#00d4ff26;color:var(--accent-cyan);border-radius:var(--radius-sm);font-size:11px}.task-card__blocked{color:var(--accent-yellow)}.agent-panel{display:flex;flex-direction:column;height:100%}.agent-panel__header{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:12px;padding-bottom:12px;border-bottom:1px solid var(--border-primary)}.agent-panel__header .panel-title{margin-bottom:0}.status-badge{display:inline-block;padding:2px 8px;border-radius:10px;font-size:11px;font-weight:600}.status-badge--active{background:#00ff8826;color:var(--accent-green)}.status-badge--idle{background:#ffd70026;color:var(--accent-yellow)}.status-badge--done{background:#00d4ff26;color:var(--accent-cyan)}.status-badge--unknown{background:#5555554d;color:var(--text-muted)}.agent-panel__tasks{padding:8px 12px;margin-bottom:12px;background:var(--bg-card);border-radius:var(--radius-md);border:1px solid var(--border-primary)}.agent-panel__task-item{display:flex;align-items:center;gap:8px;padding:4px 0;font-size:12px}.task-status-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}.task-status-dot--pending{background:var(--text-muted)}.task-status-dot--in_progress{background:var(--accent-yellow)}.task-status-dot--completed{background:var(--accent-green)}.agent-panel__feed{flex:1;overflow-y:auto;padding:4px}.activity-entry{padding:8px 12px;margin-bottom:4px;border-radius:var(--radius-sm);font-size:12px}.activity-entry--user{border-left:3px solid var(--accent-green);background:#00ff880d}.activity-entry--assistant{color:var(--accent-cyan)}.activity-entry--tool-use{background:#ffd7000d}.activity-entry--tool-result{color:var(--text-muted)}.activity-entry__header{display:flex;justify-content:space-between;align-items:center;margin-bottom:4px}.activity-entry__role{color:var(--text-muted);text-transform:uppercase;letter-spacing:.05em}.activity-entry__body{word-break:break-word}.activity-entry__code{background:var(--bg-secondary);padding:8px;border-radius:var(--radius-sm);overflow-x:auto;font-size:11px;white-space:pre-wrap;margin-top:4px}.activity-entry__tool-use{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}.activity-entry__tool-badge{display:inline-block;padding:2px 6px;background:#ffd70026;color:var(--accent-yellow);border-radius:var(--radius-sm);font-size:11px;white-space:nowrap}.activity-entry__tool-input{font-size:11px;word-break:break-all}.activity-entry__tool-result{font-size:11px;line-height:1.4}