vibecodingmachine-cli 2026.3.14-1528 → 2026.6.17-1835

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 (162) hide show
  1. package/bin/auth/auth-compliance.js +7 -7
  2. package/bin/commands/agent-commands.js +15 -15
  3. package/bin/commands/auto-commands.js +3 -3
  4. package/bin/commands/command-aliases.js +13 -4
  5. package/bin/config/cli-config.js +15 -5
  6. package/bin/update/update-checker.js +5 -5
  7. package/bin/vibecodingmachine.js +2 -2
  8. package/package.json +2 -2
  9. package/src/commands/agents/add.js +5 -5
  10. package/src/commands/agents/check.js +19 -19
  11. package/src/commands/agents/list.js +24 -24
  12. package/src/commands/agents/remove.js +4 -4
  13. package/src/commands/agents-check.js +1 -1
  14. package/src/commands/analyze-file-sizes.js +43 -43
  15. package/src/commands/auto-direct/auto-provider-manager.js +19 -19
  16. package/src/commands/auto-direct/auto-start-phases.js +493 -0
  17. package/src/commands/auto-direct/auto-status-display.js +35 -35
  18. package/src/commands/auto-direct/auto-utils.js +50 -50
  19. package/src/commands/auto-direct/cline-installer.js +56 -0
  20. package/src/commands/auto-direct/code-processor.js +27 -27
  21. package/src/commands/auto-direct/file-scanner.js +19 -19
  22. package/src/commands/auto-direct/ide-completion-waiter.js +485 -0
  23. package/src/commands/auto-direct/ide-fallback-runner.js +226 -0
  24. package/src/commands/auto-direct/ide-provider-runner.js +103 -0
  25. package/src/commands/auto-direct/iteration-handlers.js +189 -0
  26. package/src/commands/auto-direct/iteration-runner.js +485 -0
  27. package/src/commands/auto-direct/provider-config.js +38 -7
  28. package/src/commands/auto-direct/provider-manager.js +132 -6
  29. package/src/commands/auto-direct/requirement-manager.js +169 -104
  30. package/src/commands/auto-direct/requirement-mover.js +350 -0
  31. package/src/commands/auto-direct/spec-handlers.js +155 -0
  32. package/src/commands/auto-direct/spec-ide-runner.js +318 -0
  33. package/src/commands/auto-direct/spec-processing.js +203 -0
  34. package/src/commands/auto-direct/status-display.js +9 -9
  35. package/src/commands/auto-direct/utils.js +83 -1
  36. package/src/commands/auto-direct-refactored.js +1 -413
  37. package/src/commands/auto-direct.js +127 -4119
  38. package/src/commands/auto-execution.js +21 -21
  39. package/src/commands/auto-status-helpers.js +0 -2
  40. package/src/commands/auto.js +22 -22
  41. package/src/commands/check-compliance.js +65 -65
  42. package/src/commands/computers.js +39 -39
  43. package/src/commands/continuous-scan.js +19 -19
  44. package/src/commands/ide.js +4 -4
  45. package/src/commands/locale.js +7 -7
  46. package/src/commands/refactor-file.js +59 -59
  47. package/src/commands/requirements/commands.js +17 -17
  48. package/src/commands/requirements/default-handlers.js +30 -30
  49. package/src/commands/requirements/disable.js +3 -3
  50. package/src/commands/requirements/enable.js +3 -3
  51. package/src/commands/requirements/utils.js +6 -6
  52. package/src/commands/requirements-refactored.js +3 -3
  53. package/src/commands/requirements-remote.js +38 -38
  54. package/src/commands/requirements.js +3 -3
  55. package/src/commands/settings.js +111 -0
  56. package/src/commands/specs/count.js +60 -0
  57. package/src/commands/specs/disable.js +3 -3
  58. package/src/commands/specs/enable.js +3 -3
  59. package/src/commands/status.js +10 -10
  60. package/src/commands/sync.js +25 -25
  61. package/src/commands/timeout.js +35 -35
  62. package/src/trui/TruiInterface.js +2 -2
  63. package/src/trui/agents/AgentInterface.js +4 -4
  64. package/src/trui/agents/handlers/CommandHandler.js +4 -4
  65. package/src/trui/agents/handlers/ContextManager.js +1 -1
  66. package/src/trui/agents/handlers/DisplayHandler.js +11 -11
  67. package/src/trui/agents/handlers/HelpHandler.js +1 -1
  68. package/src/utils/agent-selector.js +6 -6
  69. package/src/utils/antigravity-installer.js +4 -4
  70. package/src/utils/asset-cleanup.js +1 -1
  71. package/src/utils/auth.js +9 -12
  72. package/src/utils/clarification-actions.js +4 -4
  73. package/src/utils/cline-js-handler.js +5 -5
  74. package/src/utils/compliance-check.js +6 -6
  75. package/src/utils/config.js +12 -12
  76. package/src/utils/display-formatters-complete.js +2 -2
  77. package/src/utils/display-formatters-extracted.js +2 -2
  78. package/src/utils/display-formatters.js +2 -2
  79. package/src/utils/feedback-handler.js +2 -2
  80. package/src/utils/first-run.js +7 -7
  81. package/src/utils/ide-detection.js +1 -1
  82. package/src/utils/ide-handlers.js +6 -6
  83. package/src/utils/interactive/clarification-actions.js +3 -3
  84. package/src/utils/interactive/core-ui.js +7 -7
  85. package/src/utils/interactive/file-backup.js +6 -6
  86. package/src/utils/interactive/file-import-export.js +49 -49
  87. package/src/utils/interactive/file-operations.js +3 -3
  88. package/src/utils/interactive/file-validation.js +41 -41
  89. package/src/utils/interactive/interactive-prompts.js +41 -41
  90. package/src/utils/interactive/requirement-actions.js +5 -5
  91. package/src/utils/interactive/requirement-crud.js +4 -4
  92. package/src/utils/interactive/requirements-navigation.js +10 -10
  93. package/src/utils/interactive-broken.js +6 -6
  94. package/src/utils/interactive.js +37 -37
  95. package/src/utils/keyboard-handler.js +4 -4
  96. package/src/utils/prompt-helper.js +6 -6
  97. package/src/utils/provider-checker/agent-checker.js +1 -1
  98. package/src/utils/provider-checker/agent-runner.js +203 -314
  99. package/src/utils/provider-checker/agents-file-lock.js +134 -0
  100. package/src/utils/provider-checker/agents-manager.js +224 -36
  101. package/src/utils/provider-checker/cli-installer.js +28 -28
  102. package/src/utils/provider-checker/cli-utils.js +2 -2
  103. package/src/utils/provider-checker/cursor-approval-clicker.js +108 -0
  104. package/src/utils/provider-checker/format-utils.js +4 -4
  105. package/src/utils/provider-checker/ide-installer-helper.js +96 -0
  106. package/src/utils/provider-checker/ide-manager.js +19 -8
  107. package/src/utils/provider-checker/ide-quota-checker.js +120 -0
  108. package/src/utils/provider-checker/ide-utils.js +2 -2
  109. package/src/utils/provider-checker/node-detector.js +4 -4
  110. package/src/utils/provider-checker/node-utils.js +5 -5
  111. package/src/utils/provider-checker/opencode-checker.js +107 -73
  112. package/src/utils/provider-checker/process-utils.js +1 -1
  113. package/src/utils/provider-checker/provider-validator.js +11 -11
  114. package/src/utils/provider-checker/quota-checker.js +5 -5
  115. package/src/utils/provider-checker/quota-detector.js +5 -5
  116. package/src/utils/provider-checker/requirements-manager.js +6 -6
  117. package/src/utils/provider-checker/test-requirements.js +1 -1
  118. package/src/utils/provider-checker/vscode-approval-clicker.js +328 -0
  119. package/src/utils/provider-checker-new.js +6 -6
  120. package/src/utils/provider-checker.js +6 -6
  121. package/src/utils/provider-checkers/ide-manager.js +13 -13
  122. package/src/utils/provider-checkers/node-executable-finder.js +4 -4
  123. package/src/utils/provider-checkers/provider-checker-core.js +5 -5
  124. package/src/utils/provider-checkers/provider-checker-main.js +17 -17
  125. package/src/utils/provider-registry.js +5 -6
  126. package/src/utils/provider-utils.js +12 -12
  127. package/src/utils/quota-detectors.js +32 -32
  128. package/src/utils/requirement-action-handlers.js +12 -12
  129. package/src/utils/requirement-actions/requirement-operations.js +3 -3
  130. package/src/utils/requirement-actions.js +1 -1
  131. package/src/utils/requirement-file-operations.js +5 -5
  132. package/src/utils/requirement-helpers.js +1 -1
  133. package/src/utils/requirement-management.js +5 -5
  134. package/src/utils/requirement-navigation.js +2 -2
  135. package/src/utils/requirement-organization.js +3 -3
  136. package/src/utils/rui-trui-adapter.js +14 -14
  137. package/src/utils/simple-trui.js +3 -3
  138. package/src/utils/status-helpers-extracted.js +3 -3
  139. package/src/utils/trui-clarifications.js +11 -11
  140. package/src/utils/trui-debug.js +3 -2
  141. package/src/utils/trui-devin.js +217 -0
  142. package/src/utils/trui-feedback.js +7 -7
  143. package/src/utils/trui-kiro-integration.js +34 -34
  144. package/src/utils/trui-main-handlers.js +20 -21
  145. package/src/utils/trui-main-menu.js +19 -19
  146. package/src/utils/trui-nav-agents.js +59 -8
  147. package/src/utils/trui-nav-requirements.js +3 -3
  148. package/src/utils/trui-nav-settings.js +10 -10
  149. package/src/utils/trui-nav-specifications.js +1 -1
  150. package/src/utils/trui-navigation-backup.js +11 -11
  151. package/src/utils/trui-navigation.js +9 -9
  152. package/src/utils/trui-provider-health.js +25 -25
  153. package/src/utils/trui-provider-manager.js +28 -28
  154. package/src/utils/trui-quick-menu.js +2 -2
  155. package/src/utils/trui-req-actions-backup.js +21 -21
  156. package/src/utils/trui-req-actions.js +20 -20
  157. package/src/utils/trui-req-editor.js +10 -10
  158. package/src/utils/trui-req-file-ops.js +3 -3
  159. package/src/utils/trui-req-tree.js +7 -7
  160. package/src/utils/trui-windsurf.js +103 -103
  161. package/src/utils/user-tracking.js +15 -15
  162. package/src/utils/trui-req-tree-old.js +0 -719
