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
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Settings Command - Manage VCM settings including main objective
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
const { Command } = require('commander');
|
|
8
|
+
const chalk = require('chalk');
|
|
9
|
+
const { getMainObjective, setMainObjective } = require('vibecodingmachine-core').configHelpers;
|
|
10
|
+
const { DEFAULT_MAIN_OBJECTIVE, MAIN_OBJECTIVE_MAX_LENGTH } = require('vibecodingmachine-core').constants;
|
|
11
|
+
|
|
12
|
+
const program = new Command();
|
|
13
|
+
|
|
14
|
+
program
|
|
15
|
+
.name('settings')
|
|
16
|
+
.description('Manage VCM settings')
|
|
17
|
+
.version('1.0.0');
|
|
18
|
+
|
|
19
|
+
// Get settings subcommand
|
|
20
|
+
program
|
|
21
|
+
.command('get [key]')
|
|
22
|
+
.description('Get a setting value')
|
|
23
|
+
.action(async (key) => {
|
|
24
|
+
try {
|
|
25
|
+
if (key === 'mainObjective') {
|
|
26
|
+
const objective = await getMainObjective();
|
|
27
|
+
console.log(chalk.green('Main Objective:'));
|
|
28
|
+
console.log(objective);
|
|
29
|
+
console.log(chalk.gray(`(${objective.length}/${MAIN_OBJECTIVE_MAX_LENGTH} characters)`));
|
|
30
|
+
if (objective === DEFAULT_MAIN_OBJECTIVE) {
|
|
31
|
+
console.log(chalk.yellow('Using default objective'));
|
|
32
|
+
}
|
|
33
|
+
} else if (!key) {
|
|
34
|
+
// List all settings
|
|
35
|
+
const objective = await getMainObjective();
|
|
36
|
+
console.log(chalk.blue('=== VCM Settings ==='));
|
|
37
|
+
console.log();
|
|
38
|
+
console.log(chalk.green('mainObjective:'));
|
|
39
|
+
console.log(` ${objective}`);
|
|
40
|
+
console.log(chalk.gray(` (${objective.length}/${MAIN_OBJECTIVE_MAX_LENGTH} characters)`));
|
|
41
|
+
} else {
|
|
42
|
+
console.log(chalk.yellow(`Unknown setting: ${key}`));
|
|
43
|
+
}
|
|
44
|
+
} catch (error) {
|
|
45
|
+
console.error(chalk.red('Error getting setting:'), error.message);
|
|
46
|
+
process.exit(1);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
// Set/update settings subcommand
|
|
51
|
+
program
|
|
52
|
+
.command('set <key> <value>')
|
|
53
|
+
.description('Set a setting value')
|
|
54
|
+
.alias('update')
|
|
55
|
+
.action(async (key, value) => {
|
|
56
|
+
try {
|
|
57
|
+
if (key === 'mainObjective') {
|
|
58
|
+
const result = await setMainObjective(value);
|
|
59
|
+
if (result.success) {
|
|
60
|
+
console.log(chalk.green('✓ Main objective updated successfully'));
|
|
61
|
+
console.log(chalk.gray(`New value: ${result.value}`));
|
|
62
|
+
console.log(chalk.gray(`(${result.value.length}/${MAIN_OBJECTIVE_MAX_LENGTH} characters)`));
|
|
63
|
+
} else {
|
|
64
|
+
console.error(chalk.red('✗ Failed to update main objective:'), result.error);
|
|
65
|
+
process.exit(1);
|
|
66
|
+
}
|
|
67
|
+
} else {
|
|
68
|
+
console.log(chalk.yellow(`Unknown setting: ${key}`));
|
|
69
|
+
console.log(chalk.gray('Available settings: mainObjective'));
|
|
70
|
+
}
|
|
71
|
+
} catch (error) {
|
|
72
|
+
console.error(chalk.red('Error setting value:'), error.message);
|
|
73
|
+
process.exit(1);
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
// Reset to default
|
|
78
|
+
program
|
|
79
|
+
.command('reset <key>')
|
|
80
|
+
.description('Reset a setting to its default value')
|
|
81
|
+
.action(async (key) => {
|
|
82
|
+
try {
|
|
83
|
+
if (key === 'mainObjective') {
|
|
84
|
+
const result = await setMainObjective(DEFAULT_MAIN_OBJECTIVE);
|
|
85
|
+
if (result.success) {
|
|
86
|
+
console.log(chalk.green('✓ Main objective reset to default'));
|
|
87
|
+
console.log(chalk.gray(`Default: ${DEFAULT_MAIN_OBJECTIVE}`));
|
|
88
|
+
} else {
|
|
89
|
+
console.error(chalk.red('✗ Failed to reset main objective:'), result.error);
|
|
90
|
+
process.exit(1);
|
|
91
|
+
}
|
|
92
|
+
} else {
|
|
93
|
+
console.log(chalk.yellow(`Unknown setting: ${key}`));
|
|
94
|
+
}
|
|
95
|
+
} catch (error) {
|
|
96
|
+
console.error(chalk.red('Error resetting setting:'), error.message);
|
|
97
|
+
process.exit(1);
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
// Parse arguments
|
|
102
|
+
if (require.main === module) {
|
|
103
|
+
program.parse(process.argv);
|
|
104
|
+
|
|
105
|
+
// Show help if no arguments provided
|
|
106
|
+
if (!process.argv.slice(2).length) {
|
|
107
|
+
program.outputHelp();
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
module.exports = program;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Spec Count CLI Command (T124)
|
|
4
|
+
* Shows current TODO spec count and status
|
|
5
|
+
* Usage: vcm spec-count status
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const { countTodoSpecs } = require('vibecodingmachine-core');
|
|
9
|
+
const path = require('path');
|
|
10
|
+
const fs = require('fs');
|
|
11
|
+
|
|
12
|
+
const repoPath = process.cwd();
|
|
13
|
+
const MIN_SPEC_COUNT = 2;
|
|
14
|
+
|
|
15
|
+
async function showSpecCount() {
|
|
16
|
+
try {
|
|
17
|
+
console.log('\n📊 VCM Spec Count Status\n');
|
|
18
|
+
|
|
19
|
+
const { count, specs } = await countTodoSpecs(repoPath);
|
|
20
|
+
|
|
21
|
+
console.log(`Current TODO Specs: ${count}`);
|
|
22
|
+
console.log(`Minimum Required: ${MIN_SPEC_COUNT}`);
|
|
23
|
+
console.log(`Status: ${count >= MIN_SPEC_COUNT ? '✅ OK' : '⚠️ LOW - New specs will be auto-created'}\n`);
|
|
24
|
+
|
|
25
|
+
if (specs.length > 0) {
|
|
26
|
+
console.log('Active Specs:');
|
|
27
|
+
specs.forEach((spec, i) => {
|
|
28
|
+
console.log(` ${i + 1}. ${spec.directory}`);
|
|
29
|
+
});
|
|
30
|
+
console.log('');
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Check for auto-creation log
|
|
34
|
+
const logFile = path.join(repoPath, '.vibecodingmachine', 'auto-spec-creation.log');
|
|
35
|
+
if (fs.existsSync(logFile)) {
|
|
36
|
+
const logContent = fs.readFileSync(logFile, 'utf8').split('\n').filter(Boolean).slice(-5);
|
|
37
|
+
if (logContent.length > 0) {
|
|
38
|
+
console.log('Recent Auto-Creation Activity:');
|
|
39
|
+
logContent.forEach(line => console.log(` ${line}`));
|
|
40
|
+
console.log('');
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
process.exit(0);
|
|
45
|
+
} catch (error) {
|
|
46
|
+
console.error('Error:', error.message);
|
|
47
|
+
process.exit(1);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Handle CLI arguments
|
|
52
|
+
const command = process.argv[2];
|
|
53
|
+
|
|
54
|
+
if (command === 'status' || !command) {
|
|
55
|
+
showSpecCount();
|
|
56
|
+
} else {
|
|
57
|
+
console.log('Usage: vcm spec-count [status]');
|
|
58
|
+
console.log(' status - Show current spec count and status (default)');
|
|
59
|
+
process.exit(0);
|
|
60
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* CLI Command: Disable Spec
|
|
3
|
-
*
|
|
3
|
+
*
|
|
4
4
|
* Implements "app disable spec" command for CLI interface.
|
|
5
5
|
* Follows constitutional requirements: <800 lines, test-first approach.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
const { disableSpec } = require('
|
|
8
|
+
const { disableSpec } = require('vibecodingmachine-core/src/utils/specification-enable-disable');
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* CLI disable spec command implementation
|
|
@@ -43,7 +43,7 @@ class DisableSpecCommand {
|
|
|
43
43
|
|
|
44
44
|
// Call core disable function
|
|
45
45
|
const result = await disableSpec(specId);
|
|
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 Spec
|
|
3
|
-
*
|
|
3
|
+
*
|
|
4
4
|
* Implements "app enable spec" command for CLI interface.
|
|
5
5
|
* Follows constitutional requirements: <800 lines, test-first approach.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
const { enableSpec } = require('
|
|
8
|
+
const { enableSpec } = require('vibecodingmachine-core/src/utils/specification-enable-disable');
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* CLI enable spec command implementation
|
|
@@ -43,7 +43,7 @@ class EnableSpecCommand {
|
|
|
43
43
|
|
|
44
44
|
// Call core enable function
|
|
45
45
|
const result = await enableSpec(specId);
|
|
46
|
-
|
|
46
|
+
|
|
47
47
|
if (!result.success) {
|
|
48
48
|
return {
|
|
49
49
|
success: false,
|
package/src/commands/status.js
CHANGED
|
@@ -16,7 +16,7 @@ function formatIDEName(ide) {
|
|
|
16
16
|
'cline': t('ide.cline'),
|
|
17
17
|
'cursor': t('ide.cursor'),
|
|
18
18
|
'vscode': t('ide.vscode'),
|
|
19
|
-
'
|
|
19
|
+
'devin': t('ide.devin')
|
|
20
20
|
};
|
|
21
21
|
return ideNames[ide] || ide;
|
|
22
22
|
}
|
|
@@ -34,10 +34,10 @@ async function show() {
|
|
|
34
34
|
const repoPath = await getRepoPath();
|
|
35
35
|
console.log(chalk.bold(`\n${t('status.title')}`));
|
|
36
36
|
console.log(chalk.gray(`${t('status.repository')}:`), chalk.cyan(formatPath(repoPath)));
|
|
37
|
-
|
|
37
|
+
|
|
38
38
|
const status = await checkAutoModeStatus();
|
|
39
39
|
console.log(chalk.gray(`${t('status.auto.mode')}:`), status.running ? chalk.green(t('status.running')) : chalk.yellow(t('status.stopped')));
|
|
40
|
-
|
|
40
|
+
|
|
41
41
|
if (status.running) {
|
|
42
42
|
console.log(chalk.gray(`${t('status.ide')}:`), chalk.cyan(formatIDEName(status.ide || 'cline')));
|
|
43
43
|
console.log(chalk.gray(`${t('status.chats')}:`), chalk.cyan(status.chatCount || 0));
|
|
@@ -47,21 +47,21 @@ async function show() {
|
|
|
47
47
|
try {
|
|
48
48
|
const healthTracker = new IDEHealthTracker();
|
|
49
49
|
const allMetrics = await healthTracker.getAllHealthMetrics();
|
|
50
|
-
|
|
50
|
+
|
|
51
51
|
if (allMetrics.size > 0) {
|
|
52
52
|
console.log(chalk.bold('\n📊 IDE Health Metrics:'));
|
|
53
|
-
|
|
53
|
+
|
|
54
54
|
for (const [ideId, metrics] of allMetrics) {
|
|
55
55
|
const successRate = metrics.successRate > 0 ? `${(metrics.successRate * 100).toFixed(1)}%` : 'N/A';
|
|
56
56
|
const avgResponseTime = metrics.averageResponseTime > 0 ? `${Math.round(metrics.averageResponseTime / 1000)}s` : 'N/A';
|
|
57
|
-
|
|
57
|
+
|
|
58
58
|
console.log(chalk.gray(` ${formatIDEName(ideId)}:`));
|
|
59
59
|
console.log(chalk.gray(` Success Rate:`), chalk.green(successRate));
|
|
60
60
|
console.log(chalk.gray(` Avg Response:`), chalk.cyan(avgResponseTime));
|
|
61
61
|
console.log(chalk.gray(` Interactions:`), chalk.blue(`${metrics.totalInteractions}`));
|
|
62
|
-
console.log(chalk.gray(` Health:`),
|
|
63
|
-
metrics.consecutiveFailures === 0 ?
|
|
64
|
-
chalk.green('✅ Healthy') :
|
|
62
|
+
console.log(chalk.gray(` Health:`),
|
|
63
|
+
metrics.consecutiveFailures === 0 ?
|
|
64
|
+
chalk.green('✅ Healthy') :
|
|
65
65
|
chalk.yellow(`⚠️ ${metrics.consecutiveFailures} consecutive failures`)
|
|
66
66
|
);
|
|
67
67
|
console.log();
|
|
@@ -77,7 +77,7 @@ async function show() {
|
|
|
77
77
|
// Health tracking not available or error reading metrics
|
|
78
78
|
console.log(chalk.gray('\n📊 IDE Health:'), chalk.yellow('Not available'));
|
|
79
79
|
}
|
|
80
|
-
|
|
80
|
+
|
|
81
81
|
console.log();
|
|
82
82
|
}
|
|
83
83
|
|
package/src/commands/sync.js
CHANGED
|
@@ -8,12 +8,12 @@ const { t, errorReporter } = require('vibecodingmachine-core');
|
|
|
8
8
|
*/
|
|
9
9
|
async function syncNow() {
|
|
10
10
|
const syncEngine = new SyncEngine();
|
|
11
|
-
|
|
11
|
+
|
|
12
12
|
try {
|
|
13
13
|
console.log(chalk.cyan(`\n🔄 ${t('sync.starting')}\n`));
|
|
14
14
|
|
|
15
15
|
await syncEngine.initialize();
|
|
16
|
-
|
|
16
|
+
|
|
17
17
|
// Listen for sync completion
|
|
18
18
|
const syncPromise = new Promise((resolve, reject) => {
|
|
19
19
|
syncEngine.once('sync-complete', (result) => {
|
|
@@ -24,13 +24,13 @@ async function syncNow() {
|
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
26
|
});
|
|
27
|
-
|
|
27
|
+
|
|
28
28
|
// Start sync
|
|
29
29
|
await syncEngine.sync();
|
|
30
|
-
|
|
30
|
+
|
|
31
31
|
// Wait for completion
|
|
32
32
|
const result = await syncPromise;
|
|
33
|
-
|
|
33
|
+
|
|
34
34
|
const status = syncEngine.getStatus();
|
|
35
35
|
|
|
36
36
|
console.log(chalk.green(`✓ ${t('sync.complete')}\n`));
|
|
@@ -40,7 +40,7 @@ async function syncNow() {
|
|
|
40
40
|
console.log(chalk.white(t('sync.conflicts').padEnd(17)) + (result.conflicts || 0));
|
|
41
41
|
console.log(chalk.white(t('sync.queued.changes').padEnd(17)) + status.queuedChanges);
|
|
42
42
|
console.log('');
|
|
43
|
-
|
|
43
|
+
|
|
44
44
|
} catch (error) {
|
|
45
45
|
console.error(chalk.red(`\n✗ ${t('sync.failed')}`), error.message);
|
|
46
46
|
console.log(chalk.gray(`\n${t('sync.tip.aws')}\n`));
|
|
@@ -58,10 +58,10 @@ async function syncNow() {
|
|
|
58
58
|
*/
|
|
59
59
|
async function syncStatus() {
|
|
60
60
|
const syncEngine = new SyncEngine();
|
|
61
|
-
|
|
61
|
+
|
|
62
62
|
try {
|
|
63
63
|
await syncEngine.initialize();
|
|
64
|
-
|
|
64
|
+
|
|
65
65
|
const status = syncEngine.getStatus();
|
|
66
66
|
|
|
67
67
|
console.log('\n' + chalk.bold.cyan(t('sync.status.title')));
|
|
@@ -94,22 +94,22 @@ async function syncStatus() {
|
|
|
94
94
|
console.log(chalk.white(t('sync.computer.id').padEnd(17)) + status.computerId);
|
|
95
95
|
|
|
96
96
|
console.log('');
|
|
97
|
-
|
|
97
|
+
|
|
98
98
|
// Show recent sync events
|
|
99
99
|
const history = syncEngine.getHistory(5);
|
|
100
100
|
if (history.length > 0) {
|
|
101
101
|
console.log(chalk.bold.cyan(t('sync.recent.events')));
|
|
102
102
|
console.log(chalk.gray('─'.repeat(60)));
|
|
103
|
-
|
|
103
|
+
|
|
104
104
|
for (const event of history.reverse()) {
|
|
105
105
|
const time = new Date(event.timestamp).toLocaleTimeString();
|
|
106
106
|
const icon = event.type === 'conflict-resolution' ? chalk.yellow('⚠') : chalk.gray('•');
|
|
107
107
|
console.log(`${icon} ${chalk.gray(time)} ${event.type}`);
|
|
108
108
|
}
|
|
109
|
-
|
|
109
|
+
|
|
110
110
|
console.log('');
|
|
111
111
|
}
|
|
112
|
-
|
|
112
|
+
|
|
113
113
|
} catch (error) {
|
|
114
114
|
console.error(chalk.red(`\n✗ ${t('sync.status.failed')}`), error.message);
|
|
115
115
|
await errorReporter.reportError(error, {
|
|
@@ -126,10 +126,10 @@ async function syncStatus() {
|
|
|
126
126
|
*/
|
|
127
127
|
async function viewQueue() {
|
|
128
128
|
const syncEngine = new SyncEngine();
|
|
129
|
-
|
|
129
|
+
|
|
130
130
|
try {
|
|
131
131
|
await syncEngine.initialize();
|
|
132
|
-
|
|
132
|
+
|
|
133
133
|
const status = syncEngine.getStatus();
|
|
134
134
|
|
|
135
135
|
if (status.queuedChanges === 0) {
|
|
@@ -149,7 +149,7 @@ async function viewQueue() {
|
|
|
149
149
|
],
|
|
150
150
|
colWidths: [5, 15, 40, 20]
|
|
151
151
|
});
|
|
152
|
-
|
|
152
|
+
|
|
153
153
|
// Add rows (accessing internal queue - in production, add a public getter)
|
|
154
154
|
syncEngine.offlineQueue.forEach((change, index) => {
|
|
155
155
|
table.push([
|
|
@@ -159,7 +159,7 @@ async function viewQueue() {
|
|
|
159
159
|
new Date(change.timestamp).toLocaleString()
|
|
160
160
|
]);
|
|
161
161
|
});
|
|
162
|
-
|
|
162
|
+
|
|
163
163
|
console.log(table.toString() + '\n');
|
|
164
164
|
|
|
165
165
|
console.log(chalk.gray(`${t('sync.queue.will.sync')}\n`));
|
|
@@ -167,7 +167,7 @@ async function viewQueue() {
|
|
|
167
167
|
console.log(chalk.gray(' vcm sync:force ') + `- ${t('sync.queue.force.now')}`);
|
|
168
168
|
console.log(chalk.gray(' vcm sync:now ') + `- ${t('sync.queue.sync.online')}`);
|
|
169
169
|
console.log('');
|
|
170
|
-
|
|
170
|
+
|
|
171
171
|
} catch (error) {
|
|
172
172
|
console.error(chalk.red(`\n✗ ${t('sync.queue.view.failed')}`), error.message);
|
|
173
173
|
throw error;
|
|
@@ -181,7 +181,7 @@ async function viewQueue() {
|
|
|
181
181
|
*/
|
|
182
182
|
async function forceSync() {
|
|
183
183
|
const syncEngine = new SyncEngine();
|
|
184
|
-
|
|
184
|
+
|
|
185
185
|
try {
|
|
186
186
|
console.log(chalk.yellow(`\n⚠ ${t('sync.force.starting')}\n`));
|
|
187
187
|
|
|
@@ -198,7 +198,7 @@ async function forceSync() {
|
|
|
198
198
|
// Restore original online status
|
|
199
199
|
syncEngine.setOnlineMode(wasOnline);
|
|
200
200
|
}
|
|
201
|
-
|
|
201
|
+
|
|
202
202
|
} catch (error) {
|
|
203
203
|
console.error(chalk.red(`\n✗ ${t('sync.force.failed')}`), error.message);
|
|
204
204
|
console.log(chalk.gray(`\n${t('sync.force.unreachable')}\n`));
|
|
@@ -213,10 +213,10 @@ async function forceSync() {
|
|
|
213
213
|
*/
|
|
214
214
|
async function viewHistory(options = {}) {
|
|
215
215
|
const syncEngine = new SyncEngine();
|
|
216
|
-
|
|
216
|
+
|
|
217
217
|
try {
|
|
218
218
|
await syncEngine.initialize();
|
|
219
|
-
|
|
219
|
+
|
|
220
220
|
const limit = parseInt(options.limit) || 50;
|
|
221
221
|
const history = syncEngine.getHistory(limit);
|
|
222
222
|
|
|
@@ -236,18 +236,18 @@ async function viewHistory(options = {}) {
|
|
|
236
236
|
],
|
|
237
237
|
colWidths: [20, 20, 50]
|
|
238
238
|
});
|
|
239
|
-
|
|
239
|
+
|
|
240
240
|
// Add rows
|
|
241
241
|
for (const event of history.reverse()) {
|
|
242
242
|
const time = new Date(event.timestamp).toLocaleString();
|
|
243
243
|
const type = event.type;
|
|
244
244
|
const details = getEventDetails(event);
|
|
245
|
-
|
|
245
|
+
|
|
246
246
|
table.push([time, type, details]);
|
|
247
247
|
}
|
|
248
|
-
|
|
248
|
+
|
|
249
249
|
console.log(table.toString() + '\n');
|
|
250
|
-
|
|
250
|
+
|
|
251
251
|
} catch (error) {
|
|
252
252
|
console.error(chalk.red(`\n✗ ${t('sync.history.view.failed')}`), error.message);
|
|
253
253
|
throw error;
|
package/src/commands/timeout.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Timeout Configuration Command
|
|
3
|
-
*
|
|
3
|
+
*
|
|
4
4
|
* Manages adaptive timeout settings for autonomous mode
|
|
5
5
|
* Part of User Story 3: Adaptive Timeout Management
|
|
6
6
|
*/
|
|
@@ -15,25 +15,25 @@ const { TimeoutCalculator } = require('vibecodingmachine-core');
|
|
|
15
15
|
async function showConfig() {
|
|
16
16
|
try {
|
|
17
17
|
const config = await getTimeoutConfig();
|
|
18
|
-
|
|
18
|
+
|
|
19
19
|
console.log(chalk.cyan('\n🕐 Timeout Configuration\n'));
|
|
20
|
-
|
|
20
|
+
|
|
21
21
|
// Mode
|
|
22
22
|
const modeIcon = config.mode === 'adaptive' ? '🔄' : '⏱️';
|
|
23
23
|
console.log(`${modeIcon} Mode: ${chalk.bold(config.mode)}`);
|
|
24
|
-
|
|
24
|
+
|
|
25
25
|
// Timeouts
|
|
26
26
|
console.log(`⏱️ Default: ${chalk.bold(formatDuration(config.defaultTimeout))}`);
|
|
27
27
|
console.log(`⏱️ Minimum: ${chalk.bold(formatDuration(config.minTimeout))}`);
|
|
28
28
|
console.log(`⏱️ Maximum: ${chalk.bold(formatDuration(config.maxTimeout))}`);
|
|
29
|
-
|
|
29
|
+
|
|
30
30
|
// Adaptive settings
|
|
31
31
|
if (config.mode === 'adaptive') {
|
|
32
32
|
console.log(`📊 Buffer: ${chalk.bold(config.bufferPercentage * 100)}%`);
|
|
33
33
|
console.log(`📈 EWMA Alpha: ${chalk.bold(config.ewmaAlpha)}`);
|
|
34
34
|
console.log(`📋 Min Samples: ${chalk.bold(config.minSamples)}`);
|
|
35
35
|
}
|
|
36
|
-
|
|
36
|
+
|
|
37
37
|
console.log();
|
|
38
38
|
} catch (error) {
|
|
39
39
|
console.error(chalk.red('✗ Failed to get timeout configuration:'), error.message);
|
|
@@ -48,7 +48,7 @@ async function setConfig(key, value) {
|
|
|
48
48
|
try {
|
|
49
49
|
const currentConfig = await getTimeoutConfig();
|
|
50
50
|
let newConfig = { ...currentConfig };
|
|
51
|
-
|
|
51
|
+
|
|
52
52
|
switch (key) {
|
|
53
53
|
case 'mode':
|
|
54
54
|
if (!['fixed', 'adaptive'].includes(value)) {
|
|
@@ -57,19 +57,19 @@ async function setConfig(key, value) {
|
|
|
57
57
|
}
|
|
58
58
|
newConfig.mode = value;
|
|
59
59
|
break;
|
|
60
|
-
|
|
60
|
+
|
|
61
61
|
case 'default':
|
|
62
62
|
newConfig.defaultTimeout = parseDuration(value);
|
|
63
63
|
break;
|
|
64
|
-
|
|
64
|
+
|
|
65
65
|
case 'minimum':
|
|
66
66
|
newConfig.minTimeout = parseDuration(value);
|
|
67
67
|
break;
|
|
68
|
-
|
|
68
|
+
|
|
69
69
|
case 'maximum':
|
|
70
70
|
newConfig.maxTimeout = parseDuration(value);
|
|
71
71
|
break;
|
|
72
|
-
|
|
72
|
+
|
|
73
73
|
case 'buffer':
|
|
74
74
|
const bufferPercent = parseFloat(value);
|
|
75
75
|
if (isNaN(bufferPercent) || bufferPercent < 0 || bufferPercent > 200) {
|
|
@@ -78,7 +78,7 @@ async function setConfig(key, value) {
|
|
|
78
78
|
}
|
|
79
79
|
newConfig.bufferPercentage = bufferPercent / 100;
|
|
80
80
|
break;
|
|
81
|
-
|
|
81
|
+
|
|
82
82
|
case 'ewma':
|
|
83
83
|
const alpha = parseFloat(value);
|
|
84
84
|
if (isNaN(alpha) || alpha < 0 || alpha > 1) {
|
|
@@ -87,7 +87,7 @@ async function setConfig(key, value) {
|
|
|
87
87
|
}
|
|
88
88
|
newConfig.ewmaAlpha = alpha;
|
|
89
89
|
break;
|
|
90
|
-
|
|
90
|
+
|
|
91
91
|
case 'samples':
|
|
92
92
|
const samples = parseInt(value);
|
|
93
93
|
if (isNaN(samples) || samples < 1) {
|
|
@@ -96,16 +96,16 @@ async function setConfig(key, value) {
|
|
|
96
96
|
}
|
|
97
97
|
newConfig.minSamples = samples;
|
|
98
98
|
break;
|
|
99
|
-
|
|
99
|
+
|
|
100
100
|
default:
|
|
101
101
|
console.error(chalk.red(`✗ Unknown setting: ${key}`));
|
|
102
102
|
console.log(chalk.yellow('Available settings: mode, default, minimum, maximum, buffer, ewma, samples'));
|
|
103
103
|
process.exit(1);
|
|
104
104
|
}
|
|
105
|
-
|
|
105
|
+
|
|
106
106
|
await setTimeoutConfig(newConfig);
|
|
107
107
|
console.log(chalk.green(`✓ Timeout configuration updated: ${key} = ${value}`));
|
|
108
|
-
|
|
108
|
+
|
|
109
109
|
// Show updated config
|
|
110
110
|
await showConfig();
|
|
111
111
|
} catch (error) {
|
|
@@ -134,23 +134,23 @@ async function resetConfig() {
|
|
|
134
134
|
async function testConfig(ideId) {
|
|
135
135
|
try {
|
|
136
136
|
const config = await getTimeoutConfig();
|
|
137
|
-
|
|
137
|
+
|
|
138
138
|
console.log(chalk.cyan(`\n🧪 Testing Timeout Calculation for ${chalk.bold(ideId)}\n`));
|
|
139
|
-
|
|
139
|
+
|
|
140
140
|
// Generate sample response times based on IDE performance characteristics
|
|
141
141
|
const sampleTimes = generateSampleTimes(ideId);
|
|
142
|
-
|
|
142
|
+
|
|
143
143
|
if (sampleTimes.length === 0) {
|
|
144
144
|
console.log(chalk.yellow('⚠️ No historical data available for testing'));
|
|
145
145
|
console.log(chalk.gray('Run some autonomous tasks first to generate response time data'));
|
|
146
146
|
return;
|
|
147
147
|
}
|
|
148
|
-
|
|
148
|
+
|
|
149
149
|
console.log(chalk.gray('Sample response times:'));
|
|
150
150
|
sampleTimes.forEach((time, index) => {
|
|
151
151
|
console.log(` ${index + 1}. ${formatDuration(time)}`);
|
|
152
152
|
});
|
|
153
|
-
|
|
153
|
+
|
|
154
154
|
// Calculate timeout using current configuration
|
|
155
155
|
const timeoutResult = TimeoutCalculator.calculateTimeout(sampleTimes, {
|
|
156
156
|
defaultTimeout: config.defaultTimeout,
|
|
@@ -158,14 +158,14 @@ async function testConfig(ideId) {
|
|
|
158
158
|
maxTimeout: config.maxTimeout,
|
|
159
159
|
bufferPercentage: config.bufferPercentage
|
|
160
160
|
});
|
|
161
|
-
|
|
161
|
+
|
|
162
162
|
console.log(chalk.green(`\n📊 Calculated timeout: ${chalk.bold(formatDuration(timeoutResult.timeout))}`));
|
|
163
163
|
console.log(chalk.gray(`Based on ${sampleTimes.length} samples with ${config.bufferPercentage * 100}% buffer`));
|
|
164
|
-
|
|
164
|
+
|
|
165
165
|
if (timeoutResult.outliersRemoved > 0) {
|
|
166
166
|
console.log(chalk.yellow(`⚠️ Removed ${timeoutResult.outliersRemoved} outliers from calculation`));
|
|
167
167
|
}
|
|
168
|
-
|
|
168
|
+
|
|
169
169
|
console.log();
|
|
170
170
|
} catch (error) {
|
|
171
171
|
console.error(chalk.red('✗ Failed to test timeout configuration:'), error.message);
|
|
@@ -179,7 +179,7 @@ async function testConfig(ideId) {
|
|
|
179
179
|
function formatDuration(ms) {
|
|
180
180
|
const minutes = Math.floor(ms / 60000);
|
|
181
181
|
const seconds = Math.floor((ms % 60000) / 1000);
|
|
182
|
-
|
|
182
|
+
|
|
183
183
|
if (minutes > 0) {
|
|
184
184
|
return `${minutes}m ${seconds}s`;
|
|
185
185
|
} else {
|
|
@@ -196,10 +196,10 @@ function parseDuration(str) {
|
|
|
196
196
|
console.error(chalk.red('✗ Invalid duration format. Use: 30s, 5m, 1h'));
|
|
197
197
|
process.exit(1);
|
|
198
198
|
}
|
|
199
|
-
|
|
199
|
+
|
|
200
200
|
const value = parseInt(match[1]);
|
|
201
201
|
const unit = match[2];
|
|
202
|
-
|
|
202
|
+
|
|
203
203
|
switch (unit) {
|
|
204
204
|
case 's': return value * 1000;
|
|
205
205
|
case 'm': return value * 60 * 1000;
|
|
@@ -217,10 +217,10 @@ function generateSampleTimes(ideId) {
|
|
|
217
217
|
'claude-code': [2, 3, 2, 4, 3, 2, 3, 5, 2, 3].map(x => x * 60 * 1000), // 2-5 minutes
|
|
218
218
|
'cline': [3, 4, 3, 5, 4, 3, 4, 6, 3, 4].map(x => x * 60 * 1000), // 3-6 minutes
|
|
219
219
|
'cursor': [4, 5, 4, 6, 5, 4, 5, 7, 4, 5].map(x => x * 60 * 1000), // 4-7 minutes
|
|
220
|
-
'
|
|
220
|
+
'devin': [5, 6, 5, 7, 6, 5, 6, 8, 5, 6].map(x => x * 60 * 1000), // 5-8 minutes
|
|
221
221
|
'antigravity': [3, 4, 3, 5, 4, 3, 4, 6, 3, 4].map(x => x * 60 * 1000), // 3-6 minutes
|
|
222
222
|
};
|
|
223
|
-
|
|
223
|
+
|
|
224
224
|
return profiles[ideId] || profiles['claude-code'];
|
|
225
225
|
}
|
|
226
226
|
|
|
@@ -229,12 +229,12 @@ function generateSampleTimes(ideId) {
|
|
|
229
229
|
*/
|
|
230
230
|
async function handleCommand(args) {
|
|
231
231
|
const [action, ...restArgs] = args;
|
|
232
|
-
|
|
232
|
+
|
|
233
233
|
switch (action) {
|
|
234
234
|
case 'show':
|
|
235
235
|
await showConfig();
|
|
236
236
|
break;
|
|
237
|
-
|
|
237
|
+
|
|
238
238
|
case 'set':
|
|
239
239
|
if (restArgs.length !== 2) {
|
|
240
240
|
console.error(chalk.red('✗ Usage: vcm config:timeout set <key> <value>'));
|
|
@@ -243,20 +243,20 @@ async function handleCommand(args) {
|
|
|
243
243
|
}
|
|
244
244
|
await setConfig(restArgs[0], restArgs[1]);
|
|
245
245
|
break;
|
|
246
|
-
|
|
246
|
+
|
|
247
247
|
case 'reset':
|
|
248
248
|
await resetConfig();
|
|
249
249
|
break;
|
|
250
|
-
|
|
250
|
+
|
|
251
251
|
case 'test':
|
|
252
252
|
if (restArgs.length !== 1) {
|
|
253
253
|
console.error(chalk.red('✗ Usage: vcm config:timeout test <ide-id>'));
|
|
254
|
-
console.log(chalk.yellow('Available IDEs: claude-code, cline, cursor,
|
|
254
|
+
console.log(chalk.yellow('Available IDEs: claude-code, cline, cursor, devin, antigravity'));
|
|
255
255
|
process.exit(1);
|
|
256
256
|
}
|
|
257
257
|
await testConfig(restArgs[0]);
|
|
258
258
|
break;
|
|
259
|
-
|
|
259
|
+
|
|
260
260
|
default:
|
|
261
261
|
console.log(chalk.cyan('Timeout Configuration Command\n'));
|
|
262
262
|
console.log(chalk.gray('Manages adaptive timeout settings for autonomous mode\n'));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* TRUI Interface Integration
|
|
3
|
-
*
|
|
3
|
+
*
|
|
4
4
|
* Integrates TRUI agent interface with main CLI.
|
|
5
5
|
* Follows constitutional requirements: <555 lines, test-first approach.
|
|
6
6
|
*/
|
|
@@ -19,7 +19,7 @@ class TruiInterface {
|
|
|
19
19
|
constructor(options = {}) {
|
|
20
20
|
this.providerDefinitions = getProviderDefinitions();
|
|
21
21
|
this.providerPreferences = getProviderPreferences() || {};
|
|
22
|
-
|
|
22
|
+
|
|
23
23
|
// Initialize agent interface
|
|
24
24
|
this.agentInterface = new AgentInterface({
|
|
25
25
|
providerDefinitions: this.providerDefinitions,
|