agentgui 1.0.852 β†’ 1.0.854

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/.codeinsight ADDED
@@ -0,0 +1,102 @@
1
+ ## 🎯 agentgui v1.0.811 β€” Multi-agent ACP client with real-time communication
2
+
3
+ **Runtime:** node (pnpm)
4
+
5
+ ## πŸš€ Quick Start
6
+
7
+ `node server.js --watch`
8
+
9
+ # 103f 27.9kL 1343fn 31cls cx2.6
10
+ *Legend: f=files L=lines fn=functions cls=classes cx=avg-complexity | file:line:name(NL)=location Np=params | ↑N=imports-from ↓N=imported-by (N)=occurrences (+N)=more | πŸ”„circular 🏝️isolated πŸ”₯complex πŸ“‹duplicated πŸ“large*
11
+
12
+ **Langs:** JS:99% JSON:0%
13
+
14
+ ## πŸ› οΈ Tech Stack
15
+
16
+ **Stack:** Express, Zod
17
+ **Patterns:** Date.now(335), sendJSON(225), prep(185), this.escapeHtml(157), document.createElement(142), broadcastSync(140)
18
+ **Top IDs:** type(839), data(811), error(724), conversationId(624), message(572), req(563)
19
+
20
+ ## ⚑ Code Patterns
21
+
22
+ **Async:** async(622), await(270), Promise(15)
23
+ **Errors:** try/catch(457), throw(120)
24
+ **Internal calls:** Date.now(335), sendJSON(225), prep(185), this.escapeHtml(157), document.createElement(142), broadcastSync(140), document.getElementById(138), assign(106)
25
+
26
+ ## πŸ”— I/O & Integration
27
+
28
+ **Env vars:** AGENTGUI_BASE_URL, BASE_URL, BUN_BE_BUN, BUN_INSTALL, CODEX_HOME, DEBUG, GITHUB_USER, GOOGLE_OAUTH_CLIENT_ID, GOOGLE_OAUTH_CLIENT_SECRET, HOME, HOT_RELOAD, NPM_CACHE, PASSWORD, PORT, PORTABLE_DATA_DIR, PORTABLE_EXE_DIR, RATE_LIMIT_MAX, SHELL, STARTUP_CWD, _, npm_config_cache, npm_execpath
29
+ **HTTP:** fetch(29)
30
+ **Storage:** SQL(204), files(240), JSON(175)
31
+ **Events:** emit(48), listen(289)
32
+
33
+ ## πŸ“Š Code Organization
34
+
35
+ **Large files:** js/client.js:3479L, server.js:3407L, js/streaming-renderer.js:2422L, lib/db-queries.js:1412L, lib/claude-runner.js:1266L, static/app.js:968L (+17)
36
+ **Long funcs:** lib/db-queries.js:3:createQueries(1410L), server.js:1838:processMessageWithStreaming(539L), js/client.js:2798:loadConversationMessages(284L), lib/ws-handlers-conv.js:19:register(264L), lib/claude-runner.js:276:_runACPOnce(261L), js/client.js:439:setupUI(233L) (+71)
37
+ **Many params:** lib/db-queries.js:3:createQueries(101p), lib/ws-handlers-run.js:4:register(31p), lib/routes-tools.js:3:register(27p), acp-queries.js:8:createACPQueries(24p), lib/ws-handlers-conv.js:19:register(21p), lib/ws-handlers-util.js:9:register(20p) (+31)
38
+ **Classes:** lib/pm2-manager.js:0:PM2Manager, lib/plugin-loader.js:0:PluginLoader, lib/claude-runner.js:0:AgentRunner, lib/claude-runner.js:0:AgentRegistry, lib/checkpoint-manager.js:0:CheckpointManager, lib/ws-protocol.js:0:WsRouter, js/syntax-highlighter.js:0:SyntaxHighlighter, js/image-loader.js:0:ImageLoader (+16)
39
+
40
+ ## πŸ”„ Architecture
41
+
42
+ **L0 [pure exports]:** tool-install-machine(7↓), execution-machine(5↓), tool-version(4↓), agent-discovery(4↓), oauth-common(4↓), speech(3↓), codec(3↓), acp-server-machine(3↓) (+15)
43
+ **L3 [pure imports]:** server(43↑), agent-registry-configs(1↑)
44
+ **Cross-module:** server.js→lib, server.js→database.js, database.js→lib
45
+ **Hubs:** server(43↑0↓), tool-install-machine(0↑7↓), tool-manager(4↑1↓), routes-oauth(4↑1↓), execution-machine(0↑5↓)
46
+ **External:** xstate, module, bun:sqlite, zod, ws, lru-cache
47
+
48
+ ## πŸ”Œ API Surface
49
+
50
+ **Exported fns:** claude-runner.js:1196:runClaudeWithStreaming(1p), speech.js:9:ttsCacheKey(1p), speech.js:13:ttsCacheGet(1p), speech.js:17:ttsCacheSet(1p), ws-handlers-run.js:4:register(31p)
51
+ **Classes:** PM2Manager, PluginLoader, AgentRunner, AgentRegistry, CheckpointManager, WsRouter (+18)
52
+ **Entry files:** ws-handlers-run, routes-threads, tool-install-machine, claude-runner, agent-descriptors (+18)
53
+
54
+ ## 🚨 Issues
55
+
56
+ - πŸ”₯ Complex funcs: db-queries.js:3:createQueries(1410L), server.js:1838:processMessageWithStreaming(539L), client.js:2798:loadConversationMessages(284L), ws-handlers-conv.js:19:register(264L) (+24)
57
+ - πŸ“ Large files: lib/db-queries.js:1412L, lib/claude-runner.js:1266L, server.js:3407L (+7)
58
+ - πŸ“‹ 80 duplicated groups
59
+ - πŸ” hardcoded secrets in server.js:1760
60
+ - πŸ” SQL injection in acp-queries.js:142, acp-queries.js:143, acp-queries.js:176, acp-queries.js:177, db-queries.js:479, db-queries.js:480 (+2)
61
+
62
+ ## 🧹 Dead Code & Tests
63
+
64
+ **Orphaned:** git-plugin.js, state-barrier.js, copy-vendor.js, dialogs.js, recording-machine.js, pm2-monitor.js (+46)
65
+ **Tests:** 0/103 (0%)
66
+
67
+ ## πŸ“¦ Modules
68
+
69
+ - lib: 58f, 111cx, 34↑77↓
70
+ - static: 35f, 0cx, 0↑0↓
71
+ - bin: 1f, 0cx, 0↑0↓
72
+ - electron: 1f, 0cx, 0↑0↓
73
+ - scripts: 3f, 0cx, 0↑0↓
74
+
75
+ ## πŸ“„ File Index
76
+
77
+ **acp-queries.js** 182L fn: createACPQueries, createThread, getThread, patchThread (+17)
78
+ **bin/gmgui.cjs** 79L fn: gmgui
79
+ **database.js** 650L fn: getDataDir, initSchema, migrateFromJson, migrateToACP (+2)
80
+ **ecosystem.config.cjs** 22L exports: [script], [interpreter], [watch], [env], [apps]
81
+ **electron/main.js** 83L fn: startServer, pollReady, attempt, createWindow
82
+ **lib/acp-protocol.js** 91L fn: normalizeContentBlock, extractToolResultContent, handleSessionUpdate, createACPProtocolHandler
83
+ **lib/acp-sdk-manager.js** 199L fn: log, resolveCommand, resetIdleTimer, clearIdleTimer (+14)
84
+ **lib/acp-server-machine.js** 166L fn: calcBackoff, purgeOldRestarts, getOrCreate, get (+6)
85
+ **lib/agent-descriptors.js** 47L fn: buildDescriptor, initializeDescriptors, getAgentDescriptor, getAllDescriptors
86
+ **lib/agent-discovery.js** 168L fn: findCommand, queryACPServerAgents, discoverAgents, discoverExternalACPServers (+1)
87
+ **lib/agent-registry-configs.js** 125L fn: parseClaudeOutput, registerAllAgents, buildArgs, buildArgs
88
+ **lib/checkpoint-manager.js** 182L exports: [CheckpointManager] fn: constructor, loadCheckpoint, injectCheckpointEvents, copyCheckpointChunks (+5)
89
+ **lib/claude-runner.js** 1266L exports: [runClaudeWithStreaming] fn: getSpawnOptions, resolveCommand, constructor, defaultBuildArgs (+23)
90
+ **lib/codec.js** 4L fn: encode, decode
91
+ **lib/db-queries.js** 1412L fn: createQueries, createConversation, getConversation, getAllConversations (+90)
92
+ **lib/execution-machine.js** 182L fn: notifyListeners, getOrCreate, get, remove (+8)
93
+ **lib/gm-agent-configs.js** 77L fn: log, runInstaller, installGMAgentConfigs, forceReinstallGMAgentConfigs
94
+ **lib/jsonl-watcher.js** 253L fn: constructor, start, stop, removeConversation (+13)
95
+ **lib/model-download-machine.js** 107L fn: getActor, send, snapshot, isDownloading (+4)
96
+ **lib/oauth-codex.js** 164L exports: [CODEX_AUTH_FILE], [CODEX_HOME] fn: generatePkce, parseJwtEmail, saveCodexCredentials, getCodexOAuthStatus (+5)
97
+ *+83 more files*
98
+
99
+ Git: branch: main, 1 uncommitted
100
+ Hot: package.json(50), server.js(18), client.js(10), index.html(6), db-queries.js(6), main.css(5)
101
+ Tooling: GitHub Actions (build-platforms.yml, docker-publish.yml, gh-pages.yml, publish-release.yml), Docker
102
+ Conv[JS]: 4-space, single quotes, semicolons, named exports, relative imports, kebab-case files
package/CLAUDE.md CHANGED
@@ -464,6 +464,25 @@ CSS custom properties for code/thinking blocks live in `static/css/main.css`:
464
464
 
