agentgui 1.0.274 → 1.0.275
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 +280 -280
- package/IPFS_DOWNLOADER.md +277 -277
- package/TASK_2C_COMPLETION.md +334 -334
- package/bin/gmgui.cjs +54 -54
- package/build-portable.js +3 -42
- package/database.js +1422 -1406
- package/lib/claude-runner.js +1130 -1130
- package/lib/ipfs-downloader.js +459 -459
- package/lib/speech.js +152 -152
- package/package.json +1 -1
- package/readme.md +76 -76
- package/server.js +3787 -3794
- package/setup-npm-token.sh +68 -68
- package/static/app.js +773 -773
- package/static/event-rendering-showcase.html +708 -708
- package/static/index.html +3178 -3180
- package/static/js/agent-auth.js +298 -298
- package/static/js/audio-recorder-processor.js +18 -18
- package/static/js/client.js +2656 -2656
- package/static/js/conversations.js +583 -583
- package/static/js/dialogs.js +267 -267
- package/static/js/event-consolidator.js +101 -101
- package/static/js/event-filter.js +311 -311
- package/static/js/event-processor.js +452 -452
- package/static/js/features.js +413 -413
- package/static/js/kalman-filter.js +67 -67
- package/static/js/progress-dialog.js +130 -130
- package/static/js/script-runner.js +219 -219
- package/static/js/streaming-renderer.js +2123 -2120
- package/static/js/syntax-highlighter.js +269 -269
- package/static/js/tts-websocket-handler.js +152 -152
- package/static/js/ui-components.js +431 -431
- package/static/js/voice.js +849 -849
- package/static/js/websocket-manager.js +596 -596
- package/static/templates/INDEX.html +465 -465
- package/static/templates/README.md +190 -190
- package/static/templates/agent-capabilities.html +56 -56
- package/static/templates/agent-metadata-panel.html +44 -44
- package/static/templates/agent-status-badge.html +30 -30
- package/static/templates/code-annotation-panel.html +155 -155
- package/static/templates/code-suggestion-panel.html +184 -184
- package/static/templates/command-header.html +77 -77
- package/static/templates/command-output-scrollable.html +118 -118
- package/static/templates/elapsed-time.html +54 -54
- package/static/templates/error-alert.html +106 -106
- package/static/templates/error-history-timeline.html +160 -160
- package/static/templates/error-recovery-options.html +109 -109
- package/static/templates/error-stack-trace.html +95 -95
- package/static/templates/error-summary.html +80 -80
- package/static/templates/event-counter.html +48 -48
- package/static/templates/execution-actions.html +97 -97
- package/static/templates/execution-progress-bar.html +80 -80
- package/static/templates/execution-stepper.html +120 -120
- package/static/templates/file-breadcrumb.html +118 -118
- package/static/templates/file-diff-viewer.html +121 -121
- package/static/templates/file-metadata.html +133 -133
- package/static/templates/file-read-panel.html +66 -66
- package/static/templates/file-write-panel.html +120 -120
- package/static/templates/git-branch-remote.html +107 -107
- package/static/templates/git-diff-list.html +101 -101
- package/static/templates/git-log-visualization.html +153 -153
- package/static/templates/git-status-panel.html +115 -115
- package/static/templates/quality-metrics-display.html +170 -170
- package/static/templates/terminal-output-panel.html +87 -87
- package/static/templates/test-results-display.html +144 -144
- package/static/theme.js +72 -72
- package/test-download-progress.js +223 -223
- package/test-websocket-broadcast.js +147 -147
- package/tests/ipfs-downloader.test.js +370 -370
package/bin/gmgui.cjs
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
const { spawn, spawnSync } = require('child_process');
|
|
3
|
-
const path = require('path');
|
|
4
|
-
const fs = require('fs');
|
|
5
|
-
|
|
6
|
-
const projectRoot = path.join(__dirname, '..');
|
|
7
|
-
|
|
8
|
-
async function gmgui(args = []) {
|
|
9
|
-
const command = args[0] || 'start';
|
|
10
|
-
|
|
11
|
-
if (command === 'start') {
|
|
12
|
-
// Always use node as runtime for reliability. When invoked via bunx,
|
|
13
|
-
// dependencies are already managed. When invoked via npm/npx, we install
|
|
14
|
-
// dependencies ourselves. This avoids ENOENT errors on systems where bun
|
|
15
|
-
// may not be in PATH even though bunx works.
|
|
16
|
-
const installer = 'npm';
|
|
17
|
-
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const { spawn, spawnSync } = require('child_process');
|
|
3
|
+
const path = require('path');
|
|
4
|
+
const fs = require('fs');
|
|
5
|
+
|
|
6
|
+
const projectRoot = path.join(__dirname, '..');
|
|
7
|
+
|
|
8
|
+
async function gmgui(args = []) {
|
|
9
|
+
const command = args[0] || 'start';
|
|
10
|
+
|
|
11
|
+
if (command === 'start') {
|
|
12
|
+
// Always use node as runtime for reliability. When invoked via bunx,
|
|
13
|
+
// dependencies are already managed. When invoked via npm/npx, we install
|
|
14
|
+
// dependencies ourselves. This avoids ENOENT errors on systems where bun
|
|
15
|
+
// may not be in PATH even though bunx works.
|
|
16
|
+
const installer = 'npm';
|
|
17
|
+
|
|
18
18
|
// Ensure dependencies are installed only if node_modules is missing
|
|
19
19
|
// Skip this for bunx/npx which manage dependencies independently
|
|
20
20
|
const nodeModulesPath = path.join(projectRoot, 'node_modules');
|
|
@@ -40,40 +40,40 @@ async function gmgui(args = []) {
|
|
|
40
40
|
throw new Error(`${installer} install failed: ${installResult.error.message}`);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
|
|
44
|
-
const port = process.env.PORT || 3000;
|
|
45
|
-
const baseUrl = process.env.BASE_URL || '/gm';
|
|
46
|
-
const runtime = 'node';
|
|
47
|
-
|
|
48
|
-
return new Promise((resolve, reject) => {
|
|
49
|
-
const ps = spawn(runtime, [path.join(projectRoot, 'server.js')], {
|
|
50
|
-
cwd: projectRoot,
|
|
51
|
-
env: { ...process.env, PORT: port, BASE_URL: baseUrl, STARTUP_CWD: process.cwd() },
|
|
52
|
-
stdio: 'inherit'
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
ps.on('error', (err) => {
|
|
56
|
-
console.error(`Failed to start server: ${err.message}`);
|
|
57
|
-
reject(err);
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
ps.on('exit', (code) => {
|
|
61
|
-
if (code !== 0) {
|
|
62
|
-
console.error(`Server exited with code ${code}`);
|
|
63
|
-
// Don't reject - keep the promise pending so process stays alive
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
// Never resolve this promise - keeps the process alive indefinitely
|
|
68
|
-
});
|
|
69
|
-
} else {
|
|
70
|
-
throw new Error(`Unknown command: ${command}`);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
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
|
|
76
|
-
gmgui(process.argv.slice(2)).catch(err => {
|
|
77
|
-
console.error(err.message);
|
|
78
|
-
process.exit(1);
|
|
79
|
-
});
|
|
43
|
+
|
|
44
|
+
const port = process.env.PORT || 3000;
|
|
45
|
+
const baseUrl = process.env.BASE_URL || '/gm';
|
|
46
|
+
const runtime = 'node';
|
|
47
|
+
|
|
48
|
+
return new Promise((resolve, reject) => {
|
|
49
|
+
const ps = spawn(runtime, [path.join(projectRoot, 'server.js')], {
|
|
50
|
+
cwd: projectRoot,
|
|
51
|
+
env: { ...process.env, PORT: port, BASE_URL: baseUrl, STARTUP_CWD: process.cwd() },
|
|
52
|
+
stdio: 'inherit'
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
ps.on('error', (err) => {
|
|
56
|
+
console.error(`Failed to start server: ${err.message}`);
|
|
57
|
+
reject(err);
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
ps.on('exit', (code) => {
|
|
61
|
+
if (code !== 0) {
|
|
62
|
+
console.error(`Server exited with code ${code}`);
|
|
63
|
+
// Don't reject - keep the promise pending so process stays alive
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
// Never resolve this promise - keeps the process alive indefinitely
|
|
68
|
+
});
|
|
69
|
+
} else {
|
|
70
|
+
throw new Error(`Unknown command: ${command}`);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
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
|
|
76
|
+
gmgui(process.argv.slice(2)).catch(err => {
|
|
77
|
+
console.error(err.message);
|
|
78
|
+
process.exit(1);
|
|
79
|
+
});
|
package/build-portable.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import { fileURLToPath } from 'url';
|
|
4
|
-
import { execSync
|
|
4
|
+
import { execSync } from 'child_process';
|
|
5
5
|
|
|
6
6
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
7
7
|
const src = __dirname;
|
|
8
8
|
const out = path.join(src, '..', 'wagentgui');
|
|
9
9
|
const nm = path.join(src, 'node_modules');
|
|
10
|
-
const BUN_WIN_CACHE = path.join(process.env.HOME, '.bun', 'install', 'cache', 'bun-windows-x64-v1.3.9');
|
|
11
10
|
|
|
12
11
|
function log(msg) { console.log('[BUILD] ' + msg); }
|
|
13
12
|
|
|
@@ -46,55 +45,17 @@ function sizeOf(dir) {
|
|
|
46
45
|
return sz;
|
|
47
46
|
}
|
|
48
47
|
|
|
49
|
-
function ensureWinBun() {
|
|
50
|
-
if (fs.existsSync(BUN_WIN_CACHE)) {
|
|
51
|
-
const stat = fs.statSync(BUN_WIN_CACHE);
|
|
52
|
-
if (stat.size > 50 * 1024 * 1024) {
|
|
53
|
-
// Verify it's a PE file
|
|
54
|
-
const buf = Buffer.alloc(2);
|
|
55
|
-
const fd = fs.openSync(BUN_WIN_CACHE, 'r');
|
|
56
|
-
fs.readSync(fd, buf, 0, 2, 0);
|
|
57
|
-
fs.closeSync(fd);
|
|
58
|
-
if (buf[0] === 0x4D && buf[1] === 0x5A) return BUN_WIN_CACHE;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
log('Downloading Windows Bun binary...');
|
|
62
|
-
execSync(
|
|
63
|
-
`~/.bun/bin/bun build --compile --target=bun-windows-x64 --outfile=/tmp/_bun_trigger.exe /dev/null 2>/dev/null || true`,
|
|
64
|
-
{ stdio: 'inherit' }
|
|
65
|
-
);
|
|
66
|
-
if (fs.existsSync(BUN_WIN_CACHE)) return BUN_WIN_CACHE;
|
|
67
|
-
throw new Error(`Windows Bun binary not found at ${BUN_WIN_CACHE}. Run: bun build --compile --target=bun-windows-x64 --outfile=/tmp/x.exe /dev/null`);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
48
|
log('Output: ' + out);
|
|
71
49
|
rmrf(out);
|
|
72
50
|
fs.mkdirSync(out, { recursive: true });
|
|
73
51
|
|
|
74
|
-
log('
|
|
52
|
+
log('Compiling Windows executable...');
|
|
75
53
|
execSync(
|
|
76
|
-
`~/.bun/bin/bun build --
|
|
54
|
+
`~/.bun/bin/bun build --compile --target=bun-windows-x64 --outfile=${path.join(out, 'agentgui.exe')} ${path.join(src, 'portable-entry.js')}`,
|
|
77
55
|
{ stdio: 'inherit', cwd: src }
|
|
78
56
|
);
|
|
79
|
-
const bundleSize = fs.statSync(path.join(out, 'bundle.js')).size;
|
|
80
|
-
log(`Bundle: ${Math.round(bundleSize / 1024)}KB`);
|
|
81
|
-
|
|
82
|
-
log('Locating Windows Bun binary...');
|
|
83
|
-
const bunWinPath = ensureWinBun();
|
|
84
|
-
log(`Windows Bun: ${bunWinPath} (${Math.round(fs.statSync(bunWinPath).size / 1024 / 1024)}MB)`);
|
|
85
|
-
|
|
86
|
-
log('Injecting bundle into Windows Bun exe (.bun PE section)...');
|
|
87
|
-
const injector = path.join(src, 'scripts', 'inject-pe-section.py');
|
|
88
|
-
execFileSync('python3', [
|
|
89
|
-
injector,
|
|
90
|
-
bunWinPath,
|
|
91
|
-
path.join(out, 'bundle.js'),
|
|
92
|
-
path.join(out, 'agentgui.exe')
|
|
93
|
-
], { stdio: 'inherit' });
|
|
94
|
-
fs.unlinkSync(path.join(out, 'bundle.js'));
|
|
95
57
|
|
|
96
58
|
const exeSize = fs.statSync(path.join(out, 'agentgui.exe')).size;
|
|
97
|
-
// Verify PE magic
|
|
98
59
|
const buf = Buffer.alloc(2);
|
|
99
60
|
const fd = fs.openSync(path.join(out, 'agentgui.exe'), 'r');
|
|
100
61
|
fs.readSync(fd, buf, 0, 2, 0);
|