vibecodingmachine-cli 2026.3.9-907 → 2026.3.10-1547

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 (39) hide show
  1. package/README.md +85 -85
  2. package/bin/commands/agent-commands.js +295 -28
  3. package/bin/vibecodingmachine.js +0 -0
  4. package/package.json +2 -2
  5. package/scripts/postinstall.js +161 -161
  6. package/src/commands/auth.js +100 -100
  7. package/src/commands/auto-execution.js +120 -32
  8. package/src/commands/auto-requirement-management.js +9 -9
  9. package/src/commands/auto-status-helpers.js +6 -12
  10. package/src/commands/computers.js +318 -318
  11. package/src/commands/feature.js +123 -123
  12. package/src/commands/locale.js +72 -72
  13. package/src/commands/repo.js +163 -163
  14. package/src/commands/setup.js +93 -93
  15. package/src/commands/sync.js +287 -287
  16. package/src/index.js +5 -5
  17. package/src/utils/agent-selector.js +50 -50
  18. package/src/utils/asset-cleanup.js +60 -60
  19. package/src/utils/auth.js +6 -0
  20. package/src/utils/auto-mode-ansi-ui.js +237 -237
  21. package/src/utils/auto-mode-simple-ui.js +141 -141
  22. package/src/utils/copy-with-progress.js +167 -167
  23. package/src/utils/download-with-progress.js +84 -84
  24. package/src/utils/keyboard-handler.js +153 -153
  25. package/src/utils/kiro-installer.js +178 -178
  26. package/src/utils/logger.js +4 -4
  27. package/src/utils/persistent-header.js +114 -114
  28. package/src/utils/prompt-helper.js +63 -63
  29. package/src/utils/provider-checker/agent-runner.js +110 -31
  30. package/src/utils/provider-checker/ide-manager.js +37 -8
  31. package/src/utils/provider-checker/provider-validator.js +50 -0
  32. package/src/utils/provider-checker/requirements-manager.js +21 -6
  33. package/src/utils/status-card.js +121 -121
  34. package/src/utils/stdout-interceptor.js +127 -127
  35. package/src/utils/trui-main-handlers.js +41 -8
  36. package/src/utils/trui-main-menu.js +10 -3
  37. package/src/utils/trui-nav-agents.js +23 -33
  38. package/src/utils/trui-navigation.js +2 -2
  39. package/src/utils/user-tracking.js +299 -299
