agentgui 1.0.305 → 1.0.307

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.
Files changed (2) hide show
  1. package/bin/gmgui.cjs +25 -25
  2. package/package.json +1 -1
package/bin/gmgui.cjs CHANGED
@@ -15,31 +15,31 @@ async function gmgui(args = []) {
15
15
  // may not be in PATH even though bunx works.
16
16
  const installer = 'npm';
17
17
 
18
- // Ensure dependencies are installed only if node_modules is missing
19
- // Skip this for bunx/npx which manage dependencies independently
20
- const nodeModulesPath = path.join(projectRoot, 'node_modules');
21
- const execPath = process.env.npm_execpath || '';
22
- const isBunx = execPath.includes('bun') || process.env.BUN_INSTALL;
23
- const isNpx = execPath.includes('npx') || process.env._.includes('npx');
24
-
25
- // Also skip if running from temp/cache directory (bunx/npm cache)
26
- const isFromCache = projectRoot.includes('node_modules') &&
27
- (projectRoot.includes('.bun') || projectRoot.includes('_npx') || projectRoot.includes('npm-cache'));
28
-
29
- if (!isBunx && !isNpx && !isFromCache && !fs.existsSync(nodeModulesPath)) {
30
- console.log(`Installing dependencies with ${installer}...`);
31
- const installResult = spawnSync(installer, ['install'], {
32
- cwd: projectRoot,
33
- stdio: 'inherit',
34
- shell: true
35
- });
36
- if (installResult.status !== 0 && installResult.status !== null) {
37
- throw new Error(`${installer} install failed with code ${installResult.status}`);
38
- }
39
- if (installResult.error) {
40
- throw new Error(`${installer} install failed: ${installResult.error.message}`);
41
- }
42
- }
18
+ // Ensure dependencies are installed only if node_modules is missing
19
+ // Skip this for bunx/npx which manage dependencies independently
20
+ const nodeModulesPath = path.join(projectRoot, 'node_modules');
21
+ const execPath = process.env.npm_execpath || '';
22
+ const isBunx = execPath.includes('bun') || process.env.BUN_INSTALL;
23
+ const isNpx = execPath.includes('npx') || (process.env._ && process.env._.includes('npx'));
24
+
25
+ // Also skip if running from temp/cache directory (bunx/npm cache)
26
+ const isFromCache = projectRoot.includes('node_modules') &&
27
+ (projectRoot.includes('.bun') || projectRoot.includes('_npx') || projectRoot.includes('npm-cache'));
28
+
29
+ if (!isBunx && !isNpx && !isFromCache && !fs.existsSync(nodeModulesPath)) {
30
+ console.log(`Installing dependencies with ${installer}...`);
31
+ const installResult = spawnSync(installer, ['install'], {
32
+ cwd: projectRoot,
33
+ stdio: 'inherit',
34
+ shell: true
35
+ });
36
+ if (installResult.status !== 0 && installResult.status !== null) {
37
+ throw new Error(`${installer} install failed with code ${installResult.status}`);
38
+ }
39
+ if (installResult.error) {
40
+ throw new Error(`${installer} install failed: ${installResult.error.message}`);
41
+ }
42
+ }
43
43
 
44
44
  const port = process.env.PORT || 3000;
45
45
  const baseUrl = process.env.BASE_URL || '/gm';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentgui",
3
- "version": "1.0.305",
3
+ "version": "1.0.307",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "server.js",