agentgui 1.0.608 → 1.0.610

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 CHANGED
@@ -19,7 +19,7 @@ database.js SQLite setup (WAL mode), schema, query functions
19
19
  lib/claude-runner.js Agent framework - spawns CLI processes, parses stream-json output
20
20
  lib/acp-manager.js ACP tool lifecycle - auto-starts opencode/kilo HTTP servers, restart on crash
21
21
  lib/speech.js Speech-to-text and text-to-speech via @huggingface/transformers
22
- bin/gmgui.cjs CLI entry point (npx agentgui / bunx agentgui)
22
+ bin/gmgui.cjs CLI entry point (npx agentgui / bun x agentgui)
23
23
  static/index.html Main HTML shell
24
24
  static/app.js App initialization
25
25
  static/theme.js Theme switching
@@ -97,8 +97,8 @@ Tool updates are managed through a complete pipeline:
97
97
 
98
98
  **Update Flow:**
99
99
  1. Frontend (`static/js/tools-manager.js`) initiates POST to `/api/tools/{id}/update`
100
- 2. Server (`server.js` lines 1904-1961 for individual, 1973-2003 for batch) spawns bunx process
101
- 3. Tool manager (`lib/tool-manager.js` lines 400-432) executes `bunx <package>` and detects new version
100
+ 2. Server (`server.js` lines 1904-1961 for individual, 1973-2003 for batch) spawns bun x process
101
+ 3. Tool manager (`lib/tool-manager.js` lines 400-432) executes `bun x <package>` and detects new version
102
102
  4. Version is saved to database: `queries.updateToolStatus(toolId, { version, status: 'installed' })`
103
103
  5. WebSocket broadcasts `tool_update_complete` with version and status data
104
104
  6. Frontend updates UI and removes tool from `operationInProgress` set
@@ -117,7 +117,7 @@ Tool updates are managed through a complete pipeline:
117
117
 
118
118
  ## Tool Detection System
119
119
 
120
- The system auto-detects installed AI coding tools via `bunx` package resolution:
120
+ The system auto-detects installed AI coding tools via `bun x` package resolution:
121
121
  - **OpenCode**: `opencode-ai` package (id: gm-oc)
122
122
  - **Gemini CLI**: `@google/gemini-cli` package (id: gm-gc)
123
123
  - **Kilo**: `@kilocode/cli` package (id: gm-kilo)
@@ -129,7 +129,7 @@ Tool configuration in `lib/tool-manager.js` TOOLS array includes id, name, pkg,
129
129
  - Kilo: pkg='@kilocode/cli', pluginId='@kilocode/cli' (stored at ~/.config/kilo/agents/@kilocode/cli/)
130
130
  - OpenCode: pkg='opencode-ai', pluginId='opencode-ai' (stored at ~/.config/opencode/agents/opencode-ai/)
131
131
 
132
- Detection happens by spawning `bunx <package> --version` to check if tools are installed. Version detection uses pluginId to find the correct plugin.json file. Response from `/api/tools` includes: id, name, pkg, installed, status (one of: installed|needs_update|not_installed), isUpToDate, upgradeNeeded, hasUpdate. Frontend displays tools in UI and updates based on installation status.
132
+ Detection happens by spawning `bun x <package> --version` to check if tools are installed. Version detection uses pluginId to find the correct plugin.json file. Response from `/api/tools` includes: id, name, pkg, installed, status (one of: installed|needs_update|not_installed), isUpToDate, upgradeNeeded, hasUpdate. Frontend displays tools in UI and updates based on installation status.
133
133
 
134
134
  ### Tool Installation and Update UI Flow
135
135
 
