vibecodingmachine-cli 2026.3.9-907 → 2026.3.10-1548
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/README.md +85 -85
- package/bin/commands/agent-commands.js +295 -28
- package/bin/vibecodingmachine.js +0 -0
- package/package.json +2 -2
- package/scripts/postinstall.js +161 -161
- package/src/commands/auth.js +100 -100
- package/src/commands/auto-execution.js +120 -32
- package/src/commands/auto-requirement-management.js +9 -9
- package/src/commands/auto-status-helpers.js +6 -12
- package/src/commands/computers.js +318 -318
- package/src/commands/feature.js +123 -123
- package/src/commands/locale.js +72 -72
- package/src/commands/repo.js +163 -163
- package/src/commands/setup.js +93 -93
- package/src/commands/sync.js +287 -287
- package/src/index.js +5 -5
- package/src/utils/agent-selector.js +50 -50
- package/src/utils/asset-cleanup.js +60 -60
- package/src/utils/auth.js +6 -0
- package/src/utils/auto-mode-ansi-ui.js +237 -237
- package/src/utils/auto-mode-simple-ui.js +141 -141
- package/src/utils/copy-with-progress.js +167 -167
- package/src/utils/download-with-progress.js +84 -84
- package/src/utils/keyboard-handler.js +153 -153
- package/src/utils/kiro-installer.js +178 -178
- package/src/utils/logger.js +4 -4
- package/src/utils/persistent-header.js +114 -114
- package/src/utils/prompt-helper.js +63 -63
- package/src/utils/provider-checker/agent-runner.js +110 -31
- package/src/utils/provider-checker/ide-manager.js +37 -8
- package/src/utils/provider-checker/provider-validator.js +50 -0
- package/src/utils/provider-checker/requirements-manager.js +21 -6
- package/src/utils/status-card.js +121 -121
- package/src/utils/stdout-interceptor.js +127 -127
- package/src/utils/trui-main-handlers.js +41 -8
- package/src/utils/trui-main-menu.js +10 -3
- package/src/utils/trui-nav-agents.js +23 -33
- package/src/utils/trui-navigation.js +2 -2
- package/src/utils/user-tracking.js +299 -299
|
@@ -4,7 +4,7 @@ const path = require('path');
|
|
|
4
4
|
const os = require('os');
|
|
5
5
|
const { spawn } = require('child_process');
|
|
6
6
|
const { logIDEMessage, runContinueCLIAutoMode, t, IDEHealthTracker } = require('vibecodingmachine-core');
|
|
7
|
-
const { getRepoPath, getAutoConfig, setAutoConfig, getStages } = require('../utils/config');
|
|
7
|
+
const { getRepoPath, getAutoConfig, setAutoConfig, getStages, getEffectiveRepoPath } = require('../utils/config');
|
|
8
8
|
const { checkAutoModeStatus, startAutoMode, stopAutoMode, updateAutoModeStatus } = require('../utils/auto-mode');
|
|
9
9
|
const logger = require('../utils/logger');
|
|
10
10
|
const { createKeyboardHandler } = require('../utils/keyboard-handler');
|
|
@@ -44,22 +44,54 @@ async function start(options) {
|
|
|
44
44
|
// Continue if check fails
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
console.log(chalk.red('❌ Authentication required. Please run: vcm auth'));
|
|
47
|
+
const repoPath = await getEffectiveRepoPath();
|
|
48
|
+
|
|
49
|
+
if (!repoPath) {
|
|
50
|
+
console.error(chalk.red('❌ Unable to determine repository path'));
|
|
52
51
|
process.exit(1);
|
|
53
52
|
}
|
|
54
|
-
|
|
55
|
-
const repoPath = getRepoPath();
|
|
53
|
+
|
|
56
54
|
const config = getAutoConfig(repoPath);
|
|
57
55
|
const stages = getStages(repoPath);
|
|
58
56
|
|
|
59
|
-
//
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
// Check if we're in IDE check mode (bypass config requirements)
|
|
58
|
+
const isIdeCheckMode = process.env.VCM_IDE_CHECK_MODE === 'true' || process.env.VCM_SKIP_AUTH === 'true';
|
|
59
|
+
|
|
60
|
+
// For IDE check mode, use minimal config
|
|
61
|
+
// If --ide option is provided, configure the IDE as a provider
|
|
62
|
+
let effectiveConfig = isIdeCheckMode ? { providers: [] } : config;
|
|
63
|
+
|
|
64
|
+
if (isIdeCheckMode && options && options.ide) {
|
|
65
|
+
// Convert --ide option to provider configuration
|
|
66
|
+
effectiveConfig = {
|
|
67
|
+
providers: [{
|
|
68
|
+
provider: options.ide,
|
|
69
|
+
type: 'ide',
|
|
70
|
+
model: options.ideModel || 'default'
|
|
71
|
+
}],
|
|
72
|
+
maxChats: options.maxChats || 1,
|
|
73
|
+
neverStop: options.neverStop || false
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
console.log(chalk.blue('🔍 IDE Check Mode - bypassing configuration requirements'));
|
|
78
|
+
if (!effectiveConfig || !effectiveConfig.providers || effectiveConfig.providers.length === 0) {
|
|
79
|
+
console.log(chalk.yellow('⚠️ Warning: No providers configured, but proceeding with IDE check...'));
|
|
80
|
+
// Don't exit for IDE check mode - continue with available providers
|
|
81
|
+
} else {
|
|
82
|
+
// STRICT AUTH CHECK for normal mode
|
|
83
|
+
const auth = require('../utils/auth');
|
|
84
|
+
const isAuth = await auth.isAuthenticated();
|
|
85
|
+
if (!isAuth) {
|
|
86
|
+
console.log(chalk.red('❌ Authentication required. Please run: vcm auth'));
|
|
87
|
+
process.exit(1);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// Validate config for normal mode
|
|
91
|
+
if (!effectiveConfig || !effectiveConfig.providers || effectiveConfig.providers.length === 0) {
|
|
92
|
+
console.log(chalk.red('❌ No providers configured. Please run: vcm auto:config'));
|
|
93
|
+
process.exit(1);
|
|
94
|
+
}
|
|
63
95
|
}
|
|
64
96
|
|
|
65
97
|
// Check if auto mode is already running
|
|
@@ -77,21 +109,28 @@ async function start(options) {
|
|
|
77
109
|
// Display configuration
|
|
78
110
|
console.log(chalk.cyan('Configuration:'));
|
|
79
111
|
console.log(chalk.gray(' Repository:'), chalk.white(repoPath));
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
112
|
+
|
|
113
|
+
// Only display providers if they exist (not in IDE check mode with empty providers)
|
|
114
|
+
if (effectiveConfig.providers && effectiveConfig.providers.length > 0) {
|
|
115
|
+
console.log(chalk.gray(' Providers:'), chalk.white(effectiveConfig.providers.map(p => p.provider).join(', ')));
|
|
116
|
+
} else {
|
|
117
|
+
console.log(chalk.gray(' Providers:'), chalk.yellow('(IDE check mode - no providers)'));
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
console.log(chalk.gray(' Max chats:'), chalk.white(effectiveConfig.maxChats || 'unlimited'));
|
|
121
|
+
console.log(chalk.gray(' Never stop:'), chalk.white(effectiveConfig.neverStop ? 'yes' : 'no'));
|
|
83
122
|
console.log();
|
|
84
123
|
|
|
85
124
|
// Start auto mode
|
|
86
125
|
try {
|
|
87
126
|
await startAutoMode(repoPath, {
|
|
88
|
-
providers:
|
|
89
|
-
maxChats:
|
|
90
|
-
neverStop:
|
|
127
|
+
providers: effectiveConfig.providers,
|
|
128
|
+
maxChats: effectiveConfig.maxChats,
|
|
129
|
+
neverStop: effectiveConfig.neverStop
|
|
91
130
|
});
|
|
92
131
|
|
|
93
132
|
// Main auto mode loop
|
|
94
|
-
await runAutoModeLoop(repoPath,
|
|
133
|
+
await runAutoModeLoop(repoPath, effectiveConfig, stages);
|
|
95
134
|
|
|
96
135
|
} catch (error) {
|
|
97
136
|
console.error(chalk.red('Error starting auto mode:'), error.message);
|
|
@@ -173,7 +212,7 @@ async function runAutoModeLoop(repoPath, config, stages) {
|
|
|
173
212
|
// Cleanup
|
|
174
213
|
keyboardHandler.stop();
|
|
175
214
|
await stopAutoMode(repoPath);
|
|
176
|
-
console.log(chalk.green('
|
|
215
|
+
console.log(chalk.green('🏁 Auto mode stopped'));
|
|
177
216
|
}
|
|
178
217
|
|
|
179
218
|
/**
|
|
@@ -194,6 +233,10 @@ async function executeCurrentStage(repoPath, currentStatus, currentTitle) {
|
|
|
194
233
|
return await executeCleanUpStage(repoPath, currentTitle);
|
|
195
234
|
case 'VERIFY':
|
|
196
235
|
return await executeVerifyStage(repoPath, currentTitle);
|
|
236
|
+
case 'DONE':
|
|
237
|
+
// Requirement complete - should be moved to verified section
|
|
238
|
+
console.log(chalk.green.bold(`🎉 Requirement complete: ${currentTitle}`));
|
|
239
|
+
return { success: true, requirementComplete: true };
|
|
197
240
|
case 'NOT_WORKING':
|
|
198
241
|
return await executeNotWorkingStage(repoPath, currentTitle);
|
|
199
242
|
default:
|
|
@@ -211,7 +254,7 @@ async function executeCurrentStage(repoPath, currentStatus, currentTitle) {
|
|
|
211
254
|
* @returns {Promise<{success: boolean, error?: string}>}
|
|
212
255
|
*/
|
|
213
256
|
async function executePrepareStage(repoPath, currentTitle) {
|
|
214
|
-
console.log(chalk.cyan(
|
|
257
|
+
console.log(chalk.cyan(`[${getTimestamp()}] 🔨 PREPARE: ${currentTitle}`));
|
|
215
258
|
|
|
216
259
|
// Update status to CREATE
|
|
217
260
|
const updateResult = await updateRequirementsStatus(repoPath, 'CREATE', `Starting implementation of: ${currentTitle}`);
|
|
@@ -230,15 +273,60 @@ async function executePrepareStage(repoPath, currentTitle) {
|
|
|
230
273
|
* @returns {Promise<{success: boolean, error?: string}>}
|
|
231
274
|
*/
|
|
232
275
|
async function executeCreateStage(repoPath, currentTitle) {
|
|
233
|
-
console.log(chalk.cyan(
|
|
234
|
-
|
|
235
|
-
//
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
276
|
+
console.log(chalk.cyan(`[${getTimestamp()}] 🛠️ CREATE: ${currentTitle}`));
|
|
277
|
+
|
|
278
|
+
// Check if we're in IDE check mode - if so, send requirement to IDE
|
|
279
|
+
const isIdeCheckMode = process.env.VCM_IDE_CHECK_MODE === 'true';
|
|
280
|
+
|
|
281
|
+
if (isIdeCheckMode) {
|
|
282
|
+
console.log(chalk.blue('🤖 Sending requirement to IDE for implementation...'));
|
|
283
|
+
|
|
284
|
+
// Read the full requirement from the requirements file
|
|
285
|
+
const { getRequirementsPath } = require('vibecodingmachine-core');
|
|
286
|
+
const fs = require('fs-extra');
|
|
287
|
+
const reqPath = await getRequirementsPath(repoPath);
|
|
288
|
+
const content = await fs.readFile(reqPath, 'utf8');
|
|
289
|
+
const lines = content.split('\n');
|
|
290
|
+
|
|
291
|
+
// Find the requirement block
|
|
292
|
+
let requirementText = '';
|
|
293
|
+
let foundTitle = false;
|
|
294
|
+
for (let i = 0; i < lines.length; i++) {
|
|
295
|
+
if (lines[i].includes(currentTitle)) {
|
|
296
|
+
foundTitle = true;
|
|
297
|
+
requirementText += lines[i] + '\n';
|
|
298
|
+
continue;
|
|
299
|
+
}
|
|
300
|
+
if (foundTitle) {
|
|
301
|
+
// Continue until next requirement or section
|
|
302
|
+
if (lines[i].startsWith('- ') || lines[i].startsWith('## ')) {
|
|
303
|
+
break;
|
|
304
|
+
}
|
|
305
|
+
requirementText += lines[i] + '\n';
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
// Send to IDE using Windows automation
|
|
310
|
+
try {
|
|
311
|
+
const { WindowsAutomationManager } = require('vibecodingmachine-core');
|
|
312
|
+
const manager = new WindowsAutomationManager();
|
|
313
|
+
const result = await manager.sendTextToWindsurf(requirementText.trim());
|
|
314
|
+
console.log(chalk.green(`✅ Sent to IDE: ${result.success ? 'success' : 'failed'}`));
|
|
315
|
+
} catch (error) {
|
|
316
|
+
console.error(chalk.red(`❌ Failed to send to IDE: ${error.message}`));
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
// Give IDE time to process
|
|
320
|
+
await new Promise(resolve => setTimeout(resolve, 5000));
|
|
321
|
+
} else {
|
|
322
|
+
// This would integrate with the AI provider to implement the requirement
|
|
323
|
+
// For now, we'll simulate the implementation
|
|
324
|
+
console.log(chalk.blue('🤖 Implementing requirement...'));
|
|
325
|
+
|
|
326
|
+
// Simulate work
|
|
327
|
+
await new Promise(resolve => setTimeout(resolve, 3000));
|
|
328
|
+
}
|
|
329
|
+
|
|
242
330
|
// Update status to CLEAN_UP
|
|
243
331
|
const updateResult = await updateRequirementsStatus(repoPath, 'CLEAN_UP', `Implementation complete for: ${currentTitle}`);
|
|
244
332
|
if (!updateResult.success) {
|
|
@@ -256,7 +344,7 @@ async function executeCreateStage(repoPath, currentTitle) {
|
|
|
256
344
|
* @returns {Promise<{success: boolean, error?: string}>}
|
|
257
345
|
*/
|
|
258
346
|
async function executeCleanUpStage(repoPath, currentTitle) {
|
|
259
|
-
console.log(chalk.cyan(
|
|
347
|
+
console.log(chalk.cyan(`[${getTimestamp()}] 🧹 CLEAN_UP: ${currentTitle}`));
|
|
260
348
|
|
|
261
349
|
// Run linting, cleanup, etc.
|
|
262
350
|
console.log(chalk.blue('🧹 Running code cleanup...'));
|
|
@@ -281,7 +369,7 @@ async function executeCleanUpStage(repoPath, currentTitle) {
|
|
|
281
369
|
* @returns {Promise<{success: boolean, error?: string}>}
|
|
282
370
|
*/
|
|
283
371
|
async function executeVerifyStage(repoPath, currentTitle) {
|
|
284
|
-
console.log(chalk.cyan(
|
|
372
|
+
console.log(chalk.cyan(`[${getTimestamp()}] ✅ VERIFY: ${currentTitle}`));
|
|
285
373
|
|
|
286
374
|
// Run tests, verification, etc.
|
|
287
375
|
console.log(chalk.blue('🔍 Running verification...'));
|
|
@@ -65,25 +65,25 @@ async function getCurrentRequirementDetails(repoPath) {
|
|
|
65
65
|
const content = await fs.readFile(reqPath, 'utf8');
|
|
66
66
|
const lines = content.split('\n');
|
|
67
67
|
|
|
68
|
-
// Find the "
|
|
69
|
-
let
|
|
68
|
+
// Find the "⏳ Requirements not yet completed" section (first item is current in-progress)
|
|
69
|
+
let pendingSectionIndex = -1;
|
|
70
70
|
for (let i = 0; i < lines.length; i++) {
|
|
71
|
-
if (lines[i].includes('
|
|
72
|
-
|
|
71
|
+
if (lines[i].includes('⏳ Requirements not yet completed')) {
|
|
72
|
+
pendingSectionIndex = i;
|
|
73
73
|
break;
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
if (
|
|
77
|
+
if (pendingSectionIndex === -1) {
|
|
78
78
|
return { title: 'No current requirement found', status: 'UNKNOWN' };
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
// Look for the
|
|
82
|
-
for (let i =
|
|
81
|
+
// Look for the first requirement after the section header (current in-progress item)
|
|
82
|
+
for (let i = pendingSectionIndex + 1; i < lines.length; i++) {
|
|
83
83
|
const line = lines[i].trim();
|
|
84
84
|
if (line.startsWith('- ')) {
|
|
85
85
|
const title = line.substring(2).trim();
|
|
86
|
-
|
|
86
|
+
|
|
87
87
|
// Look for status in the next few lines
|
|
88
88
|
let status = 'UNKNOWN';
|
|
89
89
|
for (let j = i + 1; j < Math.min(i + 10, lines.length); j++) {
|
|
@@ -95,7 +95,7 @@ async function getCurrentRequirementDetails(repoPath) {
|
|
|
95
95
|
break;
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
|
-
|
|
98
|
+
|
|
99
99
|
return { title, status };
|
|
100
100
|
}
|
|
101
101
|
}
|
|
@@ -55,19 +55,13 @@ function printStatusCard(currentTitle, currentStatus) {
|
|
|
55
55
|
'REQUIREMENT_IMPLEMENTED': chalk.green.bold
|
|
56
56
|
}[currentStatus] || chalk.gray;
|
|
57
57
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
// Requirement title (truncated if too long)
|
|
63
|
-
const maxTitleLength = 62;
|
|
64
|
-
const displayTitle = currentTitle.length > maxTitleLength
|
|
58
|
+
// Simple one-line status display
|
|
59
|
+
const maxTitleLength = 60;
|
|
60
|
+
const displayTitle = currentTitle.length > maxTitleLength
|
|
65
61
|
? currentTitle.substring(0, maxTitleLength - 3) + '...'
|
|
66
62
|
: currentTitle;
|
|
67
|
-
|
|
68
|
-
console.log(chalk.magenta('
|
|
69
|
-
console.log(chalk.magenta('│') + ' 🚦 Status: ' + statusColor(statusIcon + ' ' + currentStatus) + ' '.repeat(52 - currentStatus.length) + chalk.magenta('│'));
|
|
70
|
-
console.log(chalk.magenta('╰────────────────────────────────────────────────────────────────╯\n'));
|
|
63
|
+
|
|
64
|
+
console.log(chalk.magenta('📋 ') + chalk.white(displayTitle) + chalk.magenta(' | Status: ') + statusColor(statusIcon + ' ' + currentStatus));
|
|
71
65
|
}
|
|
72
66
|
|
|
73
67
|
/**
|
|
@@ -90,7 +84,7 @@ async function updateRequirementsStatus(repoPath, newStatus, responseText) {
|
|
|
90
84
|
let statusUpdated = false;
|
|
91
85
|
for (let i = 0; i < lines.length; i++) {
|
|
92
86
|
if (lines[i].includes('🚦 Current Status')) {
|
|
93
|
-
lines[i] =
|
|
87
|
+
lines[i] = `🚦 Current Status: [${newStatus}]`;
|
|
94
88
|
statusUpdated = true;
|
|
95
89
|
break;
|
|
96
90
|
}
|