vibecodingmachine-cli 2026.3.14-1537 → 2026.6.17-1956
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/bin/auth/auth-compliance.js +7 -7
- package/bin/commands/agent-commands.js +15 -15
- package/bin/commands/auto-commands.js +3 -3
- package/bin/commands/command-aliases.js +13 -4
- package/bin/config/cli-config.js +15 -5
- package/bin/update/update-checker.js +5 -5
- package/bin/vibecodingmachine.js +2 -2
- package/package.json +2 -2
- package/src/commands/agents/add.js +5 -5
- package/src/commands/agents/check.js +19 -19
- package/src/commands/agents/list.js +24 -24
- package/src/commands/agents/remove.js +4 -4
- package/src/commands/agents-check.js +1 -1
- package/src/commands/analyze-file-sizes.js +43 -43
- package/src/commands/auto-direct/auto-provider-manager.js +19 -19
- package/src/commands/auto-direct/auto-start-phases.js +493 -0
- package/src/commands/auto-direct/auto-status-display.js +35 -35
- package/src/commands/auto-direct/auto-utils.js +50 -50
- package/src/commands/auto-direct/cline-installer.js +56 -0
- package/src/commands/auto-direct/code-processor.js +27 -27
- package/src/commands/auto-direct/file-scanner.js +19 -19
- package/src/commands/auto-direct/ide-completion-waiter.js +485 -0
- package/src/commands/auto-direct/ide-fallback-runner.js +226 -0
- package/src/commands/auto-direct/ide-provider-runner.js +103 -0
- package/src/commands/auto-direct/iteration-handlers.js +189 -0
- package/src/commands/auto-direct/iteration-runner.js +485 -0
- package/src/commands/auto-direct/provider-config.js +38 -7
- package/src/commands/auto-direct/provider-manager.js +132 -6
- package/src/commands/auto-direct/requirement-manager.js +169 -104
- package/src/commands/auto-direct/requirement-mover.js +350 -0
- package/src/commands/auto-direct/spec-handlers.js +155 -0
- package/src/commands/auto-direct/spec-ide-runner.js +318 -0
- package/src/commands/auto-direct/spec-processing.js +203 -0
- package/src/commands/auto-direct/status-display.js +9 -9
- package/src/commands/auto-direct/utils.js +83 -1
- package/src/commands/auto-direct-refactored.js +1 -413
- package/src/commands/auto-direct.js +127 -4119
- package/src/commands/auto-execution.js +21 -21
- package/src/commands/auto-status-helpers.js +0 -2
- package/src/commands/auto.js +22 -22
- package/src/commands/check-compliance.js +65 -65
- package/src/commands/computers.js +39 -39
- package/src/commands/continuous-scan.js +19 -19
- package/src/commands/ide.js +4 -4
- package/src/commands/locale.js +7 -7
- package/src/commands/refactor-file.js +59 -59
- package/src/commands/requirements/commands.js +17 -17
- package/src/commands/requirements/default-handlers.js +30 -30
- package/src/commands/requirements/disable.js +3 -3
- package/src/commands/requirements/enable.js +3 -3
- package/src/commands/requirements/utils.js +6 -6
- package/src/commands/requirements-refactored.js +3 -3
- package/src/commands/requirements-remote.js +38 -38
- package/src/commands/requirements.js +3 -3
- package/src/commands/settings.js +111 -0
- package/src/commands/specs/count.js +60 -0
- package/src/commands/specs/disable.js +3 -3
- package/src/commands/specs/enable.js +3 -3
- package/src/commands/status.js +10 -10
- package/src/commands/sync.js +25 -25
- package/src/commands/timeout.js +35 -35
- package/src/trui/TruiInterface.js +2 -2
- package/src/trui/agents/AgentInterface.js +4 -4
- package/src/trui/agents/handlers/CommandHandler.js +4 -4
- package/src/trui/agents/handlers/ContextManager.js +1 -1
- package/src/trui/agents/handlers/DisplayHandler.js +11 -11
- package/src/trui/agents/handlers/HelpHandler.js +1 -1
- package/src/utils/agent-selector.js +6 -6
- package/src/utils/antigravity-installer.js +4 -4
- package/src/utils/asset-cleanup.js +1 -1
- package/src/utils/auth.js +9 -12
- package/src/utils/clarification-actions.js +4 -4
- package/src/utils/cline-js-handler.js +5 -5
- package/src/utils/compliance-check.js +6 -6
- package/src/utils/config.js +12 -12
- package/src/utils/display-formatters-complete.js +2 -2
- package/src/utils/display-formatters-extracted.js +2 -2
- package/src/utils/display-formatters.js +2 -2
- package/src/utils/feedback-handler.js +2 -2
- package/src/utils/first-run.js +7 -7
- package/src/utils/ide-detection.js +1 -1
- package/src/utils/ide-handlers.js +6 -6
- package/src/utils/interactive/clarification-actions.js +3 -3
- package/src/utils/interactive/core-ui.js +7 -7
- package/src/utils/interactive/file-backup.js +6 -6
- package/src/utils/interactive/file-import-export.js +49 -49
- package/src/utils/interactive/file-operations.js +3 -3
- package/src/utils/interactive/file-validation.js +41 -41
- package/src/utils/interactive/interactive-prompts.js +41 -41
- package/src/utils/interactive/requirement-actions.js +5 -5
- package/src/utils/interactive/requirement-crud.js +4 -4
- package/src/utils/interactive/requirements-navigation.js +10 -10
- package/src/utils/interactive-broken.js +6 -6
- package/src/utils/interactive.js +37 -37
- package/src/utils/keyboard-handler.js +4 -4
- package/src/utils/prompt-helper.js +6 -6
- package/src/utils/provider-checker/agent-checker.js +1 -1
- package/src/utils/provider-checker/agent-runner.js +203 -314
- package/src/utils/provider-checker/agents-file-lock.js +134 -0
- package/src/utils/provider-checker/agents-manager.js +224 -36
- package/src/utils/provider-checker/cli-installer.js +28 -28
- package/src/utils/provider-checker/cli-utils.js +2 -2
- package/src/utils/provider-checker/cursor-approval-clicker.js +108 -0
- package/src/utils/provider-checker/format-utils.js +4 -4
- package/src/utils/provider-checker/ide-installer-helper.js +96 -0
- package/src/utils/provider-checker/ide-manager.js +19 -8
- package/src/utils/provider-checker/ide-quota-checker.js +120 -0
- package/src/utils/provider-checker/ide-utils.js +2 -2
- package/src/utils/provider-checker/node-detector.js +4 -4
- package/src/utils/provider-checker/node-utils.js +5 -5
- package/src/utils/provider-checker/opencode-checker.js +107 -73
- package/src/utils/provider-checker/process-utils.js +1 -1
- package/src/utils/provider-checker/provider-validator.js +11 -11
- package/src/utils/provider-checker/quota-checker.js +5 -5
- package/src/utils/provider-checker/quota-detector.js +5 -5
- package/src/utils/provider-checker/requirements-manager.js +6 -6
- package/src/utils/provider-checker/test-requirements.js +1 -1
- package/src/utils/provider-checker/vscode-approval-clicker.js +328 -0
- package/src/utils/provider-checker-new.js +6 -6
- package/src/utils/provider-checker.js +6 -6
- package/src/utils/provider-checkers/ide-manager.js +13 -13
- package/src/utils/provider-checkers/node-executable-finder.js +4 -4
- package/src/utils/provider-checkers/provider-checker-core.js +5 -5
- package/src/utils/provider-checkers/provider-checker-main.js +17 -17
- package/src/utils/provider-registry.js +5 -6
- package/src/utils/provider-utils.js +12 -12
- package/src/utils/quota-detectors.js +32 -32
- package/src/utils/requirement-action-handlers.js +12 -12
- package/src/utils/requirement-actions/requirement-operations.js +3 -3
- package/src/utils/requirement-actions.js +1 -1
- package/src/utils/requirement-file-operations.js +5 -5
- package/src/utils/requirement-helpers.js +1 -1
- package/src/utils/requirement-management.js +5 -5
- package/src/utils/requirement-navigation.js +2 -2
- package/src/utils/requirement-organization.js +3 -3
- package/src/utils/rui-trui-adapter.js +14 -14
- package/src/utils/simple-trui.js +3 -3
- package/src/utils/status-helpers-extracted.js +3 -3
- package/src/utils/trui-clarifications.js +11 -11
- package/src/utils/trui-debug.js +3 -2
- package/src/utils/trui-devin.js +217 -0
- package/src/utils/trui-feedback.js +7 -7
- package/src/utils/trui-kiro-integration.js +34 -34
- package/src/utils/trui-main-handlers.js +20 -21
- package/src/utils/trui-main-menu.js +19 -19
- package/src/utils/trui-nav-agents.js +59 -8
- package/src/utils/trui-nav-requirements.js +3 -3
- package/src/utils/trui-nav-settings.js +10 -10
- package/src/utils/trui-nav-specifications.js +1 -1
- package/src/utils/trui-navigation-backup.js +11 -11
- package/src/utils/trui-navigation.js +9 -9
- package/src/utils/trui-provider-health.js +25 -25
- package/src/utils/trui-provider-manager.js +28 -28
- package/src/utils/trui-quick-menu.js +2 -2
- package/src/utils/trui-req-actions-backup.js +21 -21
- package/src/utils/trui-req-actions.js +20 -20
- package/src/utils/trui-req-editor.js +10 -10
- package/src/utils/trui-req-file-ops.js +3 -3
- package/src/utils/trui-req-tree.js +7 -7
- package/src/utils/trui-windsurf.js +103 -103
- package/src/utils/user-tracking.js +15 -15
- package/src/utils/trui-req-tree-old.js +0 -719
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Default Requirement Handlers
|
|
3
|
-
*
|
|
3
|
+
*
|
|
4
4
|
* Commands for managing default requirements
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -16,7 +16,7 @@ const { DefaultRequirementManager, JSONStorage } = require('vibecodingmachine-co
|
|
|
16
16
|
async function createDefault(title, options = {}) {
|
|
17
17
|
const { description, maxIterations } = options;
|
|
18
18
|
const repoPath = await getRepoPath();
|
|
19
|
-
|
|
19
|
+
|
|
20
20
|
if (!repoPath) {
|
|
21
21
|
console.error(chalk.red('No repository configured. Run "app init" first.'));
|
|
22
22
|
return;
|
|
@@ -25,20 +25,20 @@ async function createDefault(title, options = {}) {
|
|
|
25
25
|
try {
|
|
26
26
|
const storage = new JSONStorage(path.join(repoPath, '.vibecodingmachine'));
|
|
27
27
|
const manager = new DefaultRequirementManager(storage);
|
|
28
|
-
|
|
28
|
+
|
|
29
29
|
await manager.create({
|
|
30
30
|
title,
|
|
31
31
|
description: description || '',
|
|
32
32
|
maxIterations: maxIterations || 5
|
|
33
33
|
});
|
|
34
|
-
|
|
34
|
+
|
|
35
35
|
console.log(chalk.green('Default requirement created successfully:'));
|
|
36
36
|
console.log(` ${chalk.cyan('Title:')} ${title}`);
|
|
37
37
|
if (description) {
|
|
38
38
|
console.log(` ${chalk.gray('Description:')} ${description}`);
|
|
39
39
|
}
|
|
40
40
|
console.log(` ${chalk.yellow('Max Iterations:')} ${maxIterations || 5}`);
|
|
41
|
-
|
|
41
|
+
|
|
42
42
|
} catch (error) {
|
|
43
43
|
console.error(chalk.red('Error creating default requirement:'), error.message);
|
|
44
44
|
}
|
|
@@ -50,7 +50,7 @@ async function createDefault(title, options = {}) {
|
|
|
50
50
|
async function editDefault(options = {}) {
|
|
51
51
|
const { title, description, maxIterations } = options;
|
|
52
52
|
const repoPath = await getRepoPath();
|
|
53
|
-
|
|
53
|
+
|
|
54
54
|
if (!repoPath) {
|
|
55
55
|
console.error(chalk.red('No repository configured. Run "app init" first.'));
|
|
56
56
|
return;
|
|
@@ -59,7 +59,7 @@ async function editDefault(options = {}) {
|
|
|
59
59
|
try {
|
|
60
60
|
const storage = new JSONStorage(path.join(repoPath, '.vibecodingmachine'));
|
|
61
61
|
const manager = new DefaultRequirementManager(storage);
|
|
62
|
-
|
|
62
|
+
|
|
63
63
|
const current = await manager.getCurrent();
|
|
64
64
|
if (!current) {
|
|
65
65
|
console.error(chalk.red('No default requirement found. Create one first.'));
|
|
@@ -72,16 +72,16 @@ async function editDefault(options = {}) {
|
|
|
72
72
|
if (maxIterations !== undefined) updates.maxIterations = maxIterations;
|
|
73
73
|
|
|
74
74
|
await manager.update(current.id, updates);
|
|
75
|
-
|
|
75
|
+
|
|
76
76
|
console.log(chalk.green('Default requirement updated successfully:'));
|
|
77
|
-
|
|
77
|
+
|
|
78
78
|
const updated = await manager.getCurrent();
|
|
79
79
|
console.log(` ${chalk.cyan('Title:')} ${updated.title}`);
|
|
80
80
|
if (updated.description) {
|
|
81
81
|
console.log(` ${chalk.gray('Description:')} ${updated.description}`);
|
|
82
82
|
}
|
|
83
83
|
console.log(` ${chalk.yellow('Max Iterations:')} ${updated.maxIterations}`);
|
|
84
|
-
|
|
84
|
+
|
|
85
85
|
} catch (error) {
|
|
86
86
|
console.error(chalk.red('Error editing default requirement:'), error.message);
|
|
87
87
|
}
|
|
@@ -92,7 +92,7 @@ async function editDefault(options = {}) {
|
|
|
92
92
|
*/
|
|
93
93
|
async function deleteDefault() {
|
|
94
94
|
const repoPath = await getRepoPath();
|
|
95
|
-
|
|
95
|
+
|
|
96
96
|
if (!repoPath) {
|
|
97
97
|
console.error(chalk.red('No repository configured. Run "app init" first.'));
|
|
98
98
|
return;
|
|
@@ -101,7 +101,7 @@ async function deleteDefault() {
|
|
|
101
101
|
try {
|
|
102
102
|
const storage = new JSONStorage(path.join(repoPath, '.vibecodingmachine'));
|
|
103
103
|
const manager = new DefaultRequirementManager(storage);
|
|
104
|
-
|
|
104
|
+
|
|
105
105
|
const current = await manager.getCurrent();
|
|
106
106
|
if (!current) {
|
|
107
107
|
console.error(chalk.red('No default requirement found.'));
|
|
@@ -110,7 +110,7 @@ async function deleteDefault() {
|
|
|
110
110
|
|
|
111
111
|
await manager.delete(current.id);
|
|
112
112
|
console.log(chalk.green('Default requirement deleted successfully.'));
|
|
113
|
-
|
|
113
|
+
|
|
114
114
|
} catch (error) {
|
|
115
115
|
console.error(chalk.red('Error deleting default requirement:'), error.message);
|
|
116
116
|
}
|
|
@@ -121,7 +121,7 @@ async function deleteDefault() {
|
|
|
121
121
|
*/
|
|
122
122
|
async function showDefault() {
|
|
123
123
|
const repoPath = await getRepoPath();
|
|
124
|
-
|
|
124
|
+
|
|
125
125
|
if (!repoPath) {
|
|
126
126
|
console.error(chalk.red('No repository configured. Run "app init" first.'));
|
|
127
127
|
return;
|
|
@@ -130,7 +130,7 @@ async function showDefault() {
|
|
|
130
130
|
try {
|
|
131
131
|
const storage = new JSONStorage(path.join(repoPath, '.vibecodingmachine'));
|
|
132
132
|
const manager = new DefaultRequirementManager(storage);
|
|
133
|
-
|
|
133
|
+
|
|
134
134
|
const current = await manager.getCurrent();
|
|
135
135
|
if (!current) {
|
|
136
136
|
console.log(chalk.yellow('No default requirement found.'));
|
|
@@ -140,22 +140,22 @@ async function showDefault() {
|
|
|
140
140
|
console.log(chalk.blue('\nDefault Requirement:'));
|
|
141
141
|
console.log(` ${chalk.cyan('ID:')} ${current.id}`);
|
|
142
142
|
console.log(` ${chalk.cyan('Title:')} ${current.title}`);
|
|
143
|
-
|
|
143
|
+
|
|
144
144
|
if (current.description) {
|
|
145
145
|
console.log(` ${chalk.gray('Description:')} ${current.description}`);
|
|
146
146
|
}
|
|
147
|
-
|
|
147
|
+
|
|
148
148
|
console.log(` ${chalk.yellow('Max Iterations:')} ${current.maxIterations}`);
|
|
149
149
|
console.log(` ${chalk.gray('Status:')} ${current.status}`);
|
|
150
|
-
|
|
150
|
+
|
|
151
151
|
if (current.createdAt) {
|
|
152
152
|
console.log(` ${chalk.gray('Created:')} ${new Date(current.createdAt).toLocaleString()}`);
|
|
153
153
|
}
|
|
154
|
-
|
|
154
|
+
|
|
155
155
|
if (current.updatedAt) {
|
|
156
156
|
console.log(` ${chalk.gray('Updated:')} ${new Date(current.updatedAt).toLocaleString()}`);
|
|
157
157
|
}
|
|
158
|
-
|
|
158
|
+
|
|
159
159
|
if (current.iterations && current.iterations.length > 0) {
|
|
160
160
|
console.log(` ${chalk.blue('Iterations:')} ${current.iterations.length}`);
|
|
161
161
|
current.iterations.forEach((iteration, index) => {
|
|
@@ -163,7 +163,7 @@ async function showDefault() {
|
|
|
163
163
|
console.log(` ${index + 1}. ${status} ${iteration.summary || 'No summary'}`);
|
|
164
164
|
});
|
|
165
165
|
}
|
|
166
|
-
|
|
166
|
+
|
|
167
167
|
} catch (error) {
|
|
168
168
|
console.error(chalk.red('Error showing default requirement:'), error.message);
|
|
169
169
|
}
|
|
@@ -174,7 +174,7 @@ async function showDefault() {
|
|
|
174
174
|
*/
|
|
175
175
|
async function pauseDefault() {
|
|
176
176
|
const repoPath = await getRepoPath();
|
|
177
|
-
|
|
177
|
+
|
|
178
178
|
if (!repoPath) {
|
|
179
179
|
console.error(chalk.red('No repository configured. Run "app init" first.'));
|
|
180
180
|
return;
|
|
@@ -183,7 +183,7 @@ async function pauseDefault() {
|
|
|
183
183
|
try {
|
|
184
184
|
const storage = new JSONStorage(path.join(repoPath, '.vibecodingmachine'));
|
|
185
185
|
const manager = new DefaultRequirementManager(storage);
|
|
186
|
-
|
|
186
|
+
|
|
187
187
|
const current = await manager.getCurrent();
|
|
188
188
|
if (!current) {
|
|
189
189
|
console.error(chalk.red('No default requirement found.'));
|
|
@@ -192,7 +192,7 @@ async function pauseDefault() {
|
|
|
192
192
|
|
|
193
193
|
await manager.pause(current.id);
|
|
194
194
|
console.log(chalk.green('Default requirement paused successfully.'));
|
|
195
|
-
|
|
195
|
+
|
|
196
196
|
} catch (error) {
|
|
197
197
|
console.error(chalk.red('Error pausing default requirement:'), error.message);
|
|
198
198
|
}
|
|
@@ -203,7 +203,7 @@ async function pauseDefault() {
|
|
|
203
203
|
*/
|
|
204
204
|
async function resumeDefault() {
|
|
205
205
|
const repoPath = await getRepoPath();
|
|
206
|
-
|
|
206
|
+
|
|
207
207
|
if (!repoPath) {
|
|
208
208
|
console.error(chalk.red('No repository configured. Run "app init" first.'));
|
|
209
209
|
return;
|
|
@@ -212,7 +212,7 @@ async function resumeDefault() {
|
|
|
212
212
|
try {
|
|
213
213
|
const storage = new JSONStorage(path.join(repoPath, '.vibecodingmachine'));
|
|
214
214
|
const manager = new DefaultRequirementManager(storage);
|
|
215
|
-
|
|
215
|
+
|
|
216
216
|
const current = await manager.getCurrent();
|
|
217
217
|
if (!current) {
|
|
218
218
|
console.error(chalk.red('No default requirement found.'));
|
|
@@ -221,7 +221,7 @@ async function resumeDefault() {
|
|
|
221
221
|
|
|
222
222
|
await manager.resume(current.id);
|
|
223
223
|
console.log(chalk.green('Default requirement resumed successfully.'));
|
|
224
|
-
|
|
224
|
+
|
|
225
225
|
} catch (error) {
|
|
226
226
|
console.error(chalk.red('Error resuming default requirement:'), error.message);
|
|
227
227
|
}
|
|
@@ -232,7 +232,7 @@ async function resumeDefault() {
|
|
|
232
232
|
*/
|
|
233
233
|
async function setMaxIterations(maxIterations) {
|
|
234
234
|
const repoPath = await getRepoPath();
|
|
235
|
-
|
|
235
|
+
|
|
236
236
|
if (!repoPath) {
|
|
237
237
|
console.error(chalk.red('No repository configured. Run "app init" first.'));
|
|
238
238
|
return;
|
|
@@ -246,7 +246,7 @@ async function setMaxIterations(maxIterations) {
|
|
|
246
246
|
try {
|
|
247
247
|
const storage = new JSONStorage(path.join(repoPath, '.vibecodingmachine'));
|
|
248
248
|
const manager = new DefaultRequirementManager(storage);
|
|
249
|
-
|
|
249
|
+
|
|
250
250
|
const current = await manager.getCurrent();
|
|
251
251
|
if (!current) {
|
|
252
252
|
console.error(chalk.red('No default requirement found.'));
|
|
@@ -255,7 +255,7 @@ async function setMaxIterations(maxIterations) {
|
|
|
255
255
|
|
|
256
256
|
await manager.update(current.id, { maxIterations: parseInt(maxIterations) });
|
|
257
257
|
console.log(chalk.green(`Max iterations set to ${maxIterations}`));
|
|
258
|
-
|
|
258
|
+
|
|
259
259
|
} catch (error) {
|
|
260
260
|
console.error(chalk.red('Error setting max iterations:'), error.message);
|
|
261
261
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* CLI Command: Disable Requirement
|
|
3
|
-
*
|
|
3
|
+
*
|
|
4
4
|
* Implements "app disable requirement" command for CLI interface.
|
|
5
5
|
* Follows constitutional requirements: <800 lines, test-first approach.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
const { disableRequirement } = require('
|
|
8
|
+
const { disableRequirement } = require('vibecodingmachine-core/src/utils/requirement-enable-disable');
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* CLI disable requirement command implementation
|
|
@@ -43,7 +43,7 @@ class DisableRequirementCommand {
|
|
|
43
43
|
|
|
44
44
|
// Call core disable function
|
|
45
45
|
const result = await disableRequirement(requirementText);
|
|
46
|
-
|
|
46
|
+
|
|
47
47
|
if (!result.success) {
|
|
48
48
|
return {
|
|
49
49
|
success: false,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* CLI Command: Enable Requirement
|
|
3
|
-
*
|
|
3
|
+
*
|
|
4
4
|
* Implements "app enable requirement" command for CLI interface.
|
|
5
5
|
* Follows constitutional requirements: <800 lines, test-first approach.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
const { enableRequirement } = require('
|
|
8
|
+
const { enableRequirement } = require('vibecodingmachine-core/src/utils/requirement-enable-disable');
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* CLI enable requirement command implementation
|
|
@@ -43,7 +43,7 @@ class EnableRequirementCommand {
|
|
|
43
43
|
|
|
44
44
|
// Call core enable function
|
|
45
45
|
const result = await enableRequirement(requirementText);
|
|
46
|
-
|
|
46
|
+
|
|
47
47
|
if (!result.success) {
|
|
48
48
|
return {
|
|
49
49
|
success: false,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Requirements Command Utilities
|
|
3
|
-
*
|
|
3
|
+
*
|
|
4
4
|
* Shared utilities for requirements command operations
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -41,7 +41,7 @@ async function getReqPathOrExit() {
|
|
|
41
41
|
*/
|
|
42
42
|
async function ensureRequirementsFile(reqPath) {
|
|
43
43
|
await fs.ensureFile(reqPath);
|
|
44
|
-
|
|
44
|
+
|
|
45
45
|
// Check if file is empty and create initial structure
|
|
46
46
|
const content = await fs.readFile(reqPath, 'utf8');
|
|
47
47
|
if (!content.trim()) {
|
|
@@ -116,7 +116,7 @@ function generateRequirementId(requirements) {
|
|
|
116
116
|
const match = req.id && req.id.match(/^R(\d+)$/);
|
|
117
117
|
return match ? Math.max(max, parseInt(match[1])) : max;
|
|
118
118
|
}, 0);
|
|
119
|
-
|
|
119
|
+
|
|
120
120
|
return `R${maxId + 1}`;
|
|
121
121
|
}
|
|
122
122
|
|
|
@@ -145,7 +145,7 @@ function formatRequirement(requirement, showCurrent = false) {
|
|
|
145
145
|
const current = showCurrent && requirement.current ? ' (CURRENT)' : '';
|
|
146
146
|
const status = requirement.status ? ` [${requirement.status}]` : '';
|
|
147
147
|
const id = requirement.id ? `${requirement.id}: ` : '';
|
|
148
|
-
|
|
148
|
+
|
|
149
149
|
return `${chalk.cyan(id)}${chalk.white(requirement.title)}${status}${current}`;
|
|
150
150
|
}
|
|
151
151
|
|
|
@@ -156,7 +156,7 @@ function formatRequirement(requirement, showCurrent = false) {
|
|
|
156
156
|
async function openInEditor(filePath) {
|
|
157
157
|
const { exec } = require('child_process');
|
|
158
158
|
const platform = process.platform;
|
|
159
|
-
|
|
159
|
+
|
|
160
160
|
let command;
|
|
161
161
|
switch (platform) {
|
|
162
162
|
case 'darwin':
|
|
@@ -168,7 +168,7 @@ async function openInEditor(filePath) {
|
|
|
168
168
|
default:
|
|
169
169
|
command = `xdg-open "${filePath}"`;
|
|
170
170
|
}
|
|
171
|
-
|
|
171
|
+
|
|
172
172
|
return new Promise((resolve, reject) => {
|
|
173
173
|
exec(command, (error) => {
|
|
174
174
|
if (error) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Refactored Requirements Commands
|
|
3
|
-
*
|
|
3
|
+
*
|
|
4
4
|
* Splits monolithic requirements command into modular components
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -39,7 +39,7 @@ module.exports = {
|
|
|
39
39
|
rename,
|
|
40
40
|
working,
|
|
41
41
|
numberAll,
|
|
42
|
-
|
|
42
|
+
|
|
43
43
|
// Default requirement commands
|
|
44
44
|
'default:create': createDefault,
|
|
45
45
|
'default:edit': editDefault,
|
|
@@ -48,7 +48,7 @@ module.exports = {
|
|
|
48
48
|
'default:pause': pauseDefault,
|
|
49
49
|
'default:resume': resumeDefault,
|
|
50
50
|
'default:max-iterations': setMaxIterations,
|
|
51
|
-
|
|
51
|
+
|
|
52
52
|
// Aliases for backward compatibility
|
|
53
53
|
createDefault,
|
|
54
54
|
editDefault,
|
|
@@ -13,29 +13,29 @@ async function listRemoteRequirements(computerId) {
|
|
|
13
13
|
if (!computerId || typeof computerId !== 'string') {
|
|
14
14
|
throw new TypeError('computerId must be a non-empty string');
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
|
|
17
17
|
const repoPath = process.cwd();
|
|
18
18
|
const reqFilename = `REQUIREMENTS-${computerId}.md`;
|
|
19
19
|
const reqPath = path.join(repoPath, '.vibecodingmachine', reqFilename);
|
|
20
|
-
|
|
20
|
+
|
|
21
21
|
if (!await fs.pathExists(reqPath)) {
|
|
22
22
|
console.log(chalk.yellow(`\n⚠ Requirements file not found for ${computerId}\n`));
|
|
23
23
|
console.log(chalk.gray(`Expected: ${reqPath}\n`));
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
|
|
27
27
|
const content = await fs.readFile(reqPath, 'utf8');
|
|
28
28
|
const sections = parseRequirements(content);
|
|
29
|
-
|
|
29
|
+
|
|
30
30
|
console.log(chalk.bold.cyan(`\n📋 ${t('requirements.for.computer', { computerId })}\n`));
|
|
31
|
-
|
|
31
|
+
|
|
32
32
|
// Show counts
|
|
33
33
|
console.log(chalk.white('Summary:'));
|
|
34
34
|
console.log(chalk.yellow(` TODO: ${sections.todo.length}`));
|
|
35
35
|
console.log(chalk.cyan(` TO VERIFY: ${sections.toVerify.length}`));
|
|
36
36
|
console.log(chalk.green(` VERIFIED: ${sections.verified.length}`));
|
|
37
37
|
console.log('');
|
|
38
|
-
|
|
38
|
+
|
|
39
39
|
// Show TODO requirements
|
|
40
40
|
if (sections.todo.length > 0) {
|
|
41
41
|
console.log(chalk.bold.yellow('⏳ TODO Requirements:\n'));
|
|
@@ -47,7 +47,7 @@ async function listRemoteRequirements(computerId) {
|
|
|
47
47
|
});
|
|
48
48
|
console.log('');
|
|
49
49
|
}
|
|
50
|
-
|
|
50
|
+
|
|
51
51
|
// Show TO VERIFY requirements
|
|
52
52
|
if (sections.toVerify.length > 0) {
|
|
53
53
|
console.log(chalk.bold.cyan('🔍 TO VERIFY Requirements:\n'));
|
|
@@ -56,7 +56,7 @@ async function listRemoteRequirements(computerId) {
|
|
|
56
56
|
});
|
|
57
57
|
console.log('');
|
|
58
58
|
}
|
|
59
|
-
|
|
59
|
+
|
|
60
60
|
} catch (error) {
|
|
61
61
|
console.error(chalk.red('\n✗ Failed to list requirements:'), error.message);
|
|
62
62
|
await errorReporter.reportError(error, {
|
|
@@ -76,19 +76,19 @@ async function addRemoteRequirement(computerId, requirementText) {
|
|
|
76
76
|
if (!computerId || typeof computerId !== 'string') {
|
|
77
77
|
throw new TypeError('computerId must be a non-empty string');
|
|
78
78
|
}
|
|
79
|
-
|
|
79
|
+
|
|
80
80
|
if (!requirementText || typeof requirementText !== 'string') {
|
|
81
81
|
throw new TypeError('requirementText must be a non-empty string');
|
|
82
82
|
}
|
|
83
|
-
|
|
83
|
+
|
|
84
84
|
const repoPath = process.cwd();
|
|
85
85
|
const reqFilename = `REQUIREMENTS-${computerId}.md`;
|
|
86
86
|
const reqPath = path.join(repoPath, '.vibecodingmachine', reqFilename);
|
|
87
|
-
|
|
87
|
+
|
|
88
88
|
if (!await fs.pathExists(reqPath)) {
|
|
89
89
|
console.log(chalk.yellow(`\n⚠ Requirements file not found for ${computerId}\n`));
|
|
90
90
|
console.log(chalk.gray('Creating new requirements file...\n'));
|
|
91
|
-
|
|
91
|
+
|
|
92
92
|
// Create basic requirements file structure
|
|
93
93
|
const template = `# 🤖 Vibe Coding Machine – Requirements File
|
|
94
94
|
|
|
@@ -126,25 +126,25 @@ DONE
|
|
|
126
126
|
`;
|
|
127
127
|
await fs.writeFile(reqPath, template, 'utf8');
|
|
128
128
|
}
|
|
129
|
-
|
|
129
|
+
|
|
130
130
|
// Read current content
|
|
131
131
|
let content = await fs.readFile(reqPath, 'utf8');
|
|
132
|
-
|
|
132
|
+
|
|
133
133
|
// Find the TODO section
|
|
134
134
|
const todoMarker = '## ⏳ Requirements not yet completed';
|
|
135
135
|
const todoIndex = content.indexOf(todoMarker);
|
|
136
|
-
|
|
136
|
+
|
|
137
137
|
if (todoIndex === -1) {
|
|
138
138
|
console.log(chalk.red('\n✗ Could not find TODO section in requirements file\n'));
|
|
139
139
|
return;
|
|
140
140
|
}
|
|
141
|
-
|
|
141
|
+
|
|
142
142
|
// Find the next section after TODO
|
|
143
143
|
const nextSectionIndex = content.indexOf('\n## ', todoIndex + todoMarker.length);
|
|
144
|
-
|
|
144
|
+
|
|
145
145
|
// Insert the new requirement
|
|
146
146
|
const newRequirement = `\n### ${requirementText}\n`;
|
|
147
|
-
|
|
147
|
+
|
|
148
148
|
if (nextSectionIndex === -1) {
|
|
149
149
|
// No next section, append at end
|
|
150
150
|
content = content.substring(0, todoIndex + todoMarker.length) + newRequirement + content.substring(todoIndex + todoMarker.length);
|
|
@@ -152,14 +152,14 @@ DONE
|
|
|
152
152
|
// Insert before next section
|
|
153
153
|
content = content.substring(0, nextSectionIndex) + newRequirement + content.substring(nextSectionIndex);
|
|
154
154
|
}
|
|
155
|
-
|
|
155
|
+
|
|
156
156
|
// Write back
|
|
157
157
|
await fs.writeFile(reqPath, content, 'utf8');
|
|
158
|
-
|
|
158
|
+
|
|
159
159
|
console.log(chalk.green(`\n✓ Added requirement to ${computerId}\n`));
|
|
160
160
|
console.log(chalk.white('Requirement: ') + requirementText);
|
|
161
161
|
console.log('');
|
|
162
|
-
|
|
162
|
+
|
|
163
163
|
} catch (error) {
|
|
164
164
|
console.error(chalk.red('\n✗ Failed to add requirement:'), error.message);
|
|
165
165
|
await errorReporter.reportError(error, {
|
|
@@ -181,7 +181,7 @@ async function manageRemoteRequirements(computerId) {
|
|
|
181
181
|
{ name: '📝 Edit Requirements File', value: 'edit' },
|
|
182
182
|
{ name: chalk.gray('← Back'), value: 'back' }
|
|
183
183
|
];
|
|
184
|
-
|
|
184
|
+
|
|
185
185
|
const { action } = await inquirer.prompt([
|
|
186
186
|
{
|
|
187
187
|
type: 'list',
|
|
@@ -190,7 +190,7 @@ async function manageRemoteRequirements(computerId) {
|
|
|
190
190
|
choices: choices
|
|
191
191
|
}
|
|
192
192
|
]);
|
|
193
|
-
|
|
193
|
+
|
|
194
194
|
switch (action) {
|
|
195
195
|
case 'view': {
|
|
196
196
|
await listRemoteRequirements(computerId);
|
|
@@ -209,7 +209,7 @@ async function manageRemoteRequirements(computerId) {
|
|
|
209
209
|
await manageRemoteRequirements(computerId);
|
|
210
210
|
break;
|
|
211
211
|
}
|
|
212
|
-
|
|
212
|
+
|
|
213
213
|
case 'add': {
|
|
214
214
|
const { requirement } = await inquirer.prompt([
|
|
215
215
|
{
|
|
@@ -218,7 +218,7 @@ async function manageRemoteRequirements(computerId) {
|
|
|
218
218
|
message: 'Enter requirement title:'
|
|
219
219
|
}
|
|
220
220
|
]);
|
|
221
|
-
|
|
221
|
+
|
|
222
222
|
if (requirement) {
|
|
223
223
|
await addRemoteRequirement(computerId, requirement);
|
|
224
224
|
console.log(chalk.gray(t('interactive.press.enter.continue')));
|
|
@@ -237,26 +237,26 @@ async function manageRemoteRequirements(computerId) {
|
|
|
237
237
|
await manageRemoteRequirements(computerId);
|
|
238
238
|
break;
|
|
239
239
|
}
|
|
240
|
-
|
|
240
|
+
|
|
241
241
|
case 'edit': {
|
|
242
242
|
const repoPath = process.cwd();
|
|
243
243
|
const reqFilename = `REQUIREMENTS-${computerId}.md`;
|
|
244
244
|
const reqPath = path.join(repoPath, '.vibecodingmachine', reqFilename);
|
|
245
|
-
|
|
245
|
+
|
|
246
246
|
if (await fs.pathExists(reqPath)) {
|
|
247
247
|
const { spawn } = require('child_process');
|
|
248
248
|
const editor = process.env.EDITOR || 'nano';
|
|
249
|
-
|
|
249
|
+
|
|
250
250
|
console.log(chalk.cyan(`\nOpening ${reqFilename} in ${editor}...\n`));
|
|
251
|
-
|
|
251
|
+
|
|
252
252
|
const child = spawn(editor, [reqPath], {
|
|
253
253
|
stdio: 'inherit'
|
|
254
254
|
});
|
|
255
|
-
|
|
255
|
+
|
|
256
256
|
await new Promise((resolve) => {
|
|
257
257
|
child.on('exit', resolve);
|
|
258
258
|
});
|
|
259
|
-
|
|
259
|
+
|
|
260
260
|
console.log(chalk.green('\n✓ File saved\n'));
|
|
261
261
|
} else {
|
|
262
262
|
console.log(chalk.yellow(`\n⚠ Requirements file not found\n`));
|
|
@@ -264,7 +264,7 @@ async function manageRemoteRequirements(computerId) {
|
|
|
264
264
|
await manageRemoteRequirements(computerId);
|
|
265
265
|
break;
|
|
266
266
|
}
|
|
267
|
-
|
|
267
|
+
|
|
268
268
|
case 'back': {
|
|
269
269
|
break;
|
|
270
270
|
}
|
|
@@ -280,14 +280,14 @@ function parseRequirements(content) {
|
|
|
280
280
|
toVerify: [],
|
|
281
281
|
verified: []
|
|
282
282
|
};
|
|
283
|
-
|
|
283
|
+
|
|
284
284
|
const lines = content.split('\n');
|
|
285
285
|
let currentSection = null;
|
|
286
286
|
let currentRequirement = null;
|
|
287
|
-
|
|
287
|
+
|
|
288
288
|
for (let i = 0; i < lines.length; i++) {
|
|
289
289
|
const line = lines[i];
|
|
290
|
-
|
|
290
|
+
|
|
291
291
|
// Detect sections
|
|
292
292
|
if (line.includes('## ⏳ Requirements not yet completed')) {
|
|
293
293
|
currentSection = 'todo';
|
|
@@ -302,7 +302,7 @@ function parseRequirements(content) {
|
|
|
302
302
|
currentSection = null;
|
|
303
303
|
continue;
|
|
304
304
|
}
|
|
305
|
-
|
|
305
|
+
|
|
306
306
|
// Parse requirements
|
|
307
307
|
if (currentSection && line.startsWith('### ')) {
|
|
308
308
|
const title = line.replace(/^###\s*/, '').trim();
|
|
@@ -325,12 +325,12 @@ function parseRequirements(content) {
|
|
|
325
325
|
currentRequirement.description += line + '\n';
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
|
-
|
|
328
|
+
|
|
329
329
|
// Add last requirement
|
|
330
330
|
if (currentRequirement && currentSection) {
|
|
331
331
|
sections[currentSection].push(currentRequirement);
|
|
332
332
|
}
|
|
333
|
-
|
|
333
|
+
|
|
334
334
|
return sections;
|
|
335
335
|
}
|
|
336
336
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Refactored Requirements Commands
|
|
3
|
-
*
|
|
3
|
+
*
|
|
4
4
|
* Splits monolithic requirements command into modular components
|
|
5
5
|
*/
|
|
6
6
|
|
|
@@ -39,7 +39,7 @@ module.exports = {
|
|
|
39
39
|
rename,
|
|
40
40
|
working,
|
|
41
41
|
numberAll,
|
|
42
|
-
|
|
42
|
+
|
|
43
43
|
// Default requirement commands
|
|
44
44
|
'default:create': createDefault,
|
|
45
45
|
'default:edit': editDefault,
|
|
@@ -48,7 +48,7 @@ module.exports = {
|
|
|
48
48
|
'default:pause': pauseDefault,
|
|
49
49
|
'default:resume': resumeDefault,
|
|
50
50
|
'default:max-iterations': setMaxIterations,
|
|
51
|
-
|
|
51
|
+
|
|
52
52
|
// Aliases for backward compatibility
|
|
53
53
|
createDefault,
|
|
54
54
|
editDefault,
|