@@ -1,50 +1,50 @@
1
- /**
2
- * Centralized agent selection logic
3
- * Respects provider preferences order and ensures DRY principle
4
- */
5
-
6
- const { getProviderPreferences } = require('./provider-registry');
7
-
8
- /**
9
- * Get the effective agent based on provider preferences and options
10
- * @param {Object} options - Command line options (may include ide)
11
- * @param {Array} providerDefinitions - Array of provider definitions
12
- * @param {Map} providerDefinitionMap - Map of provider definitions by ID
13
- * @returns {Object} - { effectiveAgent: string, providerDef: Object }
14
- */
15
- async function getEffectiveAgent(options = {}, providerDefinitions, providerDefinitionMap) {
16
- const prefs = await getProviderPreferences();
17
-
18
- // Get all available providers in the order specified in preferences
19
- const availableProviders = [];
20
- for (const id of prefs.order) {
21
- if (prefs.enabled[id] !== false && providerDefinitionMap.has(id)) {
22
- availableProviders.push(id);
23
- }
24
- }
25
-
26
- // If no providers are available, use the first one from definitions as fallback
27
- if (availableProviders.length === 0) {
28
- availableProviders.push(providerDefinitions[0]?.id || 'claude-code');
29
- }
30
-
31
- // Use the first available provider by default, unless overridden by options
32
- let effectiveAgent = options.ide || availableProviders[0];
33
-
34
- // If the requested agent isn't available, use the first available one
35
- if (!availableProviders.includes(effectiveAgent)) {
36
- effectiveAgent = availableProviders[0];
37
- }
38
-
39
- const providerDef = providerDefinitionMap.get(effectiveAgent);
40
-
41
- return {
42
- effectiveAgent,
43
- providerDef,
44
- availableProviders
45
- };
46
- }
47
-
48
- module.exports = {
49
- getEffectiveAgent
50
- };
1
+ /**
2
+ * Centralized agent selection logic
3
+ * Respects provider preferences order and ensures DRY principle
4
+ */
5
+
6
+ const { getProviderPreferences } = require('./provider-registry');
7
+
8
+ /**
9
+ * Get the effective agent based on provider preferences and options
10
+ * @param {Object} options - Command line options (may include ide)
11
+ * @param {Array} providerDefinitions - Array of provider definitions
12
+ * @param {Map} providerDefinitionMap - Map of provider definitions by ID
13
+ * @returns {Object} - { effectiveAgent: string, providerDef: Object }
14
+ */
15
+ async function getEffectiveAgent(options = {}, providerDefinitions, providerDefinitionMap) {
16
+ const prefs = await getProviderPreferences();
17
+
18
+ // Get all available providers in the order specified in preferences
19
+ const availableProviders = [];
20
+ for (const id of prefs.order) {
21
+ if (prefs.enabled[id] !== false && providerDefinitionMap.has(id)) {
22
+ availableProviders.push(id);
23
+ }
24
+ }
25
+
26
+ // If no providers are available, use the first one from definitions as fallback
27
+ if (availableProviders.length === 0) {
28
+ availableProviders.push(providerDefinitions[0]?.id || 'claude-code');
29
+ }
30
+
31
+ // Use the first available provider by default, unless overridden by options
32
+ let effectiveAgent = options.ide || availableProviders[0];
33
+
34
+ // If the requested agent isn't available, use the first available one
35
+ if (!availableProviders.includes(effectiveAgent)) {
36
+ effectiveAgent = availableProviders[0];
37
+ }
38
+
39
+ const providerDef = providerDefinitionMap.get(effectiveAgent);
40
+
41
+ return {
42
+ effectiveAgent,
43
+ providerDef,
44
+ availableProviders
45
+ };
46
+ }
47
+
48
+ module.exports = {
49
+ getEffectiveAgent
50
+ };
@@ -1,60 +1,60 @@
1
- const fs = require('fs-extra');
2
- const path = require('path');
3
-
4
- /**
5
- * Scans the assets directory and removes 0-byte PNG files
6
- * This is a mitigation for an issue where empty PNG files are mysteriously created
7
- */
8
- async function cleanupBrokenAssets() {
9
- try {
10
- // Find assets directory - assuming we are in packages/cli/src/utils
11
- // and assets is at root of repo, but simpler to look relative to where VCM runs
12
- // effectively, we look for 'assets' in the current working directory as CWD is usually the repo root or where the CLI is run
13
- // Better: define path relative to the project root if possible, or CWD if that's how it's structured.
14
- // Based on previous search, assets/ is at the root of the repo.
15
- // However, when installed, strict paths matters.
16
- // But for the user's workspace context, iterating 'assets/' in CWD (repo root) is correct for their dev environment.
17
- // Let's try to be smart about finding specific 'assets' dir if we can, but CWD is a safe start for the CLI tool which is often run from root.
18
-
19
- // Actually, looking at previous grep, `assets/` was checked specifically.
20
- // Let's just check `assets` in process.cwd() as a primary target.
21
-
22
- const assetsDir = path.join(process.cwd(), 'assets');
23
-
24
- if (!await fs.pathExists(assetsDir)) {
25
- return; // No assets dir, nothing to clean
26
- }
27
-
28
- const files = await fs.readdir(assetsDir);
29
- let removedCount = 0;
30
-
31
- for (const file of files) {
32
- if (file.toLowerCase().endsWith('.png')) {
33
- const filePath = path.join(assetsDir, file);
34
- try {
35
- const stats = await fs.stat(filePath);
36
- if (stats.size === 0) {
37
- await fs.remove(filePath);
38
- removedCount++;
39
- }
40
- } catch (err) {
41
- // Ignore errors accessing specific files
42
- }
43
- }
44
- }
45
-
46
- if (removedCount > 0) {
47
- // Only log if we actually did something, to keep noise down
48
- // But maybe we want to know? The plan said "verification: verify removed".
49
- // We can use a debug flag or just log.
50
- // Let's log to console for now as it's a CLI tool.
51
- // console.log(chalk.gray(`Cleaned up ${removedCount} broken (0-byte) asset files.`));
52
- }
53
-
54
- } catch (error) {
55
- // Silently fail to avoid disrupting startup
56
- // console.error('Asset cleanup failed:', error);
57
- }
58
- }
59
-
60
- module.exports = { cleanupBrokenAssets };
1
+ const fs = require('fs-extra');
2
+ const path = require('path');
3
+
4
+ /**
5
+ * Scans the assets directory and removes 0-byte PNG files
6
+ * This is a mitigation for an issue where empty PNG files are mysteriously created
7
+ */
8
+ async function cleanupBrokenAssets() {
9
+ try {
10
+ // Find assets directory - assuming we are in packages/cli/src/utils
11
+ // and assets is at root of repo, but simpler to look relative to where VCM runs
12
+ // effectively, we look for 'assets' in the current working directory as CWD is usually the repo root or where the CLI is run
13
+ // Better: define path relative to the project root if possible, or CWD if that's how it's structured.
14
+ // Based on previous search, assets/ is at the root of the repo.
15
+ // However, when installed, strict paths matters.
16
+ // But for the user's workspace context, iterating 'assets/' in CWD (repo root) is correct for their dev environment.
17
+ // Let's try to be smart about finding specific 'assets' dir if we can, but CWD is a safe start for the CLI tool which is often run from root.
18
+
19
+ // Actually, looking at previous grep, `assets/` was checked specifically.
20
+ // Let's just check `assets` in process.cwd() as a primary target.
21
+
22
+ const assetsDir = path.join(process.cwd(), 'assets');
23
+
24
+ if (!await fs.pathExists(assetsDir)) {
25
+ return; // No assets dir, nothing to clean
26
+ }
27
+
28
+ const files = await fs.readdir(assetsDir);
29
+ let removedCount = 0;
30
+
31
+ for (const file of files) {
32
+ if (file.toLowerCase().endsWith('.png')) {
33
+ const filePath = path.join(assetsDir, file);
34
+ try {
35
+ const stats = await fs.stat(filePath);
36
+ if (stats.size === 0) {
37
+ await fs.remove(filePath);
38
+ removedCount++;
39
+ }
40
+ } catch (err) {
41
+ // Ignore errors accessing specific files
42
+ }
43
+ }
44
+ }
45
+
46
+ if (removedCount > 0) {
47
+ // Only log if we actually did something, to keep noise down
48
+ // But maybe we want to know? The plan said "verification: verify removed".
49
+ // We can use a debug flag or just log.
50
+ // Let's log to console for now as it's a CLI tool.
51
+ // console.log(chalk.gray(`Cleaned up ${removedCount} broken (0-byte) asset files.`));
52
+ }
53
+
54
+ } catch (error) {
55
+ // Silently fail to avoid disrupting startup
56
+ // console.error('Asset cleanup failed:', error);
57
+ }
58
+ }
59
+
60
+ module.exports = { cleanupBrokenAssets };
package/src/utils/auth.js CHANGED
@@ -20,6 +20,12 @@ function generateCodeChallenge(verifier) { return crypto.createHash('sha256').up
20
20
 
21
21
  class CLIAuth {
22
22
  async isAuthenticated() {
23
+ // Check for IDE checking bypass flag
24
+ if (process.env.VCM_SKIP_AUTH === 'true') {
25
+ console.log('🔓 Authentication bypassed for IDE checking');
26
+ return true;
27
+ }
28
+
23
29
  const isValid = await sharedAuth.isAuthenticated();
24
30
  if (isValid) {
25
31
  await this._updateUserActivity();