vibecodingmachine-core 1.0.2 β†’ 2025.11.2-7.1239

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 (49) hide show
  1. package/.babelrc +13 -13
  2. package/README.md +28 -28
  3. package/__tests__/applescript-manager-claude-fix.test.js +286 -286
  4. package/__tests__/requirement-2-auto-start-looping.test.js +69 -69
  5. package/__tests__/requirement-3-auto-start-looping.test.js +69 -69
  6. package/__tests__/requirement-4-auto-start-looping.test.js +69 -69
  7. package/__tests__/requirement-6-auto-start-looping.test.js +73 -73
  8. package/__tests__/requirement-7-status-tracking.test.js +332 -332
  9. package/jest.config.js +18 -18
  10. package/jest.setup.js +12 -12
  11. package/package.json +48 -48
  12. package/src/auth/access-denied.html +119 -119
  13. package/src/auth/shared-auth-storage.js +230 -230
  14. package/src/autonomous-mode/feature-implementer.cjs +70 -70
  15. package/src/autonomous-mode/feature-implementer.js +425 -425
  16. package/src/chat-management/chat-manager.cjs +71 -71
  17. package/src/chat-management/chat-manager.js +342 -342
  18. package/src/ide-integration/__tests__/applescript-manager-thread-closure.test.js +227 -227
  19. package/src/ide-integration/aider-cli-manager.cjs +850 -850
  20. package/src/ide-integration/applescript-manager.cjs +1088 -1088
  21. package/src/ide-integration/applescript-manager.js +2802 -2802
  22. package/src/ide-integration/applescript-utils.js +306 -306
  23. package/src/ide-integration/cdp-manager.cjs +221 -221
  24. package/src/ide-integration/cdp-manager.js +321 -321
  25. package/src/ide-integration/claude-code-cli-manager.cjs +301 -301
  26. package/src/ide-integration/cline-cli-manager.cjs +2252 -2252
  27. package/src/ide-integration/continue-cli-manager.js +431 -431
  28. package/src/ide-integration/provider-manager.cjs +354 -354
  29. package/src/ide-integration/quota-detector.cjs +34 -34
  30. package/src/ide-integration/quota-detector.js +349 -349
  31. package/src/ide-integration/windows-automation-manager.js +262 -262
  32. package/src/index.cjs +47 -43
  33. package/src/index.js +17 -17
  34. package/src/llm/direct-llm-manager.cjs +609 -609
  35. package/src/ui/ButtonComponents.js +247 -247
  36. package/src/ui/ChatInterface.js +499 -499
  37. package/src/ui/StateManager.js +259 -259
  38. package/src/utils/audit-logger.cjs +116 -116
  39. package/src/utils/config-helpers.cjs +94 -94
  40. package/src/utils/config-helpers.js +94 -94
  41. package/src/utils/electron-update-checker.js +113 -85
  42. package/src/utils/gcloud-auth.cjs +394 -394
  43. package/src/utils/logger.cjs +193 -193
  44. package/src/utils/logger.js +191 -191
  45. package/src/utils/repo-helpers.cjs +120 -120
  46. package/src/utils/repo-helpers.js +120 -120
  47. package/src/utils/requirement-helpers.js +432 -432
  48. package/src/utils/update-checker.js +227 -167
  49. package/src/utils/version-checker.js +169 -0