465
465
  `parseAndRenderMarkdown()` in `streaming-renderer.js` handles: `##`/`###` headers, `-`/`*` ul lists, `1.` ol lists, `>` blockquotes, `---` hr, inline bold/italic/code/links via `_mdInline()`. Thinking block content is rendered through this function.
466
466
 
467
+ ## README.md Documentation
468
+
469
+ **GitHub Badges and Metrics:**
470
+
471
+ The README.md uses shields.io badges with a consistent pattern:
472
+ - **Header badges** (lines 7-9): Star count, last commit, latest release β€” each links to corresponding GitHub page
473
+ - **GitHub Stats table** (lines 54-62): Detailed metrics (stars, forks, watchers, issues, activity) β€” each badge links to its resource page
474
+ - **All badges use:** `style=flat-square`, `color=blue`, dynamic data (no hardcoded values)
475
+
476
+ **Debug API section** (lines 174-192):
477
+ - Documents `DEBUG=1` environment variable for state inspection
478
+ - Lists `/api/debug/*` endpoints: machines, state, ws-stats
479
+ - Lists browser console `window.__debug` properties with purpose
480
+ - Links to CLAUDE.md for complete architecture documentation
481
+
482
+ **Approach validated:** Header badges are compact (visual prominence); stats table is detailed (discoverability). Non-redundant, no duplicate metrics, complementary visibility.
483
+
484
+ **For future observability improvements:** Use shields.io with the established pattern (flat-square, color=blue, dynamic endpoints). Link badges to corresponding GitHub resource pages. Document in README alongside the badge.
485
+
467
486
  ## Known Gotchas
