agent-teams-dashboard 0.3.2 → 0.5.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/README.md +27 -0
- package/README.zh-TW.md +27 -0
- package/dist/assets/index-3XAgxULs.js +51 -0
- package/dist/assets/{index-CsK61Xi-.css → index-D1kk2eFO.css} +1 -1
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/server-dist/server/auth.js +17 -0
- package/server-dist/server/index.js +16 -4
- package/server-dist/server/teamsApi.js +8 -11
- package/server-dist/server/teamsCache.js +136 -11
- package/server-dist/server/teamsWatcher.js +5 -5
- package/server-dist/server/wsServer.js +17 -5
- package/dist/assets/index-CEXrdfKk.js +0 -51
package/README.md
CHANGED
|
@@ -100,6 +100,33 @@ npm run server
|
|
|
100
100
|
|
|
101
101
|
The server serves static files from `dist/` and provides API/WebSocket endpoints on the same port (default 3001).
|
|
102
102
|
|
|
103
|
+
### Remote Access
|
|
104
|
+
|
|
105
|
+
When exposing the dashboard remotely (e.g., via Cloudflare Tunnel or Tailscale), set `AUTH_TOKEN` to enable authentication:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
AUTH_TOKEN=your-secret-token npm run server
|
|
109
|
+
|
|
110
|
+
# With CORS restriction
|
|
111
|
+
AUTH_TOKEN=your-secret-token CORS_ORIGIN=https://your-domain.com npm run server
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
When `AUTH_TOKEN` is set:
|
|
115
|
+
- API endpoints require `Authorization: Bearer <token>` header or `?token=<token>` query param
|
|
116
|
+
- WebSocket connections require `?token=<token>` query param
|
|
117
|
+
- Static files (HTML/JS/CSS) are served without auth so the login page can load
|
|
118
|
+
- The browser shows a token input screen; the token is saved in `localStorage`
|
|
119
|
+
|
|
120
|
+
Without `AUTH_TOKEN`, the dashboard works exactly as before — no authentication required.
|
|
121
|
+
|
|
122
|
+
**Environment Variables:**
|
|
123
|
+
|
|
124
|
+
| Variable | Default | Description |
|
|
125
|
+
|----------|---------|-------------|
|
|
126
|
+
| `PORT` | `3001` | Server port |
|
|
127
|
+
| `AUTH_TOKEN` | _(unset)_ | Set to enable authentication |
|
|
128
|
+
| `CORS_ORIGIN` | `*` | CORS `Access-Control-Allow-Origin` value |
|
|
129
|
+
|
|
103
130
|
## Inspiration
|
|
104
131
|
|
|
105
132
|
Inspired by [Claude Code Agent Teams Demo](https://youtu.be/Gmzh9HP7JGM?si=LDUFqPz0syBsWuta)
|
package/README.zh-TW.md
CHANGED
|
@@ -100,6 +100,33 @@ npm run server
|
|
|
100
100
|
|
|
101
101
|
伺服器會從 `dist/` 提供靜態檔案,API 與 WebSocket 在同一個 port(預設 3001,可用 `PORT` 環境變數覆蓋)。
|
|
102
102
|
|
|
103
|
+
### Remote 存取
|
|
104
|
+
|
|
105
|
+
透過 Cloudflare Tunnel 或 Tailscale 等方式開放遠端存取時,設定 `AUTH_TOKEN` 啟用認證:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
AUTH_TOKEN=your-secret-token npm run server
|
|
109
|
+
|
|
110
|
+
# 搭配 CORS 收緊
|
|
111
|
+
AUTH_TOKEN=your-secret-token CORS_ORIGIN=https://your-domain.com npm run server
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
設定 `AUTH_TOKEN` 後:
|
|
115
|
+
- API 端點需帶 `Authorization: Bearer <token>` header 或 `?token=<token>` query param
|
|
116
|
+
- WebSocket 連線需帶 `?token=<token>` query param
|
|
117
|
+
- 靜態檔案(HTML/JS/CSS)不驗證,讓瀏覽器能載入登入頁面
|
|
118
|
+
- 瀏覽器會顯示 token 輸入畫面,token 自動存入 `localStorage`
|
|
119
|
+
|
|
120
|
+
未設定 `AUTH_TOKEN` 時,行為完全不變 — 免認證。
|
|
121
|
+
|
|
122
|
+
**環境變數:**
|
|
123
|
+
|
|
124
|
+
| 變數 | 預設值 | 說明 |
|
|
125
|
+
|------|--------|------|
|
|
126
|
+
| `PORT` | `3001` | 伺服器埠號 |
|
|
127
|
+
| `AUTH_TOKEN` | _(未設定)_ | 設定後啟用認證 |
|
|
128
|
+
| `CORS_ORIGIN` | `*` | CORS `Access-Control-Allow-Origin` 值 |
|
|
129
|
+
|
|
103
130
|
## 靈感來源
|
|
104
131
|
|
|
105
132
|
靈感來自 [Claude Code Agent Teams Demo](https://youtu.be/Gmzh9HP7JGM?si=LDUFqPz0syBsWuta)
|