@@ -12,16 +12,16 @@ const chalk = require('chalk');
12
12
  async function checkAuthentication(dependencies, skipAuthCheck = false) {
13
13
  const { t, errorReporter } = dependencies;
14
14
  const auth = require('../../src/utils/auth');
15
-
15
+
16
16
  if (!skipAuthCheck) {
17
17
  const isAuth = await auth.isAuthenticated();
18
-
18
+
19
19
  if (!isAuth) {
20
20
  console.log(chalk.cyan(`\n🔐 ${t('cli.auth.opening.browser')}\n`));
21
21
  try {
22
22
  await auth.login();
23
23
  console.log(chalk.green(`\n✓ ${t('cli.auth.success')}\n`));
24
-
24
+
25
25
  // Initialize error reporter with auth token
26
26
  const token = await auth.getAuthToken();
27
27
  if (token) {
@@ -48,11 +48,11 @@ async function checkAuthentication(dependencies, skipAuthCheck = false) {
48
48
  */
49
49
  async function checkCompliance(dependencies, skipComplianceCheck = false) {
50
50
  const { t } = dependencies;
51
-
51
+
52
52
  if (!skipComplianceCheck) {
53
53
  const { checkCompliance } = require('../../src/utils/compliance-check');
54
54
  const isCompliant = await checkCompliance();
55
-
55
+
56
56
  if (!isCompliant) {
57
57
  console.log(chalk.red(`\n✗ ${t('cli.compliance.failed')}\n`));
58
58
  process.exit(1);
@@ -110,10 +110,10 @@ async function setupCommandAuth(dependencies, command, args) {
110
110
  'trui', 'help', '--help', '-h', 'version', '--version', '-v'
111
111
  ];
112
112
  const skipAuthCheck = authCommands.includes(command) || localCommands.includes(command);
113
-
113
+
114
114
  await checkAuthentication(dependencies, skipAuthCheck);
115
115
  await checkCompliance(dependencies, skipAuthCheck);
116
-
116
+
117
117
  if (!skipAuthCheck) {
118
118
  await trackActivity('command_executed', {
119
119
  command,
@@ -16,7 +16,7 @@ function createAgentCommands() {
16
16
  async executeCommand(verb, resource, options = {}) {
17
17
  const definitions = getProviderDefinitions();
18
18
  const prefs = await getProviderPreferences();
19
-
19
+
20
20
  switch (verb) {
21
21
  case 'LIST':
22
22
  return await this.handleListAgents(options);
@@ -30,11 +30,11 @@ function createAgentCommands() {
30
30
  throw new Error(`Unknown command: ${verb} ${resource}`);
31
31
  }
32
32
  },
33
-
33
+
34
34
  async handleListAgents(options = {}) {
35
35
  const definitions = getProviderDefinitions();
36
36
  const prefs = await getProviderPreferences();
37
-
37
+
38
38
  const agents = definitions.map(def => ({
39
39
  id: def.id,
40
40
  name: def.name,
@@ -43,19 +43,19 @@ function createAgentCommands() {
43
43
  status: 'Not installed',
44
44
  lastChecked: 'Never'
45
45
  }));
46
-
46
+
47
47
  return { success: true, agents };
48
48
  },
49
-
49
+
50
50
  async handleGetAgent(agentId, options = {}) {
51
51
  const definitions = getProviderDefinitions();
52
52
  const prefs = await getProviderPreferences();
53
53
  const agent = definitions.find(d => d.id === agentId);
54
-
54
+
55
55
  if (!agent) {
56
56
  return { success: false, error: `Agent '${agentId}' not found` };
57
57
  }
58
-
58
+
59
59
  return {
60
60
  success: true,
61
61
  agent: {
@@ -64,32 +64,32 @@ function createAgentCommands() {
64
64
  }
65
65
  };
66
66
  },
67
-
67
+
68
68
  async handleEnableAgent(agentId) {
69
69
  const definitions = getProviderDefinitions();
70
70
  const prefs = await getProviderPreferences();
71
-
71
+
72
72
  if (!definitions.find(d => d.id === agentId)) {
73
73
  return { success: false, error: `Agent '${agentId}' not found` };
74
74
  }
75
-
75
+
76
76
  const newEnabled = { ...prefs.enabled, [agentId]: true };
77
77
  await saveProviderPreferences(prefs.order, newEnabled);
78
-
78
+
79
79
  return { success: true, message: `Agent '${agentId}' enabled` };
80
80
  },
81
-
81
+
82
82
  async handleDisableAgent(agentId) {
83
83
  const definitions = getProviderDefinitions();
84
84
  const prefs = await getProviderPreferences();
85
-
85
+
86
86
  if (!definitions.find(d => d.id === agentId)) {
87
87
  return { success: false, error: `Agent '${agentId}' not found` };
88
88
  }
89
-
89
+
90
90
  const newEnabled = { ...prefs.enabled, [agentId]: false };
91
91
  await saveProviderPreferences(prefs.order, newEnabled);
92
-
92
+
93
93
  return { success: true, message: `Agent '${agentId}' disabled` };
94
94
  }
95
95
  };
@@ -14,9 +14,9 @@ function setupAutoCommands(autoCommands) {
14
14
  program
15
15
  .command('auto:start')
16
16
  .description(t('cli.auto.start'))
17
- .option('-i, --ide <ide>', 'IDE to use (claude-code, aider, cursor, vscode, windsurf, cline)')
18
- .option('--ide-model <model>', 'IDE agent/model to use (for IDE sub-agents like Windsurf/Antigravity)')
19
- .option('--extension <extension>', 'VS Code extension to use (amazon-q, github-copilot, windsurf)')
17
+ .option('-i, --ide <ide>', 'IDE to use (claude-code, aider, cursor, vscode, devin, cline)')
18
+ .option('--ide-model <model>', 'IDE agent/model to use (for IDE sub-agents like Devin/Antigravity)')
19
+ .option('--extension <extension>', 'VS Code extension to use (amazon-q, github-copilot, devin)')
20
20
  .option('-m, --max-chats <number>', 'Maximum number of iterations', parseInt)
21
21
  .option('-p, --provider <provider>', 'AI provider to use (claude, openai, groq, anthropic)')
22
22
  .option('-n, --never-stop', 'Run indefinitely without stopping')
@@ -120,7 +120,7 @@ function setupCommandAliases() {
120
120
  const EnableSpecCommand = require('../../src/commands/specs/enable');
121
121
  const enableCommand = new EnableSpecCommand();
122
122
  const result = await enableCommand.execute([specId]);
123
-
123
+
124
124
  if (result.success) {
125
125
  console.log(`✅ ${result.message}`);
126
126
  } else {
@@ -137,7 +137,7 @@ function setupCommandAliases() {
137
137
  const DisableSpecCommand = require('../../src/commands/specs/disable');
138
138
  const disableCommand = new DisableSpecCommand();
139
139
  const result = await disableCommand.execute([specId]);
140
-
140
+
141
141
  if (result.success) {
142
142
  console.log(`✅ ${result.message}`);
143
143
  } else {
@@ -146,6 +146,15 @@ function setupCommandAliases() {
146
146
  }
147
147
  });
148
148
 
149
+ // Spec count alias
150
+ program
151
+ .command('sc')
152
+ .description('Alias for "spec:count"')
153
+ .action(async () => {
154
+ const countCommand = require('../../src/commands/specs/count');
155
+ await countCommand();
156
+ });
157
+
149
158
  // Requirement enable alias
150
159
  program
151
160
  .command('re <requirement-text...>')
@@ -154,7 +163,7 @@ function setupCommandAliases() {
154
163
  const EnableRequirementCommand = require('../../src/commands/requirements/enable');
155
164
  const enableCommand = new EnableRequirementCommand();
156
165
  const result = await enableCommand.execute(requirementText);
157
-
166
+
158
167
  if (result.success) {
159
168
  console.log(`✅ ${result.message}`);
160
169
  } else {
@@ -171,7 +180,7 @@ function setupCommandAliases() {
171
180
  const DisableRequirementCommand = require('../../src/commands/requirements/disable');
172
181
  const disableCommand = new DisableRequirementCommand();
173
182
  const result = await disableCommand.execute(requirementText);
174
-
183
+
175
184
  if (result.success) {
176
185
  console.log(`✅ ${result.message}`);
177
186
  } else {
@@ -63,9 +63,9 @@ function setupBasicCommands(dependencies) {
63
63
  program
64
64
  .command('auto:start')
65
65
  .description(t('cli.auto.start'))
66
- .option('-i, --ide <ide>', 'IDE to use (claude-code, aider, cursor, vscode, windsurf, cline)')
67
- .option('--ide-model <model>', 'IDE agent/model to use (for IDE sub-agents like Windsurf/Antigravity)')
68
- .option('--extension <extension>', 'VS Code extension to use (amazon-q, github-copilot, windsurf)')
66
+ .option('-i, --ide <ide>', 'IDE to use (claude-code, aider, cursor, vscode, devin, cline)')
67
+ .option('--ide-model <model>', 'IDE agent/model to use (for IDE sub-agents like Devin/Antigravity)')
68
+ .option('--extension <extension>', 'VS Code extension to use (amazon-q, github-copilot, devin)')
69
69
  .option('-m, --max-chats <number>', 'Maximum number of chat iterations', parseInt)
70
70
  .option('-n, --never-stop', 'Run indefinitely without stopping')
71
71
  .option('-f, --force-provider-setup', 'Force provider selection even if already configured')
@@ -214,7 +214,7 @@ function setupFeatureAndIdeCommands(dependencies) {
214
214
  program
215
215
  .command('ide:send <message>')
216
216
  .description(t('cli.ide.send'))
217
- .option('-i, --ide <ide>', 'IDE to use (cursor, vscode, windsurf)', 'cursor')
217
+ .option('-i, --ide <ide>', 'IDE to use (cursor, vscode, devin)', 'cursor')
218
218
  .action(ideCommands.send);
219
219
 
220
220
  program
@@ -222,6 +222,16 @@ function setupFeatureAndIdeCommands(dependencies) {
222
222
  .description('Test health and connectivity of all configured IDEs')
223
223
  .option('-v, --verbose', 'Show detailed health metrics', false)
224
224
  .action(ideCommands.health);
225
+
226
+ // Spec count command (T124)
227
+ program
228
+ .command('spec:count')
229
+ .alias('spec-count')
230
+ .description('Show current TODO spec count and auto-creation status')
231
+ .action(async () => {
232
+ const countCommand = require('../../src/commands/specs/count');
233
+ await countCommand();
234
+ });
225
235
  }
226
236
 
227
237
  /**
@@ -305,7 +315,7 @@ function setupComputerCommands(dependencies) {
305
315
  // Multi-computer management commands
306
316
  const computerCommands = require('../../src/commands/computers');
307
317
  const remoteReqCommands = require('../../src/commands/requirements-remote');
308
-
318
+
309
319
  program
310
320
  .command('computers')
311
321
  .description(t('cli.computers.list'))
@@ -21,13 +21,13 @@ async function checkForUpdates(dependencies, options = {}) {
21
21
  if (process.env.VCM_SKIP_UPDATE_CHECK === '1' || process.env.VCM_SKIP_UPDATE_CHECK === 'true') {
22
22
  return;
23
23
  }
24
-
24
+
25
25
  // If running inside the repository (local development), skip update checks entirely
26
26
  const isDevWorkspace = fs.existsSync(path.join(rootDir, '.git'));
27
27
  if (isDevWorkspace) {
28
28
  return;
29
29
  }
30
-
30
+
31
31
  // Additional check: if we're in a workspace with package.json containing vibecodingmachine
32
32
  const packageJsonPath = path.join(rootDir, 'package.json');
33
33
  if (fs.existsSync(packageJsonPath)) {
@@ -40,9 +40,9 @@ async function checkForUpdates(dependencies, options = {}) {
40
40
  // Ignore JSON parse errors
41
41
  }
42
42
  }
43
-
43
+
44
44
  console.log(chalk.gray(`\n🔍 Checking for updates... (current: v${packageJson.version})`));
45
-
45
+
46
46
  // Check npm registry for CLI updates (not S3 manifest which is for Electron)
47
47
  const { checkForUpdates: checkNpmUpdates } = require('vibecodingmachine-core');
48
48
  const updateInfo = await checkNpmUpdates('vibecodingmachine-cli', packageJson.version);
@@ -100,7 +100,7 @@ async function performUpdate(updateInfo, rootDir) {
100
100
  // Do not attempt global install during development to avoid confusing local dev flow
101
101
  return;
102
102
  }
103
-
103
+
104
104
  const spinner = ora('Installing update from npm...').start();
105
105
  try {
106
106
  // Use npm directly to install the latest version from registry
@@ -57,12 +57,12 @@ if (!process.argv.slice(2).length) {
57
57
  // Check for updates before parsing commands
58
58
  (async () => {
59
59
  await checkForUpdates({ packageJson, promptWithDefaultsOnce });
60
-
60
+
61
61
  // Setup authentication and compliance for command execution
62
62
  const command = process.argv[2] || 'unknown';
63
63
  const args = process.argv.slice(3);
64
64
  await setupCommandAuth({ t, errorReporter }, command, args);
65
-
65
+
66
66
  // Parse arguments only if commands were provided
67
67
  program.parse(process.argv);
68
68
  })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibecodingmachine-cli",
3
- "version": "2026.03.14-1528",
3
+ "version": "2026.06.17-1835",
4
4
  "description": "Command-line interface for Vibe Coding Machine - Autonomous development",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -60,7 +60,7 @@
60
60
  "react": "^19.2.0",
61
61
  "screenshot-desktop": "^1.15.3",
62
62
  "table": "^6.8.1",
63
- "vibecodingmachine-core": "^2026.03.14-1528"
63
+ "vibecodingmachine-core": "^2026.06.17-1835"
64
64
  },
65
65
  "devDependencies": {
66
66
  "eslint": "^8.57.0",
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * CLI Command: Add Agent
3
- *
3
+ *
4
4
  * Implements "app add agent" command for CLI interface.
5
5
  * Follows constitutional requirements: <555 lines, test-first approach.
6
6
  */
@@ -26,7 +26,7 @@ class AddAgentCommand {
26
26
  fileManager: new FileManager()
27
27
  });
28
28
  this.fileManager = options.fileManager || new FileManager();
29
-
29
+
30
30
  // Initialize addition service
31
31
  this.additionService = new AgentAdditionService({
32
32
  configManager: this.configManager,
@@ -73,7 +73,7 @@ class AddAgentCommand {
73
73
  // Check required fields
74
74
  const requiredFields = ['id', 'name', 'description', 'installationMethods'];
75
75
  const missingFields = requiredFields.filter(field => !agentConfig[field]);
76
-
76
+
77
77
  if (missingFields.length > 0) {
78
78
  const error = `Missing required fields: ${missingFields.join(', ')}`;
79
79
  this.logger.error(error);
@@ -208,8 +208,8 @@ class AddAgentCommand {
208
208
 
209
209
  return this.formatResponse({
210
210
  ...result,
211
- message: result.available ?
212
- `Agent ID '${agentId}' is available` :
211
+ message: result.available ?
212
+ `Agent ID '${agentId}' is available` :
213
213
  `Agent ID '${agentId}' is already in use`
214
214
  }, options.format);
215
215
 
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * CLI Command: Check Agents
3
- *
3
+ *
4
4
  * Implements "app check agents" command for CLI interface.
5
5
  * Follows constitutional requirements: <555 lines, test-first approach.
6
6
  */
@@ -26,7 +26,7 @@ class CheckAgentsCommand {
26
26
  fileManager: new FileManager()
27
27
  });
28
28
  this.fileManager = options.fileManager || new FileManager();
29
-
29
+
30
30
  // Initialize check service
31
31
  this.checkService = AgentCheckService.createDefault({
32
32
  configManager: this.configManager,
@@ -55,10 +55,10 @@ class CheckAgentsCommand {
55
55
  * @returns {Promise<Object>} - Command result
56
56
  */
57
57
  async execute(args = [], options = {}) {
58
- const {
59
- agentIds = null,
60
- force = false,
61
- skipVerification = false,
58
+ const {
59
+ agentIds = null,
60
+ force = false,
61
+ skipVerification = false,
62
62
  timeout = 600000,
63
63
  parallel = true,
64
64
  maxConcurrency = 2,
@@ -70,7 +70,7 @@ class CheckAgentsCommand {
70
70
  try {
71
71
  // Load configuration
72
72
  await this.configManager.load();
73
-
73
+
74
74
  if (verbose) {
75
75
  console.log('Starting agent check operation');
76
76
  console.log('Options:', { agentIds, force, skipVerification, timeout, parallel, maxConcurrency });
@@ -107,14 +107,14 @@ class CheckAgentsCommand {
107
107
  };
108
108
  } catch (error) {
109
109
  const errorMessage = `Agent check failed: ${error.message}`;
110
-
110
+
111
111
  if (verbose) {
112
112
  console.error(errorMessage);
113
113
  console.error(error.stack);
114
114
  } else {
115
115
  console.error(errorMessage);
116
116
  }
117
-
117
+
118
118
  return {
119
119
  success: false,
120
120
  error: error.message,
@@ -144,33 +144,33 @@ class CheckAgentsCommand {
144
144
  // Parse command line arguments
145
145
  for (let i = 0; i < args.length; i++) {
146
146
  const arg = args[i];
147
-
147
+
148
148
  switch (arg) {
149
149
  case '--force':
150
150
  case '-f':
151
151
  parsed.force = true;
152
152
  break;
153
-
153
+
154
154
  case '--skip-verification':
155
155
  case '-s':
156
156
  parsed.skipVerification = true;
157
157
  break;
158
-
158
+
159
159
  case '--sequential':
160
160
  parsed.parallel = false;
161
161
  parsed.maxConcurrency = 1;
162
162
  break;
163
-
163
+
164
164
  case '--verbose':
165
165
  case '-v':
166
166
  parsed.verbose = true;
167
167
  break;
168
-
168
+
169
169
  case '--json':
170
170
  case '-j':
171
171
  parsed.json = true;
172
172
  break;
173
-
173
+
174
174
  case '--timeout':
175
175
  if (i + 1 < args.length) {
176
176
  const timeout = parseInt(args[i + 1]);
@@ -180,7 +180,7 @@ class CheckAgentsCommand {
180
180
  }
181
181
  }
182
182
  break;
183
-
183
+
184
184
  case '--max-concurrency':
185
185
  if (i + 1 < args.length) {
186
186
  const concurrency = parseInt(args[i + 1]);
@@ -190,7 +190,7 @@ class CheckAgentsCommand {
190
190
  }
191
191
  }
192
192
  break;
193
-
193
+
194
194
  case '--agents':
195
195
  if (i + 1 < args.length) {
196
196
  const agentList = args[i + 1].split(',').map(id => id.trim());
@@ -198,7 +198,7 @@ class CheckAgentsCommand {
198
198
  i++; // Skip the next argument (agent list)
199
199
  }
200
200
  break;
201
-
201
+
202
202
  default:
203
203
  // Handle positional arguments (agent IDs)
204
204
  if (!arg.startsWith('-')) {
@@ -221,7 +221,7 @@ class CheckAgentsCommand {
221
221
  */
222
222
  outputResults(formattedResponse, verbose = false) {
223
223
  const data = formattedResponse.data || formattedResponse;
224
-
224
+
225
225
  if (verbose) {
226
226
  console.log('\n=== DETAILED RESULTS ===');
227
227
  if (data.summary) {
@@ -1,15 +1,15 @@
1
1
  /**
2
2
  * CLI Command: List Agents
3
- *
3
+ *
4
4
  * Implements "app list agents" command for CLI interface.
5
5
  * Follows constitutional requirements: <555 lines, test-first approach.
6
6
  */
7
7
 
8
- const {
9
- getProviderDefinitions,
8
+ const {
9
+ getProviderDefinitions,
10
10
  getProviderDisplayName,
11
11
  getDefaultProviderOrder,
12
- mergeProviderPreferences
12
+ mergeProviderPreferences
13
13
  } = require('../../utils/provider-registry');
14
14
  const { getAutoConfig } = require('../../../utils/config');
15
15
  const { checkAllProviders } = require('../../utils/provider-checker');
@@ -34,8 +34,8 @@ class ListAgentsCommand {
34
34
  * @returns {Promise<Object>} - Command result
35
35
  */
36
36
  async execute(args = [], options = {}) {
37
- const {
38
- includeDisabled = false,
37
+ const {
38
+ includeDisabled = false,
39
39
  includeStatus = true,
40
40
  format = 'table',
41
41
  sortBy = 'name',
@@ -69,15 +69,15 @@ class ListAgentsCommand {
69
69
  if (includeStatus) {
70
70
  const { getProviderCache } = require('../../utils/provider-registry');
71
71
  const savedCache = await getProviderCache();
72
-
72
+
73
73
  agents = agents.map(agent => ({
74
74
  ...agent,
75
75
  installed: savedCache[agent.id]?.installed || false,
76
- status: savedCache[agent.id]?.installed ?
77
- (agent.enabled ? 'ENABLED' : 'DISABLED') :
76
+ status: savedCache[agent.id]?.installed ?
77
+ (agent.enabled ? 'ENABLED' : 'DISABLED') :
78
78
  'NOT_INSTALLED',
79
- statusDescription: savedCache[agent.id]?.installed ?
80
- (agent.enabled ? 'Enabled' : 'Disabled') :
79
+ statusDescription: savedCache[agent.id]?.installed ?
80
+ (agent.enabled ? 'Enabled' : 'Disabled') :
81
81
  'Not installed'
82
82
  }));
83
83
  }
@@ -102,7 +102,7 @@ class ListAgentsCommand {
102
102
  } catch (error) {
103
103
  const errorMessage = `List agents failed: ${error.message}`;
104
104
  console.error(errorMessage);
105
-
105
+
106
106
  return {
107
107
  success: false,
108
108
  error: error.message,
@@ -129,17 +129,17 @@ class ListAgentsCommand {
129
129
  // Parse command line arguments
130
130
  for (let i = 0; i < args.length; i++) {
131
131
  const arg = args[i];
132
-
132
+
133
133
  switch (arg) {
134
134
  case '--all':
135
135
  case '-a':
136
136
  parsed.includeDisabled = true;
137
137
  break;
138
-
138
+
139
139
  case '--no-status':
140
140
  parsed.includeStatus = false;
141
141
  break;
142
-
142
+
143
143
  case '--format':
144
144
  if (i + 1 < args.length) {
145
145
  const format = args[i + 1];
@@ -149,7 +149,7 @@ class ListAgentsCommand {
149
149
  }
150
150
  }
151
151
  break;
152
-
152
+
153
153
  case '--sort':
154
154
  if (i + 1 < args.length) {
155
155
  const sortBy = args[i + 1];
@@ -159,7 +159,7 @@ class ListAgentsCommand {
159
159
  }
160
160
  }
161
161
  break;
162
-
162
+
163
163
  case '--status':
164
164
  if (i + 1 < args.length) {
165
165
  const status = args[i + 1];
@@ -169,7 +169,7 @@ class ListAgentsCommand {
169
169
  }
170
170
  }
171
171
  break;
172
-
172
+
173
173
  default:
174
174
  // Handle positional arguments (agent IDs)
175
175
  if (!arg.startsWith('-')) {
@@ -223,7 +223,7 @@ class ListAgentsCommand {
223
223
  });
224
224
  }
225
225
 
226
-
226
+
227
227
  /**
228
228
  * Output results in specified format
229
229
  * @param {Array} agents - Agents to output
@@ -273,7 +273,7 @@ class ListAgentsCommand {
273
273
  * @param {boolean} includeStatus - Include status information
274
274
  */
275
275
  outputCsv(agents, includeStatus) {
276
- const headers = includeStatus
276
+ const headers = includeStatus
277
277
  ? ['ID', 'Name', 'Description', 'Enabled', 'Type', 'Status', 'Last Checked', 'Can Install', 'Can Verify']
278
278
  : ['ID', 'Name', 'Description', 'Enabled', 'Type'];
279
279
 
@@ -317,7 +317,7 @@ class ListAgentsCommand {
317
317
  console.log('\n=== AGENTS ===');
318
318
  console.log('ID'.padEnd(12) + ' ' + 'NAME'.padEnd(20) + ' ' + 'ENABLED'.padEnd(8) + ' ' + 'TYPE'.padEnd(12) + ' ' + 'STATUS'.padEnd(12) + ' ' + 'LAST CHECKED');
319
319
  console.log('-'.repeat(80));
320
-
320
+
321
321
  for (const agent of agents) {
322
322
  const id = agent.id.padEnd(12);
323
323
  const name = agent.name.padEnd(20);
@@ -325,20 +325,20 @@ class ListAgentsCommand {
325
325
  const type = (agent.type || '').padEnd(12);
326
326
  const status = agent.statusDescription.padEnd(12);
327
327
  const lastChecked = (agent.lastChecked || 'Never').padEnd(12);
328
-
328
+
329
329
  console.log(`${id} ${name} ${enabled} ${type} ${status} ${lastChecked}`);
330
330
  }
331
331
  } else {
332
332
  console.log('\n=== AGENTS ===');
333
333
  console.log('ID'.padEnd(12) + ' ' + 'NAME'.padEnd(20) + ' ' + 'ENABLED'.padEnd(8) + ' ' + 'TYPE'.padEnd(12));
334
334
  console.log('-'.repeat(54));
335
-
335
+
336
336
  for (const agent of agents) {
337
337
  const id = agent.id.padEnd(12);
338
338
  const name = agent.name.padEnd(20);
339
339
  const enabled = agent.enabled ? 'Yes'.padEnd(8) : 'No'.padEnd(8);
340
340
  const type = (agent.type || '').padEnd(12);
341
-
341
+
342
342
  console.log(`${id} ${name} ${enabled} ${type}`);
343
343
  }
344
344
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * CLI Command: Remove Agent
3
- *
3
+ *
4
4
  * Implements "app remove agent" command for CLI interface.
5
5
  * Follows constitutional requirements: <555 lines, test-first approach.
6
6
  */
@@ -26,7 +26,7 @@ class RemoveAgentCommand {
26
26
  fileManager: new FileManager()
27
27
  });
28
28
  this.fileManager = options.fileManager || new FileManager();
29
-
29
+
30
30
  // Initialize addition service (handles both add and remove)
31
31
  this.additionService = new AgentAdditionService({
32
32
  configManager: this.configManager,
@@ -203,7 +203,7 @@ class RemoveAgentCommand {
203
203
  this.logger.info('Listing removable agents');
204
204
 
205
205
  const agentsResult = await this.additionService.getAgents();
206
-
206
+
207
207
  if (!agentsResult.success) {
208
208
  return this.formatResponse({
209
209
  success: false,
@@ -249,7 +249,7 @@ class RemoveAgentCommand {
249
249
 
250
250
  // Get agent details
251
251
  const agentResult = await this.additionService.getAgent(agentId);
252
-
252
+
253
253
  if (!agentResult.success) {
254
254
  return this.formatResponse({
255
255
  success: false,