468
487
 
469
488
  - **`agent-browser --version`** prints help, not version. Use `-V` flag.
package/README.md CHANGED
@@ -4,6 +4,9 @@
4
4
  [![npm downloads](https://img.shields.io/npm/dw/agentgui?color=brightgreen)](https://www.npmjs.com/package/agentgui)
5
5
  [![license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
6
6
  [![GitHub Pages](https://img.shields.io/badge/docs-live-blue)](https://anentrypoint.github.io/agentgui/)
7
+ [![GitHub stars](https://img.shields.io/github/stars/AnEntrypoint/agentgui?color=blue&style=flat-square)](https://github.com/AnEntrypoint/agentgui/stargazers)
8
+ [![GitHub last-commit](https://img.shields.io/github/last-commit/AnEntrypoint/agentgui?style=flat-square)](https://github.com/AnEntrypoint/agentgui/commits)
9
+ [![GitHub release](https://img.shields.io/github/v/release/AnEntrypoint/agentgui?style=flat-square)](https://github.com/AnEntrypoint/agentgui/releases)
7
10
 
8
11
  Multi-agent GUI client for AI coding agents with real-time streaming, WebSocket sync, and SQLite persistence.
9
12
 
@@ -48,6 +51,16 @@ Modern AI coding requires juggling multiple agents, each in their own terminal.
48
51
  - πŸ“ **File Browser** - Drag-and-drop uploads, direct file editing, and context-aware operations
49
52
  - πŸ”Œ **Developer Friendly** - Hot reload, REST API, WebSocket endpoints, and extensible plugin system
50
53
 
54
+ ## GitHub Stats
55
+
56
+ | Metric | Badge |
57
+ |--------|-------|
58
+ | **Stars** | [![GitHub stars](https://img.shields.io/github/stars/AnEntrypoint/agentgui?color=blue&style=flat-square)](https://github.com/AnEntrypoint/agentgui/stargazers) |
59
+ | **Forks** | [![GitHub forks](https://img.shields.io/github/forks/AnEntrypoint/agentgui?color=blue&style=flat-square)](https://github.com/AnEntrypoint/agentgui/network/members) |
60
+ | **Watchers** | [![GitHub watchers](https://img.shields.io/github/watchers/AnEntrypoint/agentgui?color=blue&style=flat-square)](https://github.com/AnEntrypoint/agentgui/watchers) |
61
+ | **Open Issues** | [![GitHub issues](https://img.shields.io/github/issues/AnEntrypoint/agentgui?color=blue&style=flat-square)](https://github.com/AnEntrypoint/agentgui/issues) |
62
+ | **Activity** | [![GitHub last-commit](https://img.shields.io/github/last-commit/AnEntrypoint/agentgui?style=flat-square)](https://github.com/AnEntrypoint/agentgui/commits) |
63
+
51
64
  ### Screenshots
52
65
 
53
66
  | Light Mode | Dark Mode |
@@ -156,6 +169,27 @@ All routes prefixed with `/gm`:
156
169
  - `BASE_URL` - URL prefix (default: /gm)
157
170
  - `STARTUP_CWD` - Working directory passed to agents
158
171
  - `HOT_RELOAD` - Enable watch mode (default: true)
172
+ - `DEBUG` - Enable internal state inspection endpoints (set to `1`)
173
+
174
+ ## Debug API
175
+
176
+ When `DEBUG=1` is set, internal state inspection endpoints become available:
177
+
178
+ **Endpoints:**
179
+ - `GET /api/debug/machines` - Inspect all XState v5 machine snapshots (execution, acp-server, tool-install states)
180
+ - `GET /api/debug/state` - Full server state dump (connections, queues, active sessions)
181
+ - `GET /api/debug/ws-stats` - WebSocket connection metrics and lag distribution
182
+
183
+ **Browser Console** (`window.__debug`):
184
+ - `window.__debug.convMachineStates` - Per-conversation UI state machines
185
+ - `window.__debug.toolInstallMachineStates` - Tool installation state
186
+ - `window.__debug.voiceMachineState` - TTS playback state
187
+ - `window.__debug.convListMachineState` - Conversation list machine
188
+ - `window.__debug.promptMachineState` - Prompt area state
189
+ - `window.__debug.wsConnectionState` - WebSocket connection status
190
+ - `window.__debug.getSyncState()` - Full snapshot of all machines at once
191
+
192
+ See [CLAUDE.md](CLAUDE.md) for complete XState v5 machine documentation and internal architecture details.
159
193
 
160
194
  ## Troubleshooting
161
195
 
@@ -0,0 +1,28 @@
1
+ Stack trace:
2
+ Frame Function Args
3
+ 0007FFFFAE00 00021005FEBA (000210285F48, 00021026AB6E, 000000000000, 0007FFFF9D00) msys-2.0.dll+0x1FEBA
4
+ 0007FFFFAE00 0002100467F9 (000000000000, 000000000000, 000000000000, 0007FFFFB0D8) msys-2.0.dll+0x67F9
5
+ 0007FFFFAE00 000210046832 (000210285FF9, 0007FFFFACB8, 000000000000, 000000000000) msys-2.0.dll+0x6832
6
+ 0007FFFFAE00 000210068F86 (000000000000, 000000000000, 000000000000, 000000000000) msys-2.0.dll+0x28F86
7
+ 0007FFFFAE00 0002100690B4 (0007FFFFAE10, 000000000000, 000000000000, 000000000000) msys-2.0.dll+0x290B4
8
+ 0007FFFFB0E0 00021006A49D (0007FFFFAE10, 000000000000, 000000000000, 000000000000) msys-2.0.dll+0x2A49D
9
+ End of stack trace
10
+ Loaded modules:
11
+ 000100400000 bash.exe
12
+ 7FFD0A9A0000 ntdll.dll
13
+ 7FFD088E0000 KERNEL32.DLL
14
+ 7FFD08270000 KERNELBASE.dll
15
+ 7FFD0A520000 USER32.dll
16
+ 000210040000 msys-2.0.dll
17
+ 7FFD08670000 win32u.dll
18
+ 7FFD09E60000 GDI32.dll
19
+ 7FFD07270000 gdi32full.dll
20
+ 7FFD07D80000 msvcp_win.dll
21
+ 7FFD07E30000 ucrtbase.dll
22
+ 7FFD09050000 advapi32.dll
23
+ 7FFD089B0000 msvcrt.dll
24
+ 7FFD0A460000 sechost.dll
25
+ 7FFD08740000 RPCRT4.dll
26
+ 7FFD06870000 CRYPTBASE.DLL
27
+ 7FFD07C10000 bcryptPrimitives.dll
28
+ 7FFD09530000 IMM32.DLL
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentgui",
3
- "version": "1.0.852",
3
+ "version": "1.0.854",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "electron/main.js",