@@ -1,247 +1,247 @@
1
- /**
2
- * Shared UI Button Components
3
- * Used by both electron app and VSCode extension
4
- */
5
-
6
- // Button component for autonomous mode
7
- export function createAutonomousButton({
8
- autonomousMode = false,
9
- isPaused = false,
10
- onClick,
11
- className = '',
12
- style = {}
13
- }) {
14
- const button = document.createElement('button');
15
- button.className = `autonomous-button ${autonomousMode ? 'active' : ''} ${className}`;
16
- button.textContent = autonomousMode ? 'πŸ€– Stop Auto' : 'πŸ€– Start Auto';
17
- button.disabled = isPaused;
18
- button.title = autonomousMode ? 'Stop autonomous development' : 'Start autonomous feature implementation';
19
-
20
- // Apply shared styles
21
- Object.assign(button.style, {
22
- padding: '8px 16px',
23
- backgroundColor: autonomousMode ? '#d83b01' : '#68217a',
24
- color: 'white',
25
- border: 'none',
26
- borderRadius: '6px',
27
- fontSize: '14px',
28
- cursor: isPaused ? 'not-allowed' : 'pointer',
29
- transition: 'all 0.2s',
30
- fontWeight: '500',
31
- ...style
32
- });
33
-
34
- button.addEventListener('click', onClick);
35
- return button;
36
- }
37
-
38
- // Button component for pause/resume
39
- export function createPauseButton({
40
- isPaused = false,
41
- onClick,
42
- className = '',
43
- style = {}
44
- }) {
45
- const button = document.createElement('button');
46
- button.className = `pause-button ${isPaused ? 'paused' : ''} ${className}`;
47
- button.textContent = isPaused ? '▢️ Resume' : '⏸️ Pause (Esc)';
48
- button.title = isPaused ? 'Resume autonomous development' : 'Pause autonomous development (Esc)';
49
-
50
- // Apply shared styles
51
- Object.assign(button.style, {
52
- padding: '8px 16px',
53
- backgroundColor: isPaused ? '#28a745' : '#ffc107',
54
- color: isPaused ? 'white' : '#000',
55
- border: 'none',
56
- borderRadius: '6px',
57
- fontSize: '14px',
58
- cursor: 'pointer',
59
- transition: 'all 0.2s',
60
- ...style
61
- });
62
-
63
- button.addEventListener('click', onClick);
64
- return button;
65
- }
66
-
67
- // Button component for stop
68
- export function createStopButton({
69
- autonomousMode = false,
70
- onClick,
71
- className = '',
72
- style = {}
73
- }) {
74
- const button = document.createElement('button');
75
- button.className = `stop-button ${className}`;
76
- button.textContent = 'πŸ›‘ Stop';
77
- button.disabled = !autonomousMode;
78
- button.title = 'Stop autonomous development completely';
79
-
80
- // Apply shared styles
81
- Object.assign(button.style, {
82
- padding: '8px 16px',
83
- backgroundColor: autonomousMode ? '#dc3545' : '#6c757d',
84
- color: 'white',
85
- border: 'none',
86
- borderRadius: '6px',
87
- fontSize: '14px',
88
- cursor: autonomousMode ? 'pointer' : 'not-allowed',
89
- transition: 'all 0.2s',
90
- ...style
91
- });
92
-
93
- button.addEventListener('click', onClick);
94
- return button;
95
- }
96
-
97
- // Button component for check quota
98
- export function createCheckQuotaButton({
99
- isCheckingQuota = false,
100
- onClick,
101
- className = '',
102
- style = {}
103
- }) {
104
- const button = document.createElement('button');
105
- button.className = `check-quota-button ${className}`;
106
- button.textContent = isCheckingQuota ? 'Checking...' : 'πŸ” Check Quota';
107
- button.disabled = isCheckingQuota;
108
- button.title = 'Check for quota warnings and switch to available IDE';
109
-
110
- // Apply shared styles
111
- Object.assign(button.style, {
112
- padding: '8px 16px',
113
- backgroundColor: isCheckingQuota ? '#6c757d' : '#17a2b8',
114
- color: 'white',
115
- border: 'none',
116
- borderRadius: '6px',
117
- fontSize: '14px',
118
- cursor: isCheckingQuota ? 'not-allowed' : 'pointer',
119
- transition: 'all 0.2s',
120
- ...style
121
- });
122
-
123
- button.addEventListener('click', onClick);
124
- return button;
125
- }
126
-
127
- // Button component for open IDE
128
- export function createOpenIdeButton({
129
- isOpeningIde = false,
130
- onClick,
131
- className = '',
132
- style = {}
133
- }) {
134
- const button = document.createElement('button');
135
- button.className = `open-ide-button ${className}`;
136
- button.textContent = isOpeningIde ? 'Opening...' : 'Open IDE';
137
- button.disabled = isOpeningIde;
138
- button.title = isOpeningIde ? 'Opening IDE...' : 'Open IDE (dev mode)';
139
-
140
- // Apply shared styles
141
- Object.assign(button.style, {
142
- padding: '8px 16px',
143
- backgroundColor: isOpeningIde ? '#6c757d' : '#28a745',
144
- color: 'white',
145
- border: 'none',
146
- borderRadius: '6px',
147
- fontSize: '14px',
148
- cursor: isOpeningIde ? 'not-allowed' : 'pointer',
149
- transition: 'all 0.2s',
150
- display: 'flex',
151
- alignItems: 'center',
152
- gap: '8px',
153
- ...style
154
- });
155
-
156
- button.addEventListener('click', onClick);
157
- return button;
158
- }
159
-
160
- // IDE selector button
161
- export function createIdeButton({
162
- ide,
163
- isActive = false,
164
- onClick,
165
- className = '',
166
- style = {}
167
- }) {
168
- const button = document.createElement('button');
169
- button.className = `ide-button ${isActive ? 'active' : ''} ${className}`;
170
- button.textContent = ide === 'vscode' ? 'VS Code' : ide.charAt(0).toUpperCase() + ide.slice(1);
171
- button.dataset.ide = ide;
172
- button.title = `Select ${ide}`;
173
-
174
- // Apply shared styles
175
- Object.assign(button.style, {
176
- padding: '8px 16px',
177
- backgroundColor: isActive ? '#68217a' : '#007acc',
178
- color: 'white',
179
- border: 'none',
180
- borderRadius: '6px',
181
- fontSize: '14px',
182
- cursor: 'pointer',
183
- transition: 'all 0.2s',
184
- margin: '0 5px',
185
- ...style
186
- });
187
-
188
- button.addEventListener('click', onClick);
189
- return button;
190
- }
191
-
192
- // Container for control buttons
193
- export function createControlButtonContainer({
194
- className = '',
195
- style = {}
196
- }) {
197
- const container = document.createElement('div');
198
- container.className = `control-buttons ${className}`;
199
-
200
- // Apply shared styles
201
- Object.assign(container.style, {
202
- display: 'flex',
203
- gap: '10px',
204
- marginTop: '10px',
205
- flexWrap: 'wrap',
206
- justifyContent: 'center',
207
- ...style
208
- });
209
-
210
- return container;
211
- }
212
-
213
- // Update button states
214
- export function updateAutonomousButton(button, autonomousMode, isPaused) {
215
- button.textContent = autonomousMode ? 'πŸ€– Stop Auto' : 'πŸ€– Start Auto';
216
- button.className = `autonomous-button ${autonomousMode ? 'active' : ''}`;
217
- button.disabled = isPaused;
218
- button.style.backgroundColor = autonomousMode ? '#d83b01' : '#68217a';
219
- button.style.cursor = isPaused ? 'not-allowed' : 'pointer';
220
- }
221
-
222
- export function updatePauseButton(button, isPaused) {
223
- button.textContent = isPaused ? '▢️ Resume' : '⏸️ Pause (Esc)';
224
- button.className = `pause-button ${isPaused ? 'paused' : ''}`;
225
- button.style.backgroundColor = isPaused ? '#28a745' : '#ffc107';
226
- button.style.color = isPaused ? 'white' : '#000';
227
- }
228
-
229
- export function updateStopButton(button, autonomousMode) {
230
- button.disabled = !autonomousMode;
231
- button.style.backgroundColor = autonomousMode ? '#dc3545' : '#6c757d';
232
- button.style.cursor = autonomousMode ? 'pointer' : 'not-allowed';
233
- }
234
-
235
- export function updateCheckQuotaButton(button, isCheckingQuota) {
236
- button.textContent = isCheckingQuota ? 'Checking...' : 'πŸ” Check Quota';
237
- button.disabled = isCheckingQuota;
238
- button.style.backgroundColor = isCheckingQuota ? '#6c757d' : '#17a2b8';
239
- button.style.cursor = isCheckingQuota ? 'not-allowed' : 'pointer';
240
- }
241
-
242
- export function updateOpenIdeButton(button, isOpeningIde) {
243
- button.textContent = isOpeningIde ? 'Opening...' : 'Open IDE';
244
- button.disabled = isOpeningIde;
245
- button.style.backgroundColor = isOpeningIde ? '#6c757d' : '#28a745';
246
- button.style.cursor = isOpeningIde ? 'not-allowed' : 'pointer';
247
- }
1
+ /**
2
+ * Shared UI Button Components
3
+ * Used by both electron app and VSCode extension
4
+ */
5
+
6
+ // Button component for autonomous mode
7
+ export function createAutonomousButton({
8
+ autonomousMode = false,
9
+ isPaused = false,
10
+ onClick,
11
+ className = '',
12
+ style = {}
13
+ }) {
14
+ const button = document.createElement('button');
15
+ button.className = `autonomous-button ${autonomousMode ? 'active' : ''} ${className}`;
16
+ button.textContent = autonomousMode ? 'πŸ€– Stop Auto' : 'πŸ€– Start Auto';
17
+ button.disabled = isPaused;
18
+ button.title = autonomousMode ? 'Stop autonomous development' : 'Start autonomous feature implementation';
19
+
20
+ // Apply shared styles
21
+ Object.assign(button.style, {
22
+ padding: '8px 16px',
23
+ backgroundColor: autonomousMode ? '#d83b01' : '#68217a',
24
+ color: 'white',
25
+ border: 'none',
26
+ borderRadius: '6px',
27
+ fontSize: '14px',
28
+ cursor: isPaused ? 'not-allowed' : 'pointer',
29
+ transition: 'all 0.2s',
30
+ fontWeight: '500',
31
+ ...style
32
+ });
33
+
34
+ button.addEventListener('click', onClick);
35
+ return button;
36
+ }
37
+
38
+ // Button component for pause/resume
39
+ export function createPauseButton({
40
+ isPaused = false,
41
+ onClick,
42
+ className = '',
43
+ style = {}
44
+ }) {
45
+ const button = document.createElement('button');
46
+ button.className = `pause-button ${isPaused ? 'paused' : ''} ${className}`;
47
+ button.textContent = isPaused ? '▢️ Resume' : '⏸️ Pause (Esc)';
48
+ button.title = isPaused ? 'Resume autonomous development' : 'Pause autonomous development (Esc)';
49
+
50
+ // Apply shared styles
51
+ Object.assign(button.style, {
52
+ padding: '8px 16px',
53
+ backgroundColor: isPaused ? '#28a745' : '#ffc107',
54
+ color: isPaused ? 'white' : '#000',
55
+ border: 'none',
56
+ borderRadius: '6px',
57
+ fontSize: '14px',
58
+ cursor: 'pointer',
59
+ transition: 'all 0.2s',
60
+ ...style
61
+ });
62
+
63
+ button.addEventListener('click', onClick);
64
+ return button;
65
+ }
66
+
67
+ // Button component for stop
68
+ export function createStopButton({
69
+ autonomousMode = false,
70
+ onClick,
71
+ className = '',
72
+ style = {}
73
+ }) {
74
+ const button = document.createElement('button');
75
+ button.className = `stop-button ${className}`;
76
+ button.textContent = 'πŸ›‘ Stop';
77
+ button.disabled = !autonomousMode;
78
+ button.title = 'Stop autonomous development completely';
79
+
80
+ // Apply shared styles
81
+ Object.assign(button.style, {
82
+ padding: '8px 16px',
83
+ backgroundColor: autonomousMode ? '#dc3545' : '#6c757d',
84
+ color: 'white',
85
+ border: 'none',
86
+ borderRadius: '6px',
87
+ fontSize: '14px',
88
+ cursor: autonomousMode ? 'pointer' : 'not-allowed',
89
+ transition: 'all 0.2s',
90
+ ...style
91
+ });
92
+
93
+ button.addEventListener('click', onClick);
94
+ return button;
95
+ }
96
+
97
+ // Button component for check quota
98
+ export function createCheckQuotaButton({
99
+ isCheckingQuota = false,
100
+ onClick,
101
+ className = '',
102
+ style = {}
103
+ }) {
104
+ const button = document.createElement('button');
105
+ button.className = `check-quota-button ${className}`;
106
+ button.textContent = isCheckingQuota ? 'Checking...' : 'πŸ” Check Quota';
107
+ button.disabled = isCheckingQuota;
108
+ button.title = 'Check for quota warnings and switch to available IDE';
109
+
110
+ // Apply shared styles
111
+ Object.assign(button.style, {
112
+ padding: '8px 16px',
113
+ backgroundColor: isCheckingQuota ? '#6c757d' : '#17a2b8',
114
+ color: 'white',
115
+ border: 'none',
116
+ borderRadius: '6px',
117
+ fontSize: '14px',
118
+ cursor: isCheckingQuota ? 'not-allowed' : 'pointer',
119
+ transition: 'all 0.2s',
120
+ ...style
121
+ });
122
+
123
+ button.addEventListener('click', onClick);
124
+ return button;
125
+ }
126
+
127
+ // Button component for open IDE
128
+ export function createOpenIdeButton({
129
+ isOpeningIde = false,
130
+ onClick,
131
+ className = '',
132
+ style = {}
133
+ }) {
134
+ const button = document.createElement('button');
135
+ button.className = `open-ide-button ${className}`;
136
+ button.textContent = isOpeningIde ? 'Opening...' : 'Open IDE';
137
+ button.disabled = isOpeningIde;
138
+ button.title = isOpeningIde ? 'Opening IDE...' : 'Open IDE (dev mode)';
139
+
140
+ // Apply shared styles
141
+ Object.assign(button.style, {
142
+ padding: '8px 16px',
143
+ backgroundColor: isOpeningIde ? '#6c757d' : '#28a745',
144
+ color: 'white',
145
+ border: 'none',
146
+ borderRadius: '6px',
147
+ fontSize: '14px',
148
+ cursor: isOpeningIde ? 'not-allowed' : 'pointer',
149
+ transition: 'all 0.2s',
150
+ display: 'flex',
151
+ alignItems: 'center',
152
+ gap: '8px',
153
+ ...style
154
+ });
155
+
156
+ button.addEventListener('click', onClick);
157
+ return button;
158
+ }
159
+
160
+ // IDE selector button
161
+ export function createIdeButton({
162
+ ide,
163
+ isActive = false,
164
+ onClick,
165
+ className = '',
166
+ style = {}
167
+ }) {
168
+ const button = document.createElement('button');
169
+ button.className = `ide-button ${isActive ? 'active' : ''} ${className}`;
170
+ button.textContent = ide === 'vscode' ? 'VS Code' : ide.charAt(0).toUpperCase() + ide.slice(1);
171
+ button.dataset.ide = ide;
172
+ button.title = `Select ${ide}`;
173
+
174
+ // Apply shared styles
175
+ Object.assign(button.style, {
176
+ padding: '8px 16px',
177
+ backgroundColor: isActive ? '#68217a' : '#007acc',
178
+ color: 'white',
179
+ border: 'none',
180
+ borderRadius: '6px',
181
+ fontSize: '14px',
182
+ cursor: 'pointer',
183
+ transition: 'all 0.2s',
184
+ margin: '0 5px',
185
+ ...style
186
+ });
187
+
188
+ button.addEventListener('click', onClick);
189
+ return button;
190
+ }
191
+
192
+ // Container for control buttons
193
+ export function createControlButtonContainer({
194
+ className = '',
195
+ style = {}
196
+ }) {
197
+ const container = document.createElement('div');
198
+ container.className = `control-buttons ${className}`;
199
+
200
+ // Apply shared styles
201
+ Object.assign(container.style, {
202
+ display: 'flex',
203
+ gap: '10px',
204
+ marginTop: '10px',
205
+ flexWrap: 'wrap',
206
+ justifyContent: 'center',
207
+ ...style
208
+ });
209
+
210
+ return container;
211
+ }
212
+
213
+ // Update button states
214
+ export function updateAutonomousButton(button, autonomousMode, isPaused) {
215
+ button.textContent = autonomousMode ? 'πŸ€– Stop Auto' : 'πŸ€– Start Auto';
216
+ button.className = `autonomous-button ${autonomousMode ? 'active' : ''}`;
217
+ button.disabled = isPaused;
218
+ button.style.backgroundColor = autonomousMode ? '#d83b01' : '#68217a';
219
+ button.style.cursor = isPaused ? 'not-allowed' : 'pointer';
220
+ }
221
+
222
+ export function updatePauseButton(button, isPaused) {
223
+ button.textContent = isPaused ? '▢️ Resume' : '⏸️ Pause (Esc)';
224
+ button.className = `pause-button ${isPaused ? 'paused' : ''}`;
225
+ button.style.backgroundColor = isPaused ? '#28a745' : '#ffc107';
226
+ button.style.color = isPaused ? 'white' : '#000';
227
+ }
228
+
229
+ export function updateStopButton(button, autonomousMode) {
230
+ button.disabled = !autonomousMode;
231
+ button.style.backgroundColor = autonomousMode ? '#dc3545' : '#6c757d';
232
+ button.style.cursor = autonomousMode ? 'pointer' : 'not-allowed';
233
+ }
234
+
235
+ export function updateCheckQuotaButton(button, isCheckingQuota) {
236
+ button.textContent = isCheckingQuota ? 'Checking...' : 'πŸ” Check Quota';
237
+ button.disabled = isCheckingQuota;
238
+ button.style.backgroundColor = isCheckingQuota ? '#6c757d' : '#17a2b8';
239
+ button.style.cursor = isCheckingQuota ? 'not-allowed' : 'pointer';
240
+ }
241
+
242
+ export function updateOpenIdeButton(button, isOpeningIde) {
243
+ button.textContent = isOpeningIde ? 'Opening...' : 'Open IDE';
244
+ button.disabled = isOpeningIde;
245
+ button.style.backgroundColor = isOpeningIde ? '#6c757d' : '#28a745';
246
+ button.style.cursor = isOpeningIde ? 'not-allowed' : 'pointer';
247
+ }