package/bin/gmgui.cjs CHANGED
@@ -9,20 +9,20 @@ async function gmgui(args = []) {
9
9
  const command = args[0] || 'start';
10
10
 
11
11
  if (command === 'start') {
12
- // Always use node as runtime for reliability. When invoked via bunx,
12
+ // Always use node as runtime for reliability. When invoked via bun x,
13
13
  // dependencies are already managed. When invoked via npm/npx, we install
14
14
  // dependencies ourselves. This avoids ENOENT errors on systems where bun
15
- // may not be in PATH even though bunx works.
15
+ // may not be in PATH even though bun x works.
16
16
  const installer = 'npm';
17
17
 
18
18
  // Ensure dependencies are installed only if node_modules is missing
19
- // Skip this for bunx/npx which manage dependencies independently
19
+ // Skip this for bun x/npx which manage dependencies independently
20
20
  const nodeModulesPath = path.join(projectRoot, 'node_modules');
21
21
  const execPath = process.env.npm_execpath || '';
22
22
  const isBunx = execPath.includes('bun') || process.env.BUN_INSTALL;
23
23
  const isNpx = execPath.includes('npx') || (process.env._ && process.env._.includes('npx'));
24
24
 
25
- // Also skip if running from temp/cache directory (bunx/npm cache)
25
+ // Also skip if running from temp/cache directory (bun x/npm cache)
26
26
  const isFromCache = projectRoot.includes('node_modules') &&
27
27
  (projectRoot.includes('.bun') || projectRoot.includes('_npx') || projectRoot.includes('npm-cache'));
28
28
 
@@ -72,7 +72,7 @@ async function gmgui(args = []) {
72
72
  }
73
73
 
74
74
  // Always run when executed as a bin file (this file should only be used that way)
75
- // Works with npm, npx, bunx, and direct execution
75
+ // Works with npm, npx, bun x, and direct execution
76
76
  gmgui(process.argv.slice(2)).catch(err => {
77
77
  console.error(err.message);
78
78
  process.exit(1);
@@ -30,9 +30,6 @@ function resolveCommand(tool) {
30
30
  const ext = isWindows ? '.cmd' : '';
31
31
  const localBin = path.join(projectRoot, 'node_modules', '.bin', tool.cmd + ext);
32
32
  if (fs.existsSync(localBin)) return { bin: localBin, args: tool.args };
33
- const bunx = path.join(projectRoot, 'node_modules', '.bin', 'bunx' + ext);
34
- const runner = fs.existsSync(bunx) ? bunx : 'bunx';
35
- if (tool.npxPkg) return { bin: runner, args: [tool.npxPkg, ...tool.args] };
36
33
  return { bin: tool.cmd, args: tool.args };
37
34
  }
38
35
 
@@ -24,9 +24,9 @@ function resolveCommand(command, npxPackage) {
24
24
  if (npxCheck.status === 0) {
25
25
  return { cmd: 'npx', prefixArgs: ['--yes', npxPackage] };
26
26
  }
27
- const bunxCheck = spawnSync(whichCmd, ['bunx'], { encoding: 'utf-8', timeout: 3000 });
28
- if (bunxCheck.status === 0) {
29
- return { cmd: 'bunx', prefixArgs: [npxPackage] };
27
+ const bunCheck = spawnSync(whichCmd, ['bun'], { encoding: 'utf-8', timeout: 3000 });
28
+ if (bunCheck.status === 0) {
29
+ return { cmd: 'bun', prefixArgs: ['x', npxPackage] };
30
30
  }
31
31
  }
32
32
  return { cmd: command, prefixArgs: [] };
@@ -579,8 +579,8 @@ class AgentRegistry {
579
579
  if (a && a.npxPackage) {
580
580
  const npxCheck = spawnSync(whichCmd, ['npx'], { encoding: 'utf-8', timeout: 3000 });
581
581
  if (npxCheck.status === 0) return true;
582
- const bunxCheck = spawnSync(whichCmd, ['bunx'], { encoding: 'utf-8', timeout: 3000 });
583
- if (bunxCheck.status === 0) return true;
582
+ const bunCheck = spawnSync(whichCmd, ['bun'], { encoding: 'utf-8', timeout: 3000 });
583
+ if (bunCheck.status === 0) return true;
584
584
  }
585
585
  return false;
586
586
  } catch {
@@ -23,7 +23,7 @@ export default {
23
23
 
24
24
  for (const tool of tools) {
25
25
  try {
26
- execSync(`bunx ${tool.pkg} --version`, { stdio: 'ignore' });
26
+ execSync(`bun x ${tool.pkg} --version`, { stdio: 'ignore' });
27
27
  tool.installed = true;
28
28
  } catch {
29
29
  tool.installed = false;
@@ -242,19 +242,19 @@ export async function checkForUpdates(toolId) {
242
242
  }
243
243
 
244
244
  const spawnBunxProc = (pkg, onProgress) => new Promise((resolve) => {
245
- const cmd = isWindows ? 'bunx.cmd' : 'bunx';
245
+ const cmd = isWindows ? 'bun.cmd' : 'bun';
246
246
  let completed = false, stderr = '', stdout = '';
247
247
  let lastDataTime = Date.now();
248
248
  let proc;
249
249
 
250
250
  try {
251
- proc = spawn(cmd, [pkg], { stdio: ['pipe', 'pipe', 'pipe'], timeout: 300000, shell: isWindows });
251
+ proc = spawn(cmd, ['x', pkg], { stdio: ['pipe', 'pipe', 'pipe'], timeout: 300000, shell: isWindows });
252
252
  } catch (err) {
253
- return resolve({ success: false, error: `Failed to spawn bunx: ${err.message}` });
253
+ return resolve({ success: false, error: `Failed to spawn bun x: ${err.message}` });
254
254
  }
255
255
 
256
256
  if (!proc) {
257
- return resolve({ success: false, error: 'Failed to spawn bunx process' });
257
+ return resolve({ success: false, error: 'Failed to spawn bun x process' });
258
258
  }
259
259
 
260
260
  const timer = setTimeout(() => {
@@ -269,7 +269,7 @@ const spawnBunxProc = (pkg, onProgress) => new Promise((resolve) => {
269
269
  if (completed) { clearInterval(heartbeatTimer); return; }
270
270
  const timeSinceLastData = Date.now() - lastDataTime;
271
271
  if (timeSinceLastData > 30000) {
272
- console.warn(`[tool-manager] No output from bunx ${pkg} for ${timeSinceLastData}ms - process may be hung`);
272
+ console.warn(`[tool-manager] No output from bun x ${pkg} for ${timeSinceLastData}ms - process may be hung`);
273
273
  }
274
274
  }, 30000);
275
275
 
@@ -321,7 +321,7 @@ export async function install(toolId, onProgress) {
321
321
  try {
322
322
  const result = await spawnBunxProc(tool.pkg, onProgress);
323
323
  if (result.success) {
324
- // Give the filesystem a moment to settle after bunx install
324
+ // Give the filesystem a moment to settle after bun x install
325
325
  await new Promise(r => setTimeout(r, 500));
326
326
 
327
327
  // Aggressively clear all version caches to force fresh detection
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentgui",
3
- "version": "1.0.608",
3
+ "version": "1.0.610",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "server.js",
@@ -79,9 +79,9 @@ async function runTests() {
79
79
  console.log(' 1. Frontend sends POST /api/tools/{id}/update');
80
80
  console.log(' 2. Backend sets status to "updating" in DB');
81
81
  console.log(' 3. Backend sends immediate 200 response');
82
- console.log(' 4. Backend spawns bunx process async');
82
+ console.log(' 4. Backend spawns bun x process async');
83
83
  console.log(' 5. Backend broadcasts WebSocket "tool_update_progress" events');
84
- console.log(' 6. When bunx completes:');
84
+ console.log(' 6. When bun x completes:');
85
85
  console.log(' - Clears caches');
86
86
  console.log(' - Calls checkToolStatusAsync() for fresh status');
87
87
  console.log(' - Broadcasts "tool_update_complete" with new status');