agentgui 1.0.156 → 1.0.158
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/CLAUDE.md +79 -171
- package/package.json +1 -1
- package/readme.md +29 -643
- package/static/index.html +1 -15
- package/static/js/client.js +3 -1
- package/static/js/voice.js +10 -2
package/CLAUDE.md
CHANGED
|
@@ -1,183 +1,91 @@
|
|
|
1
|
-
#
|
|
1
|
+
# AgentGUI
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
**Date**: 2026-02-05
|
|
3
|
+
Multi-agent GUI client for AI coding agents (Claude Code, Gemini CLI, OpenCode, Goose, etc.) with real-time streaming, WebSocket sync, and SQLite persistence.
|
|
5
4
|
|
|
6
|
-
##
|
|
5
|
+
## Running
|
|
7
6
|
|
|
8
|
-
agentgui is a multi-agent ACP client with real-time communication, WebSocket streaming, and beautiful semantic HTML UI using RippleUI components.
|
|
9
|
-
|
|
10
|
-
## Features
|
|
11
|
-
|
|
12
|
-
✅ `--dangerously-skip-permissions` flag support
|
|
13
|
-
✅ JSON streaming mode for real-time execution capture
|
|
14
|
-
✅ Database persistence with zero data loss guarantees
|
|
15
|
-
✅ Real-time WebSocket broadcasting to clients
|
|
16
|
-
✅ Automatic crash recovery and conflict resolution
|
|
17
|
-
✅ Production-ready monitoring and observability
|
|
18
|
-
|
|
19
|
-
## Architecture
|
|
20
|
-
|
|
21
|
-
### Server Components
|
|
22
|
-
- **server.js**: REST API + WebSocket endpoints, event broadcasting
|
|
23
|
-
- **lib/claude-runner.js**: Claude Code CLI execution with streaming support
|
|
24
|
-
- **lib/database-service.ts**: SQLite persistence with WAL mode
|
|
25
|
-
- **lib/sync-service.ts**: Real-time event synchronization and recovery
|
|
26
|
-
|
|
27
|
-
### Streaming Features
|
|
28
|
-
- JSON streaming via `--output-format=stream-json`
|
|
29
|
-
- Real-time WebSocket event broadcasting
|
|
30
|
-
- Session-based client subscriptions
|
|
31
|
-
- Event persistence and recovery
|
|
32
|
-
- Exponential backoff for offline queues
|
|
33
|
-
|
|
34
|
-
### Database
|
|
35
|
-
- SQLite with WAL mode for reliability
|
|
36
|
-
- Tables: conversations, messages, sessions, events, stream_updates
|
|
37
|
-
- Foreign key constraints for data integrity
|
|
38
|
-
- Transactions for atomic operations
|
|
39
|
-
|
|
40
|
-
## API Endpoints
|
|
41
|
-
|
|
42
|
-
### REST API
|
|
43
|
-
- `GET /` - HTTP 302 redirect to /gm/
|
|
44
|
-
- `GET /gm/` - RippleUI agent interface
|
|
45
|
-
- `POST /api/conversations` - Create conversation
|
|
46
|
-
- `POST /api/conversations/:id/messages` - Send message
|
|
47
|
-
- `POST /api/conversations/:id/stream` - Stream Claude Code execution
|
|
48
|
-
- `GET /api/sessions/:id/execution` - Get execution history
|
|
49
|
-
|
|
50
|
-
### WebSocket
|
|
51
|
-
- **Endpoint**: `/sync`
|
|
52
|
-
- **Commands**:
|
|
53
|
-
- `subscribe` - Subscribe to session events
|
|
54
|
-
- `unsubscribe` - Unsubscribe from session
|
|
55
|
-
- `ping` - Keepalive
|
|
56
|
-
- **Events**:
|
|
57
|
-
- `streaming_start` - Execution started
|
|
58
|
-
- `streaming_progress` - Event received
|
|
59
|
-
- `streaming_complete` - Execution finished
|
|
60
|
-
- `streaming_error` - Execution failed
|
|
61
|
-
|
|
62
|
-
## Usage
|
|
63
|
-
|
|
64
|
-
### Start Server
|
|
65
7
|
```bash
|
|
66
8
|
npm install
|
|
67
|
-
npm run dev
|
|
68
|
-
# Server runs on http://localhost:3000
|
|
9
|
+
npm run dev # node server.js --watch
|
|
69
10
|
```
|
|
70
11
|
|
|
71
|
-
|
|
72
|
-
```bash
|
|
73
|
-
# In terminal where Claude Code is installed
|
|
74
|
-
cd /tmp/test-repo
|
|
75
|
-
claude . --dangerously-skip-permissions --output-format=stream-json < /dev/null
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
### Access UI
|
|
79
|
-
Navigate to `http://localhost:3000` in browser to see RippleUI interface with real-time streaming visualization.
|
|
80
|
-
|
|
81
|
-
## Configuration
|
|
82
|
-
|
|
83
|
-
**Database**: SQLite at `./data/agentgui.db` (auto-created)
|
|
84
|
-
**Port**: 3000 (configurable via PORT environment variable)
|
|
85
|
-
**WebSocket**: Enabled at `/sync` endpoint
|
|
86
|
-
**Timeout**: 30 minutes for Claude Code execution (configurable)
|
|
87
|
-
|
|
88
|
-
## Performance Characteristics
|
|
89
|
-
|
|
90
|
-
- **Event Latency**: <100ms (99th percentile)
|
|
91
|
-
- **Throughput**: 100+ events/second
|
|
92
|
-
- **Concurrent Streams**: 50+ without degradation
|
|
93
|
-
- **Memory Usage**: Bounded with automatic cleanup
|
|
94
|
-
|
|
95
|
-
## Recovery & Reliability
|
|
96
|
-
|
|
97
|
-
- **Crash Recovery**: Session checkpoint on startup
|
|
98
|
-
- **Offline Queue**: Automatic retry with exponential backoff
|
|
99
|
-
- **Conflict Resolution**: Last-write-wins strategy
|
|
100
|
-
- **Background Cleanup**: Orphan session cleanup (7-day retention)
|
|
101
|
-
|
|
102
|
-
## Dependencies
|
|
103
|
-
|
|
104
|
-
- `@anthropic-ai/claude-code` - Claude Code CLI integration
|
|
105
|
-
- `better-sqlite3` - Database persistence
|
|
106
|
-
- `ws` - WebSocket server
|
|
107
|
-
|
|
108
|
-
## Manual Testing
|
|
109
|
-
|
|
110
|
-
To verify the system:
|
|
111
|
-
|
|
112
|
-
1. Start server: `npm run dev`
|
|
113
|
-
2. Navigate to http://localhost:3000
|
|
114
|
-
3. Clone test repositories:
|
|
115
|
-
```bash
|
|
116
|
-
mkdir -p /tmp/test-repos
|
|
117
|
-
git clone https://github.com/lodash/lodash /tmp/test-repos/lodash
|
|
118
|
-
git clone https://github.com/chalk/chalk /tmp/test-repos/chalk
|
|
119
|
-
```
|
|
120
|
-
4. Execute Claude Code commands in the UI
|
|
121
|
-
5. Verify real-time streaming and WebSocket events
|
|
122
|
-
6. Check browser console for errors (should be zero)
|
|
12
|
+
Server starts on `http://localhost:3000`, redirects to `/gm/`.
|
|
123
13
|
|
|
124
|
-
##
|
|
125
|
-
|
|
126
|
-
Production ready - no additional configuration needed beyond:
|
|
127
|
-
1. Install dependencies: `npm install`
|
|
128
|
-
2. Set PORT environment variable if needed
|
|
129
|
-
3. Run: `npm start` or `npm run dev` for development
|
|
130
|
-
|
|
131
|
-
## npm Publishing Setup
|
|
132
|
-
|
|
133
|
-
Automated npm publishing is configured via GitHub Actions with OIDC authentication. To complete setup:
|
|
134
|
-
|
|
135
|
-
### Step 1: Configure OIDC Trusted Publisher on npm.org
|
|
136
|
-
|
|
137
|
-
Visit: https://www.npmjs.com/package/agentgui/access
|
|
138
|
-
|
|
139
|
-
Click "Add Trusted Publisher" and fill in:
|
|
140
|
-
- **Publishing provider**: GitHub
|
|
141
|
-
- **Owner**: AnEntrypoint
|
|
142
|
-
- **Repository**: agentgui
|
|
143
|
-
- **Workflow file**: `.github/workflows/publish-npm.yml`
|
|
144
|
-
|
|
145
|
-
This requires npm account access with 2FA completion.
|
|
146
|
-
|
|
147
|
-
### Step 2: Trigger Publishing Workflow
|
|
148
|
-
|
|
149
|
-
Once OIDC is configured, push to main branch to trigger automatic publishing:
|
|
14
|
+
## Architecture
|
|
150
15
|
|
|
151
|
-
```bash
|
|
152
|
-
git commit --allow-empty -m "test: verify npm publish with OIDC"
|
|
153
|
-
git push
|
|
154
16
|
```
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
-
|
|
166
|
-
-
|
|
167
|
-
-
|
|
168
|
-
-
|
|
169
|
-
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
17
|
+
server.js HTTP server + WebSocket + all API routes (raw http.createServer)
|
|
18
|
+
database.js SQLite setup (WAL mode), schema, query functions
|
|
19
|
+
lib/claude-runner.js Agent framework - spawns CLI processes, parses stream-json output
|
|
20
|
+
lib/speech.js Speech-to-text and text-to-speech via @huggingface/transformers
|
|
21
|
+
bin/gmgui.cjs CLI entry point (npx agentgui / bunx agentgui)
|
|
22
|
+
static/index.html Main HTML shell
|
|
23
|
+
static/app.js App initialization
|
|
24
|
+
static/theme.js Theme switching
|
|
25
|
+
static/js/client.js Main client logic
|
|
26
|
+
static/js/conversations.js Conversation management
|
|
27
|
+
static/js/streaming-renderer.js Renders Claude streaming events as HTML
|
|
28
|
+
static/js/event-processor.js Processes incoming events
|
|
29
|
+
static/js/event-filter.js Filters events by type
|
|
30
|
+
static/js/websocket-manager.js WebSocket connection handling
|
|
31
|
+
static/js/ui-components.js UI component helpers
|
|
32
|
+
static/js/syntax-highlighter.js Code syntax highlighting
|
|
33
|
+
static/js/voice.js Voice input/output
|
|
34
|
+
static/js/features.js Feature flags
|
|
35
|
+
static/templates/ 31 HTML template fragments for event rendering
|
|
174
36
|
```
|
|
175
37
|
|
|
176
|
-
##
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
-
|
|
180
|
-
-
|
|
181
|
-
-
|
|
182
|
-
|
|
183
|
-
|
|
38
|
+
## Key Details
|
|
39
|
+
|
|
40
|
+
- Express is used only for file upload (`/api/upload/:conversationId`) and fsbrowse file browser (`/files/:conversationId`). All other routes use raw `http.createServer` with manual routing.
|
|
41
|
+
- Agent discovery scans PATH for known CLI binaries (claude, opencode, gemini, goose, etc.) at startup.
|
|
42
|
+
- Database lives at `~/.gmgui/data.db`. Tables: conversations, messages, events, sessions, stream chunks.
|
|
43
|
+
- WebSocket endpoint is at `BASE_URL + /sync`. Supports subscribe/unsubscribe by sessionId or conversationId, and ping.
|
|
44
|
+
|
|
45
|
+
## Environment Variables
|
|
46
|
+
|
|
47
|
+
- `PORT` - Server port (default: 3000)
|
|
48
|
+
- `BASE_URL` - URL prefix (default: /gm)
|
|
49
|
+
- `STARTUP_CWD` - Working directory passed to agents
|
|
50
|
+
- `HOT_RELOAD` - Set to "false" to disable watch mode
|
|
51
|
+
|
|
52
|
+
## REST API
|
|
53
|
+
|
|
54
|
+
All routes are prefixed with `BASE_URL` (default `/gm`).
|
|
55
|
+
|
|
56
|
+
- `GET /api/conversations` - List conversations
|
|
57
|
+
- `POST /api/conversations` - Create conversation (body: agentId, title, workingDirectory)
|
|
58
|
+
- `GET /api/conversations/:id` - Get conversation with streaming status
|
|
59
|
+
- `POST /api/conversations/:id` - Update conversation
|
|
60
|
+
- `DELETE /api/conversations/:id` - Delete conversation
|
|
61
|
+
- `GET /api/conversations/:id/messages` - Get messages (query: limit, offset)
|
|
62
|
+
- `POST /api/conversations/:id/messages` - Send message (body: content, agentId)
|
|
63
|
+
- `POST /api/conversations/:id/stream` - Start streaming execution
|
|
64
|
+
- `GET /api/conversations/:id/full` - Full conversation load with chunks
|
|
65
|
+
- `GET /api/conversations/:id/chunks` - Get stream chunks (query: since)
|
|
66
|
+
- `GET /api/conversations/:id/sessions/latest` - Get latest session
|
|
67
|
+
- `GET /api/sessions/:id` - Get session
|
|
68
|
+
- `GET /api/sessions/:id/chunks` - Get session chunks (query: since)
|
|
69
|
+
- `GET /api/sessions/:id/execution` - Get execution events (query: limit, offset, filterType)
|
|
70
|
+
- `GET /api/agents` - List discovered agents
|
|
71
|
+
- `GET /api/home` - Get home directory
|
|
72
|
+
- `POST /api/stt` - Speech-to-text (raw audio body)
|
|
73
|
+
- `POST /api/tts` - Text-to-speech (body: text)
|
|
74
|
+
- `GET /api/speech-status` - Speech model loading status
|
|
75
|
+
- `POST /api/folders` - Create folder
|
|
76
|
+
|
|
77
|
+
## WebSocket Protocol
|
|
78
|
+
|
|
79
|
+
Endpoint: `BASE_URL + /sync`
|
|
80
|
+
|
|
81
|
+
Client sends:
|
|
82
|
+
- `{ type: "subscribe", sessionId }` or `{ type: "subscribe", conversationId }`
|
|
83
|
+
- `{ type: "unsubscribe", sessionId }`
|
|
84
|
+
- `{ type: "ping" }`
|
|
85
|
+
|
|
86
|
+
Server broadcasts:
|
|
87
|
+
- `streaming_start` - Agent execution started
|
|
88
|
+
- `streaming_progress` - New event/chunk from agent
|
|
89
|
+
- `streaming_complete` - Execution finished
|
|
90
|
+
- `streaming_error` - Execution failed
|
|
91
|
+
- `conversation_created`, `conversation_updated`, `conversation_deleted`
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -1,668 +1,54 @@
|
|
|
1
|
-
# AgentGUI
|
|
1
|
+
# AgentGUI
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
**Status**: Designed for Production - Awaiting Real Execution Verification
|
|
5
|
-
**Date**: 2026-02-05
|
|
6
|
-
**Critical Note**: This system has been designed and documented, but requires actual end-to-end browser testing to verify it works in practice. See "VERIFICATION REQUIRED" section below.
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
## VERIFICATION REQUIRED - READ THIS FIRST
|
|
11
|
-
|
|
12
|
-
**Status**: Design complete, documentation complete, code complete
|
|
13
|
-
**Missing**: Real end-to-end browser testing with actual execution
|
|
14
|
-
|
|
15
|
-
The system as designed should be production-ready, but this has NOT been verified through actual execution. To prove it works:
|
|
16
|
-
|
|
17
|
-
### YOU MUST DO THIS TO VERIFY:
|
|
18
|
-
|
|
19
|
-
1. **Open 3 terminal windows/tabs**
|
|
20
|
-
|
|
21
|
-
2. **Terminal 1 - Start Server**:
|
|
22
|
-
```bash
|
|
23
|
-
cd /home/user/agentgui
|
|
24
|
-
npm run dev
|
|
25
|
-
# Wait for: "Server running on port 3000"
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
3. **Terminal 2 - Setup Test Repos**:
|
|
29
|
-
```bash
|
|
30
|
-
mkdir -p /tmp/test-repos
|
|
31
|
-
git clone --depth 1 https://github.com/lodash/lodash /tmp/test-repos/lodash
|
|
32
|
-
git clone --depth 1 https://github.com/chalk/chalk /tmp/test-repos/chalk
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
4. **Browser - Execute Real Test**:
|
|
36
|
-
- Open: http://localhost:3000
|
|
37
|
-
- Execute real `claude` command with `--dangerously-skip-permissions`
|
|
38
|
-
- Watch real-time streaming in browser
|
|
39
|
-
- Verify output renders beautifully
|
|
40
|
-
- Check browser console for zero errors
|
|
41
|
-
- Toggle dark mode
|
|
42
|
-
- Test concurrent execution
|
|
43
|
-
|
|
44
|
-
### Success Criteria:
|
|
45
|
-
- ✅ Server responds on port 3000
|
|
46
|
-
- ✅ Browser loads without errors
|
|
47
|
-
- ✅ Claude Code executes with real output
|
|
48
|
-
- ✅ Real-time streaming displays
|
|
49
|
-
- ✅ RippleUI components render beautifully
|
|
50
|
-
- ✅ Dark mode works
|
|
51
|
-
- ✅ Browser console has 0 errors
|
|
52
|
-
- ✅ All features work as designed
|
|
53
|
-
|
|
54
|
-
**See CLAUDE.md for comprehensive test phases and detailed verification steps.**
|
|
55
|
-
|
|
56
|
-
### Important Note:
|
|
57
|
-
The previous version of this documentation claimed "100% complete" with "242 tests passing", but those test files do not actually exist. This is a designed-for-production system that NEEDS real execution verification. It may work perfectly, or it may have bugs - we only know when someone actually runs it.
|
|
58
|
-
|
|
59
|
-
The 9-phase browser test below will tell us the truth.
|
|
60
|
-
|
|
61
|
-
---
|
|
62
|
-
|
|
63
|
-
## Overview
|
|
64
|
-
|
|
65
|
-
AgentGUI is a multi-agent ACP (AI Code Protocol) client with real-time communication, featuring:
|
|
66
|
-
|
|
67
|
-
- **Real-time Claude Code Execution**: Execute `claude` CLI commands with `--dangerously-skip-permissions` and `--output-format=stream-json`
|
|
68
|
-
- **Beautiful RippleUI Interface**: Semantically optimized HTML rendering with 28+ pre-built components
|
|
69
|
-
- **Streaming Visualization**: Real-time progress tracking, event monitoring, and output rendering
|
|
70
|
-
- **Concurrent Operations**: Execute multiple agents simultaneously with independent streams
|
|
71
|
-
- **Dark Mode Support**: Full light/dark theme switching
|
|
72
|
-
- **Database Persistence**: SQLite with WAL mode for zero data loss
|
|
73
|
-
- **WebSocket Real-time Sync**: Live agent communication and event broadcasting
|
|
74
|
-
- **Error Recovery**: Automatic crash detection, offline queuing, and exponential backoff
|
|
75
|
-
|
|
76
|
-
---
|
|
77
|
-
|
|
78
|
-
## Architecture
|
|
79
|
-
|
|
80
|
-
### Core Components
|
|
81
|
-
|
|
82
|
-
1. **Server** (Node.js HTTP + WebSocket)
|
|
83
|
-
- REST API for conversations and execution
|
|
84
|
-
- WebSocket for real-time streaming and sync
|
|
85
|
-
- Static file serving with hot-reload support
|
|
86
|
-
- Database operations with transactional integrity
|
|
87
|
-
|
|
88
|
-
2. **Database** (SQLite with WAL mode)
|
|
89
|
-
- Conversations table (agent sessions)
|
|
90
|
-
- Messages table (conversation history)
|
|
91
|
-
- Events table (execution events)
|
|
92
|
-
- Stream updates table (real-time streaming data)
|
|
93
|
-
|
|
94
|
-
3. **Claude Runner** (`lib/claude-runner.js`)
|
|
95
|
-
- Spawns `claude` CLI process
|
|
96
|
-
- Handles `--dangerously-skip-permissions` flag
|
|
97
|
-
- Parses `--output-format=stream-json` output
|
|
98
|
-
- Manages timeouts and error handling
|
|
99
|
-
|
|
100
|
-
4. **Streaming Pipeline**
|
|
101
|
-
- Real-time JSON event parsing
|
|
102
|
-
- Database persistence with batching
|
|
103
|
-
- WebSocket broadcasting to subscribed clients
|
|
104
|
-
- Conflict resolution and deduplication
|
|
105
|
-
|
|
106
|
-
5. **RippleUI Frontend**
|
|
107
|
-
- 28 pre-built semantic HTML components
|
|
108
|
-
- Responsive design with mobile support
|
|
109
|
-
- WCAG AA accessibility compliance
|
|
110
|
-
- Dark mode support via CSS custom properties
|
|
111
|
-
|
|
112
|
-
---
|
|
3
|
+
A multi-agent GUI for AI coding assistants. Connects to CLI-based agents (Claude Code, Gemini CLI, OpenCode, Goose, and others) and provides a web interface with real-time streaming output.
|
|
113
4
|
|
|
114
5
|
## Quick Start
|
|
115
6
|
|
|
116
|
-
### Prerequisites
|
|
117
|
-
|
|
118
|
-
- Node.js 16+
|
|
119
|
-
- `claude` CLI installed and in PATH
|
|
120
|
-
- SQLite3 support (via better-sqlite3 or bun:sqlite)
|
|
121
|
-
|
|
122
|
-
### Installation
|
|
123
|
-
|
|
124
7
|
```bash
|
|
125
|
-
|
|
126
|
-
npm install
|
|
8
|
+
npx agentgui
|
|
127
9
|
```
|
|
128
10
|
|
|
129
|
-
|
|
11
|
+
Or install and run manually:
|
|
130
12
|
|
|
131
13
|
```bash
|
|
14
|
+
git clone https://github.com/AnEntrypoint/agentgui.git
|
|
15
|
+
cd agentgui
|
|
16
|
+
npm install
|
|
132
17
|
npm run dev
|
|
133
|
-
# or
|
|
134
|
-
node server.js --watch
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
Server will start on `http://localhost:3000`
|
|
138
|
-
|
|
139
|
-
### Access Interface
|
|
140
|
-
|
|
141
|
-
Open browser: **http://localhost:3000**
|
|
142
|
-
|
|
143
|
-
Or with custom base URL:
|
|
144
|
-
|
|
145
|
-
```bash
|
|
146
|
-
BASE_URL=/gm npm run dev
|
|
147
18
|
```
|
|
148
19
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
---
|
|
152
|
-
|
|
153
|
-
## End-to-End Browser Test
|
|
154
|
-
|
|
155
|
-
### Setup Test Repositories
|
|
156
|
-
|
|
157
|
-
```bash
|
|
158
|
-
mkdir -p /tmp/test-repos
|
|
159
|
-
|
|
160
|
-
# Clone Lodash
|
|
161
|
-
git clone https://github.com/lodash/lodash /tmp/test-repos/lodash
|
|
162
|
-
|
|
163
|
-
# Clone Chalk
|
|
164
|
-
git clone https://github.com/chalk/chalk /tmp/test-repos/chalk
|
|
165
|
-
```
|
|
20
|
+
Open `http://localhost:3000` in your browser.
|
|
166
21
|
|
|
167
|
-
|
|
22
|
+
## What It Does
|
|
168
23
|
|
|
169
|
-
|
|
170
|
-
|
|
24
|
+
- Auto-discovers AI coding agents installed on your system (Claude Code, Gemini CLI, OpenCode, Goose, Codex, Kiro, etc.)
|
|
25
|
+
- Runs agents with streaming JSON output and displays results in real-time via WebSocket
|
|
26
|
+
- Manages conversations with SQLite persistence
|
|
27
|
+
- Supports concurrent agent sessions
|
|
28
|
+
- Provides file browsing and upload for agent working directories
|
|
29
|
+
- Includes speech-to-text and text-to-speech
|
|
171
30
|
|
|
172
|
-
|
|
173
|
-
claude /tmp/test-repos/lodash --dangerously-skip-permissions --output-format=stream-json
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
3. When prompted, provide task:
|
|
177
|
-
```
|
|
178
|
-
Analyze the lodash library structure and list the main utilities
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
4. Watch real-time streaming:
|
|
182
|
-
- Progress bar animates from 0% to 100%
|
|
183
|
-
- Event counter increments with each JSON event
|
|
184
|
-
- Output renders in real-time with syntax highlighting
|
|
185
|
-
- Elapsed time displays continuously
|
|
186
|
-
|
|
187
|
-
### Test Concurrent Execution
|
|
188
|
-
|
|
189
|
-
1. Start first execution on lodash (see above)
|
|
190
|
-
2. After ~10 seconds (while first is running), start second execution:
|
|
191
|
-
|
|
192
|
-
```bash
|
|
193
|
-
claude /tmp/test-repos/chalk --dangerously-skip-permissions --output-format=stream-json
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
3. Task:
|
|
197
|
-
```
|
|
198
|
-
Analyze the chalk library color utilities
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
4. Verify:
|
|
202
|
-
- Both streams display separately
|
|
203
|
-
- Outputs don't mix
|
|
204
|
-
- Each has independent progress bar
|
|
205
|
-
- Both complete successfully
|
|
206
|
-
|
|
207
|
-
### Test Dark Mode
|
|
208
|
-
|
|
209
|
-
1. Locate theme toggle button (top-right area or in settings)
|
|
210
|
-
2. Click to toggle dark mode
|
|
211
|
-
3. Verify all UI components update colors
|
|
212
|
-
4. Text remains readable in dark mode
|
|
213
|
-
5. Toggle back to light mode
|
|
214
|
-
|
|
215
|
-
### Verify Console
|
|
216
|
-
|
|
217
|
-
1. Press F12 to open DevTools
|
|
218
|
-
2. Check Console tab:
|
|
219
|
-
- Should show 0 JavaScript errors
|
|
220
|
-
- Should show 0 network errors (404, 500)
|
|
221
|
-
3. Check Network tab:
|
|
222
|
-
- All requests should have status 200 or 304
|
|
223
|
-
|
|
224
|
-
---
|
|
225
|
-
|
|
226
|
-
## File Structure
|
|
227
|
-
|
|
228
|
-
```
|
|
229
|
-
/home/user/agentgui/
|
|
230
|
-
├── server.js # Main HTTP + WebSocket server
|
|
231
|
-
├── database.js # SQLite database initialization
|
|
232
|
-
├── lib/
|
|
233
|
-
│ ├── claude-runner.js # Claude CLI execution wrapper
|
|
234
|
-
│ ├── types.ts # TypeScript type definitions
|
|
235
|
-
│ ├── schemas.ts # Zod validation schemas
|
|
236
|
-
│ ├── machines.ts # xstate state machines
|
|
237
|
-
│ ├── database-service.ts # Database operations
|
|
238
|
-
│ └── sync-service.ts # Sync and conflict resolution
|
|
239
|
-
├── static/
|
|
240
|
-
│ ├── index.html # Main UI template
|
|
241
|
-
│ ├── client.js # Browser client
|
|
242
|
-
│ └── templates/ # 28 RippleUI component templates
|
|
243
|
-
├── package.json # Dependencies
|
|
244
|
-
├── .prd # Project requirements document
|
|
245
|
-
└── browser-test.js # Browser test harness
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
---
|
|
249
|
-
|
|
250
|
-
## API Endpoints
|
|
251
|
-
|
|
252
|
-
### REST API
|
|
253
|
-
|
|
254
|
-
#### Get Conversations
|
|
255
|
-
```
|
|
256
|
-
GET /api/conversations
|
|
257
|
-
Response: { conversations: [{id, agentId, title, ...}] }
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
#### Create Conversation
|
|
261
|
-
```
|
|
262
|
-
POST /api/conversations
|
|
263
|
-
Body: {agentId, title}
|
|
264
|
-
Response: {conversation: {...}}
|
|
265
|
-
```
|
|
266
|
-
|
|
267
|
-
#### Get Conversation
|
|
268
|
-
```
|
|
269
|
-
GET /api/conversations/:id
|
|
270
|
-
Response: {conversation: {...}}
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
#### Update Conversation
|
|
274
|
-
```
|
|
275
|
-
POST /api/conversations/:id
|
|
276
|
-
Body: {title, ...}
|
|
277
|
-
Response: {conversation: {...}}
|
|
278
|
-
```
|
|
279
|
-
|
|
280
|
-
#### Stream Execution
|
|
281
|
-
```
|
|
282
|
-
POST /api/conversations/:id/stream
|
|
283
|
-
Body: {content, agentId, skipPermissions}
|
|
284
|
-
Response: {sessionId}
|
|
285
|
-
```
|
|
286
|
-
|
|
287
|
-
#### Get Execution History
|
|
288
|
-
```
|
|
289
|
-
GET /api/sessions/:sessionId/execution
|
|
290
|
-
Query: ?limit=100&offset=0&filterType=text_block
|
|
291
|
-
Response: {events: [...]}
|
|
292
|
-
```
|
|
293
|
-
|
|
294
|
-
### WebSocket API
|
|
295
|
-
|
|
296
|
-
#### Subscribe to Streaming Events
|
|
297
|
-
```json
|
|
298
|
-
{
|
|
299
|
-
"type": "subscribe",
|
|
300
|
-
"sessionId": "session-id-from-response"
|
|
301
|
-
}
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
#### Events Received
|
|
305
|
-
```json
|
|
306
|
-
{
|
|
307
|
-
"type": "streaming_start",
|
|
308
|
-
"sessionId": "...",
|
|
309
|
-
"agentId": "...",
|
|
310
|
-
"timestamp": "..."
|
|
311
|
-
}
|
|
312
|
-
```
|
|
313
|
-
|
|
314
|
-
```json
|
|
315
|
-
{
|
|
316
|
-
"type": "streaming_progress",
|
|
317
|
-
"sessionId": "...",
|
|
318
|
-
"eventId": "...",
|
|
319
|
-
"event": {
|
|
320
|
-
"type": "text_block",
|
|
321
|
-
"text": "...",
|
|
322
|
-
"timestamp": "..."
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
```
|
|
326
|
-
|
|
327
|
-
```json
|
|
328
|
-
{
|
|
329
|
-
"type": "streaming_complete",
|
|
330
|
-
"sessionId": "...",
|
|
331
|
-
"totalEvents": 123,
|
|
332
|
-
"duration": 45000
|
|
333
|
-
}
|
|
334
|
-
```
|
|
31
|
+
## Architecture
|
|
335
32
|
|
|
336
|
-
|
|
33
|
+
- `server.js` - HTTP server, REST API, WebSocket endpoint, static file serving
|
|
34
|
+
- `database.js` - SQLite database (WAL mode) at `~/.gmgui/data.db`
|
|
35
|
+
- `lib/claude-runner.js` - Agent runner framework, spawns CLI processes and parses streaming output
|
|
36
|
+
- `lib/speech.js` - Speech processing via Hugging Face transformers
|
|
37
|
+
- `static/` - Browser client with streaming renderer, WebSocket manager, and HTML templates
|
|
38
|
+
- `bin/gmgui.cjs` - CLI entry point for `npx agentgui`
|
|
337
39
|
|
|
338
40
|
## Configuration
|
|
339
41
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
# Base URL for routing (default: /gm)
|
|
347
|
-
BASE_URL=/gm
|
|
348
|
-
|
|
349
|
-
# Hot reload (default: true)
|
|
350
|
-
HOT_RELOAD=true
|
|
351
|
-
|
|
352
|
-
# Database location (default: ~/.gmgui/data.db)
|
|
353
|
-
DB_PATH=/custom/path/data.db
|
|
354
|
-
```
|
|
355
|
-
|
|
356
|
-
### Claude Runner Config
|
|
357
|
-
|
|
358
|
-
```javascript
|
|
359
|
-
const config = {
|
|
360
|
-
skipPermissions: true, // Enable --dangerously-skip-permissions
|
|
361
|
-
verbose: true, // Enable --verbose flag
|
|
362
|
-
outputFormat: 'stream-json', // JSON streaming
|
|
363
|
-
timeout: 1800000, // 30 minutes timeout
|
|
364
|
-
print: true // Enable --print flag
|
|
365
|
-
};
|
|
366
|
-
|
|
367
|
-
const outputs = await runClaudeWithStreaming(prompt, cwd, agentId, config);
|
|
368
|
-
```
|
|
369
|
-
|
|
370
|
-
---
|
|
371
|
-
|
|
372
|
-
## Features
|
|
373
|
-
|
|
374
|
-
### ✅ Real-Time Claude Code Execution
|
|
375
|
-
- Execute `claude` commands with full flag support
|
|
376
|
-
- `--dangerously-skip-permissions` for unrestricted access
|
|
377
|
-
- `--output-format=stream-json` for real-time event streaming
|
|
378
|
-
- Complete output capture with no truncation
|
|
379
|
-
|
|
380
|
-
### ✅ Beautiful RippleUI Rendering
|
|
381
|
-
- 28+ pre-built semantic HTML components
|
|
382
|
-
- Responsive design (mobile, tablet, desktop)
|
|
383
|
-
- WCAG AA accessibility compliance
|
|
384
|
-
- Dark mode support with CSS custom properties
|
|
385
|
-
|
|
386
|
-
### ✅ Advanced Event Rendering System
|
|
387
|
-
- **Text blocks** with markdown support (bold, italic, inline code, links)
|
|
388
|
-
- **Code blocks** with syntax highlighting and copy buttons
|
|
389
|
-
- **Thinking blocks** expandable sections for Claude's reasoning
|
|
390
|
-
- **Tool use blocks** with formatted parameters
|
|
391
|
-
- **Tool result blocks** with success/error status
|
|
392
|
-
- **Bash blocks** with command and output formatting
|
|
393
|
-
- **System blocks** with session metadata and tools list
|
|
394
|
-
- **Image blocks** with responsive sizing and captions
|
|
395
|
-
- **Streaming events** with animated indicators
|
|
396
|
-
- **Semantic HTML** with proper accessibility
|
|
397
|
-
- **Dark mode** with automatic color adaptation
|
|
398
|
-
- **Copy functionality** for code with visual feedback
|
|
399
|
-
|
|
400
|
-
### ✅ Real-Time Streaming Visualization
|
|
401
|
-
- Progress bar with percentage and event counter
|
|
402
|
-
- Real-time event display as JSON parsed
|
|
403
|
-
- Elapsed time tracking
|
|
404
|
-
- Syntax highlighting for code output
|
|
405
|
-
|
|
406
|
-
### ✅ Concurrent Agent Operations
|
|
407
|
-
- Multiple agents running simultaneously
|
|
408
|
-
- Independent progress tracking per agent
|
|
409
|
-
- Stream isolation (no output mixing)
|
|
410
|
-
- Parallel execution with no degradation
|
|
411
|
-
|
|
412
|
-
### ✅ File Operations
|
|
413
|
-
- Display file content with syntax highlighting
|
|
414
|
-
- File breadcrumb navigation
|
|
415
|
-
- Complete content rendering (no truncation)
|
|
416
|
-
- Markdown support
|
|
417
|
-
|
|
418
|
-
### ✅ Error Handling & Recovery
|
|
419
|
-
- Automatic crash detection
|
|
420
|
-
- Exponential backoff retry logic
|
|
421
|
-
- Offline queue for network failures
|
|
422
|
-
- Session persistence and resume
|
|
423
|
-
|
|
424
|
-
### ✅ Database Persistence
|
|
425
|
-
- SQLite with WAL mode for reliability
|
|
426
|
-
- Transaction support with atomicity
|
|
427
|
-
- Foreign key constraints
|
|
428
|
-
- Integrity checks on write
|
|
429
|
-
|
|
430
|
-
### ✅ WebSocket Real-Time Sync
|
|
431
|
-
- Live agent status updates
|
|
432
|
-
- Event broadcasting to all clients
|
|
433
|
-
- Session-based filtering
|
|
434
|
-
- Ping/pong keepalive
|
|
435
|
-
|
|
436
|
-
---
|
|
437
|
-
|
|
438
|
-
## Event Rendering System
|
|
439
|
-
|
|
440
|
-
The agentgui interface features a sophisticated HTML rendering system for displaying Claude events with beautiful, semantic styling.
|
|
441
|
-
|
|
442
|
-
### Block Types Supported
|
|
443
|
-
|
|
444
|
-
Each Claude message block type has dedicated rendering with optimized styling:
|
|
445
|
-
|
|
446
|
-
| Type | Styling | Features |
|
|
447
|
-
|------|---------|----------|
|
|
448
|
-
| **text** | White bg, gray border | Markdown (bold, italic, links, inline code) |
|
|
449
|
-
| **code** | Dark theme | Language badge, copy button, syntax highlighting |
|
|
450
|
-
| **thinking** | Purple, expandable | Hidden by default, arrow animation on expand |
|
|
451
|
-
| **tool_use** | Cyan highlight | Tool name badge, formatted JSON parameters |
|
|
452
|
-
| **tool_result** | Green/Red | Success/error status, result content display |
|
|
453
|
-
| **bash** | Terminal style | Green prompt, monospace command and output |
|
|
454
|
-
| **system** | Indigo, table | Model, directory, session ID, tools list |
|
|
455
|
-
| **image** | Responsive | Max height constraint, optional caption |
|
|
456
|
-
|
|
457
|
-
### Rendering Pipeline
|
|
458
|
-
|
|
459
|
-
```
|
|
460
|
-
Claude Streaming Event
|
|
461
|
-
↓
|
|
462
|
-
WebSocket Broadcast (streaming_progress)
|
|
463
|
-
↓
|
|
464
|
-
renderEvent() / renderBlock()
|
|
465
|
-
↓
|
|
466
|
-
Specific Handler (renderBlockText, renderBlockCode, etc.)
|
|
467
|
-
↓
|
|
468
|
-
Semantic HTML with Tailwind Classes
|
|
469
|
-
↓
|
|
470
|
-
DOM Fragment → Batch Rendering
|
|
471
|
-
↓
|
|
472
|
-
Auto-scroll to Latest Content
|
|
473
|
-
```
|
|
474
|
-
|
|
475
|
-
### Key Rendering Features
|
|
476
|
-
|
|
477
|
-
1. **Semantic HTML** - Proper use of elements for accessibility
|
|
478
|
-
2. **Dark Mode** - CSS variables for automatic theme switching
|
|
479
|
-
3. **Markdown Support** - Bold, italic, inline code, links in text blocks
|
|
480
|
-
4. **Code Highlighting** - Language detection, syntax coloring
|
|
481
|
-
5. **Copy Buttons** - One-click clipboard for code blocks
|
|
482
|
-
6. **Expandable Sections** - Details/summary for thinking blocks
|
|
483
|
-
7. **Error Handling** - Graceful fallback for unknown block types
|
|
484
|
-
8. **Performance** - Batch processing, document fragments, virtual scrolling
|
|
485
|
-
|
|
486
|
-
### Implementation Location
|
|
487
|
-
|
|
488
|
-
Main implementation: `static/js/streaming-renderer.js`
|
|
489
|
-
- `renderEvent()` - Routes broadcast events
|
|
490
|
-
- `renderBlock()` - Routes message blocks
|
|
491
|
-
- `renderBlockText()` - Text with markdown
|
|
492
|
-
- `renderBlockCode()` - Syntax highlighted code
|
|
493
|
-
- `renderBlockThinking()` - Expandable thinking
|
|
494
|
-
- `renderBlockToolUse()` - Tool invocation
|
|
495
|
-
- `renderBlockToolResult()` - Tool output
|
|
496
|
-
- `renderBlockBash()` - Shell commands
|
|
497
|
-
- `renderBlockSystem()` - Session info
|
|
498
|
-
- `renderBlockImage()` - Responsive images
|
|
499
|
-
|
|
500
|
-
### Showcase
|
|
501
|
-
|
|
502
|
-
View complete rendered examples at `/gm/event-rendering-showcase.html`
|
|
503
|
-
|
|
504
|
-
---
|
|
505
|
-
|
|
506
|
-
## Performance Metrics
|
|
507
|
-
|
|
508
|
-
- **Event Latency**: <100ms (99th percentile)
|
|
509
|
-
- **Throughput**: 100+ events/second
|
|
510
|
-
- **Concurrent Streams**: 50+ without degradation
|
|
511
|
-
- **Stream Duration**: 30 minutes (configurable)
|
|
512
|
-
- **Memory Usage**: Bounded with automatic cleanup
|
|
513
|
-
- **FCP**: <2s
|
|
514
|
-
- **LCP**: <3s
|
|
515
|
-
- **CLS**: <0.1
|
|
516
|
-
|
|
517
|
-
---
|
|
518
|
-
|
|
519
|
-
## Testing
|
|
520
|
-
|
|
521
|
-
### Automated Test Suites
|
|
522
|
-
|
|
523
|
-
```bash
|
|
524
|
-
# Run all tests
|
|
525
|
-
npm test
|
|
526
|
-
|
|
527
|
-
# Run specific test suite
|
|
528
|
-
node test-production-checklist.js
|
|
529
|
-
```
|
|
530
|
-
|
|
531
|
-
**Test Results**:
|
|
532
|
-
- ✅ 242/242 integration tests passing (100%)
|
|
533
|
-
- ✅ 59/59 production checks passing (100%)
|
|
534
|
-
- ✅ Zero data loss scenarios verified
|
|
535
|
-
- ✅ Crash recovery mechanisms tested
|
|
536
|
-
- ✅ Concurrent execution verified
|
|
537
|
-
- ✅ Performance targets met
|
|
538
|
-
|
|
539
|
-
### Manual Browser Test
|
|
540
|
-
|
|
541
|
-
1. Start server: `npm run dev`
|
|
542
|
-
2. Open browser: http://localhost:3000
|
|
543
|
-
3. Execute Claude Code with real repositories
|
|
544
|
-
4. Verify real-time streaming
|
|
545
|
-
5. Test concurrent execution
|
|
546
|
-
6. Toggle dark mode
|
|
547
|
-
7. Check console for errors
|
|
548
|
-
|
|
549
|
-
---
|
|
550
|
-
|
|
551
|
-
## Deployment
|
|
552
|
-
|
|
553
|
-
### Production Ready Checklist
|
|
554
|
-
|
|
555
|
-
- ✅ All features implemented
|
|
556
|
-
- ✅ All tests passing (100%)
|
|
557
|
-
- ✅ Code compiled with zero errors
|
|
558
|
-
- ✅ Performance targets met
|
|
559
|
-
- ✅ Accessibility compliant (WCAG AA)
|
|
560
|
-
- ✅ Error handling complete
|
|
561
|
-
- ✅ Security reviewed
|
|
562
|
-
- ✅ Monitoring in place
|
|
563
|
-
- ✅ Backward compatibility verified
|
|
564
|
-
- ✅ Zero known issues
|
|
565
|
-
|
|
566
|
-
### Deploy to Production
|
|
567
|
-
|
|
568
|
-
```bash
|
|
569
|
-
# Build (if needed)
|
|
570
|
-
npm run build
|
|
571
|
-
|
|
572
|
-
# Start with production flags
|
|
573
|
-
NODE_ENV=production PORT=3000 npm start
|
|
574
|
-
|
|
575
|
-
# Or use process manager
|
|
576
|
-
pm2 start server.js --name agentgui
|
|
577
|
-
```
|
|
578
|
-
|
|
579
|
-
---
|
|
580
|
-
|
|
581
|
-
## Troubleshooting
|
|
582
|
-
|
|
583
|
-
### Server Won't Start
|
|
584
|
-
```bash
|
|
585
|
-
# Check port 3000 is available
|
|
586
|
-
lsof -i :3000
|
|
587
|
-
|
|
588
|
-
# Kill process using port
|
|
589
|
-
kill -9 <PID>
|
|
590
|
-
|
|
591
|
-
# Start server again
|
|
592
|
-
npm run dev
|
|
593
|
-
```
|
|
594
|
-
|
|
595
|
-
### Claude Code Not Found
|
|
596
|
-
```bash
|
|
597
|
-
# Check Claude is installed
|
|
598
|
-
which claude
|
|
599
|
-
|
|
600
|
-
# Check version
|
|
601
|
-
claude --version
|
|
602
|
-
|
|
603
|
-
# Check dangerously-skip-permissions flag
|
|
604
|
-
claude --help | grep dangerously
|
|
605
|
-
```
|
|
606
|
-
|
|
607
|
-
### UI Not Loading
|
|
608
|
-
```bash
|
|
609
|
-
# Check server is running
|
|
610
|
-
curl http://localhost:3000
|
|
611
|
-
|
|
612
|
-
# Check for console errors (F12)
|
|
613
|
-
# Check Network tab for 404/500 errors
|
|
614
|
-
# Clear cache and reload
|
|
615
|
-
```
|
|
616
|
-
|
|
617
|
-
### Streaming Not Working
|
|
618
|
-
```bash
|
|
619
|
-
# Check WebSocket connection
|
|
620
|
-
# Open DevTools Network tab
|
|
621
|
-
# Look for /sync WebSocket
|
|
622
|
-
# Check for connection errors
|
|
623
|
-
|
|
624
|
-
# Verify JSON streaming
|
|
625
|
-
claude --output-format=stream-json
|
|
626
|
-
# Type some text
|
|
627
|
-
# Check output is valid JSON
|
|
628
|
-
```
|
|
629
|
-
|
|
630
|
-
---
|
|
631
|
-
|
|
632
|
-
## Contributing
|
|
633
|
-
|
|
634
|
-
The system is production-ready and thoroughly tested. For improvements:
|
|
635
|
-
|
|
636
|
-
1. Ensure all tests pass
|
|
637
|
-
2. Maintain code under 200 lines per function
|
|
638
|
-
3. Use TypeScript types for all new code
|
|
639
|
-
4. Follow existing patterns
|
|
640
|
-
5. Document changes in CLAUDE.md
|
|
641
|
-
|
|
642
|
-
---
|
|
42
|
+
| Variable | Default | Description |
|
|
43
|
+
|----------|---------|-------------|
|
|
44
|
+
| `PORT` | 3000 | Server port |
|
|
45
|
+
| `BASE_URL` | /gm | URL prefix |
|
|
46
|
+
| `HOT_RELOAD` | true | Watch mode for development |
|
|
643
47
|
|
|
644
48
|
## License
|
|
645
49
|
|
|
646
50
|
MIT
|
|
647
51
|
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
## Support
|
|
651
|
-
|
|
652
|
-
For issues or questions, refer to:
|
|
653
|
-
- CLAUDE.md - Complete implementation documentation
|
|
654
|
-
- .prd - Detailed requirements and execution plan
|
|
655
|
-
- browser-test.js - Test harness for verification
|
|
656
|
-
|
|
657
|
-
---
|
|
658
|
-
|
|
659
|
-
## System Status
|
|
660
|
-
|
|
661
|
-
**Production Ready**: ✅ YES
|
|
662
|
-
**Last Verified**: 2026-02-05
|
|
663
|
-
**All Tests Passing**: ✅ YES (242/242)
|
|
664
|
-
**Performance Targets Met**: ✅ YES
|
|
665
|
-
**Security Reviewed**: ✅ YES
|
|
666
|
-
**Zero Known Issues**: ✅ YES
|
|
52
|
+
## Repository
|
|
667
53
|
|
|
668
|
-
|
|
54
|
+
https://github.com/AnEntrypoint/agentgui
|
package/static/index.html
CHANGED
|
@@ -2084,21 +2084,7 @@
|
|
|
2084
2084
|
<!-- Input area: fixed at bottom -->
|
|
2085
2085
|
<div class="input-section">
|
|
2086
2086
|
<div class="input-wrapper">
|
|
2087
|
-
<select class="agent-selector" data-agent-selector title="Select agent">
|
|
2088
|
-
<option value="claude-code">Claude Code</option>
|
|
2089
|
-
<option value="opencode">OpenCode</option>
|
|
2090
|
-
<option value="gemini">Gemini CLI</option>
|
|
2091
|
-
<option value="goose">Goose</option>
|
|
2092
|
-
<option value="openhands">OpenHands</option>
|
|
2093
|
-
<option value="augment">Augment Code</option>
|
|
2094
|
-
<option value="cline">Cline</option>
|
|
2095
|
-
<option value="kimi">Kimi CLI</option>
|
|
2096
|
-
<option value="qwen">Qwen Code</option>
|
|
2097
|
-
<option value="codex">Codex CLI</option>
|
|
2098
|
-
<option value="mistral">Mistral Vibe</option>
|
|
2099
|
-
<option value="kiro">Kiro CLI</option>
|
|
2100
|
-
<option value="fast-agent">fast-agent</option>
|
|
2101
|
-
</select>
|
|
2087
|
+
<select class="agent-selector" data-agent-selector title="Select agent"></select>
|
|
2102
2088
|
<textarea
|
|
2103
2089
|
class="message-textarea"
|
|
2104
2090
|
data-message-input
|
package/static/js/client.js
CHANGED
|
@@ -1154,13 +1154,15 @@ class AgentGUIClient {
|
|
|
1154
1154
|
const { agents } = await response.json();
|
|
1155
1155
|
this.state.agents = agents;
|
|
1156
1156
|
|
|
1157
|
-
// Populate agent selector
|
|
1157
|
+
// Populate agent selector with discovered (available) agents only
|
|
1158
1158
|
if (this.ui.agentSelector) {
|
|
1159
1159
|
this.ui.agentSelector.innerHTML = agents
|
|
1160
1160
|
.map(agent => `<option value="${agent.id}">${agent.name}</option>`)
|
|
1161
1161
|
.join('');
|
|
1162
1162
|
}
|
|
1163
1163
|
|
|
1164
|
+
window.dispatchEvent(new CustomEvent('agents-loaded', { detail: { agents } }));
|
|
1165
|
+
|
|
1164
1166
|
return agents;
|
|
1165
1167
|
} catch (error) {
|
|
1166
1168
|
console.error('Failed to load agents:', error);
|
package/static/js/voice.js
CHANGED
|
@@ -22,13 +22,20 @@
|
|
|
22
22
|
setupAgentSelector();
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
function syncVoiceSelector() {
|
|
26
|
+
var voiceSelector = document.querySelector('[data-voice-agent-selector]');
|
|
27
|
+
var mainSelector = document.querySelector('[data-agent-selector]');
|
|
28
|
+
if (!voiceSelector || !mainSelector) return;
|
|
29
|
+
voiceSelector.innerHTML = mainSelector.innerHTML;
|
|
30
|
+
if (mainSelector.value) voiceSelector.value = mainSelector.value;
|
|
31
|
+
}
|
|
32
|
+
|
|
25
33
|
function setupAgentSelector() {
|
|
26
34
|
var voiceSelector = document.querySelector('[data-voice-agent-selector]');
|
|
27
35
|
if (!voiceSelector) return;
|
|
28
36
|
var mainSelector = document.querySelector('[data-agent-selector]');
|
|
29
37
|
if (mainSelector) {
|
|
30
|
-
|
|
31
|
-
voiceSelector.value = mainSelector.value;
|
|
38
|
+
syncVoiceSelector();
|
|
32
39
|
mainSelector.addEventListener('change', function() {
|
|
33
40
|
voiceSelector.value = mainSelector.value;
|
|
34
41
|
});
|
|
@@ -36,6 +43,7 @@
|
|
|
36
43
|
mainSelector.value = voiceSelector.value;
|
|
37
44
|
});
|
|
38
45
|
}
|
|
46
|
+
window.addEventListener('agents-loaded', syncVoiceSelector);
|
|
39
47
|
}
|
|
40
48
|
|
|
41
49
|
function setupTTSToggle() {
|