ai-agent-session-center 2.0.2 → 2.0.3
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 +484 -429
- package/docs/3D/ADAPTATION_GUIDE.md +592 -0
- package/docs/3D/index.html +754 -0
- package/docs/AGENT_TEAM_TASKS.md +716 -0
- package/docs/CYBERDROME_V2_SPEC.md +531 -0
- package/docs/ERROR_185_ANALYSIS.md +263 -0
- package/docs/PLATFORM_FEATURES_PROMPT.md +296 -0
- package/docs/SESSION_DETAIL_FEATURES.md +98 -0
- package/docs/_3d_multimedia_features.md +1080 -0
- package/docs/_frontend_features.md +1057 -0
- package/docs/_server_features.md +1077 -0
- package/docs/session-duplication-fixes.md +271 -0
- package/docs/session-terminal-linkage.md +412 -0
- package/package.json +63 -5
- package/public/apple-touch-icon.svg +21 -0
- package/public/css/dashboard.css +0 -161
- package/public/css/detail-panel.css +25 -0
- package/public/css/layout.css +18 -1
- package/public/css/modals.css +0 -26
- package/public/css/settings.css +0 -150
- package/public/css/terminal.css +34 -0
- package/public/favicon.svg +18 -0
- package/public/index.html +6 -26
- package/public/js/alarmManager.js +0 -21
- package/public/js/app.js +21 -7
- package/public/js/detailPanel.js +63 -64
- package/public/js/historyPanel.js +61 -55
- package/public/js/quickActions.js +132 -48
- package/public/js/sessionCard.js +5 -20
- package/public/js/sessionControls.js +8 -0
- package/public/js/settingsManager.js +0 -142
- package/server/apiRouter.js +60 -15
- package/server/apiRouter.ts +774 -0
- package/server/approvalDetector.ts +94 -0
- package/server/authManager.ts +144 -0
- package/server/autoIdleManager.ts +110 -0
- package/server/config.ts +121 -0
- package/server/constants.ts +150 -0
- package/server/db.ts +475 -0
- package/server/hookInstaller.d.ts +3 -0
- package/server/hookProcessor.ts +108 -0
- package/server/hookRouter.ts +18 -0
- package/server/hookStats.ts +116 -0
- package/server/index.js +15 -1
- package/server/index.ts +230 -0
- package/server/logger.ts +75 -0
- package/server/mqReader.ts +349 -0
- package/server/portManager.ts +55 -0
- package/server/processMonitor.ts +239 -0
- package/server/serverConfig.ts +29 -0
- package/server/sessionMatcher.js +17 -6
- package/server/sessionMatcher.ts +403 -0
- package/server/sessionStore.js +109 -3
- package/server/sessionStore.ts +1145 -0
- package/server/sshManager.js +167 -24
- package/server/sshManager.ts +671 -0
- package/server/teamManager.ts +289 -0
- package/server/wsManager.ts +200 -0
package/README.md
CHANGED
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
# AI Agent Session Center
|
|
2
2
|
|
|
3
|
-
A real-time dashboard for monitoring and managing all your AI coding agent sessions. Launch, monitor, and control Claude Code, Codex CLI, and Gemini CLI sessions from a unified interface with embedded SSH terminals, approval alerts, and comprehensive analytics.
|
|
3
|
+
A real-time dashboard for monitoring and managing all your AI coding agent sessions. Launch, monitor, and control Claude Code, Codex CLI, and Gemini CLI sessions from a unified interface with an immersive 3D Cyberdrome visualization, embedded SSH terminals, approval alerts, team/subagent tracking, and comprehensive analytics.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/ai-agent-session-center)
|
|
6
6
|
[](https://nodejs.org)
|
|
7
7
|
[](./LICENSE)
|
|
8
8
|
|
|
9
|
+

|
|
10
|
+
|
|
9
11
|
---
|
|
10
12
|
|
|
11
13
|
## Quick Start
|
|
12
14
|
|
|
13
|
-
### Using npx (Recommended
|
|
15
|
+
### Using npx (Recommended)
|
|
14
16
|
|
|
15
17
|
```bash
|
|
16
18
|
npx ai-agent-session-center
|
|
17
19
|
```
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
The dashboard starts at **http://localhost:3333** and automatically configures hooks.
|
|
20
22
|
|
|
21
23
|
### Global Install
|
|
22
24
|
|
|
@@ -31,7 +33,9 @@ ai-agent-session-center
|
|
|
31
33
|
git clone https://github.com/coding-by-feng/ai-agent-session-center.git
|
|
32
34
|
cd ai-agent-session-center
|
|
33
35
|
npm install
|
|
34
|
-
npm
|
|
36
|
+
npm run dev # React + Vite dev server
|
|
37
|
+
# or
|
|
38
|
+
npm start # Production server (serves built frontend)
|
|
35
39
|
```
|
|
36
40
|
|
|
37
41
|
### CLI Options
|
|
@@ -43,573 +47,624 @@ Options:
|
|
|
43
47
|
--port <number> Server port (default: 3333)
|
|
44
48
|
--no-open Don't auto-open browser
|
|
45
49
|
--debug Enable verbose logging
|
|
46
|
-
|
|
47
|
-
Examples:
|
|
48
|
-
npx ai-agent-session-center --port 8080
|
|
49
|
-
ai-agent-session-center --no-open --debug
|
|
50
|
+
--setup Re-run the interactive setup wizard
|
|
50
51
|
```
|
|
51
52
|
|
|
52
|
-
All active AI agent sessions appear automatically as animated character cards with live status updates.
|
|
53
|
-
|
|
54
53
|
---
|
|
55
54
|
|
|
56
|
-
##
|
|
57
|
-
|
|
58
|
-
### Starting Your First Session
|
|
59
|
-
|
|
60
|
-
1. **Launch the dashboard:**
|
|
61
|
-
```bash
|
|
62
|
-
npm start
|
|
63
|
-
```
|
|
64
|
-
Opens at http://localhost:3333
|
|
65
|
-
|
|
66
|
-
2. **Create a session:**
|
|
67
|
-
- Click **+ NEW SESSION** button (or press `T`)
|
|
68
|
-
- Fill in the launch form:
|
|
69
|
-
- **Connection:** Choose "Local" for localhost or "SSH" for remote
|
|
70
|
-
- **Label:** Tag for organization (e.g., "frontend", "api", "debug")
|
|
71
|
-
- **Title:** Optional custom display name
|
|
72
|
-
- **CLI:** Select Claude Code, Codex CLI, Gemini CLI, or custom command
|
|
73
|
-
- **Directory:** Working directory for the session
|
|
74
|
-
- **API Key:** Optional per-session override
|
|
75
|
-
|
|
76
|
-
3. **Watch it appear:**
|
|
77
|
-
- A new animated character card appears in the dashboard
|
|
78
|
-
- The character animates based on what Claude is doing
|
|
79
|
-
- Status updates in real-time via WebSocket
|
|
55
|
+
## Tech Stack
|
|
80
56
|
|
|
81
|
-
|
|
57
|
+
| Component | Technology |
|
|
58
|
+
|-----------|-----------|
|
|
59
|
+
| Backend | Node.js 18+ (ESM) + Express 5 + ws 8 |
|
|
60
|
+
| Frontend | React 19 + TypeScript + Vite |
|
|
61
|
+
| 3D Visualization | Three.js + React Three Fiber + drei |
|
|
62
|
+
| State Management | Zustand + React Query |
|
|
63
|
+
| Terminal | xterm.js + node-pty |
|
|
64
|
+
| Database | SQLite (better-sqlite3, WAL mode) + IndexedDB (browser) |
|
|
65
|
+
| Forms | React Hook Form + Zod validation |
|
|
66
|
+
| Charts | Recharts |
|
|
67
|
+
| Drag & Drop | @dnd-kit |
|
|
68
|
+
| Hooks | Bash script (file-based MQ primary, HTTP fallback) |
|
|
69
|
+
| Testing | Vitest (407+ tests) + Playwright (E2E) |
|
|
70
|
+
| Port | 3333 (configurable) |
|
|
82
71
|
|
|
83
|
-
|
|
84
|
-
- Click any session card
|
|
85
|
-
- Click the **Terminal** tab in the detail panel
|
|
72
|
+
---
|
|
86
73
|
|
|
87
|
-
|
|
88
|
-
- Type any command and press Enter
|
|
89
|
-
- Commands run in Claude's shell environment
|
|
90
|
-
- See output in real-time
|
|
74
|
+
## Core Features
|
|
91
75
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
76
|
+
### 3D Cyberdrome Visualization
|
|
77
|
+
|
|
78
|
+
The main dashboard view is a fully interactive 3D office environment rendered with React Three Fiber. Each active session is represented by an animated 3D robot character that navigates the scene in real time.
|
|
79
|
+
|
|
80
|
+
- **Dynamic room system** -- rooms are created and destroyed as sessions come and go, laid out in a 4-column grid with 12x12 unit rooms and corridors
|
|
81
|
+
- **8 desks per room** with monitors, keyboards, and chairs -- robots sit at desks when working
|
|
82
|
+
- **6 robot model variants**: Standard, Mech, Drone, Spider, Orb, Tank
|
|
83
|
+
- **16-color neon palette** for robot accents and wireframe overlays
|
|
84
|
+
- **CLI source badges** on each robot's chest (C = Claude, G = Gemini, X = Codex, O = OpenClaw)
|
|
85
|
+
- **Status-driven animations**: idle bob, thinking head-tilt, working charge effect, alert visor flash, and more
|
|
86
|
+
- **Tool-specific working animations**: reading (head scan), writing (rapid arm typing), bash (arm extended), task (both arms raised), web (antenna glow)
|
|
87
|
+
- **Cross-room pathfinding** with door waypoints and wall collision avoidance
|
|
88
|
+
- **Casual areas**: Coffee Lounge (6 tables, counter, coffee machine) and Gym (bench press, treadmill, rowing machine, bike, pull-up bar, leg press, punching bag, cable machine, kettlebells, dumbbells)
|
|
89
|
+
- **Status particles** burst on state transitions (confetti, rings, rising sparks)
|
|
90
|
+
- **Subagent connection beams** -- animated dashed laser-lines between parent and child sessions
|
|
91
|
+
- **Floating dialogue bubbles** showing current prompt, tool activity, or approval status
|
|
92
|
+
- **Robot name labels** with status dot and alert banners (pure WebGL billboards)
|
|
93
|
+
- **Scene environment**: circuit traces on the floor, rising data particles, grid overlays, star field, room sconce lighting
|
|
94
|
+
- **Camera fly-to** on robot selection with smooth lerp animation
|
|
95
|
+
- **Map controls overlay**: zoom in/out, top-down view, reset
|
|
96
|
+
- **Robot list sidebar**: sortable agent list with status indicators
|
|
97
|
+
- **Position persistence** -- robot positions saved to sessionStorage across page reloads
|
|
98
|
+
|
|
99
|
+
### 9 Scene Themes
|
|
100
|
+
|
|
101
|
+
Every visual element in both the 3D scene and the UI respects the active theme via 35+ color properties:
|
|
96
102
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
103
|
+
| Dark | Light |
|
|
104
|
+
|------|-------|
|
|
105
|
+
| Command Center (default) | Light |
|
|
106
|
+
| Cyberpunk | Warm |
|
|
107
|
+
| Dracula | Blonde |
|
|
108
|
+
| Nord | |
|
|
109
|
+
| Monokai | |
|
|
110
|
+
| Solarized | |
|
|
100
111
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
When Claude needs approval for a tool call:
|
|
112
|
+
---
|
|
104
113
|
|
|
105
|
-
|
|
106
|
-
- Card border turns **screaming yellow**
|
|
107
|
-
- Character **shakes** with floating **"!"**
|
|
108
|
-
- **3-burst alarm** plays (repeats every 10s)
|
|
109
|
-
- Banner says "NEEDS YOUR APPROVAL"
|
|
114
|
+
### Session Management
|
|
110
115
|
|
|
111
|
-
|
|
112
|
-
- Click the card to open detail panel
|
|
113
|
-
- Or switch to your terminal where Claude is running
|
|
114
|
-
- Approve/deny the tool call in the terminal
|
|
115
|
-
- Card returns to normal once resolved
|
|
116
|
+
Every active AI coding session appears as an animated robot. At a glance you can see:
|
|
116
117
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
118
|
+
- **What each session is doing** -- idle, prompting, working, waiting, approval needed, or input needed
|
|
119
|
+
- **Project name and working directory**
|
|
120
|
+
- **Live duration timer**
|
|
121
|
+
- **Prompt count and tool call count** updating in real time
|
|
122
|
+
- **Activity feed** at the bottom showing events as they happen
|
|
121
123
|
|
|
122
|
-
|
|
124
|
+
#### Status Colors
|
|
123
125
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
126
|
+
| Status | What it means | Visual |
|
|
127
|
+
|--------|---------------|--------|
|
|
128
|
+
| **Idle** | No activity | Green, robot seeks coffee lounge |
|
|
129
|
+
| **Prompting** | You just sent a prompt | Cyan, robot walks to desk |
|
|
130
|
+
| **Working** | Claude is calling tools | Orange, charging effect, sits at desk |
|
|
131
|
+
| **Waiting** | Claude finished, your turn | Cyan, robot goes to gym |
|
|
132
|
+
| **Approval** | Tool blocked, needs yes/no | Yellow, visor flash, alarm |
|
|
133
|
+
| **Input** | Waiting for your answer | Purple, arm raised |
|
|
134
|
+
| **Ended** | Session closed | Red, offline animation |
|
|
135
|
+
| **Connecting** | SSH terminal connecting | Gray, boot animation |
|
|
127
136
|
|
|
128
|
-
|
|
129
|
-
- Drag sessions onto group headers
|
|
130
|
-
- Or assign from detail panel → **Group** dropdown
|
|
131
|
-
- Groups persist in localStorage
|
|
132
|
-
|
|
133
|
-
3. **Pin important sessions:**
|
|
134
|
-
- Click the **★** icon in the detail panel
|
|
135
|
-
- Pinned sessions stay at the top
|
|
136
|
-
|
|
137
|
-
4. **Archive completed work:**
|
|
138
|
-
- Press `A` with session selected
|
|
139
|
-
- Or click **ARCHIVE** in detail panel
|
|
140
|
-
- View archived sessions in **History** tab
|
|
141
|
-
|
|
142
|
-
### Searching Session History
|
|
143
|
-
|
|
144
|
-
1. **Open History tab:**
|
|
145
|
-
- Click **History** in the navigation bar
|
|
146
|
-
|
|
147
|
-
2. **Full-text search:**
|
|
148
|
-
- Type in the search box (or press `/` anywhere)
|
|
149
|
-
- Searches prompts, responses, and tool names
|
|
150
|
-
- Powered by SQLite FTS5 for fast results
|
|
151
|
-
|
|
152
|
-
3. **Filter results:**
|
|
153
|
-
- Use dropdowns for project, status, date range
|
|
154
|
-
- Sort by date, duration, prompt count, or tool calls
|
|
155
|
-
- Paginated (50 per page)
|
|
156
|
-
|
|
157
|
-
4. **View a historical session:**
|
|
158
|
-
- Click any row to open full details
|
|
159
|
-
- All conversation history, tools, and events preserved
|
|
160
|
-
|
|
161
|
-
### Analyzing Usage Patterns
|
|
162
|
-
|
|
163
|
-
1. **Open Analytics tab:**
|
|
164
|
-
- Click **Analytics** in the navigation bar
|
|
165
|
-
|
|
166
|
-
2. **Tool Usage breakdown:**
|
|
167
|
-
- See which tools Claude uses most
|
|
168
|
-
- Bar chart with percentages
|
|
169
|
-
- Filter by date range
|
|
170
|
-
|
|
171
|
-
3. **Duration Trends:**
|
|
172
|
-
- How long your sessions run over time
|
|
173
|
-
- Choose granularity: hour/day/week/month
|
|
174
|
-
- Line chart visualization
|
|
137
|
+
#### Auto-Idle Timeouts
|
|
175
138
|
|
|
176
|
-
|
|
177
|
-
- See when you use Claude most
|
|
178
|
-
- Hour-by-day grid
|
|
179
|
-
- Darker = more active
|
|
139
|
+
Sessions automatically transition to prevent stale states:
|
|
180
140
|
|
|
181
|
-
|
|
141
|
+
- Prompting -> Waiting (30s)
|
|
142
|
+
- Waiting -> Idle (2 min)
|
|
143
|
+
- Working -> Idle (3 min)
|
|
144
|
+
- Approval/Input -> Idle (10 min safety net)
|
|
182
145
|
|
|
183
|
-
|
|
184
|
-
- Click the gear icon or press `S`
|
|
146
|
+
---
|
|
185
147
|
|
|
186
|
-
|
|
187
|
-
- **Appearance** section → **Theme** dropdown
|
|
188
|
-
- 9 themes available (6 dark, 3 light)
|
|
189
|
-
- Changes apply instantly
|
|
148
|
+
### Launch Sessions
|
|
190
149
|
|
|
191
|
-
|
|
192
|
-
- **Card Size** dropdown: small/compact/normal/large
|
|
193
|
-
- Useful when monitoring many sessions
|
|
150
|
+
**Three ways to start:**
|
|
194
151
|
|
|
195
|
-
|
|
196
|
-
-
|
|
197
|
-
-
|
|
198
|
-
-
|
|
152
|
+
1. **+ NEW SESSION** -- Full SSH terminal with configuration:
|
|
153
|
+
- Local or remote connections (native SSH, uses your `~/.ssh/config` and agent)
|
|
154
|
+
- Session labels for organization (ONEOFF, HEAVY, IMPORTANT, or custom)
|
|
155
|
+
- Choose CLI: Claude Code, Codex CLI, Gemini CLI, or custom command
|
|
156
|
+
- tmux integration: attach to existing sessions or wrap new ones
|
|
157
|
+
- Per-session terminal themes, API keys, titles
|
|
158
|
+
- Working directory history (last 20, MRU)
|
|
199
159
|
|
|
200
|
-
|
|
201
|
-
- **Animation Intensity:** 0-100% (how dramatic)
|
|
202
|
-
- **Animation Speed:** 0.5x-3x (how fast)
|
|
203
|
-
- **Scanline Effect:** CRT-style overlay toggle
|
|
160
|
+
2. **QUICK SESSION** -- Launch with last config, just pick a label
|
|
204
161
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
-
|
|
209
|
-
- Adjust master volume (0-100%)
|
|
162
|
+
3. **Preset Labels** -- Quick buttons for common workflows:
|
|
163
|
+
- **ONEOFF** -- One-off task with completion review reminder
|
|
164
|
+
- **HEAVY** -- High-priority session (auto-pinned to top)
|
|
165
|
+
- **IMPORTANT** -- Alert on completion
|
|
210
166
|
|
|
211
|
-
|
|
212
|
-
- 19 actions organized by category
|
|
213
|
-
- 16 available tones (chirp, ping, alarm, etc.)
|
|
214
|
-
- Click **Preview** to hear each tone
|
|
215
|
-
- Set any action to "none" to mute it
|
|
167
|
+
---
|
|
216
168
|
|
|
217
|
-
|
|
218
|
-
- `approvalNeeded` → `urgentAlarm` (default screamer)
|
|
219
|
-
- `toolWrite` → `blip` (subtle edit notification)
|
|
220
|
-
- `sessionEnd` → `cascade` (satisfying completion)
|
|
169
|
+
### Embedded Terminals
|
|
221
170
|
|
|
222
|
-
|
|
171
|
+
Each session gets a **full xterm.js terminal** in the detail panel:
|
|
223
172
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
173
|
+
- **Direct command execution** in the same shell Claude is using
|
|
174
|
+
- **Prompt queue** -- compose and stage prompts, send with Ctrl+Enter
|
|
175
|
+
- **Auto-reconnect** on dashboard refresh
|
|
176
|
+
- **Fullscreen mode** for focused work
|
|
177
|
+
- **8 terminal themes** + auto (matches dashboard theme)
|
|
178
|
+
- **tmux support** -- attach to existing sessions or create new ones
|
|
179
|
+
- **Team terminal view** -- split-view of all team member terminals
|
|
180
|
+
- **Output ring buffer** -- 128KB replay for new connections
|
|
227
181
|
|
|
228
|
-
|
|
229
|
-
- **sweat** — droplets fall from character
|
|
230
|
-
- **shake** — vibration for urgency
|
|
231
|
-
- **sparkle** — celebratory stars
|
|
232
|
-
- **fade** — ghost-like transparency
|
|
233
|
-
- **breathe** — subtle pulse
|
|
182
|
+
---
|
|
234
183
|
|
|
235
|
-
|
|
236
|
-
- `toolWrite` → sweat drops
|
|
237
|
-
- `approvalNeeded` → shake
|
|
238
|
-
- `sessionEnd` → fade
|
|
239
|
-
- `taskComplete` → sparkle
|
|
184
|
+
### Approval Alerts
|
|
240
185
|
|
|
241
|
-
|
|
186
|
+
When Claude needs your approval for a tool call:
|
|
242
187
|
|
|
243
|
-
|
|
188
|
+
- Card turns **screaming yellow** with "AWAITING APPROVAL" banner
|
|
189
|
+
- Robot **visor flashes** with escalating urgency (faster after 15s, lateral shake after 30s)
|
|
190
|
+
- **3-burst alarm** plays and **repeats every 10 seconds** until you respond
|
|
191
|
+
- No false alarms -- auto-approved tools resolve instantly
|
|
192
|
+
- **`hasChildProcesses` check** for Bash/Task tools prevents false positives during long-running commands
|
|
193
|
+
- **PermissionRequest** hook event provides a reliable direct signal (medium+ density)
|
|
244
194
|
|
|
245
|
-
|
|
246
|
-
- Dashboard detects parent/child relationships
|
|
247
|
-
- Team badge appears on parent session card
|
|
248
|
-
|
|
249
|
-
2. **View team members:**
|
|
250
|
-
- Click the **Team** badge
|
|
251
|
-
- Modal shows all team members
|
|
252
|
-
- Navigate between team members
|
|
253
|
-
|
|
254
|
-
3. **Monitoring teams:**
|
|
255
|
-
- All team members appear as separate cards
|
|
256
|
-
- Grouped together visually
|
|
257
|
-
- Each has independent status/terminal
|
|
258
|
-
|
|
259
|
-
### Advanced Workflows
|
|
260
|
-
|
|
261
|
-
**Workflow 1: Quick iteration cycles**
|
|
262
|
-
1. Launch with **⚡ QUICK** button
|
|
263
|
-
2. Terminal tab → queue multiple prompts
|
|
264
|
-
3. Send all at once with batch submit
|
|
265
|
-
4. Monitor progress via character animations
|
|
266
|
-
|
|
267
|
-
**Workflow 2: Remote development**
|
|
268
|
-
1. **+ NEW SESSION** → SSH connection
|
|
269
|
-
2. Enter hostname from your `~/.ssh/config`
|
|
270
|
-
3. Choose working directory on remote
|
|
271
|
-
4. Terminal uses native SSH (respects your agent)
|
|
272
|
-
|
|
273
|
-
**Workflow 3: Long-running tasks**
|
|
274
|
-
1. Launch session with **⚠ IMPORTANT** label
|
|
275
|
-
2. Set duration alert in detail panel
|
|
276
|
-
3. Let it run in background
|
|
277
|
-
4. Get notified when threshold exceeded
|
|
278
|
-
|
|
279
|
-
**Workflow 4: Multi-project juggling**
|
|
280
|
-
1. Create groups: "Frontend", "Backend", "DevOps"
|
|
281
|
-
2. Launch sessions with appropriate labels
|
|
282
|
-
3. Drag sessions into groups
|
|
283
|
-
4. Minimize inactive groups
|
|
284
|
-
|
|
285
|
-
**Workflow 5: Session review**
|
|
286
|
-
1. Archive completed sessions
|
|
287
|
-
2. **History** tab → search for specific work
|
|
288
|
-
3. **Export** button → download full transcript
|
|
289
|
-
4. **Summarize** → generate AI summary
|
|
195
|
+
**Input Detection:** Tools requiring your answer (`AskUserQuestion`, `EnterPlanMode`) trigger a distinct purple "NEEDS INPUT" state.
|
|
290
196
|
|
|
291
197
|
---
|
|
292
198
|
|
|
293
|
-
|
|
199
|
+
### Session Detail Panel
|
|
294
200
|
|
|
295
|
-
|
|
201
|
+
Click any robot or session card to open a slide-in panel with:
|
|
296
202
|
|
|
297
|
-
|
|
203
|
+
| Tab | Content |
|
|
204
|
+
|-----|---------|
|
|
205
|
+
| **Terminal** | xterm.js terminal with WebSocket relay, reconnect button |
|
|
206
|
+
| **Prompts** | Full prompt history, numbered and timestamped, with COPY buttons. Previous sessions shown as collapsible accordions for resumed sessions. |
|
|
207
|
+
| **Activity** | Interleaved tool calls, events, and response excerpts (newest first) |
|
|
208
|
+
| **Notes** | Per-session persistent notes with timestamps |
|
|
209
|
+
| **Summary** | AI-generated session summaries with 5 built-in templates |
|
|
210
|
+
| **Queue** | Prompt queue management -- compose, reorder, send, move between sessions |
|
|
298
211
|
|
|
299
|
-
|
|
300
|
-
- Local or remote connections (native SSH, uses your ~/.ssh/config and agent)
|
|
301
|
-
- Session labels for organization (e.g., "frontend", "api", "debug")
|
|
302
|
-
- Custom titles for disambiguation
|
|
303
|
-
- Choose CLI: Claude Code, Codex CLI, Gemini CLI, or custom command
|
|
304
|
-
- tmux integration: attach to existing sessions or wrap new ones
|
|
305
|
-
- Per-session terminal themes
|
|
306
|
-
- API keys (optional per-session override of global settings)
|
|
212
|
+
#### Session Controls
|
|
307
213
|
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
214
|
+
| Action | Description |
|
|
215
|
+
|--------|------------|
|
|
216
|
+
| **Kill** | SIGTERM -> SIGKILL with confirmation modal |
|
|
217
|
+
| **Archive** | Move to history, keep in IndexedDB |
|
|
218
|
+
| **Resume** | Reconnect ended SSH session (`claude --resume`) |
|
|
219
|
+
| **Summarize** | AI summary using configurable prompt templates |
|
|
220
|
+
| **Notes** | Attach persistent notes |
|
|
221
|
+
| **Alert** | Duration threshold notifications |
|
|
222
|
+
| **Labels** | ONEOFF / HEAVY / IMPORTANT with custom label history |
|
|
223
|
+
| **Title** | Inline-editable custom titles |
|
|
311
224
|
|
|
312
|
-
|
|
313
|
-
- **ONEOFF** — One-off task with completion review reminder
|
|
314
|
-
- **★ HEAVY** — High-priority session (auto-pinned to top)
|
|
315
|
-
- **⚠ IMPORTANT** — Alert on completion
|
|
225
|
+
#### Summary Templates (5 built-in)
|
|
316
226
|
|
|
317
|
-
|
|
227
|
+
- Detailed Technical Summary (default)
|
|
228
|
+
- Quick Bullet Points
|
|
229
|
+
- Changelog Entry
|
|
230
|
+
- Handoff Notes
|
|
231
|
+
- PR Description
|
|
318
232
|
|
|
319
|
-
|
|
233
|
+
Custom templates can be created, edited, and saved.
|
|
320
234
|
|
|
321
|
-
|
|
235
|
+
---
|
|
322
236
|
|
|
323
|
-
|
|
237
|
+
### Team & Subagent Tracking
|
|
324
238
|
|
|
325
|
-
|
|
326
|
-
- **Prompt queue** — Add prompts to a queue, send them with Ctrl+Enter
|
|
327
|
-
- **Session persistence** — Reconnects automatically if dashboard refreshes
|
|
328
|
-
- **Fullscreen mode** — F11 to go fullscreen for focused work
|
|
329
|
-
- **Terminal themes** — 7 built-in themes (or match dashboard theme)
|
|
330
|
-
- **tmux support** — Attach to existing tmux sessions or create new ones
|
|
239
|
+
When Claude spawns agent teams:
|
|
331
240
|
|
|
332
|
-
**
|
|
241
|
+
- **Auto-detection** via `CLAUDE_CODE_PARENT_SESSION_ID` env var or path-based matching
|
|
242
|
+
- **Team badge** on parent session with member list
|
|
243
|
+
- **Animated connection beams** between parent and child robots in the 3D scene
|
|
244
|
+
- **Team config reader** loads `~/.claude/teams/{name}/config.json` for member roles and colors
|
|
245
|
+
- **Team terminal view** with split panes for all members
|
|
246
|
+
- **Auto-cleanup** when all team members end
|
|
333
247
|
|
|
334
248
|
---
|
|
335
249
|
|
|
336
|
-
###
|
|
250
|
+
### Prompt Queue
|
|
337
251
|
|
|
338
|
-
|
|
252
|
+
Stage and manage prompts for any session:
|
|
339
253
|
|
|
340
|
-
-
|
|
341
|
-
-
|
|
342
|
-
- **
|
|
343
|
-
-
|
|
254
|
+
- **Compose** prompts in the Queue tab textarea
|
|
255
|
+
- **Reorder** via drag-and-drop
|
|
256
|
+
- **Send** individual items or auto-send on terminal focus
|
|
257
|
+
- **Move** prompts between sessions (enter move mode, click target)
|
|
258
|
+
- **Drag to terminal** -- drop queue items directly onto the terminal
|
|
259
|
+
- **Ctrl+Enter** sends the first queued prompt
|
|
260
|
+
- **Global queue view** (Queue route) shows all queued prompts across sessions with export
|
|
344
261
|
|
|
345
|
-
|
|
262
|
+
---
|
|
346
263
|
|
|
347
|
-
|
|
264
|
+
### Sound System
|
|
348
265
|
|
|
349
|
-
|
|
266
|
+
16 synthesized tones (Web Audio API, no audio files) mapped to 20 configurable actions:
|
|
350
267
|
|
|
351
|
-
|
|
268
|
+
**Tones:** chirp, ping, chime, ding, blip, swoosh, click, beep, warble, buzz, cascade, fanfare, alarm, thud, urgentAlarm, none
|
|
352
269
|
|
|
353
|
-
|
|
270
|
+
**Per-CLI sound profiles** with independent volume and action mappings for Claude, Gemini, Codex, and OpenClaw.
|
|
354
271
|
|
|
355
|
-
|
|
356
|
-
- **Project name and working directory** for each session
|
|
357
|
-
- **Live duration timer** counting up since session start
|
|
358
|
-
- **Prompt count and tool call count** updating in real time
|
|
359
|
-
- **Activity feed** at the bottom showing events as they happen
|
|
272
|
+
**6 ambient presets** (procedurally generated): Off, Rain, Lo-Fi, Server Room, Deep Space, Coffee Shop.
|
|
360
273
|
|
|
361
|
-
|
|
274
|
+
**Label completion alerts**: ONEOFF triggers alarm+shake, HEAVY triggers urgentAlarm+electric frame, IMPORTANT triggers fanfare+liquid frame.
|
|
362
275
|
|
|
363
|
-
|
|
364
|
-
|--------|---------------|--------|
|
|
365
|
-
| **Idle** | No activity | Green border, calm character |
|
|
366
|
-
| **Prompting** | You just sent a prompt | Cyan pulse, walking animation |
|
|
367
|
-
| **Working** | Claude is calling tools | Orange pulse, running animation |
|
|
368
|
-
| **Waiting** | Claude finished, your turn | Soft blue, gentle pulse |
|
|
369
|
-
| **Approval** | Tool blocked, needs your yes/no | Yellow screaming, alarm sound |
|
|
370
|
-
| **Input** | Waiting for your answer | Purple glow, chime sound |
|
|
371
|
-
| **Ended** | Session closed | Red, faded, auto-removed after 60s |
|
|
276
|
+
---
|
|
372
277
|
|
|
373
|
-
###
|
|
278
|
+
### Analytics
|
|
374
279
|
|
|
375
|
-
|
|
280
|
+
The **Analytics** route shows usage patterns:
|
|
376
281
|
|
|
377
|
-
-
|
|
378
|
-
-
|
|
379
|
-
-
|
|
380
|
-
-
|
|
282
|
+
- **Summary stats** -- total sessions, prompts, tool calls, avg duration, most-used tool, busiest project
|
|
283
|
+
- **Tool usage** -- horizontal bar chart with counts and percentages (top 15)
|
|
284
|
+
- **Active projects** -- ranked by session count with last activity date
|
|
285
|
+
- **Daily heatmap** -- 7x24 grid showing when you use AI agents most
|
|
381
286
|
|
|
382
287
|
---
|
|
383
288
|
|
|
384
|
-
|
|
289
|
+
### History & Search
|
|
385
290
|
|
|
386
|
-
|
|
291
|
+
The **History** route provides:
|
|
387
292
|
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
293
|
+
- **Full-text search** across prompts, responses, and tool names (powered by SQLite)
|
|
294
|
+
- **Filter** by project, status, or date range
|
|
295
|
+
- **Sort** by date, duration, prompt count, or tool calls
|
|
296
|
+
- **Pagination** (50 per page)
|
|
297
|
+
- Click any row to open the full detail panel with conversation history
|
|
391
298
|
|
|
392
299
|
---
|
|
393
300
|
|
|
394
|
-
|
|
301
|
+
### Timeline View
|
|
302
|
+
|
|
303
|
+
Visual timeline showing session activity over time:
|
|
395
304
|
|
|
396
|
-
|
|
305
|
+
- **Grouped bar chart** with sessions (cyan), prompts (green), and tool calls (orange)
|
|
306
|
+
- **Granularity**: hour / day / week / month
|
|
307
|
+
- **Filter** by project and date range
|
|
397
308
|
|
|
398
|
-
|
|
399
|
-
- **Tool Log** — every tool call with input summaries and timestamps
|
|
400
|
-
- **Events** — raw session event stream
|
|
401
|
-
- **Notes** — attach persistent notes to any session
|
|
402
|
-
- **Summary** — AI-generated session summaries (uses prompt templates you can customize)
|
|
309
|
+
---
|
|
403
310
|
|
|
404
|
-
### Session
|
|
311
|
+
### Session Groups
|
|
405
312
|
|
|
406
|
-
|
|
407
|
-
|--------|-------------|
|
|
408
|
-
| **OPEN IN EDITOR** | Jump to the project in your editor |
|
|
409
|
-
| **KILL** | Send SIGTERM to the Claude process (with confirmation) |
|
|
410
|
-
| **ARCHIVE** | Hide from live view, still accessible in history |
|
|
411
|
-
| **SUMMARIZE** | Generate an AI summary using a prompt template |
|
|
412
|
-
| **EXPORT** | Download the full session transcript as JSON |
|
|
413
|
-
| **NOTES** | Add/view persistent notes |
|
|
414
|
-
| **ALERT** | Get notified when a session exceeds a duration threshold |
|
|
313
|
+
Organize sessions into named groups:
|
|
415
314
|
|
|
416
|
-
|
|
315
|
+
- **4 default groups**: Priority, Active, Background, Review
|
|
316
|
+
- **12-column CSS grid layout** with 5 presets (1-col, 2-col, 3-col, 1/3+2/3, 2/3+1/3)
|
|
317
|
+
- **Drag-and-drop** sessions between groups
|
|
318
|
+
- **Resizable** group columns (drag handles)
|
|
319
|
+
- **Collapsible** groups
|
|
320
|
+
- **Auto-assign** new sessions to last-used group
|
|
417
321
|
|
|
418
322
|
---
|
|
419
323
|
|
|
420
|
-
|
|
324
|
+
### Authentication
|
|
325
|
+
|
|
326
|
+
Optional password protection for the dashboard:
|
|
421
327
|
|
|
422
|
-
|
|
328
|
+
- **scrypt-based** password hashing with timing-safe comparison
|
|
329
|
+
- **24-hour tokens** via cookie, Authorization header, or query param
|
|
330
|
+
- **WebSocket authentication** -- unauthenticated connections rejected with code 4001
|
|
331
|
+
- Hooks bypass auth (they must work without login)
|
|
423
332
|
|
|
424
333
|
---
|
|
425
334
|
|
|
426
|
-
##
|
|
335
|
+
## How It Works
|
|
427
336
|
|
|
428
|
-
|
|
337
|
+
```
|
|
338
|
+
AI CLI (Claude / Gemini / Codex)
|
|
339
|
+
|
|
|
340
|
+
Hook Script (bash)
|
|
341
|
+
- Reads stdin JSON
|
|
342
|
+
- Enriches with PID, TTY, terminal env vars, team data
|
|
343
|
+
- Single jq pass (~2-5ms)
|
|
344
|
+
|
|
|
345
|
+
v
|
|
346
|
+
/tmp/claude-session-center/queue.jsonl
|
|
347
|
+
- Atomic POSIX append (~0.1ms)
|
|
348
|
+
- Fallback: HTTP POST to localhost:3333/api/hooks
|
|
349
|
+
|
|
|
350
|
+
v
|
|
351
|
+
Server (Express + WebSocket)
|
|
352
|
+
- mqReader.js: fs.watch() + 10ms debounce
|
|
353
|
+
- hookProcessor.js: validate + process
|
|
354
|
+
- sessionStore.js: state machine + SQLite dual-write
|
|
355
|
+
- wsManager.js: broadcast to all browsers
|
|
356
|
+
|
|
|
357
|
+
v
|
|
358
|
+
React Frontend
|
|
359
|
+
- Zustand stores + React Three Fiber 3D scene
|
|
360
|
+
- IndexedDB for client-side persistence
|
|
361
|
+
```
|
|
429
362
|
|
|
430
|
-
|
|
363
|
+
**End-to-end latency: 3-17ms** (hook fired to browser updated)
|
|
431
364
|
|
|
432
|
-
|
|
365
|
+
All hooks run async with fire-and-forget -- they never slow down your AI CLI.
|
|
433
366
|
|
|
434
|
-
|
|
367
|
+
### Hook Delivery
|
|
435
368
|
|
|
436
|
-
**
|
|
369
|
+
The primary transport is a **file-based message queue** (JSONL). The bash hook script appends enriched JSON to `/tmp/claude-session-center/queue.jsonl` via POSIX atomic append (~0.1ms). The server watches this file with `fs.watch()` and reads from a byte offset (no re-reading). Falls back to HTTP POST when the MQ directory doesn't exist.
|
|
370
|
+
|
|
371
|
+
### Session Matching (5-Priority System)
|
|
372
|
+
|
|
373
|
+
When a hook event arrives with an unknown `session_id`, the matcher links it to the correct terminal session:
|
|
437
374
|
|
|
438
|
-
|
|
375
|
+
| Priority | Strategy | Risk |
|
|
376
|
+
|----------|----------|------|
|
|
377
|
+
| 0 | `pendingResume` + terminal ID / workDir | Low |
|
|
378
|
+
| 1 | `agent_terminal_id` env var | Low |
|
|
379
|
+
| 2 | `tryLinkByWorkDir` | Medium |
|
|
380
|
+
| 3 | Path scan (connecting sessions) | Medium |
|
|
381
|
+
| 4 | PID parent check | High |
|
|
439
382
|
|
|
440
|
-
|
|
441
|
-
|----------|---------|
|
|
442
|
-
| **Session Events** | sessionStart, sessionEnd, promptSubmit, taskComplete |
|
|
443
|
-
| **Tool Calls** | toolRead, toolWrite, toolEdit, toolBash, toolGrep, toolGlob, toolWebFetch, toolTask, toolOther |
|
|
444
|
-
| **System** | approvalNeeded, inputNeeded, alert, kill, archive, subagentStart, subagentStop |
|
|
383
|
+
If no match is found, a display-only card is created with the detected source (VS Code, iTerm, Warp, Ghostty, etc.).
|
|
445
384
|
|
|
446
|
-
|
|
385
|
+
### Terminal Detection
|
|
447
386
|
|
|
448
|
-
|
|
387
|
+
The hook script detects and enriches events with metadata from: **iTerm2**, **Kitty**, **Warp**, **WezTerm**, **Ghostty**, **VS Code**, **JetBrains IDEs**, **Alacritty**, **Hyper**, and **tmux**.
|
|
449
388
|
|
|
450
389
|
---
|
|
451
390
|
|
|
452
|
-
##
|
|
391
|
+
## Multi-CLI Support
|
|
453
392
|
|
|
454
|
-
|
|
393
|
+
| CLI | Hook Script | Config Location | Events |
|
|
394
|
+
|-----|------------|-----------------|--------|
|
|
395
|
+
| Claude Code | dashboard-hook.sh | ~/.claude/settings.json | 14 events (high density) |
|
|
396
|
+
| Gemini CLI | dashboard-hook-gemini.sh | ~/.gemini/settings.json | 7 events |
|
|
397
|
+
| Codex | dashboard-hook-codex.sh | ~/.codex/config.toml | 1 event |
|
|
455
398
|
|
|
456
|
-
|
|
399
|
+
### Hook Density Levels
|
|
457
400
|
|
|
458
|
-
|
|
401
|
+
| Level | Claude Events | Use Case |
|
|
402
|
+
|-------|--------------|----------|
|
|
403
|
+
| high | All 14 | Full monitoring, approval detection |
|
|
404
|
+
| medium | 12 (no TeammateIdle, PreCompact) | Default, good balance |
|
|
405
|
+
| low | 5 (Start, Prompt, Permission, Stop, End) | Minimal overhead |
|
|
459
406
|
|
|
460
407
|
---
|
|
461
408
|
|
|
462
|
-
##
|
|
463
|
-
|
|
464
|
-
| Dark | Light |
|
|
465
|
-
|------|-------|
|
|
466
|
-
| Command Center (default) | Light |
|
|
467
|
-
| Cyberpunk | Warm |
|
|
468
|
-
| Dracula | Blonde |
|
|
469
|
-
| Nord | |
|
|
470
|
-
| Monokai | |
|
|
471
|
-
| Solarized | |
|
|
409
|
+
## Keyboard Shortcuts
|
|
472
410
|
|
|
473
|
-
|
|
411
|
+
| Key | Action |
|
|
412
|
+
|-----|--------|
|
|
413
|
+
| `/` | Focus search bar |
|
|
414
|
+
| `?` | Toggle shortcuts panel |
|
|
415
|
+
| `Esc` | Close panel / modal / send escape to terminal |
|
|
416
|
+
| `S` | Toggle settings |
|
|
417
|
+
| `K` | Kill selected session |
|
|
418
|
+
| `A` | Archive selected session |
|
|
419
|
+
| `T` | Open new session modal |
|
|
420
|
+
| `M` | Toggle global mute |
|
|
421
|
+
| `Ctrl+Enter` | Send first queued prompt to terminal |
|
|
474
422
|
|
|
475
423
|
---
|
|
476
424
|
|
|
477
|
-
##
|
|
425
|
+
## Settings
|
|
478
426
|
|
|
479
|
-
|
|
427
|
+
**Appearance** -- theme, font size, scanline CRT effect, animation intensity and speed sliders, default robot model
|
|
480
428
|
|
|
481
|
-
-
|
|
482
|
-
- Filter by project, status, or date range
|
|
483
|
-
- Sort by date, duration, prompt count, or tool calls
|
|
484
|
-
- Pagination (50 per page)
|
|
429
|
+
**Sound** -- enable/disable, master volume, per-action tone selection, per-CLI sound profiles, ambient presets (rain, lo-fi, server room, deep space, coffee shop)
|
|
485
430
|
|
|
486
|
-
|
|
431
|
+
**Labels** -- per-label sound, movement effect, and frame effect configuration (fire, electric, golden aura, liquid energy, plasma overload)
|
|
487
432
|
|
|
488
|
-
|
|
433
|
+
**Hooks** -- density selector, install/uninstall buttons
|
|
489
434
|
|
|
490
|
-
|
|
435
|
+
**API Keys** -- Anthropic, OpenAI, Gemini key inputs (used for per-session overrides)
|
|
491
436
|
|
|
492
|
-
|
|
437
|
+
**Import/Export** -- export all settings as JSON, import to restore, reset to defaults
|
|
493
438
|
|
|
494
439
|
---
|
|
495
440
|
|
|
496
|
-
##
|
|
441
|
+
## Commands
|
|
497
442
|
|
|
498
|
-
|
|
443
|
+
```bash
|
|
444
|
+
# Development (React + Vite hot reload + server)
|
|
445
|
+
npm run dev
|
|
499
446
|
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
- **Active Projects** — ranked by session count
|
|
503
|
-
- **Daily Heatmap** — hour-by-day grid showing when you use Claude most
|
|
447
|
+
# Build for production
|
|
448
|
+
npm run build
|
|
504
449
|
|
|
505
|
-
|
|
450
|
+
# Start production server
|
|
451
|
+
npm start
|
|
506
452
|
|
|
507
|
-
|
|
453
|
+
# Start without opening browser
|
|
454
|
+
npm run start:no-open
|
|
508
455
|
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
| `/` | Focus search bar |
|
|
512
|
-
| `Esc` | Close panel / modal |
|
|
513
|
-
| `S` | Open settings |
|
|
514
|
-
| `K` | Kill selected session |
|
|
515
|
-
| `A` | Archive selected session |
|
|
516
|
-
| `E` | Export selected session |
|
|
517
|
-
| `N` | Session notes |
|
|
518
|
-
| `?` | Show shortcuts help |
|
|
456
|
+
# Start in debug mode
|
|
457
|
+
npm run debug
|
|
519
458
|
|
|
520
|
-
|
|
459
|
+
# Interactive setup wizard
|
|
460
|
+
npm run setup
|
|
521
461
|
|
|
522
|
-
|
|
462
|
+
# Install hooks
|
|
463
|
+
npm run install-hooks
|
|
464
|
+
|
|
465
|
+
# Uninstall hooks
|
|
466
|
+
npm run uninstall-hooks
|
|
467
|
+
|
|
468
|
+
# Reset everything (remove hooks, clean config, create backup)
|
|
469
|
+
npm run reset
|
|
523
470
|
|
|
524
|
-
|
|
471
|
+
# Run tests (407+ Vitest tests)
|
|
472
|
+
npm test
|
|
525
473
|
|
|
526
|
-
|
|
474
|
+
# Watch mode
|
|
475
|
+
npm run test:watch
|
|
527
476
|
|
|
528
|
-
|
|
477
|
+
# Coverage
|
|
478
|
+
npm run test:coverage
|
|
529
479
|
|
|
530
|
-
|
|
480
|
+
# E2E tests (Playwright)
|
|
481
|
+
npm run test:e2e
|
|
482
|
+
|
|
483
|
+
# Type check
|
|
484
|
+
npm run typecheck
|
|
485
|
+
|
|
486
|
+
# Lint
|
|
487
|
+
npm run lint
|
|
488
|
+
|
|
489
|
+
# Format
|
|
490
|
+
npm run format
|
|
491
|
+
```
|
|
531
492
|
|
|
532
493
|
---
|
|
533
494
|
|
|
534
|
-
##
|
|
495
|
+
## Project Structure
|
|
535
496
|
|
|
536
497
|
```
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
498
|
+
src/ # React 19 + TypeScript frontend
|
|
499
|
+
├── App.tsx # Auth gate, router, layout
|
|
500
|
+
├── routes/
|
|
501
|
+
│ ├── LiveView.tsx # 3D Cyberdrome scene (lazy-loaded)
|
|
502
|
+
│ ├── HistoryView.tsx # Session history with search
|
|
503
|
+
│ ├── TimelineView.tsx # Timeline visualization
|
|
504
|
+
│ ├── AnalyticsView.tsx # Usage analytics
|
|
505
|
+
│ └── QueueView.tsx # Global prompt queue
|
|
506
|
+
├── components/
|
|
507
|
+
│ ├── 3d/ # Three.js / R3F components
|
|
508
|
+
│ │ ├── CyberdromeScene.tsx # Canvas wrapper (zero Zustand inside Canvas)
|
|
509
|
+
│ │ ├── CyberdromeEnvironment.tsx # Walls, desks, floors, lighting, particles
|
|
510
|
+
│ │ ├── SessionRobot.tsx # Per-session robot (memoized, ref-based animation)
|
|
511
|
+
│ │ ├── Robot3DModel.tsx # Robot geometry, materials, animations
|
|
512
|
+
│ │ ├── RobotDialogue.tsx # Floating speech bubbles
|
|
513
|
+
│ │ ├── RobotLabel.tsx # Name tags with status dots
|
|
514
|
+
│ │ ├── RobotListSidebar.tsx # DOM overlay agent list
|
|
515
|
+
│ │ ├── StatusParticles.tsx # Particle bursts on transitions
|
|
516
|
+
│ │ ├── SubagentConnections.tsx # Parent-child laser beams
|
|
517
|
+
│ │ ├── CameraController.tsx # Smooth fly-to animation
|
|
518
|
+
│ │ ├── RoomLabels.tsx # Floor text labels
|
|
519
|
+
│ │ └── SceneOverlay.tsx # Map controls + room badges
|
|
520
|
+
│ ├── session/ # Session detail panel and controls
|
|
521
|
+
│ ├── terminal/ # xterm.js terminal + toolbar
|
|
522
|
+
│ ├── settings/ # Settings panel tabs
|
|
523
|
+
│ ├── modals/ # New session, quick session, shortcuts
|
|
524
|
+
│ ├── layout/ # Header, navbar, activity feed
|
|
525
|
+
│ ├── auth/ # Login screen
|
|
526
|
+
│ └── ui/ # Modal, tabs, search, toast, resize
|
|
527
|
+
├── stores/ # Zustand stores
|
|
528
|
+
│ ├── sessionStore.ts # Sessions, selection, teams
|
|
529
|
+
│ ├── settingsStore.ts # All user preferences
|
|
530
|
+
│ ├── roomStore.ts # Dynamic room management
|
|
531
|
+
│ ├── uiStore.ts # Modals, panels, toasts
|
|
532
|
+
│ ├── wsStore.ts # WebSocket connection state
|
|
533
|
+
│ ├── queueStore.ts # Prompt queue
|
|
534
|
+
│ └── cameraStore.ts # Camera fly-to targets
|
|
535
|
+
├── hooks/ # React hooks
|
|
536
|
+
├── lib/ # Utilities, sound engine, scene config
|
|
537
|
+
└── styles/ # CSS modules
|
|
538
|
+
|
|
539
|
+
server/ # Node.js backend
|
|
540
|
+
├── index.js # Express + WS orchestrator
|
|
541
|
+
├── apiRouter.js # REST API endpoints
|
|
542
|
+
├── hookRouter.js # POST /api/hooks (HTTP fallback)
|
|
543
|
+
├── hookProcessor.js # Hook validation + processing
|
|
544
|
+
├── mqReader.js # File-based JSONL queue reader
|
|
545
|
+
├── sessionStore.js # In-memory state machine (coordinator)
|
|
546
|
+
│ ├── sessionMatcher.js # 5-priority session matching
|
|
547
|
+
│ ├── approvalDetector.js # Tool approval timeout logic
|
|
548
|
+
│ ├── teamManager.js # Team/subagent tracking
|
|
549
|
+
│ ├── processMonitor.js # PID liveness checking
|
|
550
|
+
│ └── autoIdleManager.js # Idle transition timers
|
|
551
|
+
├── wsManager.js # WebSocket broadcast + terminal relay
|
|
552
|
+
├── sshManager.js # SSH/PTY terminal management
|
|
553
|
+
├── db.js # SQLite schema + queries
|
|
554
|
+
├── hookInstaller.js # Auto-install hooks on startup
|
|
555
|
+
├── hookStats.js # Performance statistics
|
|
556
|
+
├── config.js # Tool categories, timeouts
|
|
557
|
+
├── constants.js # Centralized magic strings
|
|
558
|
+
├── serverConfig.js # User config from data/server-config.json
|
|
559
|
+
└── logger.js # Debug-aware logging
|
|
560
|
+
|
|
561
|
+
public/ # Legacy vanilla JS frontend (fallback)
|
|
562
|
+
hooks/ # Hook scripts + installers
|
|
563
|
+
├── dashboard-hook.sh # Main hook (bash)
|
|
564
|
+
├── dashboard-hook.ps1 # Windows PowerShell variant
|
|
565
|
+
├── dashboard-hook-gemini.sh # Gemini CLI adapter
|
|
566
|
+
├── dashboard-hook-codex.sh # Codex CLI adapter
|
|
567
|
+
├── install-hooks.js # CLI installer
|
|
568
|
+
├── setup-wizard.js # Interactive 6-step setup
|
|
569
|
+
└── reset.js # Full reset with backup
|
|
570
|
+
|
|
571
|
+
bin/cli.js # npx/global CLI entry point
|
|
572
|
+
data/server-config.json # User configuration
|
|
542
573
|
```
|
|
543
574
|
|
|
544
|
-
|
|
545
|
-
2. A bash hook script enriches the JSON with terminal metadata (PID, TTY, terminal app, tab ID) and POSTs it to `localhost:3333`
|
|
546
|
-
3. The server processes events, updates the in-memory state machine + SQLite (dual-write)
|
|
547
|
-
4. WebSocket pushes updates to all connected browsers
|
|
548
|
-
5. The dashboard renders everything in real time with CSS animations and Web Audio
|
|
575
|
+
---
|
|
549
576
|
|
|
550
|
-
|
|
577
|
+
## REST API
|
|
578
|
+
|
|
579
|
+
### Sessions
|
|
580
|
+
|
|
581
|
+
| Method | Path | Description |
|
|
582
|
+
|--------|------|-------------|
|
|
583
|
+
| `GET` | `/api/sessions` | List all in-memory sessions |
|
|
584
|
+
| `PUT` | `/api/sessions/:id/title` | Update title |
|
|
585
|
+
| `PUT` | `/api/sessions/:id/label` | Update label |
|
|
586
|
+
| `PUT` | `/api/sessions/:id/accent-color` | Update accent color |
|
|
587
|
+
| `POST` | `/api/sessions/:id/kill` | Kill session (SIGTERM -> SIGKILL) |
|
|
588
|
+
| `POST` | `/api/sessions/:id/resume` | Resume SSH session |
|
|
589
|
+
| `POST` | `/api/sessions/:id/summarize` | AI summarization |
|
|
590
|
+
| `DELETE` | `/api/sessions/:id` | Delete session |
|
|
591
|
+
|
|
592
|
+
### Terminals
|
|
593
|
+
|
|
594
|
+
| Method | Path | Description |
|
|
595
|
+
|--------|------|-------------|
|
|
596
|
+
| `POST` | `/api/terminals` | Create PTY terminal (max 10) |
|
|
597
|
+
| `GET` | `/api/terminals` | List active terminals |
|
|
598
|
+
| `DELETE` | `/api/terminals/:id` | Close terminal |
|
|
599
|
+
|
|
600
|
+
### History & Analytics
|
|
601
|
+
|
|
602
|
+
| Method | Path | Description |
|
|
603
|
+
|--------|------|-------------|
|
|
604
|
+
| `GET` | `/api/db/sessions` | Search/list sessions (paginated) |
|
|
605
|
+
| `GET` | `/api/db/sessions/:id` | Full session detail |
|
|
606
|
+
| `GET` | `/api/db/search` | Full-text search |
|
|
607
|
+
| `GET` | `/api/db/projects` | Distinct projects |
|
|
608
|
+
| `GET` | `/api/db/analytics/summary` | Summary stats |
|
|
609
|
+
| `GET` | `/api/db/analytics/tools` | Tool breakdown |
|
|
610
|
+
| `GET` | `/api/db/analytics/projects` | Active projects |
|
|
611
|
+
| `GET` | `/api/db/analytics/heatmap` | Activity heatmap |
|
|
612
|
+
|
|
613
|
+
### Other
|
|
614
|
+
|
|
615
|
+
| Method | Path | Description |
|
|
616
|
+
|--------|------|-------------|
|
|
617
|
+
| `GET` | `/api/auth/status` | Auth status |
|
|
618
|
+
| `POST` | `/api/auth/login` | Login |
|
|
619
|
+
| `GET` | `/api/hooks/status` | Hook density and installed events |
|
|
620
|
+
| `POST` | `/api/hooks/install` | Install hooks |
|
|
621
|
+
| `GET` | `/api/ssh-keys` | List SSH keys from `~/.ssh/` |
|
|
622
|
+
| `POST` | `/api/tmux-sessions` | List tmux sessions on host |
|
|
623
|
+
| `GET` | `/api/teams/:id/config` | Read team config |
|
|
551
624
|
|
|
552
|
-
|
|
625
|
+
---
|
|
553
626
|
|
|
554
|
-
|
|
627
|
+
## Troubleshooting
|
|
555
628
|
|
|
556
|
-
|
|
629
|
+
### Port 3333 in Use
|
|
557
630
|
|
|
558
|
-
|
|
631
|
+
The server automatically kills the process occupying port 3333 on startup. To use a different port:
|
|
559
632
|
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
| Database | SQLite (better-sqlite3) with WAL mode + FTS5 |
|
|
565
|
-
| Frontend | Vanilla JS (ES2022, zero build step) |
|
|
566
|
-
| Characters | CSS-animated (20 models) |
|
|
567
|
-
| Audio | Web Audio API (synthesized, no audio files) |
|
|
568
|
-
| Font | JetBrains Mono |
|
|
569
|
-
| Hooks | Bash (macOS/Linux) + PowerShell (Windows) |
|
|
633
|
+
```bash
|
|
634
|
+
npx ai-agent-session-center --port 4444
|
|
635
|
+
PORT=4444 npm start
|
|
636
|
+
```
|
|
570
637
|
|
|
571
|
-
|
|
638
|
+
### Hooks Not Firing
|
|
572
639
|
|
|
573
|
-
|
|
640
|
+
1. Check hooks are registered: `cat ~/.claude/settings.json | grep dashboard-hook`
|
|
641
|
+
2. Verify the hook script exists: `ls -la ~/.claude/hooks/dashboard-hook.sh`
|
|
642
|
+
3. Verify executable: `chmod +x ~/.claude/hooks/dashboard-hook.sh`
|
|
643
|
+
4. Test manually: `echo '{"session_id":"test","hook_event_name":"SessionStart"}' | ~/.claude/hooks/dashboard-hook.sh`
|
|
644
|
+
5. Re-install: `npm run install-hooks`
|
|
574
645
|
|
|
646
|
+
### jq Not Installed
|
|
647
|
+
|
|
648
|
+
The hook script requires `jq` for JSON enrichment. Without it, hooks still work but send unenriched JSON.
|
|
649
|
+
|
|
650
|
+
```bash
|
|
651
|
+
# macOS
|
|
652
|
+
brew install jq
|
|
653
|
+
|
|
654
|
+
# Ubuntu/Debian
|
|
655
|
+
sudo apt-get install jq
|
|
575
656
|
```
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
└── logger.js # Debug-aware colored logging
|
|
588
|
-
|
|
589
|
-
public/
|
|
590
|
-
├── index.html # Dashboard UI
|
|
591
|
-
├── css/
|
|
592
|
-
│ └── dashboard.css # 9 themes, animations, responsive layout
|
|
593
|
-
└── js/
|
|
594
|
-
├── app.js # Bootstrap: WS connect, event routing
|
|
595
|
-
├── sessionPanel.js # Session cards, detail panel, drag-drop groups
|
|
596
|
-
├── robotManager.js # 20 CSS character models
|
|
597
|
-
├── soundManager.js # 16 synthesized tones, per-action mapping
|
|
598
|
-
├── movementManager.js # 18 movement effects, per-action mapping
|
|
599
|
-
├── settingsManager.js # Settings persistence, theme/font management
|
|
600
|
-
├── statsPanel.js # Global stats header bar
|
|
601
|
-
├── wsClient.js # WebSocket client with auto-reconnect
|
|
602
|
-
├── navController.js # View switching (live/history/timeline/analytics)
|
|
603
|
-
├── historyPanel.js # Full-text search, filters, pagination
|
|
604
|
-
├── timelinePanel.js # Hour/day/week timeline charts
|
|
605
|
-
├── analyticsPanel.js # Tool breakdown, duration trends, heatmaps
|
|
606
|
-
└── chartUtils.js # SVG bar charts, line charts, heatmaps
|
|
607
|
-
|
|
608
|
-
hooks/
|
|
609
|
-
├── dashboard-hook.sh # Bash: enriches JSON, POSTs to localhost:3333
|
|
610
|
-
├── dashboard-hook.ps1 # PowerShell: Windows variant
|
|
611
|
-
└── install-hooks.js # Merges hook config into ~/.claude/settings.json
|
|
612
|
-
```
|
|
657
|
+
|
|
658
|
+
### Sessions Not Appearing
|
|
659
|
+
|
|
660
|
+
1. Check MQ file: `ls /tmp/claude-session-center/queue.jsonl`
|
|
661
|
+
2. Check data: `tail -5 /tmp/claude-session-center/queue.jsonl`
|
|
662
|
+
3. Debug mode: `npm run debug`
|
|
663
|
+
4. Verify density includes SessionStart: `npm run install-hooks`
|
|
664
|
+
|
|
665
|
+
### WebSocket Disconnections
|
|
666
|
+
|
|
667
|
+
Auto-reconnects with exponential backoff (1s base, 10s max). On reconnect, replays missed events from the server's ring buffer (last 500 events).
|
|
613
668
|
|
|
614
669
|
---
|
|
615
670
|
|