agentgui 1.0.737 → 1.0.739
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 +36 -13
- package/README.md +11 -4
- package/package.json +1 -1
- package/static/index.html +1 -1
package/CLAUDE.md
CHANGED
|
@@ -16,15 +16,30 @@ Server starts on `http://localhost:3000`, redirects to `/gm/`.
|
|
|
16
16
|
```
|
|
17
17
|
server.js HTTP server + WebSocket + all API routes (raw http.createServer)
|
|
18
18
|
database.js SQLite setup (WAL mode), schema, query functions
|
|
19
|
+
acp-queries.js ACP query helpers (UUID, timestamp, JSON utilities)
|
|
20
|
+
bin/gmgui.cjs CLI entry point (npx agentgui / bun x agentgui)
|
|
21
|
+
|
|
19
22
|
lib/claude-runner.js Agent framework - AgentRunner/AgentRegistry classes, direct protocol execution
|
|
20
23
|
lib/acp-runner.js ACP JSON-RPC session lifecycle (init, session/new, prompt, drain)
|
|
21
24
|
lib/acp-protocol.js ACP session/update message normalization (shared by all ACP agents)
|
|
22
|
-
lib/agent-registry-configs.js Agent registration configs (Claude Code, OpenCode, Gemini, 10+ ACP agents)
|
|
23
|
-
lib/agent-descriptors.js Data-driven ACP agent descriptor builder
|
|
24
25
|
lib/acp-sdk-manager.js ACP tool lifecycle - on-demand start opencode/kilo/codex, health checks, idle timeout
|
|
25
26
|
lib/acp-server-machine.js XState v5 machine per ACP tool: stopped/starting/running/crashed/restarting states
|
|
27
|
+
lib/agent-registry-configs.js Agent registration configs (Claude Code, OpenCode, Gemini, 10+ ACP agents)
|
|
28
|
+
lib/agent-descriptors.js Data-driven ACP agent descriptor builder
|
|
29
|
+
lib/checkpoint-manager.js Session recovery - load checkpoints, inject into resume flow, idempotency
|
|
30
|
+
lib/codec.js msgpack encode/decode (pack/unpack wrappers)
|
|
26
31
|
lib/execution-machine.js XState v5 machine per conversation: idle/streaming/draining/rate_limited states
|
|
32
|
+
lib/gm-agent-configs.js GM agent configuration and spawning
|
|
33
|
+
lib/jsonl-watcher.js Watches ~/.claude/projects for JSONL file changes
|
|
34
|
+
lib/plugin-interface.js Plugin interface contract definition
|
|
35
|
+
lib/plugin-loader.js Plugin discovery and loading (EventEmitter-based)
|
|
36
|
+
lib/pm2-manager.js PM2 process management wrapper
|
|
27
37
|
lib/tool-install-machine.js XState v5 machine per tool: unchecked/checking/idle/installing/installed/updating/needs_update/failed states
|
|
38
|
+
lib/tool-manager.js Tool facade - re-exports from tool-version, tool-spawner, tool-provisioner
|
|
39
|
+
lib/tool-version.js Version detection for CLI tools and plugins (data-driven framework paths)
|
|
40
|
+
lib/tool-spawner.js npm/bun install/update spawn with timeout and heartbeat
|
|
41
|
+
lib/tool-provisioner.js Auto-provisioning and periodic update checking
|
|
42
|
+
lib/speech.js Speech-to-text and text-to-speech via @huggingface/transformers
|
|
28
43
|
lib/ws-protocol.js WebSocket RPC router (WsRouter class)
|
|
29
44
|
lib/ws-optimizer.js Per-client priority queue for WS event batching
|
|
30
45
|
lib/ws-handlers-conv.js Conversation CRUD, chunks, cancel, steer, inject RPC handlers
|
|
@@ -35,27 +50,33 @@ lib/ws-handlers-run.js Thread/run RPC handlers
|
|
|
35
50
|
lib/ws-handlers-util.js Utility RPC handlers (speech, auth, git, tools, voice)
|
|
36
51
|
lib/ws-handlers-oauth.js Gemini + Codex OAuth WS RPC handlers
|
|
37
52
|
lib/ws-handlers-scripts.js npm script run/stop WS RPC handlers
|
|
38
|
-
lib/
|
|
39
|
-
|
|
40
|
-
lib/tool-spawner.js npm/bun install/update spawn with timeout and heartbeat
|
|
41
|
-
lib/tool-provisioner.js Auto-provisioning and periodic update checking
|
|
42
|
-
lib/speech.js Speech-to-text and text-to-speech via @huggingface/transformers
|
|
43
|
-
bin/gmgui.cjs CLI entry point (npx agentgui / bun x agentgui)
|
|
53
|
+
lib/plugins/ Server plugins (acp, agents, auth, database, files, git, speech, stream, tools, websocket, workflow)
|
|
54
|
+
|
|
44
55
|
static/index.html Main HTML shell
|
|
45
56
|
static/app.js App initialization
|
|
46
57
|
static/theme.js Theme switching
|
|
58
|
+
static/css/tools-popup.css Tool popup styles
|
|
47
59
|
static/js/client.js Main client logic
|
|
48
60
|
static/js/conversations.js Conversation management
|
|
49
|
-
static/js/streaming-renderer.js Renders
|
|
61
|
+
static/js/streaming-renderer.js Renders agent streaming events as HTML
|
|
50
62
|
static/js/event-processor.js Processes incoming events
|
|
51
63
|
static/js/event-filter.js Filters events by type
|
|
52
64
|
static/js/websocket-manager.js WebSocket connection handling
|
|
65
|
+
static/js/ws-client.js WsClient RPC wrapper over WebSocketManager
|
|
53
66
|
static/js/ui-components.js UI component helpers
|
|
54
67
|
static/js/syntax-highlighter.js Code syntax highlighting
|
|
55
68
|
static/js/voice.js Voice input/output
|
|
69
|
+
static/js/stt-handler.js Speech-to-text recording and upload
|
|
56
70
|
static/js/features.js View toggle, drag-drop upload, model progress indicator
|
|
57
71
|
static/js/tools-manager.js Tool install/update UI orchestrator
|
|
58
|
-
static/js/tools-manager-ui.js Tool card rendering + voice selector helpers
|
|
72
|
+
static/js/tools-manager-ui.js Tool card rendering + voice selector helpers
|
|
73
|
+
static/js/agent-auth.js Agent authentication UI (OAuth flows)
|
|
74
|
+
static/js/dialogs.js Modal dialog system
|
|
75
|
+
static/js/image-loader.js Lazy image loading for agent file read events
|
|
76
|
+
static/js/pm2-monitor.js PM2 process monitor UI
|
|
77
|
+
static/js/script-runner.js npm script runner UI
|
|
78
|
+
static/js/state-barrier.js Atomic state machine for conversation management
|
|
79
|
+
static/js/terminal.js xterm.js terminal integration
|
|
59
80
|
static/js/ws-machine.js XState v5 WS connection machine: disconnected/connecting/connected/reconnecting
|
|
60
81
|
static/js/conv-machine.js XState v5 per-conversation UI machine: idle/streaming/queued
|
|
61
82
|
static/js/tool-install-machine.js XState v5 per-tool UI install machine: idle/installing/installed/updating/needs_update/failed
|
|
@@ -63,7 +84,9 @@ static/js/voice-machine.js XState v5 voice/TTS machine: idle/queued/speaki
|
|
|
63
84
|
static/js/conv-list-machine.js XState v5 conversation list machine: unloaded/loading/loaded/error
|
|
64
85
|
static/js/prompt-machine.js XState v5 prompt area machine: ready/loading/streaming/queued/disabled
|
|
65
86
|
static/lib/xstate.umd.min.js XState v5 browser bundle (UMD, served locally from node_modules)
|
|
66
|
-
static/
|
|
87
|
+
static/lib/msgpackr.min.js msgpack browser bundle
|
|
88
|
+
static/lib/webjsx.js WebJSX library
|
|
89
|
+
static/vendor/ Third-party assets (highlight.js, Prism, RippleUI, xterm.js)
|
|
67
90
|
```
|
|
68
91
|
|
|
69
92
|
## XState State Machines
|
|
@@ -112,7 +135,7 @@ On startup, agentgui auto-launches bundled ACP tools (opencode, kilo) as HTTP se
|
|
|
112
135
|
- OpenCode: port 18100 (`opencode acp --port 18100`)
|
|
113
136
|
- Kilo: port 18101 (`kilo acp --port 18101`)
|
|
114
137
|
|
|
115
|
-
Managed by `lib/acp-manager.js`. Features: crash restart with exponential backoff (max 10 in 5min), health checks every 30s via `GET /provider`, clean shutdown on SIGTERM. The `acpPort` field on discovered agents is set automatically once healthy. Models are queried from the running ACP HTTP servers via their `/provider` endpoint.
|
|
138
|
+
Managed by `lib/acp-sdk-manager.js`. Features: crash restart with exponential backoff (max 10 in 5min), health checks every 30s via `GET /provider`, clean shutdown on SIGTERM. The `acpPort` field on discovered agents is set automatically once healthy. Models are queried from the running ACP HTTP servers via their `/provider` endpoint.
|
|
116
139
|
|
|
117
140
|
## REST API
|
|
118
141
|
|
|
@@ -348,7 +371,7 @@ OpenAI Codex CLI uses PKCE authorization code flow against `https://auth.openai.
|
|
|
348
371
|
- **`all_conversations_deleted`** must be in `BROADCAST_TYPES` set in server.js or it won't fan-out to all clients.
|
|
349
372
|
- **`streaming_start` and `message_created`** are high-priority in WSOptimizer — they flush immediately, not batched.
|
|
350
373
|
- **Sidebar animation:** `transition: none !important` in index.html CSS — sidebar snaps instantly on toggle by design.
|
|
351
|
-
- **Claude Code
|
|
374
|
+
- **Claude Code runs with plugins enabled** — `--dangerously-skip-permissions` was removed to allow gm plugin enforcement.
|
|
352
375
|
- **Tool status race on startup:** `autoProvision()` broadcasts `tool_status_update` for already-installed tools so the UI shows correct state before the first manual fetch.
|
|
353
376
|
- **Thinking blocks** are transient (not in DB), rendered only via `handleStreamingProgress()` in client.js. The `renderEvent` switch case for `thinking_block` is disabled to prevent double-render.
|
|
354
377
|
- **Terminal output** is base64-encoded (`encoding: 'base64'` field on message). Client decodes with `decodeURIComponent(escape(atob(data)))` pattern for multibyte safety.
|
package/README.md
CHANGED
|
@@ -87,17 +87,24 @@ Server starts on `http://localhost:3000/gm/`
|
|
|
87
87
|
## Architecture
|
|
88
88
|
|
|
89
89
|
```
|
|
90
|
-
server.js HTTP server + WebSocket + all API routes
|
|
90
|
+
server.js HTTP server + WebSocket + all API routes (raw http.createServer)
|
|
91
91
|
database.js SQLite setup (WAL mode), schema, query functions
|
|
92
|
-
lib/claude-runner.js Agent framework -
|
|
93
|
-
lib/acp-
|
|
92
|
+
lib/claude-runner.js Agent framework - AgentRunner/AgentRegistry classes
|
|
93
|
+
lib/acp-runner.js ACP JSON-RPC session lifecycle
|
|
94
|
+
lib/acp-sdk-manager.js ACP tool lifecycle - auto-starts HTTP servers, health checks, restart
|
|
95
|
+
lib/ws-protocol.js WebSocket RPC router (WsRouter class)
|
|
96
|
+
lib/ws-optimizer.js Per-client priority queue for WS event batching
|
|
97
|
+
lib/ws-handlers-*.js WebSocket RPC handlers (conv, msg, queue, session, run, util, oauth, scripts)
|
|
94
98
|
lib/speech.js Speech-to-text and text-to-speech via @huggingface/transformers
|
|
99
|
+
lib/tool-manager.js Tool detection, install, update facade
|
|
100
|
+
lib/plugins/ Server plugins (acp, agents, auth, database, files, git, speech, stream, tools, websocket, workflow)
|
|
95
101
|
static/index.html Main HTML shell
|
|
96
102
|
static/app.js App initialization
|
|
97
103
|
static/js/client.js Main client logic
|
|
98
104
|
static/js/conversations.js Conversation management
|
|
99
|
-
static/js/streaming-renderer.js Renders
|
|
105
|
+
static/js/streaming-renderer.js Renders agent streaming events as HTML
|
|
100
106
|
static/js/websocket-manager.js WebSocket connection handling
|
|
107
|
+
static/js/*.machine.js XState v5 state machines (ws, conv, tool-install, voice, conv-list, prompt)
|
|
101
108
|
```
|
|
102
109
|
|
|
103
110
|
### Key Details
|
package/package.json
CHANGED
package/static/index.html
CHANGED
|
@@ -3307,7 +3307,6 @@
|
|
|
3307
3307
|
var _escHtmlRe = /[&<>"']/g;
|
|
3308
3308
|
window._escHtml = function(t) { return t.replace(_escHtmlRe, function(c) { return _escHtmlMap[c]; }); };
|
|
3309
3309
|
</script>
|
|
3310
|
-
<script defer src="/gm/js/conversations.js"></script>
|
|
3311
3310
|
<script defer src="/gm/js/event-processor.js"></script>
|
|
3312
3311
|
<script defer src="/gm/js/streaming-renderer.js"></script>
|
|
3313
3312
|
<script defer src="/gm/js/image-loader.js"></script>
|
|
@@ -3319,6 +3318,7 @@
|
|
|
3319
3318
|
<script defer src="/gm/js/voice-machine.js"></script>
|
|
3320
3319
|
<script defer src="/gm/js/conv-list-machine.js"></script>
|
|
3321
3320
|
<script defer src="/gm/js/prompt-machine.js"></script>
|
|
3321
|
+
<script defer src="/gm/js/conversations.js"></script>
|
|
3322
3322
|
<script defer src="/gm/lib/msgpackr.min.js"></script>
|
|
3323
3323
|
<script defer src="/gm/js/websocket-manager.js"></script>
|
|
3324
3324
|
<script defer src="/gm/js/ws-client.js"></script>
|