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.
Files changed (69) hide show
  1. package/CLAUDE.md +280 -280
  2. package/IPFS_DOWNLOADER.md +277 -277
  3. package/TASK_2C_COMPLETION.md +334 -334
  4. package/bin/gmgui.cjs +54 -54
  5. package/build-portable.js +3 -42
  6. package/database.js +1422 -1406
  7. package/lib/claude-runner.js +1130 -1130
  8. package/lib/ipfs-downloader.js +459 -459
  9. package/lib/speech.js +152 -152
  10. package/package.json +1 -1
  11. package/readme.md +76 -76
  12. package/server.js +3787 -3794
  13. package/setup-npm-token.sh +68 -68
  14. package/static/app.js +773 -773
  15. package/static/event-rendering-showcase.html +708 -708
  16. package/static/index.html +3178 -3180
  17. package/static/js/agent-auth.js +298 -298
  18. package/static/js/audio-recorder-processor.js +18 -18
  19. package/static/js/client.js +2656 -2656
  20. package/static/js/conversations.js +583 -583
  21. package/static/js/dialogs.js +267 -267
  22. package/static/js/event-consolidator.js +101 -101
  23. package/static/js/event-filter.js +311 -311
  24. package/static/js/event-processor.js +452 -452
  25. package/static/js/features.js +413 -413
  26. package/static/js/kalman-filter.js +67 -67
  27. package/static/js/progress-dialog.js +130 -130
  28. package/static/js/script-runner.js +219 -219
  29. package/static/js/streaming-renderer.js +2123 -2120
  30. package/static/js/syntax-highlighter.js +269 -269
  31. package/static/js/tts-websocket-handler.js +152 -152
  32. package/static/js/ui-components.js +431 -431
  33. package/static/js/voice.js +849 -849
  34. package/static/js/websocket-manager.js +596 -596
  35. package/static/templates/INDEX.html +465 -465
  36. package/static/templates/README.md +190 -190
  37. package/static/templates/agent-capabilities.html +56 -56
  38. package/static/templates/agent-metadata-panel.html +44 -44
  39. package/static/templates/agent-status-badge.html +30 -30
  40. package/static/templates/code-annotation-panel.html +155 -155
  41. package/static/templates/code-suggestion-panel.html +184 -184
  42. package/static/templates/command-header.html +77 -77
  43. package/static/templates/command-output-scrollable.html +118 -118
  44. package/static/templates/elapsed-time.html +54 -54
  45. package/static/templates/error-alert.html +106 -106
  46. package/static/templates/error-history-timeline.html +160 -160
  47. package/static/templates/error-recovery-options.html +109 -109
  48. package/static/templates/error-stack-trace.html +95 -95
  49. package/static/templates/error-summary.html +80 -80
  50. package/static/templates/event-counter.html +48 -48
  51. package/static/templates/execution-actions.html +97 -97
  52. package/static/templates/execution-progress-bar.html +80 -80
  53. package/static/templates/execution-stepper.html +120 -120
  54. package/static/templates/file-breadcrumb.html +118 -118
  55. package/static/templates/file-diff-viewer.html +121 -121
  56. package/static/templates/file-metadata.html +133 -133
  57. package/static/templates/file-read-panel.html +66 -66
  58. package/static/templates/file-write-panel.html +120 -120
  59. package/static/templates/git-branch-remote.html +107 -107
  60. package/static/templates/git-diff-list.html +101 -101
  61. package/static/templates/git-log-visualization.html +153 -153
  62. package/static/templates/git-status-panel.html +115 -115
  63. package/static/templates/quality-metrics-display.html +170 -170
  64. package/static/templates/terminal-output-panel.html +87 -87
  65. package/static/templates/test-results-display.html +144 -144
  66. package/static/theme.js +72 -72
  67. package/test-download-progress.js +223 -223
  68. package/test-websocket-broadcast.js +147 -147
  69. package/tests/ipfs-downloader.test.js +370 -370
@@ -1,67 +1,67 @@
1
- class KalmanFilter {
2
- constructor(config = {}) {
3
- this._initEst = config.initialEstimate || 0;
4
- this._initErr = config.initialError || 1000;
5
- this._q = Math.max(config.processNoise || 1, 0.001);
6
- this._r = config.measurementNoise || 10;
7
- this._est = this._initEst;
8
- this._err = this._initErr;
9
- this._gain = 0;
10
- this._initialized = false;
11
- this._lastValid = this._initEst;
12
- }
13
-
14
- update(measurement) {
15
- if (!Number.isFinite(measurement)) {
16
- return { estimate: this._est, error: this._err, gain: this._gain };
17
- }
18
- if (measurement < 0) measurement = 0;
19
- if (!this._initialized) {
20
- this._est = measurement;
21
- this._err = this._r;
22
- this._initialized = true;
23
- this._lastValid = measurement;
24
- this._gain = 1;
25
- return { estimate: this._est, error: this._err, gain: this._gain };
26
- }
27
- let r = this._r;
28
- if (this._est > 0 && Math.abs(measurement - this._est) > this._est * 10) {
29
- r = r * 100;
30
- }
31
- const predErr = this._err + this._q;
32
- this._gain = predErr / (predErr + r);
33
- this._est = this._est + this._gain * (measurement - this._est);
34
- this._err = (1 - this._gain) * predErr;
35
- if (this._err < 1e-10) this._err = 1e-10;
36
- this._lastValid = this._est;
37
- return { estimate: this._est, error: this._err, gain: this._gain };
38
- }
39
-
40
- predict() {
41
- return this._est;
42
- }
43
-
44
- setProcessNoise(q) { this._q = Math.max(q, 0.001); }
45
- setMeasurementNoise(r) { this._r = r; }
46
-
47
- getState() {
48
- return {
49
- estimate: this._est,
50
- error: this._err,
51
- gain: this._gain,
52
- processNoise: this._q,
53
- measurementNoise: this._r,
54
- initialized: this._initialized
55
- };
56
- }
57
-
58
- reset() {
59
- this._est = this._initEst;
60
- this._err = this._initErr;
61
- this._gain = 0;
62
- this._initialized = false;
63
- this._lastValid = this._initEst;
64
- }
65
- }
66
-
67
- if (typeof module !== 'undefined' && module.exports) module.exports = KalmanFilter;
1
+ class KalmanFilter {
2
+ constructor(config = {}) {
3
+ this._initEst = config.initialEstimate || 0;
4
+ this._initErr = config.initialError || 1000;
5
+ this._q = Math.max(config.processNoise || 1, 0.001);
6
+ this._r = config.measurementNoise || 10;
7
+ this._est = this._initEst;
8
+ this._err = this._initErr;
9
+ this._gain = 0;
10
+ this._initialized = false;
11
+ this._lastValid = this._initEst;
12
+ }
13
+
14
+ update(measurement) {
15
+ if (!Number.isFinite(measurement)) {
16
+ return { estimate: this._est, error: this._err, gain: this._gain };
17
+ }
18
+ if (measurement < 0) measurement = 0;
19
+ if (!this._initialized) {
20
+ this._est = measurement;
21
+ this._err = this._r;
22
+ this._initialized = true;
23
+ this._lastValid = measurement;
24
+ this._gain = 1;
25
+ return { estimate: this._est, error: this._err, gain: this._gain };
26
+ }
27
+ let r = this._r;
28
+ if (this._est > 0 && Math.abs(measurement - this._est) > this._est * 10) {
29
+ r = r * 100;
30
+ }
31
+ const predErr = this._err + this._q;
32
+ this._gain = predErr / (predErr + r);
33
+ this._est = this._est + this._gain * (measurement - this._est);
34
+ this._err = (1 - this._gain) * predErr;
35
+ if (this._err < 1e-10) this._err = 1e-10;
36
+ this._lastValid = this._est;
37
+ return { estimate: this._est, error: this._err, gain: this._gain };
38
+ }
39
+
40
+ predict() {
41
+ return this._est;
42
+ }
43
+
44
+ setProcessNoise(q) { this._q = Math.max(q, 0.001); }
45
+ setMeasurementNoise(r) { this._r = r; }
46
+
47
+ getState() {
48
+ return {
49
+ estimate: this._est,
50
+ error: this._err,
51
+ gain: this._gain,
52
+ processNoise: this._q,
53
+ measurementNoise: this._r,
54
+ initialized: this._initialized
55
+ };
56
+ }
57
+
58
+ reset() {
59
+ this._est = this._initEst;
60
+ this._err = this._initErr;
61
+ this._gain = 0;
62
+ this._initialized = false;
63
+ this._lastValid = this._initEst;
64
+ }
65
+ }
66
+
67
+ if (typeof module !== 'undefined' && module.exports) module.exports = KalmanFilter;
@@ -1,130 +1,130 @@
1
- /**
2
- * Progress Dialog
3
- * Modal dialog for displaying download/upload progress
4
- */
5
-
6
- class ProgressDialog {
7
- constructor(config = {}) {
8
- this.title = config.title || 'Progress';
9
- this.message = config.message || 'Processing...';
10
- this.percentage = config.percentage || 0;
11
- this.cancellable = config.cancellable || false;
12
- this.onCancel = config.onCancel || null;
13
- this.overlay = null;
14
- this.progressBar = null;
15
- this.progressText = null;
16
- this.messageEl = null;
17
- this._create();
18
- }
19
-
20
- _create() {
21
- this.overlay = document.createElement('div');
22
- this.overlay.className = 'folder-modal-overlay visible';
23
- this.overlay.style.zIndex = '3000';
24
-
25
- const modal = document.createElement('div');
26
- modal.className = 'folder-modal';
27
- modal.style.width = '400px';
28
-
29
- const header = document.createElement('div');
30
- header.className = 'folder-modal-header';
31
- header.innerHTML = `
32
- <h3>${this._escapeHtml(this.title)}</h3>
33
- ${this.cancellable ? '<button class="folder-modal-close" aria-label="Cancel">&times;</button>' : ''}
34
- `;
35
-
36
- const body = document.createElement('div');
37
- body.style.padding = '1.5rem 1rem';
38
-
39
- this.messageEl = document.createElement('div');
40
- this.messageEl.style.marginBottom = '1rem';
41
- this.messageEl.style.fontSize = '0.875rem';
42
- this.messageEl.style.color = 'var(--color-text-primary)';
43
- this.messageEl.textContent = this.message;
44
-
45
- const progressContainer = document.createElement('div');
46
- progressContainer.style.marginBottom = '0.5rem';
47
-
48
- this.progressBar = document.createElement('div');
49
- this.progressBar.style.width = '100%';
50
- this.progressBar.style.height = '8px';
51
- this.progressBar.style.backgroundColor = 'var(--color-bg-secondary)';
52
- this.progressBar.style.borderRadius = '4px';
53
- this.progressBar.style.overflow = 'hidden';
54
-
55
- const progressFill = document.createElement('div');
56
- progressFill.className = 'progress-fill';
57
- progressFill.style.height = '100%';
58
- progressFill.style.backgroundColor = 'var(--color-primary)';
59
- progressFill.style.width = this.percentage + '%';
60
- progressFill.style.transition = 'width 0.3s ease';
61
-
62
- this.progressBar.appendChild(progressFill);
63
- progressContainer.appendChild(this.progressBar);
64
-
65
- this.progressText = document.createElement('div');
66
- this.progressText.style.fontSize = '0.75rem';
67
- this.progressText.style.color = 'var(--color-text-secondary)';
68
- this.progressText.style.textAlign = 'right';
69
- this.progressText.style.marginTop = '0.25rem';
70
- this.progressText.textContent = Math.round(this.percentage) + '%';
71
-
72
- body.appendChild(this.messageEl);
73
- body.appendChild(progressContainer);
74
- body.appendChild(this.progressText);
75
-
76
- modal.appendChild(header);
77
- modal.appendChild(body);
78
- this.overlay.appendChild(modal);
79
-
80
- if (this.cancellable) {
81
- const closeBtn = header.querySelector('.folder-modal-close');
82
- closeBtn.addEventListener('click', () => this._handleCancel());
83
- }
84
-
85
- document.body.appendChild(this.overlay);
86
- }
87
-
88
- update(percentage, message) {
89
- if (message !== undefined) {
90
- this.message = message;
91
- if (this.messageEl) {
92
- this.messageEl.textContent = message;
93
- }
94
- }
95
-
96
- if (percentage !== undefined) {
97
- this.percentage = Math.min(100, Math.max(0, percentage));
98
- const fill = this.progressBar?.querySelector('.progress-fill');
99
- if (fill) {
100
- fill.style.width = this.percentage + '%';
101
- }
102
- if (this.progressText) {
103
- this.progressText.textContent = Math.round(this.percentage) + '%';
104
- }
105
- }
106
- }
107
-
108
- close() {
109
- if (this.overlay && this.overlay.parentNode) {
110
- this.overlay.remove();
111
- }
112
- }
113
-
114
- _handleCancel() {
115
- if (this.onCancel) {
116
- this.onCancel();
117
- }
118
- this.close();
119
- }
120
-
121
- _escapeHtml(text) {
122
- const div = document.createElement('div');
123
- div.textContent = text;
124
- return div.innerHTML;
125
- }
126
- }
127
-
128
- if (typeof module !== 'undefined' && module.exports) {
129
- module.exports = ProgressDialog;
130
- }
1
+ /**
2
+ * Progress Dialog
3
+ * Modal dialog for displaying download/upload progress
4
+ */
5
+
6
+ class ProgressDialog {
7
+ constructor(config = {}) {
8
+ this.title = config.title || 'Progress';
9
+ this.message = config.message || 'Processing...';
10
+ this.percentage = config.percentage || 0;
11
+ this.cancellable = config.cancellable || false;
12
+ this.onCancel = config.onCancel || null;
13
+ this.overlay = null;
14
+ this.progressBar = null;
15
+ this.progressText = null;
16
+ this.messageEl = null;
17
+ this._create();
18
+ }
19
+
20
+ _create() {
21
+ this.overlay = document.createElement('div');
22
+ this.overlay.className = 'folder-modal-overlay visible';
23
+ this.overlay.style.zIndex = '3000';
24
+
25
+ const modal = document.createElement('div');
26
+ modal.className = 'folder-modal';
27
+ modal.style.width = '400px';
28
+
29
+ const header = document.createElement('div');
30
+ header.className = 'folder-modal-header';
31
+ header.innerHTML = `
32
+ <h3>${this._escapeHtml(this.title)}</h3>
33
+ ${this.cancellable ? '<button class="folder-modal-close" aria-label="Cancel">&times;</button>' : ''}
34
+ `;
35
+
36
+ const body = document.createElement('div');
37
+ body.style.padding = '1.5rem 1rem';
38
+
39
+ this.messageEl = document.createElement('div');
40
+ this.messageEl.style.marginBottom = '1rem';
41
+ this.messageEl.style.fontSize = '0.875rem';
42
+ this.messageEl.style.color = 'var(--color-text-primary)';
43
+ this.messageEl.textContent = this.message;
44
+
45
+ const progressContainer = document.createElement('div');
46
+ progressContainer.style.marginBottom = '0.5rem';
47
+
48
+ this.progressBar = document.createElement('div');
49
+ this.progressBar.style.width = '100%';
50
+ this.progressBar.style.height = '8px';
51
+ this.progressBar.style.backgroundColor = 'var(--color-bg-secondary)';
52
+ this.progressBar.style.borderRadius = '4px';
53
+ this.progressBar.style.overflow = 'hidden';
54
+
55
+ const progressFill = document.createElement('div');
56
+ progressFill.className = 'progress-fill';
57
+ progressFill.style.height = '100%';
58
+ progressFill.style.backgroundColor = 'var(--color-primary)';
59
+ progressFill.style.width = this.percentage + '%';
60
+ progressFill.style.transition = 'width 0.3s ease';
61
+
62
+ this.progressBar.appendChild(progressFill);
63
+ progressContainer.appendChild(this.progressBar);
64
+
65
+ this.progressText = document.createElement('div');
66
+ this.progressText.style.fontSize = '0.75rem';
67
+ this.progressText.style.color = 'var(--color-text-secondary)';
68
+ this.progressText.style.textAlign = 'right';
69
+ this.progressText.style.marginTop = '0.25rem';
70
+ this.progressText.textContent = Math.round(this.percentage) + '%';
71
+
72
+ body.appendChild(this.messageEl);
73
+ body.appendChild(progressContainer);
74
+ body.appendChild(this.progressText);
75
+
76
+ modal.appendChild(header);
77
+ modal.appendChild(body);
78
+ this.overlay.appendChild(modal);
79
+
80
+ if (this.cancellable) {
81
+ const closeBtn = header.querySelector('.folder-modal-close');
82
+ closeBtn.addEventListener('click', () => this._handleCancel());
83
+ }
84
+
85
+ document.body.appendChild(this.overlay);
86
+ }
87
+
88
+ update(percentage, message) {
89
+ if (message !== undefined) {
90
+ this.message = message;
91
+ if (this.messageEl) {
92
+ this.messageEl.textContent = message;
93
+ }
94
+ }
95
+
96
+ if (percentage !== undefined) {
97
+ this.percentage = Math.min(100, Math.max(0, percentage));
98
+ const fill = this.progressBar?.querySelector('.progress-fill');
99
+ if (fill) {
100
+ fill.style.width = this.percentage + '%';
101
+ }
102
+ if (this.progressText) {
103
+ this.progressText.textContent = Math.round(this.percentage) + '%';
104
+ }
105
+ }
106
+ }
107
+
108
+ close() {
109
+ if (this.overlay && this.overlay.parentNode) {
110
+ this.overlay.remove();
111
+ }
112
+ }
113
+
114
+ _handleCancel() {
115
+ if (this.onCancel) {
116
+ this.onCancel();
117
+ }
118
+ this.close();
119
+ }
120
+
121
+ _escapeHtml(text) {
122
+ const div = document.createElement('div');
123
+ div.textContent = text;
124
+ return div.innerHTML;
125
+ }
126
+ }
127
+
128
+ if (typeof module !== 'undefined' && module.exports) {
129
+ module.exports = ProgressDialog;
130
+ }